summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2010-01-04 08:39:24 +0100
committerChristian Dywan <christian@twotoasts.de>2010-01-04 08:39:24 +0100
commit5d675b9f1199c2f410556f20a732e36820035951 (patch)
treec3b427f9b111d581a776360767c8fca4cb5b33dd
parent525cc3ada2060d8f71ed978057c0cd48ef1e6d3b (diff)
downloadgtk+-5d675b9f1199c2f410556f20a732e36820035951.tar.gz
No GTK_WIDGET_NO_WINDOW in GtkFixed and deprecate gtk_fixed_set_has_window
-rw-r--r--gtk/gtk.symbols4
-rw-r--r--gtk/gtkfixed.c23
-rw-r--r--gtk/gtkfixed.h2
3 files changed, 17 insertions, 12 deletions
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 344207f2cc..65ac5ef1cc 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -1706,12 +1706,14 @@ gtk_file_selection_show_fileop_buttons
#if IN_HEADER(__GTK_FIXED_H__)
#if IN_FILE(__GTK_FIXED_C__)
-gtk_fixed_get_has_window
gtk_fixed_get_type G_GNUC_CONST
gtk_fixed_move
gtk_fixed_new
gtk_fixed_put
+#ifndef GTK_DISABLE_DEPRECATED
gtk_fixed_set_has_window
+gtk_fixed_get_has_window
+#endif
#endif
#endif
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 96c4a8d9e3..191a5e0452 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -114,8 +114,8 @@ gtk_fixed_child_type (GtkContainer *container)
static void
gtk_fixed_init (GtkFixed *fixed)
{
- GTK_WIDGET_SET_FLAGS (fixed, GTK_NO_WINDOW);
-
+ gtk_widget_set_has_window (GTK_WIDGET (fixed), FALSE);
+
fixed->children = NULL;
}
@@ -272,7 +272,7 @@ gtk_fixed_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- if (GTK_WIDGET_NO_WINDOW (widget))
+ if (!gtk_widget_get_has_window (widget))
GTK_WIDGET_CLASS (gtk_fixed_parent_class)->realize (widget);
else
{
@@ -351,7 +351,7 @@ gtk_fixed_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
- if (!GTK_WIDGET_NO_WINDOW (widget))
+ if (gtk_widget_get_has_window (widget))
{
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (widget->window,
@@ -375,7 +375,7 @@ gtk_fixed_size_allocate (GtkWidget *widget,
child_allocation.x = child->x + border_width;
child_allocation.y = child->y + border_width;
- if (GTK_WIDGET_NO_WINDOW (widget))
+ if (!gtk_widget_get_has_window (widget))
{
child_allocation.x += widget->allocation.x;
child_allocation.y += widget->allocation.y;
@@ -463,6 +463,8 @@ gtk_fixed_forall (GtkContainer *container,
*
* This function was added to provide an easy migration path for
* older applications which may expect #GtkFixed to have a separate window.
+ *
+ * Deprecated: 2.20: Use gtk_widget_set_has_window() instead.
**/
void
gtk_fixed_set_has_window (GtkFixed *fixed,
@@ -471,12 +473,9 @@ gtk_fixed_set_has_window (GtkFixed *fixed,
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_get_has_window (GTK_WIDGET (fixed)))
{
- if (has_window)
- GTK_WIDGET_UNSET_FLAGS (fixed, GTK_NO_WINDOW);
- else
- GTK_WIDGET_SET_FLAGS (fixed, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (fixed), has_window);
}
}
@@ -488,13 +487,15 @@ gtk_fixed_set_has_window (GtkFixed *fixed,
* See gtk_fixed_set_has_window().
*
* Return value: %TRUE if @fixed has its own window.
+ *
+ * Deprecated: 2.20: Use gtk_widget_get_has_window() instead.
**/
gboolean
gtk_fixed_get_has_window (GtkFixed *fixed)
{
g_return_val_if_fail (GTK_IS_FIXED (fixed), FALSE);
- return !GTK_WIDGET_NO_WINDOW (fixed);
+ return gtk_widget_get_has_window (GTK_WIDGET (fixed));
}
#define __GTK_FIXED_C__
diff --git a/gtk/gtkfixed.h b/gtk/gtkfixed.h
index 7c782473cd..6480a2d188 100644
--- a/gtk/gtkfixed.h
+++ b/gtk/gtkfixed.h
@@ -79,9 +79,11 @@ void gtk_fixed_move (GtkFixed *fixed,
GtkWidget *widget,
gint x,
gint y);
+#ifndef GTK_DISABLE_DEPRECATED
void gtk_fixed_set_has_window (GtkFixed *fixed,
gboolean has_window);
gboolean gtk_fixed_get_has_window (GtkFixed *fixed);
+#endif
G_END_DECLS