diff options
Diffstat (limited to 'gtk/gtkfixed.c')
-rw-r--r-- | gtk/gtkfixed.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c index 8f5dd6d4d0..c16aa2300f 100644 --- a/gtk/gtkfixed.c +++ b/gtk/gtkfixed.c @@ -505,3 +505,47 @@ gtk_fixed_forall (GtkContainer *container, (* callback) (child->widget, callback_data); } } + +/** + * gtk_fixed_set_has_window: + * @fixed: a #GtkFixed + * @has_window: %TRUE if a separate window should be created + * + * Sets whether a #GtkFixed widget is created with a separate + * #GdkWindow for widget->window or not. (By default, it will be + * created with no separate #GdkWindow). This function must be called + * while the is not realized, for instance, immediately after the + * window is created. + **/ +void +gtk_fixed_set_has_window (GtkFixed *fixed, + gboolean has_window) +{ + g_return_if_fail (GTK_IS_FIXED (fixed)); + g_return_if_fail (!GTK_WIDGET_REALIZED (fixed)); + + if (!has_window != GTK_WIDGET_NO_WINDOW (fixed)) + { + if (has_window) + GTK_WIDGET_UNSET_FLAGS (fixed, GTK_NO_WINDOW); + else + GTK_WIDGET_SET_FLAGS (fixed, GTK_NO_WINDOW); + } +} + +/** + * gtk_fixed_get_has_window: + * @fixed: a #GtkWidget + * + * Gets whether the #GtkFixed has it's own #GdkWindow. + * See gdk_fixed_set_has_window(). + * + * Return value: + **/ +gboolean +gtk_fixed_get_has_window (GtkFixed *fixed) +{ + g_return_if_fail (GTK_IS_FIXED (fixed)); + + return !GTK_WIDGET_NO_WINDOW (fixed); +} |