Make get_layout_manager_type() public

The inspector, and other tools introspecting the widget structure like
gtk-builder-tool and Glade, may very well want to access the default
layout manager used by a class, especially if there are layout
properties involved, without having a whitelist of widget/layout manager
associations.
This commit is contained in:
Emmanuele Bassi 2019-05-06 12:15:21 +01:00
parent 59c6862a03
commit fe473dbef8
2 changed files with 13 additions and 3 deletions

View File

@ -707,8 +707,6 @@ static void gtk_widget_update_input_shape (GtkWidget *widget);
static gboolean gtk_widget_class_get_visible_by_default (GtkWidgetClass *widget_class);
static GType gtk_widget_class_get_layout_manager_type (GtkWidgetClass *widget_class);
static void remove_parent_surface_transform_changed_listener (GtkWidget *widget);
static void add_parent_surface_transform_changed_listener (GtkWidget *widget);
@ -13607,7 +13605,17 @@ gtk_widget_class_set_layout_manager_type (GtkWidgetClass *widget_class,
priv->layout_manager_type = type;
}
static GType
/**
* gtk_widget_class_get_layout_manager_type:
* @widget_class: a #GtkWidgetClass
*
* Retrieves the type of the #GtkLayoutManager used by the #GtkWidget class.
*
* See also: gtk_widget_class_set_layout_manager_type()
*
* Returns: a #GtkLayoutManager subclass, or %G_TYPE_INVALID
*/
GType
gtk_widget_class_get_layout_manager_type (GtkWidgetClass *widget_class)
{
GtkWidgetClassPrivate *priv;

View File

@ -417,6 +417,8 @@ GtkLayoutManager * gtk_widget_get_layout_manager (GtkWidget *widge
GDK_AVAILABLE_IN_ALL
void gtk_widget_class_set_layout_manager_type (GtkWidgetClass *widget_class,
GType type);
GDK_AVAILABLE_IN_ALL
GType gtk_widget_class_get_layout_manager_type (GtkWidgetClass *widget_class);
GDK_AVAILABLE_IN_ALL
void gtk_widget_add_accelerator (GtkWidget *widget,