82 e.eventdata = NULL; |
82 e.eventdata = NULL; |
83 e.intval = gtk_toggle_tool_button_get_active(widget); |
83 e.intval = gtk_toggle_tool_button_get_active(widget); |
84 event->callback(&e, event->userdata); |
84 event->callback(&e, event->userdata); |
85 } |
85 } |
86 |
86 |
87 int ui_toggle_button_get(UiInteger *integer) { |
87 int64_t ui_toggle_button_get(UiInteger *integer) { |
88 GtkToggleButton *button = integer->obj; |
88 GtkToggleButton *button = integer->obj; |
89 integer->value = (int)gtk_toggle_button_get_active(button); |
89 integer->value = (int)gtk_toggle_button_get_active(button); |
90 return integer->value; |
90 return integer->value; |
91 } |
91 } |
92 |
92 |
93 void ui_toggle_button_set(UiInteger *integer, int value) { |
93 void ui_toggle_button_set(UiInteger *integer, int64_t value) { |
94 GtkToggleButton *button = integer->obj; |
94 GtkToggleButton *button = integer->obj; |
95 integer->value = value; |
95 integer->value = value; |
96 gtk_toggle_button_set_active(button, value != 0 ? TRUE : FALSE); |
96 gtk_toggle_button_set_active(button, value != 0 ? TRUE : FALSE); |
97 } |
97 } |
98 |
98 |
224 e.intval = i->get(i); |
224 e.intval = i->get(i); |
225 |
225 |
226 ui_notify_evt(i->observers, &e); |
226 ui_notify_evt(i->observers, &e); |
227 } |
227 } |
228 |
228 |
229 int ui_radiobutton_get(UiInteger *value) { |
229 int64_t ui_radiobutton_get(UiInteger *value) { |
230 int selection = 0; |
230 int selection = 0; |
231 GSList *ls = value->obj; |
231 GSList *ls = value->obj; |
232 int i = 0; |
232 int i = 0; |
233 guint len = g_slist_length(ls); |
233 guint len = g_slist_length(ls); |
234 while(ls) { |
234 while(ls) { |