ui/gtk/button.c

changeset 29
3fc287f06305
parent 0
2483f517c562
equal deleted inserted replaced
28:1ecc1183f046 29:3fc287f06305
33 #include "container.h" 33 #include "container.h"
34 #include <cx/allocator.h> 34 #include <cx/allocator.h>
35 #include "../common/context.h" 35 #include "../common/context.h"
36 #include "../common/object.h" 36 #include "../common/object.h"
37 37
38 UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data) { 38 UIWIDGET ui_button_deprecated(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 = malloc(sizeof(UiEventData)); 42 UiEventData *event = malloc(sizeof(UiEventData));
43 event->obj = obj; 43 event->obj = obj;
130 ct->add(ct, button, FALSE); 130 ct->add(ct, button, FALSE);
131 131
132 return button; 132 return button;
133 } 133 }
134 134
135 UIWIDGET ui_checkbox(UiObject *obj, char *label, UiInteger *value) { 135 UIWIDGET ui_checkbox_deprecated(UiObject *obj, char *label, UiInteger *value) {
136 UiVar *var = NULL; 136 UiVar *var = NULL;
137 if(value) { 137 if(value) {
138 var = malloc(sizeof(UiVar)); 138 var = malloc(sizeof(UiVar));
139 var->value = value; 139 var->value = value;
140 var->type = UI_VAR_SPECIAL; 140 var->type = UI_VAR_SPECIAL;
188 ct->add(ct, rbutton, FALSE); 188 ct->add(ct, rbutton, FALSE);
189 189
190 return rbutton; 190 return rbutton;
191 } 191 }
192 192
193 UIWIDGET ui_radiobutton(UiObject *obj, char *label, UiInteger *rgroup) { 193 UIWIDGET ui_radiobutton_deprecated(UiObject *obj, char *label, UiInteger *rgroup) {
194 UiVar *var = NULL; 194 UiVar *var = NULL;
195 if(rgroup) { 195 if(rgroup) {
196 var = malloc(sizeof(UiVar)); 196 var = malloc(sizeof(UiVar));
197 var->value = rgroup; 197 var->value = rgroup;
198 var->type = UI_VAR_SPECIAL; 198 var->type = UI_VAR_SPECIAL;

mercurial