[gtk+/gtkobject-removal: 5/5] Remove GtkWidgetFlags



commit e33cd5a769878b05ddd60d00acd448ce70ec0e77
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Sep 18 19:58:14 2010 -0400

    Remove GtkWidgetFlags

 gtk/gtkwidget.h     |  132 ---------------------------------------------------
 gtk/tests/builder.c |   10 ----
 2 files changed, 0 insertions(+), 142 deletions(-)
---
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 413ca85..c106cb6 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -40,85 +40,6 @@
 
 G_BEGIN_DECLS
 
-/**
- * GtkWidgetFlags:
- * @GTK_TOPLEVEL: widgets without a real parent, as there are #GtkWindow<!-- -->s and
- *  #GtkMenu<!-- -->s have this flag set throughout their lifetime.
- *  Toplevel widgets always contain their own #GdkWindow.
- * @GTK_NO_WINDOW: Indicative for a widget that does not provide its own #GdkWindow.
- *  Visible action (e.g. drawing) is performed on the parent's #GdkWindow.
- * @GTK_REALIZED: Set by gtk_widget_realize(), unset by gtk_widget_unrealize().
- *  A realized widget has an associated #GdkWindow.
- * @GTK_MAPPED: Set by gtk_widget_map(), unset by gtk_widget_unmap().
- *  Only realized widgets can be mapped. It means that gdk_window_show()
- *  has been called on the widgets window(s).
- * @GTK_VISIBLE: Set by gtk_widget_show(), unset by gtk_widget_hide(). Implies that a
- *  widget will be mapped as soon as its parent is mapped.
- * @GTK_SENSITIVE: Set and unset by gtk_widget_set_sensitive().
- *  The sensitivity of a widget determines whether it will receive
- *  certain events (e.g. button or key presses). One premise for
- *  the widget's sensitivity is to have this flag set.
- * @GTK_PARENT_SENSITIVE: Set and unset by gtk_widget_set_sensitive() operations on the
- *  parents of the widget.
- *  This is the second premise for the widget's sensitivity. Once
- *  it has %GTK_SENSITIVE and %GTK_PARENT_SENSITIVE set, its state is
- *  effectively sensitive. This is expressed (and can be examined) by
- *  the #GTK_WIDGET_IS_SENSITIVE macro.
- * @GTK_CAN_FOCUS: Determines whether a widget is able to handle focus grabs.
- * @GTK_HAS_FOCUS: Set by gtk_widget_grab_focus() for widgets that also
- *  have %GTK_CAN_FOCUS set. The flag will be unset once another widget
- *  grabs the focus.
- * @GTK_CAN_DEFAULT: The widget is allowed to receive the default action via
- *  gtk_widget_grab_default() and will reserve space to draw the default if possible
- * @GTK_HAS_DEFAULT: The widget currently is receiving the default action and
- *  should be drawn appropriately if possible
- * @GTK_HAS_GRAB: Set by gtk_grab_add(), unset by gtk_grab_remove(). It means that the
- *  widget is in the grab_widgets stack, and will be the preferred one for
- *  receiving events other than ones of cosmetic value.
- * @GTK_RC_STYLE: Indicates that the widget's style has been looked up through the rc
- *  mechanism. It does not imply that the widget actually had a style
- *  defined through the rc mechanism.
- * @GTK_COMPOSITE_CHILD: Indicates that the widget is a composite child of its parent; see
- *  gtk_widget_push_composite_child(), gtk_widget_pop_composite_child().
- * @GTK_APP_PAINTABLE: Set and unset by gtk_widget_set_app_paintable().
- *  Must be set on widgets whose window the application directly draws on,
- *  in order to keep GTK+ from overwriting the drawn stuff.  See
- *  <xref linkend="app-paintable-widgets"/> for a detailed
- *  description of this flag.
- * @GTK_RECEIVES_DEFAULT: The widget when focused will receive the default action and have
- *  %GTK_HAS_DEFAULT set even if there is a different widget set as default.
- * @GTK_DOUBLE_BUFFERED: Set and unset by gtk_widget_set_double_buffered().
- *  Indicates that exposes done on the widget should be
- *  double-buffered.  See <xref linkend="double-buffering"/> for a
- *  detailed discussion of how double-buffering works in GTK+ and
- *  why you may want to disable it for special cases.
- * @GTK_NO_SHOW_ALL:
- *
- * Tells about certain properties of the widget.
- */
-typedef enum
-{
-  GTK_TOPLEVEL         = 1 << 4,
-  GTK_NO_WINDOW        = 1 << 5,
-  GTK_REALIZED         = 1 << 6,
-  GTK_MAPPED           = 1 << 7,
-  GTK_VISIBLE          = 1 << 8,
-  GTK_SENSITIVE        = 1 << 9,
-  GTK_PARENT_SENSITIVE = 1 << 10,
-  GTK_CAN_FOCUS        = 1 << 11,
-  GTK_HAS_FOCUS        = 1 << 12,
-  GTK_CAN_DEFAULT      = 1 << 13,
-  GTK_HAS_DEFAULT      = 1 << 14,
-  GTK_HAS_GRAB	       = 1 << 15,
-  GTK_RC_STYLE	       = 1 << 16,
-  GTK_COMPOSITE_CHILD  = 1 << 17,
-  GTK_APP_PAINTABLE    = 1 << 18,
-  GTK_RECEIVES_DEFAULT = 1 << 19,
-  GTK_DOUBLE_BUFFERED  = 1 << 20,
-  GTK_NO_SHOW_ALL      = 1 << 21,
-  GTK_MULTIDEVICE      = 1 << 22
-} GtkWidgetFlags;
-
 /* Kinds of widget-specific help */
 typedef enum
 {
@@ -136,59 +57,6 @@ typedef enum
 #define GTK_IS_WIDGET_CLASS(klass)	  (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET))
 #define GTK_WIDGET_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WIDGET, GtkWidgetClass))
 
-/* Macros for extracting the widget flags from GtkWidget.
- */
-/**
- * GTK_WIDGET_FLAGS:
- * @wid: a #GtkWidget.
- *
- * Returns the widget flags from @wid.
- *
- * Deprecated: 2.20: Use the proper function to test individual states:
- * gtk_widget_get_app_paintable(), gtk_widget_get_can_default(),
- * gtk_widget_get_can_focus(), gtk_widget_get_double_buffered(),
- * gtk_widget_has_default(), gtk_widget_is_drawable(),
- * gtk_widget_has_focus(), gtk_widget_has_grab(), gtk_widget_get_mapped(),
- * gtk_widget_get_has_window(), gtk_widget_has_rc_style(),
- * gtk_widget_get_realized(), gtk_widget_get_receives_default(),
- * gtk_widget_get_sensitive(), gtk_widget_is_sensitive(),
- * gtk_widget_is_toplevel() or gtk_widget_get_visible().
- */
-#define GTK_WIDGET_FLAGS(wid)		  (GTK_OBJECT_FLAGS (wid))
-/* FIXME: Deprecating GTK_WIDGET_FLAGS requires fixing GTK internals. */
-
-/* Macros for setting and clearing widget flags.
- */
-/**
- * GTK_WIDGET_SET_FLAGS:
- * @wid: a #GtkWidget.
- * @flag: the flags to set.
- *
- * Turns on certain widget flags.
- *
- * Deprecated: 2.22: Use the proper function instead: gtk_widget_set_app_paintable(),
- *   gtk_widget_set_can_default(), gtk_widget_set_can_focus(),
- *   gtk_widget_set_double_buffered(), gtk_widget_set_has_window(),
- *   gtk_widget_set_mapped(), gtk_widget_set_no_show_all(),
- *   gtk_widget_set_realized(), gtk_widget_set_receives_default(),
- *   gtk_widget_set_sensitive() or gtk_widget_set_visible().
- *
- */
-#define GTK_WIDGET_SET_FLAGS(wid,flag)	  G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END
-/* FIXME: Deprecating GTK_WIDGET_SET_FLAGS requires fixing GTK internals. */
-
-/**
- * GTK_WIDGET_UNSET_FLAGS:
- * @wid: a #GtkWidget.
- * @flag: the flags to unset.
- *
- * Turns off certain widget flags.
- *
- * Deprecated: 2.22: Use the proper function instead. See GTK_WIDGET_SET_FLAGS().
- */
-#define GTK_WIDGET_UNSET_FLAGS(wid,flag)  G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END
-/* FIXME: Deprecating GTK_WIDGET_UNSET_FLAGS requires fixing GTK internals. */
-
 #define GTK_TYPE_REQUISITION              (gtk_requisition_get_type ())
 
 /* forward declaration to avoid excessive includes (and concurrent includes)
diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
index e35abd4..0a3f625 100644
--- a/gtk/tests/builder.c
+++ b/gtk/tests/builder.c
@@ -1844,17 +1844,7 @@ test_value_from_string (void)
                              GTK_BUILDER_ERROR_INVALID_VALUE));
   g_error_free (error);
   error = NULL;
-  
-  g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_WIDGET_FLAGS, "mapped", &value, &error) == TRUE);
-  g_assert (G_VALUE_HOLDS_FLAGS (&value));
-  g_assert (g_value_get_flags (&value) == GTK_MAPPED);
-  g_value_unset (&value);
 
-  g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_WIDGET_FLAGS, "GTK_VISIBLE | GTK_REALIZED", &value, &error) == TRUE);
-  g_assert (G_VALUE_HOLDS_FLAGS (&value));
-  g_assert (g_value_get_flags (&value) == (GTK_VISIBLE | GTK_REALIZED));
-  g_value_unset (&value);
-  
   g_assert (gtk_builder_value_from_string_type (builder, GTK_TYPE_WINDOW_TYPE, "foobar", &value, &error) == FALSE);
   g_value_unset (&value);
   g_assert (g_error_matches (error,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]