ui/gtk/toolkit.h

branch
newapi
changeset 422
c1354a29a7e9
parent 412
138b1089ba05
equal deleted inserted replaced
421:3b969399f962 422:c1354a29a7e9
59 #define WINDOW_DESTROY(window) gtk_window_destroy(GTK_WINDOW(window)) 59 #define WINDOW_DESTROY(window) gtk_window_destroy(GTK_WINDOW(window))
60 #define WINDOW_SET_CONTENT(window, child) gtk_window_set_child(GTK_WINDOW(window), child) 60 #define WINDOW_SET_CONTENT(window, child) gtk_window_set_child(GTK_WINDOW(window), child)
61 #define BOX_ADD(box, child) gtk_box_append(GTK_BOX(box), child) 61 #define BOX_ADD(box, child) gtk_box_append(GTK_BOX(box), child)
62 #define BOX_ADD_EXPAND(box, child) gtk_widget_set_hexpand(child, TRUE); gtk_widget_set_vexpand(child, TRUE); gtk_box_append(GTK_BOX(box), child) 62 #define BOX_ADD_EXPAND(box, child) gtk_widget_set_hexpand(child, TRUE); gtk_widget_set_vexpand(child, TRUE); gtk_box_append(GTK_BOX(box), child)
63 #define BOX_ADD_NO_EXPAND(box, child) gtk_box_append(GTK_BOX(box), child) 63 #define BOX_ADD_NO_EXPAND(box, child) gtk_box_append(GTK_BOX(box), child)
64 #define BOX_REMOVE(box, child) gtk_box_remove(GTK_BOX(box), child)
64 #define ENTRY_SET_TEXT(entry, text) gtk_editable_set_text(GTK_EDITABLE(entry), text) 65 #define ENTRY_SET_TEXT(entry, text) gtk_editable_set_text(GTK_EDITABLE(entry), text)
65 #define ENTRY_GET_TEXT(entry) gtk_editable_get_text(GTK_EDITABLE(entry)) 66 #define ENTRY_GET_TEXT(entry) gtk_editable_get_text(GTK_EDITABLE(entry))
66 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new() 67 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new()
67 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(sw), child) 68 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(sw), child)
68 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(sw)) 69 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(sw))
78 #define WINDOW_DESTROY(window) gtk_widget_destroy(window) 79 #define WINDOW_DESTROY(window) gtk_widget_destroy(window)
79 #define WINDOW_SET_CONTENT(window, child) gtk_container_add(GTK_CONTAINER(window), child) 80 #define WINDOW_SET_CONTENT(window, child) gtk_container_add(GTK_CONTAINER(window), child)
80 #define BOX_ADD(box, child) gtk_container_add(GTK_CONTAINER(box), child) 81 #define BOX_ADD(box, child) gtk_container_add(GTK_CONTAINER(box), child)
81 #define BOX_ADD_EXPAND(box, child) gtk_box_pack_start(GTK_BOX(box), child, TRUE, TRUE, 0) 82 #define BOX_ADD_EXPAND(box, child) gtk_box_pack_start(GTK_BOX(box), child, TRUE, TRUE, 0)
82 #define BOX_ADD_NO_EXPAND(box, child) gtk_box_pack_start(GTK_BOX(box), child, TRUE, FALSE, 0) 83 #define BOX_ADD_NO_EXPAND(box, child) gtk_box_pack_start(GTK_BOX(box), child, TRUE, FALSE, 0)
84 #define BOX_REMOVE(box, child) gtk_container_remove(GTK_CONTAINER(box), child)
83 #define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_ENTRY(entry), text) 85 #define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_ENTRY(entry), text)
84 #define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_ENTRY(entry)) 86 #define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_ENTRY(entry))
85 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new(NULL, NULL) 87 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new(NULL, NULL)
86 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_container_add(GTK_CONTAINER(sw), child) 88 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_container_add(GTK_CONTAINER(sw), child)
87 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_bin_get_child(GTK_BIN(sw)) 89 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_bin_get_child(GTK_BIN(sw))
156 struct UiSelection { 158 struct UiSelection {
157 GtkSelectionData *data; 159 GtkSelectionData *data;
158 }; 160 };
159 #endif 161 #endif
160 162
161 typedef enum UiOrientation UiOrientation;
162 enum UiOrientation { UI_HORIZONTAL = 0, UI_VERTICAL };
163
164 #ifdef UI_APPLICATION 163 #ifdef UI_APPLICATION
165 void ui_app_quit(); 164 void ui_app_quit();
166 GtkApplication* ui_get_application(); 165 GtkApplication* ui_get_application();
167 #endif 166 #endif
168 167

mercurial