summaryrefslogtreecommitdiff
path: root/gtk/gtkprivate.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-07-19 14:57:15 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-07-19 14:57:15 +0000
commitaa49527fa78bf5b3a3f1394092b248e27e1bfa3f (patch)
treea1b7651c9e379ab1f7ffe2af68727cdccdf682e6 /gtk/gtkprivate.h
parent8f2bf7976d73ba58b808002268c49a19e9b586ee (diff)
downloadgtk+-aa49527fa78bf5b3a3f1394092b248e27e1bfa3f.tar.gz
Enforce the widget/child realization/mapping invariants.
Sat Jul 7 02:50:14 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_set_parent): Enforce the widget/child realization/mapping invariants. * gtk/gtkwidget.[ch] gtk/gtkprivate.h: Add functions gtk_widget_[get/set]_child_visible() to control whether visible children of a mapped window are mapped. * docs/widget_system.txt: Updated for changes in container contract, and addition of GTK_CHILD_VISIBLE. * gtk/gtkcontainer.c: Add generic map()/unmap() functions that work for almost all containers. * gtk/gtknotebook.c gtk/gtkpacker.c: Use gtk_widget_set_child_visible() where necessary. * gtk/*.c: Remove excess map(), unmap(), and realization/mapping invariant enforcing code from many containers.
Diffstat (limited to 'gtk/gtkprivate.h')
-rw-r--r--gtk/gtkprivate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index af9822c674..66943590c3 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -49,7 +49,8 @@ typedef enum
PRIVATE_GTK_IN_REPARENT = 1 << 6,
PRIVATE_GTK_DIRECTION_SET = 1 << 7, /* If the reading direction is not DIR_NONE */
PRIVATE_GTK_DIRECTION_LTR = 1 << 8, /* If the reading direction is DIR_LTR */
- PRIVATE_GTK_ANCHORED = 1 << 9 /* If widget has a GtkWindow ancestor */
+ PRIVATE_GTK_ANCHORED = 1 << 9, /* If widget has a GtkWindow ancestor */
+ PRIVATE_GTK_CHILD_VISIBLE = 1 << 10 /* If widget should be mapped when parent is mapped */
} GtkPrivateFlags;
/* Macros for extracting a widgets private_flags from GtkWidget.
@@ -64,6 +65,7 @@ typedef enum
#define GTK_WIDGET_DIRECTION_SET(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_DIRECTION_SET) != 0)
#define GTK_WIDGET_DIRECTION_LTR(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_DIRECTION_LTR) != 0)
#define GTK_WIDGET_ANCHORED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_ANCHORED) != 0)
+#define GTK_WIDGET_CHILD_VISIBLE(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_CHILD_VISIBLE) != 0)
/* Macros for setting and clearing private widget flags.
* we use a preprocessor string concatenation here for a clear