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 |