ui/gtk/toolkit.h

changeset 101
7b3a3130be44
parent 100
d2bd73d28ff1
--- a/ui/gtk/toolkit.h	Thu Dec 12 20:01:43 2024 +0100
+++ b/ui/gtk/toolkit.h	Mon Jan 06 22:22:55 2025 +0100
@@ -61,6 +61,7 @@
 #define BOX_ADD(box, child) gtk_box_append(GTK_BOX(box), child)
 #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)
 #define BOX_ADD_NO_EXPAND(box, child) gtk_box_append(GTK_BOX(box), child)
+#define BOX_REMOVE(box, child) gtk_box_remove(GTK_BOX(box), child)
 #define ENTRY_SET_TEXT(entry, text) gtk_editable_set_text(GTK_EDITABLE(entry), text)
 #define ENTRY_GET_TEXT(entry) gtk_editable_get_text(GTK_EDITABLE(entry))
 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new()
@@ -80,6 +81,7 @@
 #define BOX_ADD(box, child) gtk_container_add(GTK_CONTAINER(box), child)
 #define BOX_ADD_EXPAND(box, child) gtk_box_pack_start(GTK_BOX(box), child, TRUE, TRUE, 0)
 #define BOX_ADD_NO_EXPAND(box, child) gtk_box_pack_start(GTK_BOX(box), child, TRUE, FALSE, 0)  
+#define BOX_REMOVE(box, child) gtk_container_remove(GTK_CONTAINER(box), child)
 #define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_ENTRY(entry), text)
 #define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_ENTRY(entry))
 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new(NULL, NULL)
@@ -152,15 +154,15 @@
     void        *userdata;
 } UiVarEventData;
 
+typedef enum UiOrientation UiOrientation;
+enum UiOrientation { UI_HORIZONTAL = 0, UI_VERTICAL };
+
 #ifndef UI_GTK4
 struct UiSelection {
     GtkSelectionData *data;
 };
 #endif
 
-typedef enum UiOrientation UiOrientation;
-enum UiOrientation { UI_HORIZONTAL = 0, UI_VERTICAL };
-
 #ifdef UI_APPLICATION
 void ui_app_quit();
 GtkApplication* ui_get_application();

mercurial