diff options
author | Timm Bäder <mail@baedert.org> | 2019-12-31 08:26:27 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-01-07 17:27:18 +0100 |
commit | 6c188f7c93c8fe39df82ad1084a06845414302a4 (patch) | |
tree | 1064ab98fd888d76b6491befc404ba6ecd436cf8 | |
parent | c30e0f78adf7b4836d010c718f521a60e126722b (diff) | |
download | gtk+-6c188f7c93c8fe39df82ad1084a06845414302a4.tar.gz |
bin: Move vfunc implementations before class_init
And avoid every single function prototype.
-rw-r--r-- | gtk/gtkbin.c | 57 |
1 files 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 |