From 09e4f753fd3dd9ccf4fbbe940e1cb909790d33c6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 11 Sep 2015 09:07:37 -0400 Subject: [PATCH] widget: Move _gtk_widget_peek_request_cache to private.h --- gtk/gtkwidget.c | 17 +---------------- gtk/gtkwidgetprivate.h | 8 +++++++- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 26528909ec..4d714b2544 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -10627,7 +10627,7 @@ gtk_widget_get_screen_unchecked (GtkWidget *widget) if (_gtk_widget_is_toplevel (toplevel)) { if (GTK_IS_WINDOW (toplevel)) - return gtk_window_get_screen (GTK_WINDOW (toplevel)); + return _gtk_window_get_screen (GTK_WINDOW (toplevel)); else if (GTK_IS_INVISIBLE (toplevel)) return gtk_invisible_get_screen (GTK_INVISIBLE (widget)); } @@ -12402,21 +12402,6 @@ gtk_widget_real_adjust_baseline_request (GtkWidget *widget, } } -/** - * _gtk_widget_peek_request_cache: - * - * Returns the address of the widget’s request cache (strictly for - * internal use in gtksizerequest.c) - * - * Returns: the address of @widget’s size request cache. - **/ -gpointer -_gtk_widget_peek_request_cache (GtkWidget *widget) -{ - /* Don't bother slowing things down with the return_if_fail guards here */ - return &widget->priv->requests; -} - static gboolean is_my_window (GtkWidget *widget, GdkWindow *window) diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h index 82f15a3a84..68488064b1 100644 --- a/gtk/gtkwidgetprivate.h +++ b/gtk/gtkwidgetprivate.h @@ -248,7 +248,7 @@ void _gtk_widget_synthesize_crossing (GtkWidget *fro GdkDevice *device, GdkCrossingMode mode); -gpointer _gtk_widget_peek_request_cache (GtkWidget *widget); +static inline gpointer _gtk_widget_peek_request_cache (GtkWidget *widget); void _gtk_widget_buildable_finish_accelerator (GtkWidget *widget, GtkWidget *toplevel, @@ -368,6 +368,12 @@ _gtk_widget_get_style_context (GtkWidget *widget) return gtk_widget_get_style_context (widget); } +static inline gpointer +_gtk_widget_peek_request_cache (GtkWidget *widget) +{ + return &widget->priv->requests; +} + G_END_DECLS #endif /* __GTK_WIDGET_PRIVATE_H__ */