widget handlers react on events; used by widget implementation

struct mbtk_handler_s { const char *name; /* cookie; a handler implementation will always use the same pointer for name so it can be checked with ==; also useful for debugging */ mbtk_event_handled_t (*event)(mbtk_widget_t *widget, mbtk_event_t *ev); /* called when an event is received for a widget (or child of that widget) that has the handler associated; if event is not handled it is propagated up in the widget hierarchy */ void (*widget_remove)(mbtk_widget_t *widget); /* called when one of the widgets of the handler is destroyed or for other reason the widget should be removed from the handler */ void (*handler_destroy)(mbtk_handler_t *hand); /* called when the parent window of the handler is destroyed */ gdl_elem_t link; /* linked list of handlers in a window (for destroying handlers when window is destroyed); only when dynamically allocated */ /* over-allocated with handler specific fields */ };