Updated in omtk 0.1.2.
typedef struct { OmtkWidget *widget; OmtkWidget *document; int event; void *custom; } OmtkEvent;
This structure is passed to a callback function of an event.
Updated in omtk 0.1.2.
void omtk_event_add(OmtkWidget *widget, int event, \ int (*function)(OmtkEvent *e), void *custom);
Adds an event.
Example:
/* our callback function */ int app_launched(OmtkEvent *event) { /* event->custom == 1234 */ printf("the application launched! %d\n", (int)event->custom); return 0; } void add_event(void) { omtk_event_add(NULL, OMTK_EVENT_DID_LAUNCH, app_launched, (void *)1234); }
int omtk_event_perform(OmtkWidget *widget, int event);
This function performs an event. Do not use it if you don't know what you do.
Example:
omtk_event_perform(item, OMTK_EVENT_DID_CLICK); /* item is an OmtkWidget* */
void omtk_event_free(OmtkWidget *widget);
Frees all events of a widget. You shouldn't use this function.
void omtk_event_freeall(void);
This function frees all events. Do not use it if you don't know what you do.
Zurück zu www.eggdrop.ch | Back to www.eggdrop.ch Last update: 20.02.04 |
Copyright (C) 2004, 2005 by Thomas "tom" Steinacher <tom at eggdrop.ch> |