ui/gtk/button.c

changeset 42
29b2821d1262
parent 33
458831c574f4
child 52
25e5390cce41
equal deleted inserted replaced
41:394f3b06dba1 42:29b2821d1262
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 event->obj = obj; 45 event->obj = obj;
46 event->user_data = data; 46 event->userdata = data;
47 event->callback = f; 47 event->callback = f;
48 event->value = 0; 48 event->value = 0;
49 49
50 g_signal_connect( 50 g_signal_connect(
51 button, 51 button,
71 e.obj = event->obj; 71 e.obj = event->obj;
72 e.window = event->obj->window; 72 e.window = event->obj->window;
73 e.document = event->obj->document; 73 e.document = event->obj->document;
74 e.eventdata = NULL; 74 e.eventdata = NULL;
75 e.intval = event->value; 75 e.intval = event->value;
76 event->callback(&e, event->user_data); 76 event->callback(&e, event->userdata);
77 } 77 }
78 78
79 void ui_button_toggled(GtkToggleToolButton *widget, UiEventData *event) { 79 void ui_button_toggled(GtkToggleToolButton *widget, UiEventData *event) {
80 UiEvent e; 80 UiEvent e;
81 e.obj = event->obj; 81 e.obj = event->obj;
82 e.window = event->obj->window; 82 e.window = event->obj->window;
83 e.document = event->obj->document; 83 e.document = event->obj->document;
84 e.eventdata = NULL; 84 e.eventdata = NULL;
85 e.intval = gtk_toggle_tool_button_get_active(widget); 85 e.intval = gtk_toggle_tool_button_get_active(widget);
86 event->callback(&e, event->user_data); 86 event->callback(&e, event->userdata);
87 } 87 }

mercurial