ui/gtk/button.c

changeset 65
4697592e24ba
parent 59
eb6611be50c7
child 94
d51e334c1439
equal deleted inserted replaced
64:6ef2c7f73a30 65:4697592e24ba
37 37
38 UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data) { 38 UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data) {
39 GtkWidget *button = gtk_button_new_with_label(label); 39 GtkWidget *button = gtk_button_new_with_label(label);
40 40
41 if(f) { 41 if(f) {
42 UiEventData *event = ucx_mempool_malloc( 42 //UiEventData *event = ucx_mempool_malloc(
43 obj->ctx->mempool, 43 // obj->ctx->mempool,
44 sizeof(UiEventData)); 44 // sizeof(UiEventData));
45 UiEventData *event = malloc(sizeof(UiEventData));
45 event->obj = obj; 46 event->obj = obj;
46 event->userdata = data; 47 event->userdata = data;
47 event->callback = f; 48 event->callback = f;
48 event->value = 0; 49 event->value = 0;
49 50

mercurial