GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
Application events. More...
#include <widgets/gp_widget_event.h>
Go to the source code of this file.
Macros | |
#define | GP_APP_EVENT_DEFAULT_MASK (1<<GP_WIDGET_EVENT_FREE) |
Default app event mask. | |
Functions | |
void | gp_app_on_event_set (int(*on_event)(gp_widget_event *ev)) |
Sets an application event hanlder. | |
void | gp_app_event_mask (enum gp_widget_event_type ev_type) |
Masks out an app event. | |
void | gp_app_event_unmask (enum gp_widget_event_type ev_type) |
Unmasks an app event. | |
static int | gp_app_send_event (enum gp_widget_event_type ev_type,...) |
Sends an event to the application. | |
Application events.
Definition in file gp_app_event.h.
void gp_app_event_mask | ( | enum gp_widget_event_type | ev_type | ) |
Masks out an app event.
ev_type | An event type to mask out. |
void gp_app_event_unmask | ( | enum gp_widget_event_type | ev_type | ) |
Unmasks an app event.
ev_type | An event type to unmask. |
void gp_app_on_event_set | ( | int(*)(gp_widget_event *ev) | on_event | ) |
Sets an application event hanlder.
The application event handler works the same as a gp_widget::on_event() handler.
Currently application can receive these events:
GP_WIDGET_EVENT_FREE
This event is send when gp_widgets_exit() is called to exit the gp_widgets_main_loop().
GP_WIDGET_EVENT_INPUT
Routes any input events unused by the widget layout to the application handler.
GP_WIDGET_EVENT_COLOR_SCHEME
See gp_widgets_color_scheme and gp_widgets_color_scheme_set() for details.
on_event | An pointer to application event handler or NULL to disable events. |
|
inlinestatic |
Sends an event to the application.
This is called by the widget library when app event should be send.
ev_type | An widget event. |
... | Optional pointer or long integer. |
Definition at line 108 of file gp_app_event.h.
References gp_widget_event::type.