diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2019-03-20 15:37:15 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2019-03-26 00:11:27 +0000 |
commit | 65965bed16df9745145fa8878f68db02d539aab0 (patch) | |
tree | 11b6cca1d3c5c9b52d31c4515cf095164672588a /gtk/gtklayoutmanager.h | |
parent | 630442f31c3fcbdb191997f72aea9228a232fb58 (diff) | |
download | gtk+-65965bed16df9745145fa8878f68db02d539aab0.tar.gz |
Changes after review
- Rename GtkLegacyLayout to GtkCustomLayout
- Use for() to iterate over children in GtkBinLayout
- Whitespace fixes for code imported from GtkBox
- Store the GtkLayoutChild instances inside LayoutManager
- Simplify the GtkLayoutManager API by dropping unnecessary arguments
- Fix the ownership model of GtkLayoutManager
Diffstat (limited to 'gtk/gtklayoutmanager.h')
-rw-r--r-- | gtk/gtklayoutmanager.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtklayoutmanager.h b/gtk/gtklayoutmanager.h index 02f2173a36..53f4931c69 100644 --- a/gtk/gtklayoutmanager.h +++ b/gtk/gtklayoutmanager.h @@ -1,5 +1,5 @@ /* gtklayoutmanager.h: Layout manager base class - * Copyright 2018 The GNOME Foundation + * Copyright 2019 The GNOME Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,6 +18,7 @@ */ #pragma once +#include <gsk/gsk.h> #include <gtk/gtktypes.h> #include <gtk/gtkwidget.h> #include <gtk/gtklayoutchild.h> @@ -38,6 +39,8 @@ G_DECLARE_DERIVABLE_TYPE (GtkLayoutManager, gtk_layout_manager, GTK, LAYOUT_MANA * sizes of the widget using the layout manager for a given orientation * @allocate: a virtual function, used to allocate the size of the widget * using the layout manager + * @create_layout_child: a virtual function, used to create a #GtkLayoutChild + * meta object for the layout properties * * The `GtkLayoutManagerClass` structure contains only private data, and * should only be accessed through the provided API, or when subclassing @@ -68,7 +71,8 @@ struct _GtkLayoutManagerClass int baseline); GtkLayoutChild * (* create_layout_child) (GtkLayoutManager *manager, - GtkWidget *widget); + GtkWidget *widget, + GtkWidget *for_child); /*< private >*/ gpointer _padding[16]; @@ -90,8 +94,7 @@ void gtk_layout_manager_allocate (GtkLayoutManage int height, int baseline); GDK_AVAILABLE_IN_ALL -GtkSizeRequestMode gtk_layout_manager_get_request_mode (GtkLayoutManager *manager, - GtkWidget *widget); +GtkSizeRequestMode gtk_layout_manager_get_request_mode (GtkLayoutManager *manager); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_layout_manager_get_widget (GtkLayoutManager *manager); @@ -101,6 +104,6 @@ void gtk_layout_manager_layout_changed (GtkLayoutManage GDK_AVAILABLE_IN_ALL GtkLayoutChild * gtk_layout_manager_get_layout_child (GtkLayoutManager *manager, - GtkWidget *widget); + GtkWidget *child); G_END_DECLS |