72 e.eventdata = NULL; |
72 e.eventdata = NULL; |
73 e.intval = event->value; |
73 e.intval = event->value; |
74 event->callback(&e, event->userdata); |
74 event->callback(&e, event->userdata); |
75 } |
75 } |
76 |
76 |
77 void ui_button_toggled(GtkToggleToolButton *widget, UiEventData *event) { |
|
78 UiEvent e; |
|
79 e.obj = event->obj; |
|
80 e.window = event->obj->window; |
|
81 e.document = event->obj->ctx->document; |
|
82 e.eventdata = NULL; |
|
83 e.intval = gtk_toggle_tool_button_get_active(widget); |
|
84 event->callback(&e, event->userdata); |
|
85 } |
|
86 |
|
87 int64_t ui_toggle_button_get(UiInteger *integer) { |
77 int64_t ui_toggle_button_get(UiInteger *integer) { |
88 GtkToggleButton *button = integer->obj; |
78 GtkToggleButton *button = integer->obj; |
89 integer->value = (int)gtk_toggle_button_get_active(button); |
79 integer->value = (int)gtk_toggle_button_get_active(button); |
90 return integer->value; |
80 return integer->value; |
91 } |
81 } |