68 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(sw)) |
68 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(sw)) |
69 #define FRAME_SET_CHILD(frame, child) gtk_frame_set_child(GTK_FRAME(frame), child) |
69 #define FRAME_SET_CHILD(frame, child) gtk_frame_set_child(GTK_FRAME(frame), child) |
70 #define EXPANDER_SET_CHILD(expander, child) gtk_expander_set_child(GTK_EXPANDER(expander), child) |
70 #define EXPANDER_SET_CHILD(expander, child) gtk_expander_set_child(GTK_EXPANDER(expander), child) |
71 #define WIDGET_ADD_CSS_CLASS(w, cssclass) gtk_widget_add_css_class(w, cssclass) |
71 #define WIDGET_ADD_CSS_CLASS(w, cssclass) gtk_widget_add_css_class(w, cssclass) |
72 #define WIDGET_REMOVE_CSS_CLASS(w, cssclass) gtk_widget_remove_css_class(w, cssclass) |
72 #define WIDGET_REMOVE_CSS_CLASS(w, cssclass) gtk_widget_remove_css_class(w, cssclass) |
|
73 #define ICON_IMAGE(icon) gtk_image_new_from_icon_name(icon) |
|
74 #define LISTBOX_REMOVE(listbox, row) gtk_list_box_remove(GTK_LIST_BOX(listbox), row) |
|
75 #define LISTBOX_ROW_SET_CHILD(row, child) gtk_list_box_row_set_child(GTK_LIST_BOX_ROW(row), child) |
73 #else |
76 #else |
74 #define WINDOW_SHOW(window) gtk_widget_show_all(window) |
77 #define WINDOW_SHOW(window) gtk_widget_show_all(window) |
75 #define WINDOW_DESTROY(window) gtk_widget_destroy(window) |
78 #define WINDOW_DESTROY(window) gtk_widget_destroy(window) |
76 #define WINDOW_SET_CONTENT(window, child) gtk_container_add(GTK_CONTAINER(window), child) |
79 #define WINDOW_SET_CONTENT(window, child) gtk_container_add(GTK_CONTAINER(window), child) |
77 #define BOX_ADD(box, child) gtk_container_add(GTK_CONTAINER(box), child) |
80 #define BOX_ADD(box, child) gtk_container_add(GTK_CONTAINER(box), child) |
84 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_bin_get_child(GTK_BIN(sw)) |
87 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_bin_get_child(GTK_BIN(sw)) |
85 #define FRAME_SET_CHILD(frame, child) gtk_container_add(GTK_CONTAINER(frame), child) |
88 #define FRAME_SET_CHILD(frame, child) gtk_container_add(GTK_CONTAINER(frame), child) |
86 #define EXPANDER_SET_CHILD(expander, child) gtk_container_add(GTK_CONTAINER(expander), child) |
89 #define EXPANDER_SET_CHILD(expander, child) gtk_container_add(GTK_CONTAINER(expander), child) |
87 #define WIDGET_ADD_CSS_CLASS(w, cssclass) gtk_style_context_add_class(gtk_widget_get_style_context(w), cssclass) |
90 #define WIDGET_ADD_CSS_CLASS(w, cssclass) gtk_style_context_add_class(gtk_widget_get_style_context(w), cssclass) |
88 #define WIDGET_REMOVE_CSS_CLASS(w, cssclass) gtk_style_context_remove_class(gtk_widget_get_style_context(w), cssclass) |
91 #define WIDGET_REMOVE_CSS_CLASS(w, cssclass) gtk_style_context_remove_class(gtk_widget_get_style_context(w), cssclass) |
|
92 #define ICON_IMAGE(icon) gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_BUTTON) |
|
93 #define LISTBOX_REMOVE(listbox, row) gtk_container_remove(GTK_CONTAINER(listbox), row) |
|
94 #define LISTBOX_ROW_SET_CHILD(row, child) gtk_container_add(GTK_CONTAINER(row), child) |
89 #endif |
95 #endif |
90 |
96 |
91 #ifdef UI_GTK2 |
97 #ifdef UI_GTK2 |
92 #undef SCROLLEDWINDOW_SET_CHILD |
98 #undef SCROLLEDWINDOW_SET_CHILD |
93 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), child) |
99 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), child) |
166 void ui_set_widget_groups(UiContext *ctx, GtkWidget *widget, const int *groups); |
172 void ui_set_widget_groups(UiContext *ctx, GtkWidget *widget, const int *groups); |
167 void ui_set_widget_ngroups(UiContext *ctx, GtkWidget *widget, const int *groups, size_t ngroups); |
173 void ui_set_widget_ngroups(UiContext *ctx, GtkWidget *widget, const int *groups, size_t ngroups); |
168 |
174 |
169 void ui_destroy_userdata(GtkWidget *object, void *userdata); |
175 void ui_destroy_userdata(GtkWidget *object, void *userdata); |
170 void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data); |
176 void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data); |
|
177 void ui_destroy_widget_var(GtkWidget *object, UiVar *var); |
171 void ui_destroy_boundvar(UiContext *ctx, UiVar *var); |
178 void ui_destroy_boundvar(UiContext *ctx, UiVar *var); |
172 |
179 |
173 void ui_set_active_window(UiObject *obj); |
180 void ui_set_active_window(UiObject *obj); |
174 UiObject *ui_get_active_window(); |
181 UiObject *ui_get_active_window(); |
175 |
182 |