ui/gtk/button.c

changeset 52
25e5390cce41
parent 42
29b2821d1262
child 59
eb6611be50c7
equal deleted inserted replaced
51:42506e19eb6b 52:25e5390cce41
68 68
69 void ui_button_clicked(GtkWidget *widget, UiEventData *event) { 69 void ui_button_clicked(GtkWidget *widget, UiEventData *event) {
70 UiEvent e; 70 UiEvent e;
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->ctx->document;
74 e.eventdata = NULL; 74 e.eventdata = NULL;
75 e.intval = event->value; 75 e.intval = event->value;
76 event->callback(&e, event->userdata); 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->ctx->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->userdata); 86 event->callback(&e, event->userdata);
87 } 87 }

mercurial