t_bunny_response key(t_bunny_event_state state, t_bunny_keysym keysym, void *my_data)
{
t_tekgui *tekgui;
tekgui = my_data;
(void) tekgui;
if (keysym == BKS_ESCAPE && state == GO_DOWN)
return (EXIT_ON_SUCCESS);
return (GO_ON);
}
t_bunny_response fonction_loop(void *my_data)
{
t_tekgui *tekgui;
tekgui = my_data;
tekgui_display(tekgui->pix, tekgui);
aff_window(tekgui);
return (GO_ON);
}
int main()
{
t_tekgui *tekgui;
tekgui = tekgui_load("exemple.ini");
if (tekgui == NULL)
return (-1);
bunny_set_key_response(key);
bunny_set_loop_main_function(&fonction_loop);
bunny_loop(tekgui->win, 60, tekgui);
tekgui_stop(tekgui);
return (0);
}
Created
March 1, 2016 09:47
-
-
Save d0ugal/6e0acfea12a94d07e443 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment