diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index c5f8bd8..56edb90 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1088,7 +1088,7 @@ gtk_container_destroy (GtkObject *object)
   GtkContainer *container = GTK_CONTAINER (object);
   GtkContainerPrivate *priv = container->priv;
 
-  if (GTK_CONTAINER_RESIZE_PENDING (container))
+  if (_gtk_widget_get_resize_pending (GTK_WIDGET (container)))
     _gtk_container_dequeue_resize_handler (container);
 
   if (priv->focus_child)
@@ -1280,10 +1280,10 @@ void
 _gtk_container_dequeue_resize_handler (GtkContainer *container)
 {
   g_return_if_fail (GTK_IS_CONTAINER (container));
-  g_return_if_fail (GTK_CONTAINER_RESIZE_PENDING (container));
+  g_return_if_fail (_gtk_widget_get_resize_pending (GTK_WIDGET (container)));
 
   container_resize_queue = g_slist_remove (container_resize_queue, container);
-  GTK_PRIVATE_UNSET_FLAG (container, GTK_RESIZE_PENDING);
+  _gtk_widget_set_resize_pending (GTK_WIDGET (container), FALSE);
 }
 
 /**
@@ -1394,7 +1394,7 @@ gtk_container_idle_sizer (gpointer data)
       widget = slist->data;
       g_slist_free_1 (slist);
 
-      GTK_PRIVATE_UNSET_FLAG (widget, GTK_RESIZE_PENDING);
+      _gtk_widget_set_resize_pending (widget, FALSE);
       gtk_container_check_resize (GTK_CONTAINER (widget));
     }
 
@@ -1420,9 +1420,9 @@ _gtk_container_queue_resize (GtkContainer *container)
   
   while (TRUE)
     {
-      GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
-      GTK_PRIVATE_SET_FLAG (widget, GTK_WIDTH_REQUEST_NEEDED);
-      GTK_PRIVATE_SET_FLAG (widget, GTK_HEIGHT_REQUEST_NEEDED);
+      _gtk_widget_set_alloc_needed (widget, TRUE);
+      _gtk_widget_set_width_request_needed (widget, TRUE);
+      _gtk_widget_set_height_request_needed (widget, TRUE);
 
       if ((resize_container && widget == GTK_WIDGET (resize_container)) ||
 	  !(parent = gtk_widget_get_parent (widget)))
@@ -1440,9 +1440,9 @@ _gtk_container_queue_resize (GtkContainer *container)
 	  switch (resize_container->priv->resize_mode)
 	    {
 	    case GTK_RESIZE_QUEUE:
-	      if (!GTK_CONTAINER_RESIZE_PENDING (resize_container))
+	      if (!_gtk_widget_get_resize_pending (GTK_WIDGET (resize_container)))
 		{
-		  GTK_PRIVATE_SET_FLAG (resize_container, GTK_RESIZE_PENDING);
+		  _gtk_widget_set_resize_pending (GTK_WIDGET (resize_container), TRUE);
 		  if (container_resize_queue == NULL)
 		    gdk_threads_add_idle_full (GTK_PRIORITY_RESIZE,
 				     gtk_container_idle_sizer,
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index e8f90bd..3efcdd1 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -612,7 +612,7 @@ gtk_expander_size_allocate (GtkWidget     *widget,
   child_ypad     = 2 * border_width + priv->spacing + (interior_focus ? 0 : 2 * focus_width + 2 * focus_pad);
   top_min_height = 2 * expander_spacing + expander_size;
 
-  child_visible = (child && GTK_WIDGET_CHILD_VISIBLE (child));
+  child_visible = (child && gtk_widget_get_child_visible (child));
 
   if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
     {
@@ -1111,7 +1111,7 @@ focus_in_site (GtkExpander      *expander,
       {
 	GtkWidget *child = gtk_bin_get_child (GTK_BIN (expander));
 
-	if (child && GTK_WIDGET_CHILD_VISIBLE (child))
+	if (child && gtk_widget_get_child_visible (child))
 	  return gtk_widget_child_focus (child, direction);
 	else
 	  return FALSE;
@@ -1329,7 +1329,7 @@ gtk_expander_get_width (GtkSizeRequest      *widget,
       *natural_size += label_nat;
     }
 
-  if (child && GTK_WIDGET_CHILD_VISIBLE (child))
+  if (child && gtk_widget_get_child_visible (child))
     {
       gint child_min, child_nat;
 
@@ -1399,7 +1399,7 @@ gtk_expander_get_height (GtkSizeRequest      *widget,
       *natural_size += extra;
     }
 
-  if (child && GTK_WIDGET_CHILD_VISIBLE (child))
+  if (child && gtk_widget_get_child_visible (child))
     {
       gint child_min, child_nat;
 
@@ -1474,7 +1474,7 @@ gtk_expander_get_height_for_width (GtkSizeRequest *widget,
       *natural_height += extra;
     }
 
-  if (child && GTK_WIDGET_CHILD_VISIBLE (child))
+  if (child && gtk_widget_get_child_visible (child))
     {
       gint child_min, child_nat;
 
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 6d9eca5..3c6844b 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1931,7 +1931,7 @@ gtk_grab_notify_foreach (GtkWidget *child,
 
   if (is_shadowed)
     {
-      GTK_PRIVATE_SET_FLAG (child, GTK_SHADOWED);
+      _gtk_widget_set_shadowed (child, TRUE);
       if (!was_shadowed && devices &&
 	  gtk_widget_is_sensitive (child))
         synth_crossing_for_grab_notify (child, info->new_grab_widget,
@@ -1940,7 +1940,7 @@ gtk_grab_notify_foreach (GtkWidget *child,
     }
   else
     {
-      GTK_PRIVATE_UNSET_FLAG (child, GTK_SHADOWED);
+      _gtk_widget_set_shadowed (child, FALSE);
       if (was_shadowed && devices &&
           gtk_widget_is_sensitive (child))
         synth_crossing_for_grab_notify (info->old_grab_widget, child,
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 09f8dde..2c73dd1 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1715,7 +1715,7 @@ gtk_notebook_map (GtkWidget *widget)
     {
       if (priv->action_widget[i] &&
           gtk_widget_get_visible (priv->action_widget[i]) &&
-          GTK_WIDGET_CHILD_VISIBLE (priv->action_widget[i]) &&
+          gtk_widget_get_child_visible (priv->action_widget[i]) &&
           !gtk_widget_get_mapped (priv->action_widget[i]))
         gtk_widget_map (priv->action_widget[i]);
     }
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index c31f070..6839ec7 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -418,7 +418,7 @@ _gtk_plug_remove_from_socket (GtkPlug   *plug,
   priv = plug->priv;
   widget = GTK_WIDGET (plug);
 
-  if (GTK_WIDGET_IN_REPARENT (widget))
+  if (_gtk_widget_get_in_reparent (widget))
     return;
 
   g_object_ref (plug);
@@ -428,12 +428,12 @@ _gtk_plug_remove_from_socket (GtkPlug   *plug,
   window = gtk_widget_get_window (widget);
 
   gdk_window_hide (window);
-  GTK_PRIVATE_SET_FLAG (plug, GTK_IN_REPARENT);
+  _gtk_widget_set_in_reparent (widget, TRUE);
   gdk_window_reparent (window,
 		       gtk_widget_get_root_window (widget),
 		       0, 0);
   gtk_widget_unparent (GTK_WIDGET (plug));
-  GTK_PRIVATE_UNSET_FLAG (plug, GTK_IN_REPARENT);
+  _gtk_widget_set_in_reparent (widget, FALSE);
   
   socket_->plug_widget = NULL;
   if (socket_->plug_window != NULL)
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index 9e5b4cf..44aed92 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -31,51 +31,6 @@
 
 G_BEGIN_DECLS
 
-/* The private flags that are used in the private_flags member of GtkWidget.
- */
-typedef enum
-{
-  PRIVATE_GTK_USER_STYLE            = 1 <<  0,
-  PRIVATE_GTK_RESIZE_PENDING        = 1 <<  2,
-  PRIVATE_GTK_HAS_POINTER           = 1 <<  3,   /* If the pointer is above a window belonging to the widget */
-  PRIVATE_GTK_SHADOWED		    = 1 <<  4,   /* If there is a grab in effect shadowing the widget */
-  PRIVATE_GTK_HAS_SHAPE_MASK	    = 1 <<  5,
-  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_CHILD_VISIBLE         = 1 <<  10,  /* If widget should be mapped when parent is mapped */
-  PRIVATE_GTK_REDRAW_ON_ALLOC       = 1 <<  11,  /* If we should queue a draw on the entire widget when it is reallocated */
-  PRIVATE_GTK_ALLOC_NEEDED          = 1 <<  12,  /* If we we should allocate even if the allocation is the same */
-  PRIVATE_GTK_WIDTH_REQUEST_NEEDED  = 1 <<  13,  /* Whether we need to call gtk_extended_layout_get_desired_width */
-  PRIVATE_GTK_HEIGHT_REQUEST_NEEDED = 1 <<  14   /* Whether we need to call gtk_extended_layout_get_desired_height */
-} GtkPrivateFlags;
-
-/* Macros for extracting a widgets private_flags from GtkWidget.
- */
-#define GTK_PRIVATE_FLAGS(wid)                (GTK_WIDGET (wid)->private_flags)
-#define GTK_WIDGET_USER_STYLE(obj)            ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_USER_STYLE) != 0)
-#define GTK_CONTAINER_RESIZE_PENDING(obj)     ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_RESIZE_PENDING) != 0)
-#define GTK_WIDGET_HAS_POINTER(obj)           ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HAS_POINTER) != 0)
-#define GTK_WIDGET_SHADOWED(obj)              ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_SHADOWED) != 0)
-#define GTK_WIDGET_HAS_SHAPE_MASK(obj)        ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HAS_SHAPE_MASK) != 0)
-#define GTK_WIDGET_IN_REPARENT(obj)           ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IN_REPARENT) != 0)
-#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)
-#define GTK_WIDGET_REDRAW_ON_ALLOC(obj)       ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_REDRAW_ON_ALLOC) != 0)
-#define GTK_WIDGET_ALLOC_NEEDED(obj)          ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_ALLOC_NEEDED) != 0)
-#define GTK_WIDGET_WIDTH_REQUEST_NEEDED(obj)  ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_WIDTH_REQUEST_NEEDED) != 0)
-#define GTK_WIDGET_HEIGHT_REQUEST_NEEDED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HEIGHT_REQUEST_NEEDED) != 0)
-
-/* Macros for setting and clearing private widget flags.
- * we use a preprocessor string concatenation here for a clear
- * flags/private_flags distinction at the cost of single flag operations.
- */
-#define GTK_PRIVATE_SET_FLAG(wid,flag)    G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) |= (PRIVATE_ ## flag)); }G_STMT_END
-#define GTK_PRIVATE_UNSET_FLAG(wid,flag)  G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) &= ~(PRIVATE_ ## flag)); }G_STMT_END
-
 #ifdef G_OS_WIN32
 
 const gchar *_gtk_get_datadir ();
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index 9116a18..4a3da3e 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -187,9 +187,9 @@ real_queue_resize (GtkWidget *widget)
 {
   GtkWidget *parent;
 
-  GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
-  GTK_PRIVATE_SET_FLAG (widget, GTK_WIDTH_REQUEST_NEEDED);
-  GTK_PRIVATE_SET_FLAG (widget, GTK_HEIGHT_REQUEST_NEEDED);
+  _gtk_widget_set_alloc_needed (widget, TRUE);
+  _gtk_widget_set_width_request_needed (widget, TRUE);
+  _gtk_widget_set_height_request_needed (widget, TRUE);
 
   parent = gtk_widget_get_parent (widget);
   if (parent)
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index e2ada95..a80aa29 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -229,7 +229,7 @@ compute_size_for_orientation (GtkSizeRequest    *request,
     {
       cached_size = &cache->widths[0];
 
-      if (!GTK_WIDGET_WIDTH_REQUEST_NEEDED (request))
+      if (!_gtk_widget_get_width_request_needed (widget))
         found_in_cache = get_cached_size (for_size, cache->widths, &cached_size);
       else
         {
@@ -241,7 +241,7 @@ compute_size_for_orientation (GtkSizeRequest    *request,
     {
       cached_size = &cache->heights[0];
 
-      if (!GTK_WIDGET_HEIGHT_REQUEST_NEEDED (request))
+      if (!_gtk_widget_get_height_request_needed (widget))
         found_in_cache = get_cached_size (for_size, cache->heights, &cached_size);
       else
         {
@@ -303,14 +303,14 @@ compute_size_for_orientation (GtkSizeRequest    *request,
           cached_size->age = cache->cached_width_age;
           cache->cached_width_age++;
 
-          GTK_PRIVATE_UNSET_FLAG (request, GTK_WIDTH_REQUEST_NEEDED);
+          _gtk_widget_set_width_request_needed (widget, FALSE);
         }
       else
         {
           cached_size->age = cache->cached_height_age;
           cache->cached_height_age++;
 
-          GTK_PRIVATE_UNSET_FLAG (request, GTK_HEIGHT_REQUEST_NEEDED);
+          _gtk_widget_set_height_request_needed (widget, FALSE);
         }
 
       adjusted_min = cached_size->minimum_size;
diff --git a/gtk/gtksocket-win32.c b/gtk/gtksocket-win32.c
index 8e9406f..d300304 100644
--- a/gtk/gtksocket-win32.c
+++ b/gtk/gtksocket-win32.c
@@ -43,7 +43,7 @@ GdkNativeWindow
 _gtk_socket_windowing_get_id (GtkSocket *socket)
 {
   g_return_val_if_fail (GTK_IS_SOCKET (socket), 0);
-  g_return_val_if_fail (GTK_WIDGET_ANCHORED (socket), 0);
+  g_return_val_if_fail (_gtk_widget_get_anchored (GTK_WIDGET (socket)), 0);
 
   if (!gtk_widget_get_realized (GTK_WIDGET (socket)))
     gtk_widget_realize (GTK_WIDGET (socket));
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 36d3119..fd2b996 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -309,7 +309,7 @@ gtk_socket_add_id (GtkSocket      *socket,
 		   GdkNativeWindow window_id)
 {
   g_return_if_fail (GTK_IS_SOCKET (socket));
-  g_return_if_fail (GTK_WIDGET_ANCHORED (socket));
+  g_return_if_fail (_gtk_widget_get_anchored (GTK_WIDGET (socket)));
 
   if (!gtk_widget_get_realized (GTK_WIDGET (socket)))
     gtk_widget_realize (GTK_WIDGET (socket));
@@ -334,7 +334,7 @@ GdkNativeWindow
 gtk_socket_get_id (GtkSocket *socket)
 {
   g_return_val_if_fail (GTK_IS_SOCKET (socket), 0);
-  g_return_val_if_fail (GTK_WIDGET_ANCHORED (socket), 0);
+  g_return_val_if_fail (_gtk_widget_get_anchored (GTK_WIDGET (socket)), 0);
 
   if (!gtk_widget_get_realized (GTK_WIDGET (socket)))
     gtk_widget_realize (GTK_WIDGET (socket));
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 18d468e..97fb799 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -3442,7 +3442,7 @@ gtk_text_view_allocate_children (GtkTextView *text_view)
            * get in the way. Invalidating the layout around the anchor
            * achieves this.
 	   */ 
-	  if (GTK_WIDGET_ALLOC_NEEDED (child->widget))
+	  if (_gtk_widget_get_alloc_needed (child->widget))
 	    {
 	      GtkTextIter end = child_loc;
 	      gtk_text_iter_forward_char (&end);
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 8c943c4..0ac4f18 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -3394,7 +3394,7 @@ toolbar_content_get_state (ToolbarContent *content)
 static gboolean
 toolbar_content_child_visible (ToolbarContent *content)
 {
-  return GTK_WIDGET_CHILD_VISIBLE (content->item);
+  return gtk_widget_get_child_visible (content->item);
 }
 
 static void
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 0be63a7..c408247 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -11790,7 +11790,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView       *tree_view,
    */
   if (!gtk_widget_get_visible (GTK_WIDGET (tree_view)) ||
       !gtk_widget_get_realized (GTK_WIDGET (tree_view)) ||
-      GTK_WIDGET_ALLOC_NEEDED (tree_view) || 
+      _gtk_widget_get_alloc_needed (tree_view) ||
       GTK_RBNODE_FLAG_SET (tree_view->priv->tree->root, GTK_RBNODE_DESCENDANTS_INVALID))
     {
       if (tree_view->priv->scroll_to_path)
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index bac9620..620d31f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -146,8 +146,39 @@ struct _GtkWidgetPrivate
    */
   guint saved_state : 3;
 
-  /* unused bits in our 32-bit block */
-  guint reserved : 10;
+  guint in_destruction        : 1;
+  guint toplevel              : 1;
+  guint anchored              : 1;
+  guint composite_child       : 1;
+  guint no_window             : 1;
+  guint realized              : 1;
+  guint mapped                : 1;
+  guint visible               : 1;
+  guint sensitive             : 1;
+  guint parent_sensitive      : 1;
+  guint can_focus             : 1;
+  guint has_focus             : 1;
+  guint can_default           : 1;
+  guint has_default           : 1;
+  guint receives_default      : 1;
+  guint has_grab              : 1;
+  guint shadowed              : 1;
+  guint rc_style              : 1;
+  guint user_style            : 1;
+  guint app_paintable         : 1;
+  guint double_buffered       : 1;
+  guint redraw_on_alloc       : 1;
+  guint no_show_all           : 1;
+  guint child_visible         : 1;
+  guint multidevice           : 1;
+  guint has_shape_mask        : 1;
+  guint in_reparent           : 1;
+  guint resize_pending        : 1;
+  guint alloc_needed          : 1;
+  guint width_request_needed  : 1;
+  guint height_request_needed : 1;
+
+  guint direction             : 2;
 
   /* The widget's name. If the widget does not have a name
    *  (the name is NULL), then its name (as returned by
@@ -183,6 +214,7 @@ struct _GtkWidgetPrivate
 };
 
 enum {
+  DESTROY,
   SHOW,
   HIDE,
   MAP,
@@ -1005,6 +1037,23 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                                                      GTK_PARAM_READWRITE));
 
   /**
+   * GtkWidget::destroy:
+   * @object: the object which received the signal
+   *
+   * Signals that all holders of a reference to the widget should release
+   * the reference that they hold. May result in finalization of the widget
+   * if all references are released.
+   */
+  widget_signals[DESTROY] =
+    g_signal_new (I_("destroy"),
+                  G_TYPE_FROM_CLASS (gobject_class),
+                  G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                  G_STRUCT_OFFSET (GtkWidgetClass, destroy),
+                  NULL, NULL,
+                  _gtk_marshal_VOID__VOID,
+                  G_TYPE_NONE, 0);
+
+  /**
    * GtkWidget::show:
    * @widget: the object which received the signal.
    */
@@ -3038,7 +3087,7 @@ gtk_widget_get_property (GObject         *object,
       g_value_set_boolean (value, (gtk_widget_get_receives_default (widget) != FALSE));
       break;
     case PROP_COMPOSITE_CHILD:
-      g_value_set_boolean (value, (GTK_OBJECT_FLAGS (widget) & GTK_COMPOSITE_CHILD) != 0 );
+      g_value_set_boolean (value, widget->priv->composite_child);
       break;
     case PROP_STYLE:
       g_value_set_object (value, gtk_widget_get_style (widget));
@@ -3127,7 +3176,7 @@ gtk_widget_init (GtkWidget *widget)
                                               GtkWidgetPrivate);
   priv = widget->priv;
 
-  GTK_PRIVATE_FLAGS (widget) = PRIVATE_GTK_CHILD_VISIBLE;
+  priv->child_visible = TRUE;
   priv->state = GTK_STATE_NORMAL;
   priv->saved_state = GTK_STATE_NORMAL;
   priv->name = NULL;
@@ -3138,15 +3187,14 @@ gtk_widget_init (GtkWidget *widget)
   priv->window = NULL;
   priv->parent = NULL;
 
-  GTK_OBJECT_FLAGS (widget) |= GTK_SENSITIVE;
-  GTK_OBJECT_FLAGS (widget) |= GTK_PARENT_SENSITIVE;
-  GTK_OBJECT_FLAGS (widget) |= composite_child_stack ? GTK_COMPOSITE_CHILD : 0;
-  gtk_widget_set_double_buffered (widget, TRUE);
-
-  GTK_PRIVATE_SET_FLAG (widget, GTK_REDRAW_ON_ALLOC);
-  GTK_PRIVATE_SET_FLAG (widget, GTK_WIDTH_REQUEST_NEEDED);
-  GTK_PRIVATE_SET_FLAG (widget, GTK_HEIGHT_REQUEST_NEEDED);
-  GTK_PRIVATE_SET_FLAG (widget, GTK_ALLOC_NEEDED);
+  priv->sensitive = TRUE;
+  priv->parent_sensitive = TRUE;
+  priv->composite_child = composite_child_stack != 0;
+  priv->double_buffered = TRUE;
+  priv->redraw_on_alloc = TRUE;
+  priv->width_request_needed = TRUE;
+  priv->height_request_needed = TRUE;
+  priv->alloc_needed = TRUE;
 
   priv->style = gtk_widget_get_default_style ();
   g_object_ref (priv->style);
@@ -3349,7 +3397,7 @@ gtk_widget_unparent (GtkWidget *widget)
   /* If we are unanchoring the child, we save around the toplevel
    * to emit hierarchy changed
    */
-  if (GTK_WIDGET_ANCHORED (priv->parent))
+  if (priv->parent->priv->anchored)
     g_object_ref (toplevel);
   else
     toplevel = NULL;
@@ -3366,7 +3414,7 @@ gtk_widget_unparent (GtkWidget *widget)
   
   if (gtk_widget_get_realized (widget))
     {
-      if (GTK_WIDGET_IN_REPARENT (widget))
+      if (priv->in_reparent)
 	gtk_widget_unmap (widget);
       else
 	gtk_widget_unrealize (widget);
@@ -3376,7 +3424,7 @@ gtk_widget_unparent (GtkWidget *widget)
    * flag to the default state, so it doesn't affect the child
    * in the next parent.
    */
-  GTK_PRIVATE_SET_FLAG (widget, GTK_CHILD_VISIBLE);
+  priv->child_visible = TRUE;
     
   old_parent = priv->parent;
   priv->parent = NULL;
@@ -3400,8 +3448,9 @@ gtk_widget_unparent (GtkWidget *widget)
  * gtk_widget_destroy:
  * @widget: a #GtkWidget
  *
- * Destroys a widget. Equivalent to gtk_object_destroy(), except that
- * you don't have to cast the widget to #GtkObject. When a widget is
+ * Destroys a widget.
+ *
+ * When a widget is
  * destroyed, it will break any references it holds to other objects.
  * If the widget is inside a container, the widget will be removed
  * from the container. If the widget is a toplevel (derived from
@@ -3420,7 +3469,8 @@ gtk_widget_destroy (GtkWidget *widget)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  gtk_object_destroy ((GtkObject*) widget);
+  if (!widget->priv->in_destruction)
+    g_object_run_dispose (G_OBJECT (widget));
 }
 
 /**
@@ -3487,11 +3537,11 @@ gtk_widget_real_show (GtkWidget *widget)
 
   if (!gtk_widget_get_visible (widget))
     {
-      GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
+      priv->visible = TRUE;
 
       if (priv->parent &&
 	  gtk_widget_get_mapped (priv->parent) &&
-	  GTK_WIDGET_CHILD_VISIBLE (widget) &&
+          gtk_widget_get_child_visible (widget) &&
 	  !gtk_widget_get_mapped (widget))
 	gtk_widget_map (widget);
     }
@@ -3573,7 +3623,7 @@ gtk_widget_real_hide (GtkWidget *widget)
 {
   if (gtk_widget_get_visible (widget))
     {
-      GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
+      widget->priv->visible = FALSE;
       
       if (gtk_widget_get_mapped (widget))
 	gtk_widget_unmap (widget);
@@ -3663,7 +3713,7 @@ gtk_widget_map (GtkWidget *widget)
 
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (gtk_widget_get_visible (widget));
-  g_return_if_fail (GTK_WIDGET_CHILD_VISIBLE (widget));
+  g_return_if_fail (gtk_widget_get_child_visible (widget));
 
   priv = widget->priv;
 
@@ -3806,7 +3856,7 @@ gtk_widget_realize (GtkWidget *widget)
   GtkWidgetShapeInfo *shape_info;
   
   g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail (GTK_WIDGET_ANCHORED (widget) ||
+  g_return_if_fail (widget->priv->anchored ||
 		    GTK_IS_INVISIBLE (widget));
 
   priv = widget->priv;
@@ -3835,7 +3885,7 @@ gtk_widget_realize (GtkWidget *widget)
 				       GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (widget), quark_has_tooltip)),
 				       TRUE);
 
-      if (GTK_WIDGET_HAS_SHAPE_MASK (widget))
+      if (priv->has_shape_mask)
 	{
 	  shape_info = g_object_get_qdata (G_OBJECT (widget), quark_shape_info);
 	  gdk_window_shape_combine_mask (priv->window,
@@ -3855,7 +3905,7 @@ gtk_widget_realize (GtkWidget *widget)
       if (mode != GDK_EXTENSION_EVENTS_NONE)
         gtk_widget_set_extension_events_internal (widget, mode, NULL);
 
-      if ((GTK_WIDGET_FLAGS (widget) & GTK_MULTIDEVICE) != 0)
+      if (priv->multidevice)
         gdk_window_set_support_multidevice (priv->window, TRUE);
 
       _gtk_widget_enable_device_events (widget);
@@ -3875,7 +3925,7 @@ gtk_widget_unrealize (GtkWidget *widget)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (GTK_WIDGET_HAS_SHAPE_MASK (widget))
+  if (widget->priv->has_shape_mask)
     gtk_widget_shape_combine_mask (widget, NULL, 0, 0);
 
   if (g_object_get_qdata (G_OBJECT (widget), quark_input_shape_info))
@@ -4226,10 +4276,10 @@ gtk_widget_size_allocate (GtkWidget	*widget,
     }
 #endif /* G_ENABLE_DEBUG */
  
-  alloc_needed = GTK_WIDGET_ALLOC_NEEDED (widget);
-  if (!GTK_WIDGET_WIDTH_REQUEST_NEEDED (widget) &&
-      !GTK_WIDGET_HEIGHT_REQUEST_NEEDED (widget))      /* Preserve request/allocate ordering */
-    GTK_PRIVATE_UNSET_FLAG (widget, GTK_ALLOC_NEEDED);
+  alloc_needed = priv->alloc_needed;
+  if (!priv->width_request_needed && !priv->height_request_needed)
+    /* Preserve request/allocate ordering */
+    priv->alloc_needed = FALSE;
 
   old_allocation = priv->allocation;
   real_allocation = *allocation;
@@ -4277,7 +4327,7 @@ gtk_widget_size_allocate (GtkWidget	*widget,
 
   if (gtk_widget_get_mapped (widget))
     {
-      if (!gtk_widget_get_has_window (widget) && GTK_WIDGET_REDRAW_ON_ALLOC (widget) && position_changed)
+      if (!gtk_widget_get_has_window (widget) && priv->redraw_on_alloc && position_changed)
 	{
 	  /* Invalidate union(old_allaction,priv->allocation) in priv->window
 	   */
@@ -4290,7 +4340,7 @@ gtk_widget_size_allocate (GtkWidget	*widget,
       
       if (size_changed)
 	{
-	  if (GTK_WIDGET_REDRAW_ON_ALLOC (widget))
+	  if (priv->redraw_on_alloc)
 	    {
 	      /* Invalidate union(old_allaction,priv->allocation) in priv->window and descendents owned by widget
 	       */
@@ -5481,16 +5531,16 @@ gtk_widget_reparent (GtkWidget *widget,
        * that gtk_widget_unparent doesn't unrealize widget
        */
       if (gtk_widget_get_realized (widget) && gtk_widget_get_realized (new_parent))
-	GTK_PRIVATE_SET_FLAG (widget, GTK_IN_REPARENT);
+	priv->in_reparent = TRUE;
       
       g_object_ref (widget);
       gtk_container_remove (GTK_CONTAINER (priv->parent), widget);
       gtk_container_add (GTK_CONTAINER (new_parent), widget);
       g_object_unref (widget);
       
-      if (GTK_WIDGET_IN_REPARENT (widget))
+      if (priv->in_reparent)
 	{
-	  GTK_PRIVATE_UNSET_FLAG (widget, GTK_IN_REPARENT);
+          priv->in_reparent = FALSE;
 
 	  gtk_widget_reparent_subwindows (widget, gtk_widget_get_parent_window (widget));
 	  gtk_widget_reparent_fixup_child (widget,
@@ -5818,12 +5868,9 @@ gtk_widget_set_can_focus (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (can_focus != gtk_widget_get_can_focus (widget))
+  if (widget->priv->can_focus != can_focus)
     {
-      if (can_focus)
-        GTK_OBJECT_FLAGS (widget) |= GTK_CAN_FOCUS;
-      else
-        GTK_OBJECT_FLAGS (widget) &= ~(GTK_CAN_FOCUS);
+      widget->priv->can_focus = can_focus;
 
       gtk_widget_queue_resize (widget);
       g_object_notify (G_OBJECT (widget), "can-focus");
@@ -5846,7 +5893,7 @@ gtk_widget_get_can_focus (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_CAN_FOCUS) != 0;
+  return widget->priv->can_focus;
 }
 
 /**
@@ -5866,7 +5913,7 @@ gtk_widget_has_focus (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_HAS_FOCUS) != 0;
+  return widget->priv->has_focus;
 }
 
 /**
@@ -5912,12 +5959,9 @@ gtk_widget_set_can_default (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (can_default != gtk_widget_get_can_default (widget))
+  if (widget->priv->can_default != can_default)
     {
-      if (can_default)
-        GTK_OBJECT_FLAGS (widget) |= GTK_CAN_DEFAULT;
-      else
-        GTK_OBJECT_FLAGS (widget) &= ~(GTK_CAN_DEFAULT);
+      widget->priv->can_default = can_default;
 
       gtk_widget_queue_resize (widget);
       g_object_notify (G_OBJECT (widget), "can-default");
@@ -5940,7 +5984,7 @@ gtk_widget_get_can_default (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_CAN_DEFAULT) != 0;
+  return widget->priv->can_default;
 }
 
 /**
@@ -5960,17 +6004,14 @@ gtk_widget_has_default (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_HAS_DEFAULT) != 0;
+  return widget->priv->has_default;
 }
 
 void
 _gtk_widget_set_has_default (GtkWidget *widget,
                              gboolean   has_default)
 {
-  if (has_default)
-    GTK_OBJECT_FLAGS (widget) |= GTK_HAS_DEFAULT;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_HAS_DEFAULT);
+  widget->priv->has_default = has_default;
 }
 
 /**
@@ -6023,12 +6064,9 @@ gtk_widget_set_receives_default (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (receives_default != gtk_widget_get_receives_default (widget))
+  if (widget->priv->receives_default != receives_default)
     {
-      if (receives_default)
-        GTK_OBJECT_FLAGS (widget) |= GTK_RECEIVES_DEFAULT;
-      else
-        GTK_OBJECT_FLAGS (widget) &= ~(GTK_RECEIVES_DEFAULT);
+      widget->priv->receives_default = receives_default;
 
       g_object_notify (G_OBJECT (widget), "receives-default");
     }
@@ -6054,7 +6092,7 @@ gtk_widget_get_receives_default (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_RECEIVES_DEFAULT) != 0;
+  return widget->priv->receives_default;
 }
 
 /**
@@ -6075,17 +6113,14 @@ gtk_widget_has_grab (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_HAS_GRAB) != 0;
+  return widget->priv->has_grab;
 }
 
 void
 _gtk_widget_set_has_grab (GtkWidget *widget,
                           gboolean   has_grab)
 {
-  if (has_grab)
-    GTK_OBJECT_FLAGS (widget) |= GTK_HAS_GRAB;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_HAS_GRAB);
+  widget->priv->has_grab = has_grab;
 }
 
 /**
@@ -6168,7 +6203,7 @@ gtk_widget_set_name (GtkWidget	 *widget,
   g_free (priv->name);
   priv->name = new_name;
 
-  if (gtk_widget_has_rc_style (widget))
+  if (priv->rc_style)
     gtk_widget_reset_rc_style (widget);
 
   g_object_notify (G_OBJECT (widget), "name");
@@ -6308,7 +6343,7 @@ gtk_widget_get_visible (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_VISIBLE) != 0;
+  return widget->priv->visible;
 }
 
 /**
@@ -6335,10 +6370,7 @@ gtk_widget_set_has_window (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (has_window)
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_NO_WINDOW);
-  else
-    GTK_OBJECT_FLAGS (widget) |= GTK_NO_WINDOW;
+  widget->priv->no_window = !has_window;
 }
 
 /**
@@ -6357,7 +6389,7 @@ gtk_widget_get_has_window (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return !((GTK_OBJECT_FLAGS (widget) & GTK_NO_WINDOW) != 0);
+  return ! widget->priv->no_window;
 }
 
 /**
@@ -6377,17 +6409,14 @@ gtk_widget_is_toplevel (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_TOPLEVEL) != 0;
+  return widget->priv->toplevel;
 }
 
 void
 _gtk_widget_set_is_toplevel (GtkWidget *widget,
                              gboolean   is_toplevel)
 {
-  if (is_toplevel)
-    GTK_OBJECT_FLAGS (widget) |= GTK_TOPLEVEL;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_TOPLEVEL);
+  widget->priv->toplevel = is_toplevel;
 }
 
 /**
@@ -6425,7 +6454,7 @@ gtk_widget_get_realized (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_REALIZED) != 0;
+  return widget->priv->realized;
 }
 
 /**
@@ -6446,10 +6475,7 @@ gtk_widget_set_realized (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (realized)
-    GTK_OBJECT_FLAGS (widget) |= GTK_REALIZED;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_REALIZED);
+  widget->priv->realized = realized;
 }
 
 /**
@@ -6467,7 +6493,7 @@ gtk_widget_get_mapped (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_MAPPED) != 0;
+  return widget->priv->mapped;
 }
 
 /**
@@ -6488,10 +6514,7 @@ gtk_widget_set_mapped (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (mapped)
-    GTK_OBJECT_FLAGS (widget) |= GTK_MAPPED;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_MAPPED);
+  widget->priv->mapped = mapped;
 }
 
 /**
@@ -6526,12 +6549,9 @@ gtk_widget_set_app_paintable (GtkWidget *widget,
 
   app_paintable = (app_paintable != FALSE);
 
-  if (gtk_widget_get_app_paintable (widget) != app_paintable)
+  if (widget->priv->app_paintable != app_paintable)
     {
-      if (app_paintable)
-        GTK_OBJECT_FLAGS (widget) |= GTK_APP_PAINTABLE;
-      else
-        GTK_OBJECT_FLAGS (widget) &= ~(GTK_APP_PAINTABLE);
+      widget->priv->app_paintable = app_paintable;
 
       if (gtk_widget_is_drawable (widget))
 	gtk_widget_queue_draw (widget);
@@ -6558,7 +6578,7 @@ gtk_widget_get_app_paintable (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_APP_PAINTABLE) != 0;
+  return widget->priv->app_paintable;
 }
 
 /**
@@ -6593,12 +6613,9 @@ gtk_widget_set_double_buffered (GtkWidget *widget,
 
   double_buffered = (double_buffered != FALSE);
 
-  if (double_buffered != gtk_widget_get_double_buffered (widget))
+  if (widget->priv->double_buffered != double_buffered)
     {
-      if (double_buffered)
-        GTK_OBJECT_FLAGS (widget) |= GTK_DOUBLE_BUFFERED;
-      else
-        GTK_OBJECT_FLAGS (widget) &= ~(GTK_DOUBLE_BUFFERED);
+      widget->priv->double_buffered = double_buffered;
 
       g_object_notify (G_OBJECT (widget), "double-buffered");
     }
@@ -6621,7 +6638,7 @@ gtk_widget_get_double_buffered (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_DOUBLE_BUFFERED) != 0;
+  return widget->priv->double_buffered;
 }
 
 /**
@@ -6652,10 +6669,7 @@ gtk_widget_set_redraw_on_allocate (GtkWidget *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (redraw_on_allocate)
-    GTK_PRIVATE_SET_FLAG (widget, GTK_REDRAW_ON_ALLOC);
-  else
-    GTK_PRIVATE_UNSET_FLAG (widget, GTK_REDRAW_ON_ALLOC);
+  widget->priv->redraw_on_alloc = redraw_on_allocate;
 }
 
 /**
@@ -6681,24 +6695,24 @@ gtk_widget_set_sensitive (GtkWidget *widget,
 
   sensitive = (sensitive != FALSE);
 
-  if (sensitive == (gtk_widget_get_sensitive (widget) != FALSE))
+  if (widget->priv->sensitive == sensitive)
     return;
 
   if (sensitive)
     {
-      GTK_OBJECT_FLAGS (widget) |= GTK_SENSITIVE;
+      widget->priv->sensitive = TRUE;
       data.state = priv->saved_state;
     }
   else
     {
-      GTK_OBJECT_FLAGS (widget) &= ~(GTK_SENSITIVE);
+      widget->priv->sensitive = FALSE;
       data.state = gtk_widget_get_state (widget);
     }
   data.state_restoration = TRUE;
   data.use_forall = TRUE;
 
   if (priv->parent)
-    data.parent_sensitive = (gtk_widget_is_sensitive (priv->parent) != FALSE);
+    data.parent_sensitive = gtk_widget_is_sensitive (priv->parent);
   else
     data.parent_sensitive = TRUE;
 
@@ -6728,7 +6742,7 @@ gtk_widget_get_sensitive (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_SENSITIVE) != 0;
+  return widget->priv->sensitive;
 }
 
 /**
@@ -6747,8 +6761,7 @@ gtk_widget_is_sensitive (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (gtk_widget_get_sensitive (widget) &&
-          (GTK_OBJECT_FLAGS (widget) & GTK_PARENT_SENSITIVE) != 0);
+  return widget->priv->sensitive && widget->priv->parent_sensitive;
 }
 
 /**
@@ -6806,7 +6819,7 @@ gtk_widget_set_parent (GtkWidget *widget,
   gtk_widget_reset_rc_styles (widget);
 
   g_signal_emit (widget, widget_signals[PARENT_SET], 0, NULL);
-  if (GTK_WIDGET_ANCHORED (priv->parent))
+  if (priv->parent->priv->anchored)
     _gtk_widget_propagate_hierarchy_changed (widget, NULL);
   g_object_notify (G_OBJECT (widget), "parent");
 
@@ -6818,7 +6831,7 @@ gtk_widget_set_parent (GtkWidget *widget,
   if (gtk_widget_get_visible (priv->parent) &&
       gtk_widget_get_visible (widget))
     {
-      if (GTK_WIDGET_CHILD_VISIBLE (widget) &&
+      if (gtk_widget_get_child_visible (widget) &&
 	  gtk_widget_get_mapped (priv->parent))
 	gtk_widget_map (widget);
 
@@ -6894,7 +6907,7 @@ gtk_widget_has_rc_style (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return (GTK_OBJECT_FLAGS (widget) & GTK_RC_STYLE) != 0;
+  return widget->priv->rc_style;
 }
 
 /**
@@ -6918,16 +6931,16 @@ gtk_widget_set_style (GtkWidget *widget,
     {
       gboolean initial_emission;
 
-      initial_emission = !gtk_widget_has_rc_style (widget) && !GTK_WIDGET_USER_STYLE (widget);
+      initial_emission = !widget->priv->rc_style && !widget->priv->user_style;
       
-      GTK_OBJECT_FLAGS (widget) &= ~(GTK_RC_STYLE);
-      GTK_PRIVATE_SET_FLAG (widget, GTK_USER_STYLE);
+      widget->priv->rc_style = FALSE;
+      widget->priv->user_style = TRUE;
       
       gtk_widget_set_style_internal (widget, style, initial_emission);
     }
   else
     {
-      if (GTK_WIDGET_USER_STYLE (widget))
+      if (widget->priv->user_style)
 	gtk_widget_reset_rc_style (widget);
     }
 }
@@ -6946,8 +6959,7 @@ gtk_widget_ensure_style (GtkWidget *widget)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (!GTK_WIDGET_USER_STYLE (widget) &&
-      !gtk_widget_has_rc_style (widget))
+  if (!widget->priv->rc_style && !widget->priv->user_style)
     gtk_widget_reset_rc_style (widget);
 }
 
@@ -6960,12 +6972,12 @@ gtk_widget_reset_rc_style (GtkWidget *widget)
   GtkWidgetPrivate *priv = widget->priv;
   GtkStyle *new_style = NULL;
   gboolean initial_emission;
-  
-  initial_emission = !gtk_widget_has_rc_style (widget) && !GTK_WIDGET_USER_STYLE (widget);
 
-  GTK_PRIVATE_UNSET_FLAG (widget, GTK_USER_STYLE);
-  GTK_OBJECT_FLAGS (widget) |= GTK_RC_STYLE;
-  
+  initial_emission = !priv->rc_style && !priv->user_style;
+
+  priv->user_style = FALSE;
+  priv->rc_style = TRUE;
+
   if (gtk_widget_has_screen (widget))
     new_style = gtk_rc_get_style (widget);
   if (!new_style)
@@ -7030,7 +7042,7 @@ gtk_widget_modify_style (GtkWidget      *widget,
    * modifier style and the only reference was our own.
    */
   
-  if (gtk_widget_has_rc_style (widget))
+  if (widget->priv->rc_style)
     gtk_widget_reset_rc_style (widget);
 }
 
@@ -7396,7 +7408,7 @@ gtk_widget_set_style_internal (GtkWidget *widget,
 		     initial_emission ? NULL : previous_style);
       g_object_unref (previous_style);
 
-      if (GTK_WIDGET_ANCHORED (widget) && !initial_emission)
+      if (priv->anchored && !initial_emission)
 	gtk_widget_queue_resize (widget);
     }
   else if (initial_emission)
@@ -7444,16 +7456,13 @@ gtk_widget_propagate_hierarchy_changed_recurse (GtkWidget *widget,
   GtkWidgetPrivate *priv = widget->priv;
   HierarchyChangedInfo *info = client_data;
   gboolean new_anchored = gtk_widget_is_toplevel (widget) ||
-                 (priv->parent && GTK_WIDGET_ANCHORED (priv->parent));
+                 (priv->parent && priv->parent->priv->anchored);
 
-  if (GTK_WIDGET_ANCHORED (widget) != new_anchored)
+  if (priv->anchored != new_anchored)
     {
       g_object_ref (widget);
-      
-      if (new_anchored)
-	GTK_PRIVATE_SET_FLAG (widget, GTK_ANCHORED);
-      else
-	GTK_PRIVATE_UNSET_FLAG (widget, GTK_ANCHORED);
+
+      priv->anchored = new_anchored;
       
       g_signal_emit (widget, widget_signals[HIERARCHY_CHANGED], 0, info->previous_toplevel);
       do_screen_change (widget, info->previous_screen, info->new_screen);
@@ -7477,8 +7486,8 @@ gtk_widget_propagate_hierarchy_changed_recurse (GtkWidget *widget,
  * emitting #GtkWidget::hierarchy-changed.
  **/
 void
-_gtk_widget_propagate_hierarchy_changed (GtkWidget    *widget,
-					 GtkWidget    *previous_toplevel)
+_gtk_widget_propagate_hierarchy_changed (GtkWidget *widget,
+					 GtkWidget *previous_toplevel)
 {
   GtkWidgetPrivate *priv = widget->priv;
   HierarchyChangedInfo info;
@@ -7487,7 +7496,7 @@ _gtk_widget_propagate_hierarchy_changed (GtkWidget    *widget,
   info.previous_screen = previous_toplevel ? gtk_widget_get_screen (previous_toplevel) : NULL;
 
   if (gtk_widget_is_toplevel (widget) ||
-      (priv->parent && GTK_WIDGET_ANCHORED (priv->parent)))
+      (priv->parent && priv->parent->priv->anchored))
     info.new_screen = gtk_widget_get_screen (widget);
   else
     info.new_screen = NULL;
@@ -7601,7 +7610,7 @@ _gtk_widget_propagate_screen_changed (GtkWidget    *widget,
 static void
 reset_rc_styles_recurse (GtkWidget *widget, gpointer data)
 {
-  if (gtk_widget_has_rc_style (widget))
+  if (widget->priv->rc_style)
     gtk_widget_reset_rc_style (widget);
   
   if (GTK_IS_CONTAINER (widget))
@@ -7945,12 +7954,12 @@ gtk_widget_set_child_visible (GtkWidget *widget,
   g_object_ref (widget);
 
   if (is_visible)
-    GTK_PRIVATE_SET_FLAG (widget, GTK_CHILD_VISIBLE);
+    priv->child_visible = TRUE;
   else
     {
       GtkWidget *toplevel;
-      
-      GTK_PRIVATE_UNSET_FLAG (widget, GTK_CHILD_VISIBLE);
+
+      priv->child_visible = FALSE;
 
       toplevel = gtk_widget_get_toplevel (widget);
       if (toplevel != widget && gtk_widget_is_toplevel (toplevel))
@@ -7960,7 +7969,7 @@ gtk_widget_set_child_visible (GtkWidget *widget,
   if (priv->parent && gtk_widget_get_realized (priv->parent))
     {
       if (gtk_widget_get_mapped (priv->parent) &&
-	  GTK_WIDGET_CHILD_VISIBLE (widget) &&
+	  priv->child_visible &&
 	  gtk_widget_get_visible (widget))
 	gtk_widget_map (widget);
       else
@@ -7988,7 +7997,7 @@ gtk_widget_get_child_visible (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
   
-  return GTK_WIDGET_CHILD_VISIBLE (widget);
+  return widget->priv->child_visible;
 }
 
 static GdkScreen *
@@ -8927,7 +8936,7 @@ gtk_widget_set_composite_name (GtkWidget   *widget,
 			       const gchar *name)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail ((GTK_OBJECT_FLAGS (widget) & GTK_COMPOSITE_CHILD) != 0);
+  g_return_if_fail (widget->priv->composite_child);
   g_return_if_fail (name != NULL);
 
   if (!quark_composite_name)
@@ -8958,7 +8967,7 @@ gtk_widget_get_composite_name (GtkWidget *widget)
 
   priv = widget->priv;
 
-  if (((GTK_OBJECT_FLAGS (widget) & GTK_COMPOSITE_CHILD) != 0) && priv->parent)
+  if (widget->priv->composite_child && priv->parent)
     return _gtk_container_child_composite_name (GTK_CONTAINER (priv->parent),
 					       widget);
   else
@@ -9116,17 +9125,8 @@ gtk_widget_set_direction (GtkWidget        *widget,
   g_return_if_fail (dir >= GTK_TEXT_DIR_NONE && dir <= GTK_TEXT_DIR_RTL);
 
   old_dir = gtk_widget_get_direction (widget);
-  
-  if (dir == GTK_TEXT_DIR_NONE)
-    GTK_PRIVATE_UNSET_FLAG (widget, GTK_DIRECTION_SET);
-  else
-    {
-      GTK_PRIVATE_SET_FLAG (widget, GTK_DIRECTION_SET);
-      if (dir == GTK_TEXT_DIR_LTR)
-	GTK_PRIVATE_SET_FLAG (widget, GTK_DIRECTION_LTR);
-      else
-	GTK_PRIVATE_UNSET_FLAG (widget, GTK_DIRECTION_LTR);
-    }
+
+  widget->priv->direction = dir;
 
   if (old_dir != gtk_widget_get_direction (widget))
     gtk_widget_emit_direction_changed (widget, old_dir);
@@ -9146,10 +9146,10 @@ gtk_widget_get_direction (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_TEXT_DIR_LTR);
   
-  if (GTK_WIDGET_DIRECTION_SET (widget))
-    return GTK_WIDGET_DIRECTION_LTR (widget) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL;
-  else
+  if (widget->priv->direction == GTK_TEXT_DIR_NONE)
     return gtk_default_direction;
+  else
+    return widget->priv->direction;
 }
 
 static void
@@ -9159,7 +9159,7 @@ gtk_widget_set_default_direction_recurse (GtkWidget *widget, gpointer data)
 
   g_object_ref (widget);
   
-  if (!GTK_WIDGET_DIRECTION_SET (widget))
+  if (widget->priv->direction == GTK_TEXT_DIR_NONE)
     gtk_widget_emit_direction_changed (widget, old_dir);
   
   if (GTK_IS_CONTAINER (widget))
@@ -9230,10 +9230,19 @@ gtk_widget_dispose (GObject *object)
   else if (gtk_widget_get_visible (widget))
     gtk_widget_hide (widget);
 
-  GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
+  priv->visible = FALSE;
   if (gtk_widget_get_realized (widget))
     gtk_widget_unrealize (widget);
-  
+
+  if (!priv->in_destruction)
+    {
+      priv->in_destruction = TRUE;
+
+      g_signal_emit (object, widget_signals[DESTROY], 0);
+
+      priv->in_destruction = FALSE;
+    }
+
   G_OBJECT_CLASS (gtk_widget_parent_class)->dispose (object);
 }
 
@@ -9250,14 +9259,12 @@ gtk_widget_real_destroy (GtkObject *object)
 
   /* Callers of add_mnemonic_label() should disconnect on ::destroy */
   g_object_set_qdata (G_OBJECT (widget), quark_mnemonic_labels, NULL);
-  
+
   gtk_grab_remove (widget);
 
   g_object_unref (priv->style);
   priv->style = gtk_widget_get_default_style ();
   g_object_ref (priv->style);
-
-  GTK_OBJECT_CLASS (gtk_widget_parent_class)->destroy (object);
 }
 
 static void
@@ -9283,6 +9290,12 @@ gtk_widget_finalize (GObject *object)
   if (accessible)
     g_object_unref (accessible);
 
+  if (g_object_is_floating (object))
+    g_warning ("A floating object was finalized. This means that someone\n"
+               "called g_object_unref() on an object that had only a floating\n"
+               "reference; the initial floating reference is not owned by anyone\n"
+               "and must be removed with g_object_ref_sink().");
+
   G_OBJECT_CLASS (gtk_widget_parent_class)->finalize (object);
 }
 
@@ -9861,10 +9874,7 @@ gtk_widget_propagate_state (GtkWidget           *widget,
    */
 
 
-  if (data->parent_sensitive)
-    GTK_OBJECT_FLAGS (widget) |= GTK_PARENT_SENSITIVE;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_PARENT_SENSITIVE);
+  priv->parent_sensitive = data->parent_sensitive;
 
   if (gtk_widget_is_sensitive (widget))
     {
@@ -9904,7 +9914,7 @@ gtk_widget_propagate_state (GtkWidget           *widget,
 
       g_signal_emit (widget, widget_signals[STATE_CHANGED], 0, old_state);
 
-      if (!GTK_WIDGET_SHADOWED (widget))
+      if (!priv->shadowed)
         {
           GList *event_windows = NULL;
           GList *devices, *d;
@@ -10057,7 +10067,7 @@ gtk_widget_shape_combine_mask (GtkWidget *widget,
 
   if (!shape_mask)
     {
-      GTK_PRIVATE_UNSET_FLAG (widget, GTK_HAS_SHAPE_MASK);
+      priv->has_shape_mask = FALSE;
 
       if (priv->window)
 	gdk_window_shape_combine_mask (priv->window, NULL, 0, 0);
@@ -10066,7 +10076,7 @@ gtk_widget_shape_combine_mask (GtkWidget *widget,
     }
   else
     {
-      GTK_PRIVATE_SET_FLAG (widget, GTK_HAS_SHAPE_MASK);
+      priv->has_shape_mask = TRUE;
       
       shape_info = g_slice_new (GtkWidgetShapeInfo);
       g_object_set_qdata_full (G_OBJECT (widget), quark_shape_info, shape_info,
@@ -10173,7 +10183,7 @@ gtk_widget_reset_shapes (GtkWidget *widget)
 
   priv = widget->priv;
 
-  if (!GTK_WIDGET_HAS_SHAPE_MASK (widget))
+  if (!priv->has_shape_mask)
     gtk_reset_shapes_recurse (widget, priv->window);
 }
 
@@ -11784,7 +11794,7 @@ gtk_widget_get_no_show_all (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
   
-  return (GTK_OBJECT_FLAGS (widget) & GTK_NO_SHOW_ALL) != 0;
+  return widget->priv->no_show_all;
 }
 
 /**
@@ -11809,15 +11819,12 @@ gtk_widget_set_no_show_all (GtkWidget *widget,
 
   no_show_all = (no_show_all != FALSE);
 
-  if (no_show_all == gtk_widget_get_no_show_all (widget))
-    return;
+  if (widget->priv->no_show_all != no_show_all)
+    {
+      widget->priv->no_show_all = no_show_all;
 
-  if (no_show_all)
-    GTK_OBJECT_FLAGS (widget) |= GTK_NO_SHOW_ALL;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_NO_SHOW_ALL);
-  
-  g_object_notify (G_OBJECT (widget), "no-show-all");
+      g_object_notify (G_OBJECT (widget), "no-show-all");
+    }
 }
 
 
@@ -12245,7 +12252,7 @@ gtk_widget_get_support_multidevice (GtkWidget *widget)
 {
   g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
 
-  return GTK_WIDGET_FLAGS (widget) & GTK_MULTIDEVICE;
+  return widget->priv->multidevice;
 }
 
 /**
@@ -12272,12 +12279,12 @@ gtk_widget_set_support_multidevice (GtkWidget *widget,
 
   if (support_multidevice)
     {
-      GTK_WIDGET_SET_FLAGS (widget, GTK_MULTIDEVICE);
+      priv->multidevice = TRUE;
       gtk_widget_set_extension_events (widget, GDK_EXTENSION_EVENTS_ALL);
     }
   else
     {
-      GTK_WIDGET_UNSET_FLAGS (widget, GTK_MULTIDEVICE);
+      priv->multidevice = FALSE;
       gtk_widget_set_extension_events (widget, GDK_EXTENSION_EVENTS_NONE);
     }
 
@@ -12289,10 +12296,7 @@ static void
 _gtk_widget_set_has_focus (GtkWidget *widget,
                            gboolean   has_focus)
 {
-  if (has_focus)
-    GTK_OBJECT_FLAGS (widget) |= GTK_HAS_FOCUS;
-  else
-    GTK_OBJECT_FLAGS (widget) &= ~(GTK_HAS_FOCUS);
+  widget->priv->has_focus = has_focus;
 }
 
 /**
@@ -12350,3 +12354,94 @@ gtk_widget_send_focus_change (GtkWidget *widget,
 
   return res;
 }
+
+gboolean
+_gtk_widget_get_resize_pending (GtkWidget *widget)
+{
+  return widget->priv->resize_pending;
+}
+
+void
+_gtk_widget_set_resize_pending (GtkWidget *widget,
+                                gboolean   resize_pending)
+{
+  widget->priv->resize_pending = resize_pending;
+}
+
+gboolean
+_gtk_widget_get_in_reparent (GtkWidget *widget)
+{
+  return widget->priv->in_reparent;
+}
+
+void
+_gtk_widget_set_in_reparent (GtkWidget *widget,
+                             gboolean   in_reparent)
+{
+  widget->priv->in_reparent = in_reparent;
+}
+
+gboolean
+_gtk_widget_get_anchored (GtkWidget *widget)
+{
+  return widget->priv->anchored;
+}
+
+void
+_gtk_widget_set_anchored (GtkWidget *widget,
+                          gboolean   anchored)
+{
+  widget->priv->anchored = anchored;
+}
+
+gboolean
+_gtk_widget_get_shadowed (GtkWidget *widget)
+{
+  return widget->priv->shadowed;
+}
+
+void
+_gtk_widget_set_shadowed (GtkWidget *widget,
+                          gboolean   shadowed)
+{
+  widget->priv->shadowed = shadowed;
+}
+
+gboolean
+_gtk_widget_get_alloc_needed (GtkWidget *widget)
+{
+  return widget->priv->alloc_needed;
+}
+
+void
+_gtk_widget_set_alloc_needed (GtkWidget *widget,
+                              gboolean   alloc_needed)
+{
+  widget->priv->alloc_needed = alloc_needed;
+}
+
+gboolean
+_gtk_widget_get_width_request_needed (GtkWidget *widget)
+{
+  return widget->priv->width_request_needed;
+}
+
+void
+_gtk_widget_set_width_request_needed (GtkWidget *widget,
+                                      gboolean   width_request_needed)
+{
+  widget->priv->width_request_needed = width_request_needed;
+}
+
+gboolean
+_gtk_widget_get_height_request_needed (GtkWidget *widget)
+{
+  return widget->priv->height_request_needed;
+}
+
+void
+_gtk_widget_set_height_request_needed (GtkWidget *widget,
+                                       gboolean   height_request_needed)
+{
+  widget->priv->height_request_needed = height_request_needed;
+}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 73c7bb6..f2617a2 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -33,7 +33,6 @@
 
 #include <gdk/gdk.h>
 #include <gtk/gtkaccelgroup.h>
-#include <gtk/gtkobject.h>
 #include <gtk/gtkadjustment.h>
 #include <gtk/gtkstyle.h>
 #include <gtk/gtksettings.h>
@@ -250,16 +249,7 @@ struct _GtkRequisition
  */
 struct _GtkWidget
 {
-  /* The object structure needs to be the first
-   *  element in the widget structure in order for
-   *  the object mechanism to work correctly. This
-   *  allows a GtkWidget pointer to be cast to a
-   *  GtkObject pointer.
-   */
-  GtkObject object;
-
-  /* internally used private flags. */
-  guint GSEAL (private_flags) : 16;
+  GInitiallyUnowned parent_instance;
 
   GtkWidgetPrivate *priv;
 };
@@ -284,13 +274,7 @@ struct _GtkWidget
  */
 struct _GtkWidgetClass
 {
-  /* The object class structure needs to be the first
-   *  element in the widget class structure in order for
-   *  the class mechanism to work correctly. This allows a
-   *  GtkWidgetClass pointer to be cast to a GtkObjectClass
-   *  pointer.
-   */
-  GtkObjectClass parent_class;
+  GInitiallyUnownedClass parent_class;
 
   /*< public >*/
   
@@ -306,6 +290,7 @@ struct _GtkWidgetClass
 					     GParamSpec **pspecs);
 
   /* basics */
+  void (* destroy)             (GtkWidget        *widget);
   void (* show)		       (GtkWidget        *widget);
   void (* show_all)            (GtkWidget        *widget);
   void (* hide)		       (GtkWidget        *widget);
@@ -987,6 +972,28 @@ void         _gtk_widget_buildable_finish_accelerator (GtkWidget *widget,
 						       GtkWidget *toplevel,
 						       gpointer   user_data);
 
+gboolean     _gtk_widget_get_resize_pending (GtkWidget *widget);
+void         _gtk_widget_set_resize_pending (GtkWidget *widget,
+                                             gboolean   resize_pending);
+gboolean     _gtk_widget_get_in_reparent    (GtkWidget *widget);
+void         _gtk_widget_set_in_reparent    (GtkWidget *widget,
+                                             gboolean   in_reparent);
+gboolean     _gtk_widget_get_anchored       (GtkWidget *widget);
+void         _gtk_widget_set_anchored       (GtkWidget *widget,
+                                             gboolean   anchored);
+gboolean     _gtk_widget_get_shadowed       (GtkWidget *widget);
+void         _gtk_widget_set_shadowed       (GtkWidget *widget,
+                                             gboolean   shadowed);
+gboolean     _gtk_widget_get_alloc_needed   (GtkWidget *widget);
+void         _gtk_widget_set_alloc_needed   (GtkWidget *widget,
+                                             gboolean   alloc_needed);
+gboolean     _gtk_widget_get_width_request_needed  (GtkWidget *widget);
+void         _gtk_widget_set_width_request_needed  (GtkWidget *widget,
+                                                    gboolean   width_request_needed);
+gboolean     _gtk_widget_get_height_request_needed (GtkWidget *widget);
+void         _gtk_widget_set_height_request_needed (GtkWidget *widget,
+                                                    gboolean   height_request_needed);
+
 G_END_DECLS
 
 #endif /* __GTK_WIDGET_H__ */
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 756266e..53af6da 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -986,7 +986,7 @@ gtk_window_init (GtkWindow *window)
   gtk_widget_set_has_window (GTK_WIDGET (window), TRUE);
   _gtk_widget_set_is_toplevel (GTK_WIDGET (window), TRUE);
 
-  GTK_PRIVATE_SET_FLAG (window, GTK_ANCHORED);
+  _gtk_widget_set_anchored (GTK_WIDGET (window), TRUE);
 
   gtk_container_set_resize_mode (GTK_CONTAINER (window), GTK_RESIZE_QUEUE);
 
