[gtk] bin: Move vfunc implementations before class_init



commit 6c188f7c93c8fe39df82ad1084a06845414302a4
Author: Timm Bäder <mail baedert org>
Date:   Tue Dec 31 08:26:27 2019 +0100

    bin: Move vfunc implementations before class_init
    
    And avoid every single function prototype.

 gtk/gtkbin.c | 57 ++++++++++++++++++++-------------------------------------
 1 file changed, 20 insertions(+), 37 deletions(-)
---
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 279ccdb466..62f2245a77 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -45,23 +45,6 @@ typedef struct
   GtkWidget *child;
 } GtkBinPrivate;
 
-static void gtk_bin_add         (GtkContainer   *container,
-                                GtkWidget      *widget);
-static void gtk_bin_remove      (GtkContainer   *container,
-                                GtkWidget      *widget);
-static void gtk_bin_forall      (GtkContainer   *container,
-                                GtkCallback     callback,
-                                gpointer        callback_data);
-static GType gtk_bin_child_type (GtkContainer   *container);
-
-static void               gtk_bin_measure                         (GtkWidget      *widget,
-                                                                   GtkOrientation  orientation,
-                                                                   int             for_size,
-                                                                   int            *minimum,
-                                                                   int            *natural,
-                                                                   int            *minimum_baseline,
-                                                                   int            *natural_baseline);
-
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GtkBin, gtk_bin, GTK_TYPE_CONTAINER)
 
 static void
@@ -81,26 +64,6 @@ gtk_bin_size_allocate (GtkWidget *widget,
                               }, baseline);
 }
 
-static void
-gtk_bin_class_init (GtkBinClass *class)
-{
-  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
-  GtkContainerClass *container_class = (GtkContainerClass*) class;
-
-  widget_class->measure = gtk_bin_measure;
-  widget_class->size_allocate = gtk_bin_size_allocate;
-
-  container_class->add = gtk_bin_add;
-  container_class->remove = gtk_bin_remove;
-  container_class->forall = gtk_bin_forall;
-  container_class->child_type = gtk_bin_child_type;
-}
-
-static void
-gtk_bin_init (GtkBin *bin)
-{
-}
-
 static GType
 gtk_bin_child_type (GtkContainer *container)
 {
@@ -195,6 +158,26 @@ gtk_bin_measure (GtkWidget *widget,
     }
 }
 
+static void
+gtk_bin_class_init (GtkBinClass *class)
+{
+  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
+  GtkContainerClass *container_class = (GtkContainerClass*) class;
+
+  widget_class->measure = gtk_bin_measure;
+  widget_class->size_allocate = gtk_bin_size_allocate;
+
+  container_class->add = gtk_bin_add;
+  container_class->remove = gtk_bin_remove;
+  container_class->forall = gtk_bin_forall;
+  container_class->child_type = gtk_bin_child_type;
+}
+
+static void
+gtk_bin_init (GtkBin *bin)
+{
+}
+
 /**
  * gtk_bin_get_child:
  * @bin: a #GtkBin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]