ui/gtk/container.c

branch
newapi
changeset 344
870dd3d41d83
parent 336
56c12f44c2d3
--- a/ui/gtk/container.c	Tue Oct 22 21:17:01 2024 +0200
+++ b/ui/gtk/container.c	Wed Oct 23 14:52:18 2024 +0200
@@ -242,7 +242,7 @@
 
 
 
-static GtkWidget* box_set_margin(GtkWidget *box, int margin) {
+GtkWidget* ui_box_set_margin(GtkWidget *box, int margin) {
     GtkWidget *ret = box;
 #if GTK_MAJOR_VERSION >= 3
 #if GTK_MAJOR_VERSION * 1000 + GTK_MINOR_VERSION >= 3012
@@ -270,7 +270,7 @@
     
     GtkWidget *box = type == UI_CONTAINER_VBOX ? ui_gtk_vbox_new(args.spacing) : ui_gtk_hbox_new(args.spacing);
     ui_set_name_and_style(box, args.name, args.style_class);
-    GtkWidget *widget = args.margin > 0 ? box_set_margin(box, args.margin) : box;
+    GtkWidget *widget = args.margin > 0 ? ui_box_set_margin(box, args.margin) : box;
     ct->add(ct, widget, TRUE);
     
     UiObject *newobj = uic_object_new(obj, box);
@@ -288,7 +288,7 @@
     return ui_box_create(obj, args, UI_CONTAINER_HBOX);
 }
 
-static GtkWidget* create_grid(int colspacing, int rowspacing) {
+GtkWidget* ui_create_grid_widget(int colspacing, int rowspacing) {
 #if GTK_MAJOR_VERSION >= 3
     GtkWidget *grid = gtk_grid_new();
     gtk_grid_set_column_spacing(GTK_GRID(grid), colspacing);
@@ -306,9 +306,9 @@
     UI_APPLY_LAYOUT1(current, args);
     GtkWidget *widget;
     
-    GtkWidget *grid = create_grid(args.columnspacing, args.rowspacing);
+    GtkWidget *grid = ui_create_grid_widget(args.columnspacing, args.rowspacing);
     ui_set_name_and_style(grid, args.name, args.style_class);
-    widget = box_set_margin(grid, args.margin);
+    widget = ui_box_set_margin(grid, args.margin);
     current->container->add(current->container, widget, TRUE);
     
     UiObject *newobj = uic_object_new(obj, grid);
@@ -621,13 +621,13 @@
             break;
         }
         case UI_CONTAINER_GRID: {
-            sub = create_grid(data->columnspacing, data->rowspacing);
+            sub = ui_create_grid_widget(data->columnspacing, data->rowspacing);
             newobj->container = ui_grid_container(newobj, sub);
             break;
         }
     }
     newobj->widget = sub;
-    GtkWidget *widget = box_set_margin(sub, data->margin);
+    GtkWidget *widget = ui_box_set_margin(sub, data->margin);
     
     data->add_tab(data->widget, tab_index, name, widget);
     

mercurial