diff -ru gtk-demo.orig/changedisplay.c gtk-demo/changedisplay.c
--- gtk-demo.orig/changedisplay.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/changedisplay.c	2012-01-03 12:08:46.000000000 -0800
@@ -128,7 +128,7 @@
   gtk_widget_show_all (popup);
   cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
 
-  if (gdk_pointer_grab (popup->window, FALSE,
+  if (gdk_pointer_grab (gtk_widget_get_window (popup), FALSE,
 			GDK_BUTTON_RELEASE_MASK,
 			NULL,
 			cursor,
@@ -248,11 +248,11 @@
   dialog_label =
     gtk_label_new ("Please enter the name of\nthe new display\n");
 
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog_label);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), display_entry);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), dialog_label);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), display_entry);
 
   gtk_widget_grab_focus (display_entry);
-  gtk_widget_show_all (GTK_BIN (dialog)->child);
+  gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (dialog)));
 
   while (!result)
     {
@@ -621,7 +621,7 @@
       vbox = gtk_vbox_new (FALSE, 5);
       gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
 
-      gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->window)->vbox), vbox,
+      gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (info->window))), vbox,
 			  TRUE, TRUE, 0);
 
       frame = create_display_frame (info);
diff -ru gtk-demo.orig/clipboard.c gtk-demo/clipboard.c
--- gtk-demo.orig/clipboard.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/clipboard.c	2012-01-03 12:08:46.000000000 -0800
@@ -125,7 +125,7 @@
 {
   GdkPixbuf *pixbuf;
 
-  if (selection_data->length > 0)
+  if (gtk_selection_data_get_length (selection_data) > 0)
     {
       pixbuf = gtk_selection_data_get_pixbuf (selection_data);
       gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
diff -ru gtk-demo.orig/colorsel.c gtk-demo/colorsel.c
--- gtk-demo.orig/colorsel.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/colorsel.c	2012-01-03 12:12:24.000000000 -0800
@@ -19,14 +19,14 @@
                        GdkEventExpose *event, 
                        gpointer        data)
 {
-  if (widget->window)
+  if (gtk_widget_get_window (widget))
     {
       GtkStyle *style;
       cairo_t *cr;
 
       style = gtk_widget_get_style (widget);
 
-      cr = gdk_cairo_create (widget->window);
+      cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
       gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
       gdk_cairo_rectangle (cr, &event->area);
@@ -50,7 +50,8 @@
 
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
   
-  colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (dialog)->colorsel);
+  colorsel = 
+    GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (dialog)));
 
   gtk_color_selection_set_previous_color (colorsel, &color);
   gtk_color_selection_set_current_color (colorsel, &color);
diff -ru gtk-demo.orig/combobox.c gtk-demo/combobox.c
--- gtk-demo.orig/combobox.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/combobox.c	2012-01-03 12:08:46.000000000 -0800
@@ -435,7 +435,7 @@
     entry = g_object_new (TYPE_MASK_ENTRY, NULL);
     MASK_ENTRY (entry)->mask = "^([0-9]*|One|Two|2\302\275|Three)$";
      
-    gtk_container_remove (GTK_CONTAINER (combo), GTK_BIN (combo)->child);
+    gtk_container_remove (GTK_CONTAINER (combo), gtk_bin_get_child (GTK_BIN (combo)));
     gtk_container_add (GTK_CONTAINER (combo), entry);
   
   }
diff -ru gtk-demo.orig/dialog.c gtk-demo/dialog.c
--- gtk-demo.orig/dialog.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/dialog.c	2012-01-03 12:08:46.000000000 -0800
@@ -53,7 +53,7 @@
 
   hbox = gtk_hbox_new (FALSE, 8);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox, FALSE, FALSE, 0);
 
   stock = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
   gtk_box_pack_start (GTK_BOX (hbox), stock, FALSE, FALSE, 0);
diff -ru gtk-demo.orig/drawingarea.c gtk-demo/drawingarea.c
--- gtk-demo.orig/drawingarea.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/drawingarea.c	2012-01-03 12:18:01.000000000 -0800
@@ -26,14 +26,17 @@
                           gpointer           data)
 {
   cairo_t *cr;
+  GtkAllocation allocation;
+  
+  gtk_widget_get_allocation (widget, &allocation);
 
   if (surface)
     cairo_surface_destroy (surface);
 
-  surface = gdk_window_create_similar_surface (widget->window,
+  surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
                                                CAIRO_CONTENT_COLOR,
-                                               widget->allocation.width,
-                                               widget->allocation.height);
+                                               allocation.width,
+                                               allocation.height);
 
   /* Initialize the surface to white */
   cr = cairo_create (surface);
@@ -55,7 +58,7 @@
 {
   cairo_t *cr;
 
-  cr = gdk_cairo_create (widget->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
   
   cairo_set_source_surface (cr, surface, 0, 0);
   gdk_cairo_rectangle (cr, &event->area);
@@ -89,7 +92,7 @@
   cairo_destroy (cr);
 
   /* Now invalidate the affected region of the drawing area. */
-  gdk_window_invalidate_rect (widget->window,
+  gdk_window_invalidate_rect (gtk_widget_get_window (widget),
                               &update_rect,
                               FALSE);
 }
@@ -148,6 +151,9 @@
 {
   gint i, j, xcount, ycount;
   cairo_t *cr;
+  GtkAllocation allocation;
+  
+  gtk_widget_get_allocation (da, &allocation);
 
 #define CHECK_SIZE 10
 #define SPACING 2
@@ -159,17 +165,17 @@
    * works.
    */
 
-  cr = gdk_cairo_create (da->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (da));
   gdk_cairo_rectangle (cr, &event->area);
   cairo_clip (cr);
 
   xcount = 0;
   i = SPACING;
-  while (i < da->allocation.width)
+  while (i < allocation.width)
     {
       j = SPACING;
       ycount = xcount % 2; /* start with even/odd depending on row */
-      while (j < da->allocation.height)
+      while (j < allocation.height)
         {
           if (ycount % 2)
             cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
diff -ru gtk-demo.orig/entry_buffer.c gtk-demo/entry_buffer.c
--- gtk-demo.orig/entry_buffer.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/entry_buffer.c	2012-01-03 12:08:46.000000000 -0800
@@ -32,7 +32,7 @@
 		      G_CALLBACK (gtk_widget_destroyed), &window);
 
     vbox = gtk_vbox_new (FALSE, 5);
-    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), vbox, TRUE, TRUE, 0);
     gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
     label = gtk_label_new (NULL);
diff -ru gtk-demo.orig/entry_completion.c gtk-demo/entry_completion.c
--- gtk-demo.orig/entry_completion.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/entry_completion.c	2012-01-03 12:08:46.000000000 -0800
@@ -59,7 +59,7 @@
 		      G_CALLBACK (gtk_widget_destroyed), &window);
 
     vbox = gtk_vbox_new (FALSE, 5);
-    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), vbox, TRUE, TRUE, 0);
     gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
     label = gtk_label_new (NULL);
diff -ru gtk-demo.orig/expander.c gtk-demo/expander.c
--- gtk-demo.orig/expander.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/expander.c	2012-01-03 12:08:46.000000000 -0800
@@ -33,7 +33,7 @@
 		      G_CALLBACK (gtk_widget_destroyed), &window);
 
     vbox = gtk_vbox_new (FALSE, 5);
-    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), vbox, TRUE, TRUE, 0);
     gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
     label = gtk_label_new ("Expander demo. Click on the triangle for details.");
diff -ru gtk-demo.orig/hypertext.c gtk-demo/hypertext.c
--- gtk-demo.orig/hypertext.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/hypertext.c	2012-01-03 12:08:46.000000000 -0800
@@ -225,7 +225,7 @@
 
   set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
 
-  gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
+  gdk_window_get_pointer (gtk_widget_get_window (text_view), NULL, NULL, NULL);
   return FALSE;
 }
 
@@ -238,7 +238,7 @@
 {
   gint wx, wy, bx, by;
   
-  gdk_window_get_pointer (text_view->window, &wx, &wy, NULL);
+  gdk_window_get_pointer (gtk_widget_get_window (text_view), &wx, &wy, NULL);
   
   gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view), 
                                          GTK_TEXT_WINDOW_WIDGET,
diff -ru gtk-demo.orig/offscreen_window.c gtk-demo/offscreen_window.c
--- gtk-demo.orig/offscreen_window.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/offscreen_window.c	2012-01-03 12:08:46.000000000 -0800
@@ -74,7 +74,7 @@
 
   s = sin (bin->angle);
   c = cos (bin->angle);
-  child_area = bin->child->allocation;
+  gtk_widget_get_allocation (bin->child, &child_area);
 
   w = c * child_area.width + s * child_area.height;
   h = s * child_area.width + c * child_area.height;
@@ -114,7 +114,7 @@
 
   s = sin (bin->angle);
   c = cos (bin->angle);
-  child_area = bin->child->allocation;
+  gtk_widget_get_allocation (bin->child, &child_area);
 
   w = c * child_area.width + s * child_area.height;
   h = s * child_area.width + c * child_area.height;
@@ -188,7 +188,7 @@
     {
       to_child (bin, widget_x, widget_y, &x, &y);
 
-      child_area = bin->child->allocation;
+      gtk_widget_get_allocation (bin->child, &child_area);
 
       if (x >= 0 && x < child_area.width &&
           y >= 0 && y < child_area.height)
@@ -228,15 +228,17 @@
   gint attributes_mask;
   gint border_width;
   GtkRequisition child_requisition;
+  GtkAllocation widget_allocation, bin_child_allocation;
 
   gtk_widget_set_realized (widget, TRUE);
 
-  border_width = GTK_CONTAINER (widget)->border_width;
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+  gtk_widget_get_allocation (widget, &widget_allocation);
 
-  attributes.x = widget->allocation.x + border_width;
-  attributes.y = widget->allocation.y + border_width;
-  attributes.width = widget->allocation.width - 2 * border_width;
-  attributes.height = widget->allocation.height - 2 * border_width;
+  attributes.x = widget_allocation.x + border_width;
+  attributes.y = widget_allocation.y + border_width;
+  attributes.width = widget_allocation.width - 2 * border_width;
+  attributes.height = widget_allocation.height - 2 * border_width;
   attributes.window_type = GDK_WINDOW_CHILD;
   attributes.event_mask = gtk_widget_get_events (widget)
                         | GDK_EXPOSURE_MASK
@@ -253,10 +255,10 @@
 
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
 
-  widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
-                                   &attributes, attributes_mask);
-  gdk_window_set_user_data (widget->window, widget);
-  g_signal_connect (widget->window, "pick-embedded-child",
+  gtk_widget_set_window (widget, gdk_window_new (gtk_widget_get_parent_window (widget),
+                                   &attributes, attributes_mask));
+  gdk_window_set_user_data (gtk_widget_get_window (widget), widget);
+  g_signal_connect (gtk_widget_get_window (widget), "pick-embedded-child",
                     G_CALLBACK (pick_offscreen_child), bin);
 
   attributes.window_type = GDK_WINDOW_OFFSCREEN;
@@ -264,24 +266,25 @@
   child_requisition.width = child_requisition.height = 0;
   if (bin->child && gtk_widget_get_visible (bin->child))
     {
-      attributes.width = bin->child->allocation.width;
-      attributes.height = bin->child->allocation.height;
+      gtk_widget_get_allocation (bin->child, &bin_child_allocation);
+      attributes.width = bin_child_allocation.width;
+      attributes.height = bin_child_allocation.height;
     }
   bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
                                           &attributes, attributes_mask);
   gdk_window_set_user_data (bin->offscreen_window, widget);
   if (bin->child)
     gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
-  gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
+  gdk_offscreen_window_set_embedder (bin->offscreen_window, gtk_widget_get_window (widget));
   g_signal_connect (bin->offscreen_window, "to-embedder",
                     G_CALLBACK (offscreen_window_to_parent), bin);
   g_signal_connect (bin->offscreen_window, "from-embedder",
                     G_CALLBACK (offscreen_window_from_parent), bin);
 
-  widget->style = gtk_style_attach (widget->style, widget->window);
+  gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), gtk_widget_get_window (widget)));
 
-  gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
-  gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
+  gtk_style_set_background (gtk_widget_get_style (widget), gtk_widget_get_window (widget), GTK_STATE_NORMAL);
+  gtk_style_set_background (gtk_widget_get_style (widget), bin->offscreen_window, GTK_STATE_NORMAL);
   gdk_window_show (bin->offscreen_window);
 }
 
@@ -376,9 +379,12 @@
 {
   GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
   GtkRequisition child_requisition;
+  gint border_width;
   double s, c;
   double w, h;
-
+  
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+  
   child_requisition.width = 0;
   child_requisition.height = 0;
 
@@ -390,8 +396,8 @@
   w = c * child_requisition.width + s * child_requisition.height;
   h = s * child_requisition.width + c * child_requisition.height;
 
-  requisition->width = GTK_CONTAINER (widget)->border_width * 2 + w;
-  requisition->height = GTK_CONTAINER (widget)->border_width * 2 + h;
+  requisition->width = border_width * 2 + w;
+  requisition->height = border_width * 2 + h;
 }
 
 static void
@@ -403,15 +409,15 @@
   gint w, h;
   gdouble s, c;
 
-  widget->allocation = *allocation;
+  gtk_widget_set_allocation (widget, allocation);
 
-  border_width = GTK_CONTAINER (widget)->border_width;
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 
   w = allocation->width - border_width * 2;
   h = allocation->height - border_width * 2;
 
   if (gtk_widget_get_realized (widget))
-    gdk_window_move_resize (widget->window,
+    gdk_window_move_resize (gtk_widget_get_window (widget),
                             allocation->x + border_width,
                             allocation->y + border_width,
                             w, h);
@@ -452,7 +458,7 @@
 gtk_rotated_bin_damage (GtkWidget      *widget,
                         GdkEventExpose *event)
 {
-  gdk_window_invalidate_rect (widget->window, NULL, FALSE);
+  gdk_window_invalidate_rect (gtk_widget_get_window (widget), NULL, FALSE);
 
   return TRUE;
 }
@@ -468,7 +474,7 @@
 
   if (gtk_widget_is_drawable (widget))
     {
-      if (event->window == widget->window)
+      if (event->window == gtk_widget_get_window (widget))
         {
           GdkPixmap *pixmap;
           GtkAllocation child_area;
@@ -477,9 +483,9 @@
           if (bin->child && gtk_widget_get_visible (bin->child))
             {
               pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
-              child_area = bin->child->allocation;
+              gtk_widget_get_allocation (bin->child, &child_area);
 
-              cr = gdk_cairo_create (widget->window);
+              cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
               /* transform */
               s = sin (bin->angle);
@@ -505,7 +511,7 @@
         }
       else if (event->window == bin->offscreen_window)
         {
-          gtk_paint_flat_box (widget->style, event->window,
+          gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
                               GTK_STATE_NORMAL, GTK_SHADOW_NONE,
                               &event->area, widget, "blah",
                               0, 0, -1, -1);
diff -ru gtk-demo.orig/offscreen_window2.c gtk-demo/offscreen_window2.c
--- gtk-demo.orig/offscreen_window2.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/offscreen_window2.c	2012-01-03 12:08:46.000000000 -0800
@@ -126,7 +126,7 @@
     {
       to_child (bin, widget_x, widget_y, &x, &y);
 
-      child_area = bin->child->allocation;
+      gtk_widget_get_allocation (bin->child, &child_area);
 
       if (x >= 0 && x < child_area.width &&
           y >= 0 && y < child_area.height)
@@ -166,15 +166,17 @@
   gint attributes_mask;
   gint border_width;
   GtkRequisition child_requisition;
+  GtkAllocation widget_allocation, bin_child_allocation;
 
   gtk_widget_set_realized (widget, TRUE);
 
-  border_width = GTK_CONTAINER (widget)->border_width;
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+  gtk_widget_get_allocation (widget, &widget_allocation);
 
-  attributes.x = widget->allocation.x + border_width;
-  attributes.y = widget->allocation.y + border_width;
-  attributes.width = widget->allocation.width - 2 * border_width;
-  attributes.height = widget->allocation.height - 2 * border_width;
+  attributes.x = widget_allocation.x + border_width;
+  attributes.y = widget_allocation.y + border_width;
+  attributes.width = widget_allocation.width - 2 * border_width;
+  attributes.height = widget_allocation.height - 2 * border_width;
   attributes.window_type = GDK_WINDOW_CHILD;
   attributes.event_mask = gtk_widget_get_events (widget)
                         | GDK_EXPOSURE_MASK
@@ -191,10 +193,10 @@
 
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
 
-  widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
-                                   &attributes, attributes_mask);
-  gdk_window_set_user_data (widget->window, widget);
-  g_signal_connect (widget->window, "pick-embedded-child",
+  gtk_widget_set_window (widget, gdk_window_new (gtk_widget_get_parent_window (widget),
+                                   &attributes, attributes_mask));
+  gdk_window_set_user_data (gtk_widget_get_window (widget), widget);
+  g_signal_connect (gtk_widget_get_window (widget), "pick-embedded-child",
                     G_CALLBACK (pick_offscreen_child), bin);
 
   attributes.window_type = GDK_WINDOW_OFFSCREEN;
@@ -202,24 +204,25 @@
   child_requisition.width = child_requisition.height = 0;
   if (bin->child && gtk_widget_get_visible (bin->child))
     {
-      attributes.width = bin->child->allocation.width;
-      attributes.height = bin->child->allocation.height;
+      gtk_widget_get_allocation (bin->child, &bin_child_allocation);
+      attributes.width = bin_child_allocation.width;
+      attributes.height = bin_child_allocation.height;
     }
   bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
                                           &attributes, attributes_mask);
   gdk_window_set_user_data (bin->offscreen_window, widget);
   if (bin->child)
     gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
-  gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
+  gdk_offscreen_window_set_embedder (bin->offscreen_window, gtk_widget_get_window (widget));
   g_signal_connect (bin->offscreen_window, "to-embedder",
                     G_CALLBACK (offscreen_window_to_parent), bin);
   g_signal_connect (bin->offscreen_window, "from-embedder",
                     G_CALLBACK (offscreen_window_from_parent), bin);
 
-  widget->style = gtk_style_attach (widget->style, widget->window);
+  gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), gtk_widget_get_window (widget)));
 
-  gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
-  gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
+  gtk_style_set_background (gtk_widget_get_style (widget), gtk_widget_get_window (widget), GTK_STATE_NORMAL);
+  gtk_style_set_background (gtk_widget_get_style (widget), bin->offscreen_window, GTK_STATE_NORMAL);
   gdk_window_show (bin->offscreen_window);
 }
 
@@ -302,6 +305,9 @@
 {
   GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
   GtkRequisition child_requisition;
+  gint border_width;
+  
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 
   child_requisition.width = 0;
   child_requisition.height = 0;
@@ -309,8 +315,8 @@
   if (bin->child && gtk_widget_get_visible (bin->child))
     gtk_widget_size_request (bin->child, &child_requisition);
 
-  requisition->width = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.width + 10;
-  requisition->height = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.height * 2 + 10;
+  requisition->width = border_width * 2 + child_requisition.width + 10;
+  requisition->height = border_width * 2 + child_requisition.height * 2 + 10;
 }
 
 static void
@@ -320,15 +326,16 @@
   GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
   gint border_width;
   gint w, h;
-  widget->allocation = *allocation;
+  
+  gtk_widget_set_allocation (widget, allocation);
 
-  border_width = GTK_CONTAINER (widget)->border_width;
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 
   w = allocation->width - border_width * 2;
   h = allocation->height - border_width * 2;
 
   if (gtk_widget_get_realized (widget))
-    gdk_window_move_resize (widget->window,
+    gdk_window_move_resize (gtk_widget_get_window (widget),
                             allocation->x + border_width,
                             allocation->y + border_width,
                             w, h);
@@ -357,7 +364,7 @@
 gtk_mirror_bin_damage (GtkWidget      *widget,
                         GdkEventExpose *event)
 {
-  gdk_window_invalidate_rect (widget->window, NULL, FALSE);
+  gdk_window_invalidate_rect (gtk_widget_get_window (widget), NULL, FALSE);
 
   return TRUE;
 }
@@ -371,7 +378,7 @@
 
   if (gtk_widget_is_drawable (widget))
     {
-      if (event->window == widget->window)
+      if (event->window == gtk_widget_get_window (widget))
         {
           GdkPixmap *pixmap;
           cairo_t *cr;
@@ -383,7 +390,7 @@
               pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
               gdk_pixmap_get_size (pixmap, &width, &height);
 
-              cr = gdk_cairo_create (widget->window);
+              cr = gdk_cairo_create (gtk_widget_get_window (widget));
 
               cairo_save (cr);
 
@@ -423,7 +430,7 @@
         }
       else if (event->window == bin->offscreen_window)
         {
-          gtk_paint_flat_box (widget->style, event->window,
+          gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
                               GTK_STATE_NORMAL, GTK_SHADOW_NONE,
                               &event->area, widget, "blah",
                               0, 0, -1, -1);
diff -ru gtk-demo.orig/panes.c gtk-demo/panes.c
--- gtk-demo.orig/panes.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/panes.c	2012-01-03 12:08:46.000000000 -0800
@@ -17,15 +17,14 @@
 toggle_resize (GtkWidget *widget,
 	       GtkWidget *child)
 {
-  GtkPaned *paned = GTK_PANED (child->parent);
-  gboolean is_child1 = (child == paned->child1);
+  GtkPaned *paned = GTK_PANED (gtk_widget_get_parent (child));
+  gboolean is_child1 = (child == gtk_paned_get_child1 (paned));
   gboolean resize, shrink;
 
-  resize = is_child1 ? paned->child1_resize : paned->child2_resize;
-  shrink = is_child1 ? paned->child1_shrink : paned->child2_shrink;
+  gtk_container_child_get (GTK_CONTAINER (paned), child, "resize", &resize, "shrink", &shrink, NULL);
 
   g_object_ref (child);
-  gtk_container_remove (GTK_CONTAINER (child->parent), child);
+  gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (child)), child);
   if (is_child1)
     gtk_paned_pack1 (paned, child, !resize, shrink);
   else
@@ -37,15 +36,14 @@
 toggle_shrink (GtkWidget *widget,
 	       GtkWidget *child)
 {
-  GtkPaned *paned = GTK_PANED (child->parent);
-  gboolean is_child1 = (child == paned->child1);
+  GtkPaned *paned = GTK_PANED (gtk_widget_get_parent (child));
+  gboolean is_child1 = (child == gtk_paned_get_child1 (paned));
   gboolean resize, shrink;
 
-  resize = is_child1 ? paned->child1_resize : paned->child2_resize;
-  shrink = is_child1 ? paned->child1_shrink : paned->child2_shrink;
+  gtk_container_child_get (GTK_CONTAINER (paned), child, "resize", &resize, "shrink", &shrink, NULL);
 
   g_object_ref (child);
-  gtk_container_remove (GTK_CONTAINER (child->parent), child);
+  gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (child)), child);
   if (is_child1)
     gtk_paned_pack1 (paned, child, resize, !shrink);
   else
@@ -78,7 +76,7 @@
   gtk_table_attach_defaults (GTK_TABLE (table), check_button,
 			     0, 1, 1, 2);
   g_signal_connect (check_button, "toggled",
-		    G_CALLBACK (toggle_resize), paned->child1);
+		    G_CALLBACK (toggle_resize), gtk_paned_get_child1 (paned));
   
   check_button = gtk_check_button_new_with_mnemonic ("_Shrink");
   gtk_table_attach_defaults (GTK_TABLE (table), check_button,
@@ -86,7 +84,7 @@
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
 			       TRUE);
   g_signal_connect (check_button, "toggled",
-		    G_CALLBACK (toggle_shrink), paned->child1);
+		    G_CALLBACK (toggle_shrink), gtk_paned_get_child1 (paned));
   
   label = gtk_label_new (label2);
   gtk_table_attach_defaults (GTK_TABLE (table), label,
@@ -98,7 +96,7 @@
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
 			       TRUE);
   g_signal_connect (check_button, "toggled",
-		    G_CALLBACK (toggle_resize), paned->child2);
+		    G_CALLBACK (toggle_resize), gtk_paned_get_child2 (paned));
   
   check_button = gtk_check_button_new_with_mnemonic ("_Shrink");
   gtk_table_attach_defaults (GTK_TABLE (table), check_button,
@@ -106,7 +104,7 @@
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
 			       TRUE);
   g_signal_connect (check_button, "toggled",
-		    G_CALLBACK (toggle_shrink), paned->child2);
+		    G_CALLBACK (toggle_shrink), gtk_paned_get_child2 (paned));
 
   return frame;
 }
diff -ru gtk-demo.orig/rotated_text.c gtk-demo/rotated_text.c
--- gtk-demo.orig/rotated_text.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/rotated_text.c	2012-01-03 12:08:46.000000000 -0800
@@ -107,9 +107,12 @@
   cairo_pattern_t *pattern;
 
   PangoAttrList *attrs;
+  GtkAllocation allocation;
+  
+  gtk_widget_get_allocation (widget, &allocation);
 
-  int width = widget->allocation.width;
-  int height = widget->allocation.height;
+  int width = allocation.width;
+  int height = allocation.height;
   double device_radius;
   int i;
 
@@ -117,7 +120,7 @@
    * space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
    * [-RADIUS, RADIUS].
    * We first center, then change the scale. */
-  cr = gdk_cairo_create (widget->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
   device_radius = MIN (width, height) / 2.;
   cairo_translate (cr,
 		   device_radius + (width - 2 * device_radius) / 2,
diff -ru gtk-demo.orig/search_entry.c gtk-demo/search_entry.c
--- gtk-demo.orig/search_entry.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/search_entry.c	2012-01-03 12:08:46.000000000 -0800
@@ -264,7 +264,7 @@
                         G_CALLBACK (search_entry_destroyed), &window);
 
       vbox = gtk_vbox_new (FALSE, 5);
-      gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
+      gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), vbox, TRUE, TRUE, 0);
       gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
       label = gtk_label_new (NULL);
diff -ru gtk-demo.orig/sizegroup.c gtk-demo/sizegroup.c
--- gtk-demo.orig/sizegroup.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/sizegroup.c	2012-01-03 12:08:46.000000000 -0800
@@ -116,7 +116,7 @@
 			G_CALLBACK (gtk_widget_destroyed), &window);
 
       vbox = gtk_vbox_new (FALSE, 5);
-      gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
+      gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), vbox, TRUE, TRUE, 0);
       gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
diff -ru gtk-demo.orig/spinner.c gtk-demo/spinner.c
--- gtk-demo.orig/spinner.c	2012-01-03 12:04:00.000000000 -0800
+++ gtk-demo/spinner.c	2012-01-03 12:08:46.000000000 -0800
@@ -48,7 +48,7 @@
                       G_CALLBACK (gtk_widget_destroyed), &window);
 
     vbox = gtk_vbox_new (FALSE, 5);
-    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), vbox, TRUE, TRUE, 0);
     gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
     /* Sensitive */
diff -ru gtk-demo.orig/toolpalette.c gtk-demo/toolpalette.c
--- gtk-demo.orig/toolpalette.c	2012-01-03 12:04:01.000000000 -0800
+++ gtk-demo/toolpalette.c	2012-01-03 12:08:46.000000000 -0800
@@ -86,13 +86,15 @@
 {
   cairo_t *cr;
   GList *iter;
+  GtkAllocation allocation;
 
-  cr = gdk_cairo_create (widget->window);
+  cr = gdk_cairo_create (gtk_widget_get_window (widget));
   gdk_cairo_region (cr, event->region);
   cairo_clip (cr);
 
+  gtk_widget_get_allocation (widget, &allocation);
   cairo_set_source_rgb (cr, 1, 1, 1);
-  cairo_rectangle (cr, 0, 0, widget->allocation.width, widget->allocation.height);
+  cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
   cairo_fill (cr);
 
   for (iter = canvas_items; iter; iter = iter->next)
@@ -176,6 +178,7 @@
   GtkToolItemGroup *drop_group = NULL;
   GtkWidget        *drag_palette = gtk_drag_get_source_widget (context);
   GtkWidget        *drag_item = NULL;
+  GtkAllocation	    allocation;
 
   while (drag_palette && !GTK_IS_TOOL_PALETTE (drag_palette))
     drag_palette = gtk_widget_get_parent (drag_palette);
@@ -186,6 +189,7 @@
                                                   selection);
       drop_group = gtk_tool_palette_get_drop_group (GTK_TOOL_PALETTE (widget),
                                                     x, y);
+      gtk_widget_get_allocation (GTK_WIDGET (drop_group), &allocation);
     }
 
   if (GTK_IS_TOOL_ITEM_GROUP (drag_item))
@@ -195,8 +199,8 @@
   else if (GTK_IS_TOOL_ITEM (drag_item) && drop_group)
     palette_drop_item (GTK_TOOL_ITEM (drag_item),
                        drop_group,
-                       x - GTK_WIDGET (drop_group)->allocation.x,
-                       y - GTK_WIDGET (drop_group)->allocation.y);
+                       x - allocation.x,
+                       y - allocation.y);
 }
 
 /********************************/
@@ -372,7 +376,7 @@
                               gpointer     user_data)
 {
   GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
-  GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (GTK_WIDGET (palette)->parent);
+  GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (GTK_WIDGET (palette)));
   GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
   GtkTreeIter iter;
   gint val = 0;
