[gtkmm/gtkmm-3maybe: 4/5] Fix the build with -DGSEAL_ENABLE.



commit 10639e4d0e09b6745171578a386f93dd792e75bb
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 16 12:55:55 2010 +0100

    Fix the build with -DGSEAL_ENABLE.
    
    * configure.ac: Add -DGSEAL_ENABLE to the fatal warnings.
    * gtk/gtkmm/radiobuttongroup.cc:
    * gtk/src/bin.[hg|ccg]:
    * gtk/src/box.[hg|ccg]:
    * gtk/src/buttonbox.ccg:
    * gtk/src/buttonbox.hg:
    * gtk/src/colorselection.[hg|ccg]:
    * gtk/src/fontselection.hg:
    * gtk/src/handlebox.[hg|ccg]:
    * gtk/src/inputdialog.hg:
    * gtk/src/menushell.hg:
    * gtk/src/messagedialog.ccg:
    * gtk/src/notebook.hg:
    * gtk/src/ruler.[hg|ccg]:
    * gtk/src/scrolledwindow.hg:
    * gtk/src/selectiondata.ccg:
    * gtk/src/table.hg:
    * gtk/src/tearoffmenuitem.hg:
    * gtk/src/textview.hg:
    * gtk/src/widget.[hg|ccg]: Replace uses of GSEAL()ed struct fields where
        possible by using new C functions. But some have no replacement so
        we must undef GSEAL_ENABLE in the .cpp file to keep our now-deprecated API.
    
    * gtk/src/printer.hg: Add get_hard_margins().
    * gtk/src/viewport.hg: Added get_bin_window().
    * gtk/src/window.[hg|ccg]: Added get_window_type(), deprecating
        get_is_toplevel() and get_is_popup(). Removed get_is_dialog() because it
        never had any implmentation, so nobody could be using it.

 ChangeLog                     |   33 ++++++++++++++++++
 configure.ac                  |    2 +-
 gtk/gtkmm/radiobuttongroup.cc |    2 +-
 gtk/src/bin.ccg               |   18 +++++-----
 gtk/src/bin.hg                |   26 ++++++--------
 gtk/src/box.ccg               |    6 ++--
 gtk/src/box.hg                |   15 +++++---
 gtk/src/buttonbox.ccg         |   56 +++++++++++++++++++++++++++++-
 gtk/src/buttonbox.hg          |   47 +++++++++++++++++--------
 gtk/src/colorselection.ccg    |    6 +++-
 gtk/src/colorselection.hg     |   32 ++++++++++++++++--
 gtk/src/fontselection.hg      |   50 ++++++++++++++++++++++-----
 gtk/src/handlebox.ccg         |    5 ++-
 gtk/src/handlebox.hg          |   30 +++++++++++++---
 gtk/src/inputdialog.hg        |    1 +
 gtk/src/menushell.hg          |   15 +++++---
 gtk/src/messagedialog.ccg     |   13 +++----
 gtk/src/notebook.hg           |    9 +++++
 gtk/src/printer.hg            |   14 ++++----
 gtk/src/ruler.ccg             |   16 +--------
 gtk/src/ruler.hg              |   27 +++++++++++----
 gtk/src/scrolledwindow.hg     |   17 ++++++++--
 gtk/src/selectiondata.ccg     |    7 ++--
 gtk/src/table.hg              |    9 ++++-
 gtk/src/tearoffmenuitem.hg    |   12 +++++-
 gtk/src/textview.hg           |   16 ++++----
 gtk/src/viewport.hg           |    8 +++--
 gtk/src/widget.ccg            |   53 +++++++++++++++++++----------
 gtk/src/widget.hg             |   75 ++++++++++++++++++++++++++++------------
 gtk/src/window.ccg            |    8 +++-
 gtk/src/window.hg             |   25 ++++++++++---
 31 files changed, 471 insertions(+), 182 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ba6cb17..0a717c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2010-03-16  Murray Cumming  <murrayc murrayc com>
+
+    Fix the build with -DGSEAL_ENABLE.
+
+	* configure.ac: Add -DGSEAL_ENABLE to the fatal warnings.
+	* gtk/gtkmm/radiobuttongroup.cc:
+	* gtk/src/bin.[hg|ccg]:
+	* gtk/src/box.[hg|ccg]:
+	* gtk/src/buttonbox.ccg:
+	* gtk/src/buttonbox.hg:
+	* gtk/src/colorselection.[hg|ccg]:
+	* gtk/src/fontselection.hg:
+	* gtk/src/handlebox.[hg|ccg]:
+	* gtk/src/inputdialog.hg:
+	* gtk/src/menushell.hg:
+	* gtk/src/messagedialog.ccg:
+	* gtk/src/notebook.hg:
+	* gtk/src/ruler.[hg|ccg]:
+	* gtk/src/scrolledwindow.hg:
+	* gtk/src/selectiondata.ccg:
+	* gtk/src/table.hg:
+	* gtk/src/tearoffmenuitem.hg:
+	* gtk/src/textview.hg:
+	* gtk/src/widget.[hg|ccg]: Replace uses of GSEAL()ed struct fields where 
+    possible by using new C functions. But some have no replacement so 
+    we must undef GSEAL_ENABLE in the .cpp file to keep our now-deprecated API.
+
+	* gtk/src/printer.hg: Add get_hard_margins().
+	* gtk/src/viewport.hg: Added get_bin_window().
+	* gtk/src/window.[hg|ccg]: Added get_window_type(), deprecating 
+    get_is_toplevel() and get_is_popup(). Removed get_is_dialog() because it 
+    never had any implmentation, so nobody could be using it.
+
 2010-03-10  Murray Cumming  <murrayc murrayc com>
 
     ToolPalette: Make some getter methods const.
diff --git a/configure.ac b/configure.ac
index 562b3e3..f0fe25f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,7 +98,7 @@ AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked mkfifo])
 # Evaluate the --enable-warnings=level option.
 MM_ARG_ENABLE_WARNINGS([GTKMM_WXXFLAGS],
                        [-Wall],
-                       [-pedantic -Wall -Wextra],
+                       [-pedantic -Wall -Wextra -DGSEAL_ENABLE],
                        [G PANGO ATK GDK GDK_PIXBUF GTK])
 
 AC_CONFIG_FILES([Makefile
diff --git a/gtk/gtkmm/radiobuttongroup.cc b/gtk/gtkmm/radiobuttongroup.cc
index 26b6dc1..c435006 100644
--- a/gtk/gtkmm/radiobuttongroup.cc
+++ b/gtk/gtkmm/radiobuttongroup.cc
@@ -61,7 +61,7 @@ void RadioButtonGroup::add(RadioMenuItem& item)
   item.set_group(*this);
 
   //probably not necessary:
-  group_ = item.gobj()->group;
+  group_ = gtk_radio_menu_item_get_group(item.gobj());
 }
 
 void RadioButtonGroup::add(const Glib::RefPtr<RadioAction>& item)
diff --git a/gtk/src/bin.ccg b/gtk/src/bin.ccg
index a3aa564..580bfe3 100644
--- a/gtk/src/bin.ccg
+++ b/gtk/src/bin.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: bin.ccg,v 1.2 2004/03/15 00:26:00 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 1998-2002 The gtkmm Development Team
  *
@@ -30,13 +30,14 @@ namespace Gtk
 {
 
 
-void 
+void
 Bin::remove()
 {
-  if(gobj()->child)
+  GtkWidget* child = gtk_bin_get_child(gobj());
+  if(child)
   {
-    Gtk::Widget* cppChild = Glib::wrap(gobj()->child);
-    
+    Gtk::Widget* cppChild = Glib::wrap(child);
+
     //If this is a managed widget,
     //then do an extra ref so that it will
     //not be destroyed when adding to another container
@@ -44,12 +45,12 @@ Bin::remove()
     //before being added to the first container.
     if(cppChild->is_managed_())
       cppChild->reference();
-     
+
     gtk_container_remove(Container::gobj(), cppChild->gobj());
   }
 }
 
-void 
+void
 Bin::add_label(const Glib::ustring& str, bool mnemonic /* = false */,
 	             double x_align /* = 0.5 */, double y_align /* = 0.5 */)
 {
@@ -64,7 +65,7 @@ Bin::add_label(const Glib::ustring& str, bool mnemonic /* = false */,
   label->show();
 }
 
-void 
+void
 Bin::add_label(const Glib::ustring& str, bool mnemonic,
 	       AlignmentEnum x_align, AlignmentEnum y_align /* = ALIGN_CENTER */)
 {
@@ -124,4 +125,3 @@ Bin::add_pixlabel(const Glib::ustring& pixfile,
 
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/bin.hg b/gtk/src/bin.hg
index 68e8297..185b740 100644
--- a/gtk/src/bin.hg
+++ b/gtk/src/bin.hg
@@ -1,7 +1,7 @@
 /* $Id: bin.hg,v 1.2 2003/03/03 07:49:05 murrayc Exp $ */
 
 /* bin.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -40,17 +40,14 @@ class Bin : public Container
   _CLASS_GTKOBJECT(Bin,GtkBin,GTK_BIN,Gtk::Container,GtkContainer)
 protected:
 
-  /** This constructor is protected because only derived 
+  /** This constructor is protected because only derived
    * classes should be instantiated.
    */
   _CTOR_DEFAULT
 public:
-  
 
-  // get_child() is a convenience function to get a c++ wrapper of
-  // the contained widget. It may return NULL if such an item is not
-  // available.
-  _MEMBER_GET_PTR(child, child, Widget*, GtkWidget*)
+  _WRAP_METHOD(Gtk::Widget* get_child(), gtk_bin_get_child)
+  _WRAP_METHOD(const Gtk::Widget* get_child() const, gtk_bin_get_child)
 
   /** Remove the contained object
    * Since this can only hold one object it is not necessary to
@@ -68,11 +65,11 @@ public:
    * This does not correspond to any GTK+ function and is provided purely for
    * convenience.
    * @param label The text for the label.
-   * @param mnemonic If <tt>true</tt>, characters preceded by an underscore 
+   * @param mnemonic If <tt>true</tt>, characters preceded by an underscore
    * (_) will be underlined and used as a keyboard accelerator (shortcut).
-   * @param x_align The horizontal alignment of the text.  This ranges from 
+   * @param x_align The horizontal alignment of the text.  This ranges from
    * 0.0 (left aligned) to 1.0 (right aligned).
-   * @param y_align The vertical alignment of the text.  This ranges from 
+   * @param y_align The vertical alignment of the text.  This ranges from
    * 0.0 (top aligned) to 1.0 (bottom aligned).
    */
   void add_label(const Glib::ustring& label, bool mnemonic = false,
@@ -84,9 +81,9 @@ public:
    * @param label The label text.
    * @param mnemonic If <tt>true</tt>, characters preceded by an underscore
    * (_) will be underlined and used as a keyboard accelerator (shortcut).
-   * @param x_align The horizontal alignment of the text.  For possible 
+   * @param x_align The horizontal alignment of the text.  For possible
    * values, see Gtk::AlignmentEnum.
-   * @param y_align The vertical alignment of the text.  For possible 
+   * @param y_align The vertical alignment of the text.  For possible
    * values, see Gtk::AlignmentEnum.
    */
   void add_label(const Glib::ustring& label, bool mnemonic,
@@ -105,7 +102,7 @@ public:
   /** Add Image and Label objects.
    * This does not correspond to any GTK+ function and is provided purely for
    * convenience.
-   * This will create, manage, add, and show a new Image and Label (within an 
+   * This will create, manage, add, and show a new Image and Label (within an
    * HBox) to this Bin.
    * @param pixmap A Glib::RefPtr to a Gdk::Pixmap.
    * @param mask A Glib::RefPtr to a Gdk::Bitmap.
@@ -121,7 +118,7 @@ public:
   /** Add Image and Label objects.
    * This does not correspond to any GTK+ function and is provided purely for
    * convenience.
-   * This will create, manage, add, and show a new Image and Label (within an 
+   * This will create, manage, add, and show a new Image and Label (within an
    * HBox) to this Bin.
    * @param pixfile The path to a file to be displayed.
    * @param label The text for the label.
@@ -134,4 +131,3 @@ public:
 };
 
 }  /* namespace Gtk */
-
diff --git a/gtk/src/box.ccg b/gtk/src/box.ccg
index 5eda27f..7eb162a 100644
--- a/gtk/src/box.ccg
+++ b/gtk/src/box.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: box.ccg,v 1.1 2003/01/21 13:38:42 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 1998-2002 The gtkmm Development Team
  *
@@ -23,6 +23,7 @@
 #include <gtk/gtk.h>
 #include <glibmm/wrap.h>
 
+
 namespace Gtk
 {
 
@@ -30,7 +31,7 @@ namespace Box_Helpers
 {
 
 Widget* Child::get_widget() const
-{ 
+{
   return Glib::wrap(gobj()->widget);
 }
 
@@ -122,4 +123,3 @@ void Box::pack_end(Widget& child, PackOptions options, guint padding)
 
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 660bd39..66137cb 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -20,6 +20,12 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the ->children struct field.
+//TODO: We probably need to remove the entire STL-style children() API in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 #include <gtkmm/container.h>
 #include <glibmm/helperlist.h>
 #include <gtk/gtk.h>  /* For _GtkBoxChild */
@@ -28,7 +34,7 @@ _PINCLUDE(gtkmm/private/container_p.h)
 namespace Gtk
 {
 
-/** Packing options for adding child widgets to a Box with pack_start() and pack_end(). 
+/** Packing options for adding child widgets to a Box with pack_start() and pack_end().
  * @ingroup gtkmmEnums
  */
 enum PackOptions
@@ -70,7 +76,7 @@ public:
 
 protected:
   inline GtkBox* parent()
-    { return (GtkBox*) (gobj()->widget->parent); }
+    { return (GtkBox*) (gtk_widget_get_parent(gobj()->widget)); }
 
   void redraw();
 
@@ -111,7 +117,7 @@ struct EndElem : public Element
   GP_LIST(BoxList,Box,GtkBox,Child,children)
   //The standard iterator, instead of List_Cpp_Iterator,
   //only works because Child is derived from _GtkBoxChild.
-  
+
   GP_LIST_FIND(get_widget)
   GP_LIST_CONTAINER_REMOVE(get_widget)
         // Non-standard
@@ -232,7 +238,7 @@ public:
    * @param spacing Determines the space in pixels between child widgets.
    */
   _WRAP_CTOR(VBox(bool homogeneous = false, int spacing = 0), gtk_vbox_new)
-  
+
 };
 
 /** Horizontal Box for laying widgets in a horizontal row.
@@ -266,4 +272,3 @@ public:
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/buttonbox.ccg b/gtk/src/buttonbox.ccg
index e4fc0f8..36a7549 100644
--- a/gtk/src/buttonbox.ccg
+++ b/gtk/src/buttonbox.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: buttonbox.ccg,v 1.1 2003/01/21 13:38:43 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 1998-2002 The gtkmm Development Team
  *
@@ -41,5 +41,57 @@ HButtonBox::HButtonBox(ButtonBoxStyle layout, int spacing)
   set_spacing(spacing);
 }
 
-} // namespace Gtk
 
+int ButtonBox::get_child_min_width() const
+{
+  int result = 0;
+  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-min-width", &result, (void*)0);
+  return result;
+}
+
+void ButtonBox::set_child_min_width(const int& value)
+{
+  //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+  gobj()->child_min_width = value;
+}
+
+int ButtonBox::get_child_min_height() const
+{
+  int result = 0;
+  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-min-width", &result, (void*)0);
+  return result;
+}
+
+void ButtonBox::set_child_min_height(const int& value)
+{
+  //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+  gobj()->child_min_height = value;
+}
+
+int ButtonBox::get_child_ipadding_x() const
+{
+  int result = 0;
+  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-internal-padding-x", &result, (void*)0);
+  return result;
+}
+
+void ButtonBox::set_child_ipadding_x(const int& value)
+{
+  //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+  gobj()->child_ipad_x = value;
+}
+
+int ButtonBox::get_child_ipadding_y() const
+{
+  int result = 0;
+  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-internal-padding-y", &result, (void*)0);
+  return result;
+}
+
+void ButtonBox::set_child_ipadding_y(const int& value)
+{
+  //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+  gobj()->child_ipad_y = value;
+}
+
+} // namespace Gtk
diff --git a/gtk/src/buttonbox.hg b/gtk/src/buttonbox.hg
index 4fa831f..3bcee26 100644
--- a/gtk/src/buttonbox.hg
+++ b/gtk/src/buttonbox.hg
@@ -1,7 +1,7 @@
 /* $Id: buttonbox.hg,v 1.3 2003/10/12 09:38:11 murrayc Exp $ */
 
 /* buttonbox.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -23,6 +23,13 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/box_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to set the struct fields for the style properties.
+//TODO: Find a better way to set them.
+//TODO: Remove these functions anyway in an ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 namespace Gtk
 {
 
@@ -47,21 +54,32 @@ class ButtonBox : public Box
 public:
   _WRAP_METHOD(ButtonBoxStyle get_layout() const, gtk_button_box_get_layout)
   _WRAP_METHOD(void set_layout(ButtonBoxStyle layout_style), gtk_button_box_set_layout)
-  
+
   _WRAP_METHOD(void set_child_secondary(Widget& child, bool is_secondary = true), gtk_button_box_set_child_secondary)
   _WRAP_METHOD(bool get_child_secondary(const Gtk::Widget& child) const, gtk_button_box_get_child_secondary)
 
-  _MEMBER_GET(child_min_width,child_min_width,int,int)
-  _MEMBER_SET(child_min_width,child_min_width,int,int)
+//TODO: Replace (and deprecate) with use of properties:
+
+
+  int get_child_min_width() const;
 
-  _MEMBER_GET(child_min_height,child_min_height,int,int)
-  _MEMBER_SET(child_min_height,child_min_height,int,int)
+  //Note that the const int& is silly, but was once generated and must be kept for ABI.
+  void set_child_min_width(const int& value);
 
-  _MEMBER_GET(child_ipadding_x,child_ipad_x,int,int)
-  _MEMBER_SET(child_ipadding_x,child_ipad_x,int,int)
+  int get_child_min_height() const;
 
-  _MEMBER_GET(child_ipadding_y,child_ipad_y,int,int)
-  _MEMBER_SET(child_ipadding_y,child_ipad_y,int,int)
+  //Note that the const int& is silly, but was once generated and must be kept for ABI.
+  void set_child_min_height(const int& value);
+
+  int get_child_ipadding_x() const;
+
+  //Note that the const int& is silly, but was once generated and must be kept for ABI.
+  void set_child_ipadding_x(const int& value);
+
+  int get_child_ipadding_y() const;
+
+  //Note that the const int& is silly, but was once generated and must be kept for ABI.
+  void set_child_ipadding_y(const int& value);
 
   _WRAP_PROPERTY("layout-style", ButtonBoxStyle)
 };
@@ -70,10 +88,10 @@ public:
  *
  * A button box should be used to provide a consistent layout of buttons
  * throughout your application. There is one default layout and a default spacing
- * value that are persistant across all Gtk::VButtonBox widgets. 
+ * value that are persistant across all Gtk::VButtonBox widgets.
  *
  * The layout/spacing can then be altered by the programmer, or if desired,
- * by the user to alter the 'feel' of a program to a small degree. 
+ * by the user to alter the 'feel' of a program to a small degree.
  *
  * @ingroup Widgets
  * @ingroup Containers
@@ -89,10 +107,10 @@ public:
  *
  * A button box should be used to provide a consistent layout of buttons
  * throughout your application. There is one default layout and a default spacing
- * value that are persistant across all Gtk::HButtonBox widgets. 
+ * value that are persistant across all Gtk::HButtonBox widgets.
  *
  * The layout/spacing can then be altered by the programmer, or if desired,
- * by the user to alter the 'feel' of a program to a small degree. 
+ * by the user to alter the 'feel' of a program to a small degree.
  *
  * The HButtonBox widget looks like this:
  * @image html hbuttonbox1.png
@@ -108,4 +126,3 @@ public:
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/colorselection.ccg b/gtk/src/colorselection.ccg
index f553c5e..bd3f54a 100644
--- a/gtk/src/colorselection.ccg
+++ b/gtk/src/colorselection.ccg
@@ -139,5 +139,9 @@ ColorSelection::set_change_palette_hook(const ColorSelection::SlotChangePaletteH
   return old_slot;
 }
 
-} // namespace Gtk
+ColorSelection* ColorSelectionDialog::get_colorsel()
+{
+  return get_color_selection();
+}
 
+} // namespace Gtk
diff --git a/gtk/src/colorselection.hg b/gtk/src/colorselection.hg
index d99e78d..9cb279e 100644
--- a/gtk/src/colorselection.hg
+++ b/gtk/src/colorselection.hg
@@ -25,6 +25,11 @@ _PINCLUDE(gtkmm/private/dialog_p.h)
 #include <gtkmm/dialog.h>
 #include <gtkmm/button.h>
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to set the struct fields.
+//TODO: Remove these functions anyway in an ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
 
 namespace Gtk
 {
@@ -36,7 +41,7 @@ namespace Gtk
  * parameters such as hue, saturation, value, red, green, blue, and opacity.
  *
  * It is found on the standard color selection dialog box
- * Gtk::ColorSelectionDialog. 
+ * Gtk::ColorSelectionDialog.
  *
  * @ingroup Widgets
  */
@@ -95,11 +100,32 @@ public:
   _CTOR_DEFAULT()
   _WRAP_CTOR(ColorSelectionDialog(const Glib::ustring& title), gtk_color_selection_dialog_new)
 
-  _MEMBER_GET_PTR(colorsel,colorsel,ColorSelection*,GtkWidget*)
+  _WRAP_METHOD(ColorSelection* get_color_selection(), gtk_color_selection_dialog_get_color_selection)
+  _WRAP_METHOD(const ColorSelection* get_color_selection() const, gtk_color_selection_dialog_get_color_selection)
+
+_DEPRECATE_IFDEF_START
+  //TODO: Remove these in gtkmm 3. They use G_SEAL()ed struct fields.
+
+  /** @deprecated: Use get_color_selection() instead.
+   */
+  ColorSelection* get_colorsel();
+
+  /** @deprecated: Use get_color_selection() instead.
+   */
+  const ColorSelection* get_colorsel() const;
+
+  /** @deprecated Use Gtk::Dialog::get_widget_for_response() instead.
+   */
   _MEMBER_GET_PTR(ok_button,ok_button,Button*,GtkWidget*)
+
+  /** @deprecated Use Gtk::Dialog::get_widget_for_response() instead.
+   */
   _MEMBER_GET_PTR(cancel_button,cancel_button,Button*,GtkWidget*)
+
+  /** @deprecated Use Gtk::Dialog::get_widget_for_response() instead.
+   */
   _MEMBER_GET_PTR(help_button,help_button,Button*,GtkWidget*)
+_DEPRECATE_IFDEF_END
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/fontselection.hg b/gtk/src/fontselection.hg
index 87ad302..146207f 100644
--- a/gtk/src/fontselection.hg
+++ b/gtk/src/fontselection.hg
@@ -21,6 +21,17 @@ _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/box_p.h)
 _PINCLUDE(gtkmm/private/dialog_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+// So we can still wrap the (deprecated) widget.
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to set the struct fields.
+//TODO: Remove these functions anyway in an ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 #include <gtkmm/dialog.h>
 #include <gtkmm/box.h>
 
@@ -39,8 +50,8 @@ class RadioButton;
  * The Gtk::FontSelection widget lists the available fonts, styles and
  * sizes, allowing the user to select a font. It is used in the
  * Gtk::FontSelectionDialog widget to provide a dialog box for selecting
- * fonts. 
- * 
+ * fonts.
+ *
  * @ingroup Widgets
  */
 class FontSelection : public VBox
@@ -78,13 +89,31 @@ public:
   _WRAP_METHOD(Glib::ustring get_preview_text() const, gtk_font_selection_get_preview_text)
   _WRAP_METHOD(void set_preview_text(const Glib::ustring& fontname),gtk_font_selection_set_preview_text)
 
-  // Font page
+  //TODO: Remove these accessors when we can break ABI.
+  //They probably all return null now anyway.
+
+
+_DEPRECATE_IFDEF_START
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_PTR(font_entry,font_entry,Entry*,GtkWidget*)
+
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_PTR(font_style_entry,font_style_entry,Entry*,GtkWidget*)
 
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_PTR(pixels_button,pixels_button,RadioButton*,GtkWidget*)
+
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_PTR(points_button,points_button,RadioButton*,GtkWidget*)
+
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_PTR(filter_button,filter_button,Button*,GtkWidget*)
+_DEPRECATE_IFDEF_END
 
   //Note: The GdkFont "font" property is deprecated, or should be.
   _WRAP_PROPERTY("font_name", Glib::ustring)
@@ -93,7 +122,7 @@ public:
 
 /** A dialog box for selecting fonts.
  *
- * The Gtk::FontSelectionDialog widget is a dialog box for selecting a font. 
+ * The Gtk::FontSelectionDialog widget is a dialog box for selecting a font.
  *
  * A FontSelectionDialog looks like this:
  * @image html fontselectiondialog1.png
@@ -115,11 +144,14 @@ public:
   _WRAP_METHOD(Glib::ustring get_preview_text() const,gtk_font_selection_dialog_get_preview_text)
   _WRAP_METHOD(void set_preview_text(const Glib::ustring& fontname), gtk_font_selection_dialog_set_preview_text)
 
-  _MEMBER_GET_PTR(font_selection,fontsel,FontSelection*,GtkWidget*)
-  _MEMBER_GET_PTR(ok_button,ok_button,Button*,GtkWidget*)
-  _MEMBER_GET_PTR(apply_button,apply_button,Button*,GtkWidget*)
-  _MEMBER_GET_PTR(cancel_button,cancel_button,Button*,GtkWidget*)
+  _WRAP_METHOD(Button* get_ok_button(), gtk_font_selection_dialog_get_ok_button)
+  _WRAP_METHOD(const Button* get_ok_button() const, gtk_font_selection_dialog_get_ok_button, constversion)
+
+  _WRAP_METHOD(Button* get_cancel_button(), gtk_font_selection_dialog_get_cancel_button)
+  _WRAP_METHOD(const Button* get_cancel_button() const, gtk_font_selection_dialog_get_cancel_button, constversion)
+
+  _WRAP_METHOD(Button* get_apply_button(), gtk_font_selection_dialog_get_apply_button)
+  _WRAP_METHOD(const Button* get_apply_button() const, gtk_font_selection_dialog_get_apply_button, constversion)
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/handlebox.ccg b/gtk/src/handlebox.ccg
index 1c14491..d7b1f11 100644
--- a/gtk/src/handlebox.ccg
+++ b/gtk/src/handlebox.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: handlebox.ccg,v 1.1 2003/01/21 13:40:26 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 1998-2002 The gtkmm Development Team
  *
@@ -26,6 +26,7 @@
 namespace Gtk
 {
 
+_DEPRECATE_IFDEF_START
 bool HandleBox::is_float_window_mapped() const
 {
   return gobj()->float_window_mapped;
@@ -40,6 +41,6 @@ bool HandleBox::shrinks_on_detach() const
 {
   return gobj()->shrink_on_detach;
 }
+_DEPRECATE_IFDEF_END
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/handlebox.hg b/gtk/src/handlebox.hg
index bb7592a..6b313f5 100644
--- a/gtk/src/handlebox.hg
+++ b/gtk/src/handlebox.hg
@@ -1,7 +1,7 @@
  /* $Id: handlebox.hg,v 1.1 2003/01/21 13:40:26 murrayc Exp $ */
 
 /* handlebox.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -23,6 +23,12 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/bin_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to set the struct fields.
+//TODO: Remove these functions anyway in an ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 #m4 _CONVERSION(`int',`PositionType',`($2)$3')
 
 namespace Gtk
@@ -44,7 +50,7 @@ class HandleBox : public Bin
   _CLASS_GTKOBJECT(HandleBox,GtkHandleBox,GTK_HANDLE_BOX,Gtk::Bin,GtkBin)
 public:
   _CTOR_DEFAULT
-  
+
 
   _WRAP_METHOD(void set_shadow_type(ShadowType type), gtk_handle_box_set_shadow_type)
   _WRAP_METHOD(ShadowType get_shadow_type() const, gtk_handle_box_get_shadow_type)
@@ -53,17 +59,32 @@ public:
   _WRAP_METHOD(void set_snap_edge(PositionType edge), gtk_handle_box_set_snap_edge)
   _WRAP_METHOD(PositionType get_snap_edge() const, gtk_handle_box_get_snap_edge)
 
+  _WRAP_METHOD(bool is_child_detached() const, gtk_handle_box_get_child_detached)
+
   _WRAP_SIGNAL(void child_attached(Widget* child), "child_attached")
   _WRAP_SIGNAL(void child_detached(Widget* child), "child_detached")
 
+_DEPRECATE_IFDEF_START
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_GOBJECT(bin_window, bin_window, Gdk::Window, GdkWindow*)
-  _MEMBER_GET_GOBJECT(float_window, float_window, Gdk::Window, GdkWindow*)
 
-  _WRAP_METHOD(bool is_child_detached() const, gtk_handle_box_get_child_detached)
+  /** @deprecated You should not need to call this method.
+   */
+  _MEMBER_GET_GOBJECT(float_window, float_window, Gdk::Window, GdkWindow*)
 
+  /** @deprecated This method does not seem to be useful and will be removed from a future version of gtkmm, due to changes in GTK+.
+   */
   bool is_float_window_mapped() const;
+
+  /** @deprecated This method does not seem to be useful and will be removed from a future version of gtkmm, due to changes in GTK+.
+   */
   bool is_in_drag() const;
+
+  /** @deprecated This method does not seem to be useful and will be removed from a future version of gtkmm, due to changes in GTK+.
+   */
   bool shrinks_on_detach() const;
+_DEPRECATE_IFDEF_END
 
   //_WRAP_PROPERTY("shadow", ShadowType); //deprecated.
   _WRAP_PROPERTY("shadow-type", ShadowType)
@@ -72,4 +93,3 @@ public:
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/inputdialog.hg b/gtk/src/inputdialog.hg
index f86a10e..5bc0d75 100644
--- a/gtk/src/inputdialog.hg
+++ b/gtk/src/inputdialog.hg
@@ -26,6 +26,7 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #m4 _PUSH(SECTION_CC_PRE_INCLUDES)
 // So we can still wrap the (deprecated) widget.
 #undef GTK_DISABLE_DEPRECATED
+#undef GSEAL_ENABLE
 #m4 _POP()
 
 #include <gtkmm/dialog.h>
diff --git a/gtk/src/menushell.hg b/gtk/src/menushell.hg
index f7c8316..aafadd1 100644
--- a/gtk/src/menushell.hg
+++ b/gtk/src/menushell.hg
@@ -16,7 +16,7 @@
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
- 
+
 #include <gdk/gdkkeysyms.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
@@ -24,6 +24,12 @@ _PINCLUDE(gtkmm/menu.h)
 _PINCLUDE(gtkmm/menubar.h)
 _PINCLUDE(gtkmm/window.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the ->children struct field.
+//TODO: We probably need to remove the entire STL-style children() API in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 #include <gtkmm/container.h>
 #include <gtkmm/menu_elems.h>
 #include <glibmm/helperlist.h>
@@ -61,7 +67,7 @@ namespace Menu_Helpers
  * @ingroup Containers
  * @ingroup Menus
  */
-class MenuShell : public Container 
+class MenuShell : public Container
 {
   _CLASS_GTKOBJECT(MenuShell,GtkMenuShell,GTK_MENU_SHELL,Gtk::Container,GtkContainer)
 
@@ -108,7 +114,7 @@ public:
    * MenuBar and OptionMenu is attached to a window at this time and
    * the window object can be found automatically.
    *
-   * Important note when using popup menus: 
+   * Important note when using popup menus:
    * If you are using accelerated menu entries inside a popup
    * menu you have to call the accelerate() method manually. This is
    * because the popup menu is not connected to any window and the
@@ -136,7 +142,7 @@ public:
 
   _WRAP_METHOD(bool get_take_focus() const, gtk_menu_shell_get_take_focus)
   _WRAP_METHOD(void set_take_focus(bool take_focus = true), gtk_menu_shell_set_take_focus)
-  
+
   _WRAP_PROPERTY("take-focus", bool)
 
 protected:
@@ -159,4 +165,3 @@ dnl // Override GtkMenuItem::insert, in order to accelerate all menu items autom
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/messagedialog.ccg b/gtk/src/messagedialog.ccg
index 379e8d0..e210fea 100644
--- a/gtk/src/messagedialog.ccg
+++ b/gtk/src/messagedialog.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: messagedialog.ccg,v 1.7 2005/02/15 10:52:44 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 2002 The gtkmm Development Team
  *
@@ -49,13 +49,13 @@ MessageDialog::MessageDialog(Gtk::Window& parent, const Glib::ustring& message,
 
 void MessageDialog::set_message(const Glib::ustring& message, bool use_markup)
 {
-  // TODO: GTK+ bug: The label widget is really a <private> struct field.
-  // There should really be a message property.
-
   if(use_markup)
-    gtk_message_dialog_set_markup(gobj(), message.c_str()); 
+    gtk_message_dialog_set_markup(gobj(), message.c_str());
   else
-    gtk_label_set_text(GTK_LABEL(gobj()->label), message.c_str());
+  {
+    property_use_markup() = false;
+    property_text() = message;
+  }
 }
 
 void MessageDialog::set_secondary_text(const Glib::ustring& text, bool use_markup)
@@ -67,4 +67,3 @@ void MessageDialog::set_secondary_text(const Glib::ustring& text, bool use_marku
 }
 
 } // namespace Gtk
-
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index eed6824..88f043e 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -21,6 +21,12 @@
 #m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the ->children struct field.
+//TODO: We probably need to remove the entire STL-style children() API in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 #include <gtkmm/container.h>
 #include <gtkmm/label.h>
 //#include <gtk/gtknotebook.h>
@@ -405,6 +411,9 @@ public:
   _WRAP_METHOD(bool get_tab_detachable(Widget& child) const, gtk_notebook_get_tab_detachable)
   _WRAP_METHOD(void set_tab_detachable(Widget& child, bool detachable = true), gtk_notebook_set_tab_detachable)
 
+  _WRAP_METHOD(Widget* get_action_widget(PackType pack_type = PACK_START), gtk_notebook_get_action_widget)
+  _WRAP_METHOD(void set_action_widget(Widget* widget, PackType pack_type = PACK_START), gtk_notebook_set_action_widget)
+
   PageList::iterator get_current();
 
   PageList& pages();
diff --git a/gtk/src/printer.hg b/gtk/src/printer.hg
index ad7f609..18a85d7 100644
--- a/gtk/src/printer.hg
+++ b/gtk/src/printer.hg
@@ -25,11 +25,11 @@ namespace Gtk
 
 _WRAP_ENUM(PrintCapabilities, GtkPrintCapabilities)
 
-/** A Printer object represents a printer. You only need to deal directly with printers if you use the 
+/** A Printer object represents a printer. You only need to deal directly with printers if you use the
  * non-portable PrintUnixDialog API.
  *
- * A Printer object allows to get status information about the printer, such as its description, its location, 
- * the number of queued jobs, etc. Most importantly, a Printer object can be used to create a PrintJob object, 
+ * A Printer object allows to get status information about the printer, such as its description, its location,
+ * the number of queued jobs, etc. Most importantly, a Printer object can be used to create a PrintJob object,
  * which lets you print to the printer.
  *
  * @newin{2,10}
@@ -84,10 +84,10 @@ public:
   _WRAP_METHOD(bool has_details() const, gtk_printer_has_details)
   _WRAP_METHOD(void request_details(), gtk_printer_request_details)
   _WRAP_METHOD(PrintCapabilities get_capabilities() const, gtk_printer_get_capabilities)
-
+  _WRAP_METHOD(bool get_hard_margins(double& top, double& bottom, double& left, double& right) const, gtk_printer_get_hard_margins)
 
   _WRAP_SIGNAL(void details_acquired(bool success), "details_acquired")
-  
+
   _WRAP_PROPERTY("name", Glib::ustring)
 
   //GtkPrintBackend is in a "semi-private" header:
@@ -110,10 +110,10 @@ inline bool operator==(const Glib::RefPtr<Printer>& lhs, const Glib::RefPtr<Prin
 inline bool operator!=(const Glib::RefPtr<Printer>& lhs, const Glib::RefPtr<Printer>& rhs)
   { return !lhs->equal(rhs); }
 
-/** For example, 
+/** For example,
  * bool on_enumerate_printers(const Glib::RefPtr<Printer>& printer);
  * @param printer A printer.
- * @param result true to stop the enumeration, false to continue. 
+ * @param result true to stop the enumeration, false to continue.
  *
  * @relates Gtk::Printer
  */
diff --git a/gtk/src/ruler.ccg b/gtk/src/ruler.ccg
index 805fb60..696f9e4 100644
--- a/gtk/src/ruler.ccg
+++ b/gtk/src/ruler.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: ruler.ccg,v 1.1 2003/01/21 13:40:35 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 1998-2002 The gtkmm Development Team
  *
@@ -21,22 +21,8 @@
  */
 
 #include <gtk/gtk.h>
-#include <cstring>
-
-using std::strcmp;
 
 namespace Gtk
 {
 
-MetricType Ruler::get_metric() const
-{
-  MetricType metric = PIXELS;
-
-  if     (strcmp(gobj()->metric->abbrev, "In") == 0) metric = INCHES;
-  else if(strcmp(gobj()->metric->abbrev, "Cn") == 0) metric = CENTIMETERS;
-
-  return metric;
-}
-
 } // namespace Gtk
-
diff --git a/gtk/src/ruler.hg b/gtk/src/ruler.hg
index 519f5d5..cbfcc8e 100644
--- a/gtk/src/ruler.hg
+++ b/gtk/src/ruler.hg
@@ -1,7 +1,7 @@
 /* $Id: ruler.hg,v 1.1 2003/01/21 13:40:35 murrayc Exp $ */
 
 /* ruler.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -24,6 +24,11 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/widget_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the struct fields.
+//TODO: We need to remove these methods anyway in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
 
 namespace Gtk
 {
@@ -47,9 +52,7 @@ protected:
   _CTOR_DEFAULT
 
 public:
-  
 
-  MetricType get_metric() const; 
 
   /** Sets the desired metric of the ruler.  The possible choices are:
    * <ul><li>Gtk::PIXELS
@@ -58,10 +61,21 @@ public:
    * </ul>The default metric is Gtk::PIXELS.
    */
   _WRAP_METHOD(void set_metric(MetricType metric = PIXELS), gtk_ruler_set_metric)
-  _WRAP_METHOD(MetricType get_metric(), gtk_ruler_get_metric)
 
+  _WRAP_METHOD(MetricType get_metric() const, gtk_ruler_get_metric)
+  _WRAP_METHOD(MetricType get_metric(), gtk_ruler_get_metric, deprecated "Use the const version")
+
+_DEPRECATE_IFDEF_START
+//TODO: Remove these when we can break ABI:
+
+  /** @deprecated Use get_range() instead.
+   */
   _MEMBER_GET(range_lower,lower,double,double)
+
+  /** @deprecated Use get_range() instead.
+   */
   _MEMBER_GET(range_upper,upper,double,double)
+_DEPRECATE_IFDEF_END
 
   /** sets the range of the ruler.
    * <i>upper</i> and <i>lower</i> arguments denote the extents of the Ruler.
@@ -97,7 +111,7 @@ class VRuler : public Ruler
   _CLASS_GTKOBJECT(VRuler,GtkVRuler,GTK_VRULER,Gtk::Ruler,GtkRuler)
 public:
   _CTOR_DEFAULT
-  
+
 };
 
 
@@ -110,8 +124,7 @@ class HRuler : public Ruler
   _CLASS_GTKOBJECT(HRuler,GtkHRuler,GTK_HRULER,Gtk::Ruler,GtkRuler)
 public:
   _CTOR_DEFAULT
-  
+
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/scrolledwindow.hg b/gtk/src/scrolledwindow.hg
index 36eaa11..484e6b7 100644
--- a/gtk/src/scrolledwindow.hg
+++ b/gtk/src/scrolledwindow.hg
@@ -1,7 +1,7 @@
 /* $Id: scrolledwindow.hg,v 1.7 2006/08/17 18:03:34 murrayc Exp $ */
 
 /* scrolledwindow.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -23,6 +23,11 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/bin_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the struct fields.
+//TODO: W need to remove these methods anyway in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
 
 namespace Gtk
 {
@@ -55,7 +60,7 @@ class ScrolledWindow : public Bin
 public:
   _CTOR_DEFAULT
   _WRAP_CTOR(ScrolledWindow(Adjustment& hadjustment, Adjustment& vadjustment), gtk_scrolled_window_new)
-  
+
 
   _WRAP_METHOD(void set_hadjustment(Gtk::Adjustment* hadjustment = 0), gtk_scrolled_window_set_hadjustment)
   _WRAP_METHOD(void set_vadjustment(Gtk::Adjustment* vadjustment = 0), gtk_scrolled_window_set_vadjustment)
@@ -91,8 +96,15 @@ public:
   _WRAP_METHOD(HScrollbar* get_hscrollbar(), gtk_scrolled_window_get_hscrollbar)
   _WRAP_METHOD(const HScrollbar* get_hscrollbar() const, gtk_scrolled_window_get_hscrollbar)
 
+_DEPRECATE_IFDEF_START
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET(vscrollbar_visible,vscrollbar_visible,bool,guint)
+
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET(hscrollbar_visible,hscrollbar_visible,bool,guint)
+_DEPRECATE_IFDEF_END
 
   //Keybinding signals:
   _IGNORE_SIGNAL("scroll_child")
@@ -107,4 +119,3 @@ public:
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/selectiondata.ccg b/gtk/src/selectiondata.ccg
index 456b968..20b6332 100644
--- a/gtk/src/selectiondata.ccg
+++ b/gtk/src/selectiondata.ccg
@@ -59,8 +59,10 @@ Glib::ustring SelectionData::get_text() const
 
 std::string SelectionData::get_data_as_string() const
 {
-  if(gobj()->data && gobj()->length > 0)
-    return std::string(reinterpret_cast<char*>(gobj()->data), gobj()->length);
+  const guchar* data = get_data();
+  const int length = get_length();
+  if(data && length > 0)
+    return std::string(reinterpret_cast<const char*>(data), length);
   else
     return std::string();
 }
@@ -92,4 +94,3 @@ std::string SelectionData::get_data_type() const
 
 
 } // namespace Gtk
-
diff --git a/gtk/src/table.hg b/gtk/src/table.hg
index 5779e40..bdf030f 100644
--- a/gtk/src/table.hg
+++ b/gtk/src/table.hg
@@ -25,6 +25,12 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the ->children struct field.
+//TODO: We probably need to remove the entire STL-style children() API in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 namespace Gtk
 {
 
@@ -65,7 +71,7 @@ public:
 
 protected:
   inline GtkTable* parent()
-    { return (GtkTable*) (gobj()->widget->parent); }
+    { return GTK_TABLE(gtk_widget_get_parent(gobj()->widget)); }
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
   friend class Dummy_; // silence the compiler (Child has only private ctors)
@@ -179,4 +185,3 @@ protected:
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/tearoffmenuitem.hg b/gtk/src/tearoffmenuitem.hg
index c2d29f7..1c99ebb 100644
--- a/gtk/src/tearoffmenuitem.hg
+++ b/gtk/src/tearoffmenuitem.hg
@@ -2,7 +2,7 @@
 
 
 /* tearoffmenuitem.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -24,6 +24,11 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/menuitem_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to use the struct fields.
+//TODO: We need to remove these methods anyway in a future ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
 
 namespace Gtk
 {
@@ -40,8 +45,11 @@ class TearoffMenuItem : public MenuItem
 public:
   _CTOR_DEFAULT
 
+_DEPRECATE_IFDEF_START
+  /** @deprecated This method was apparently not useful and will be removed in a later gtkmm version, due to changes in GTK+.
+   */
   bool is_torn_off() const;
+_DEPRECATE_IFDEF_END
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index 4d34aa1..c9d67ad 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -64,7 +64,7 @@ public:
 
   _DEPRECATE_IFDEF_START
   /** @deprecated Use scroll_to().
-   */                            
+   */
   bool scroll_to_iter(TextBuffer::iterator& iter, double within_margin);
 
   /** @deprecated Use scroll_to().
@@ -101,7 +101,7 @@ public:
    * @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
    * @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
    * @result true if scrolling occurred.
-   */ 
+   */
   bool scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign);
   _IGNORE(gtk_text_view_scroll_to_iter)
 
@@ -125,7 +125,7 @@ public:
    */
   void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign);
   _IGNORE(gtk_text_view_scroll_to_mark)
- 
+
   _IGNORE(gtk_text_view_scroll_mark_onscreen) //It does not do anything more than the default scroll_to(mark).
 
   _WRAP_METHOD(bool move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark), gtk_text_view_move_mark_onscreen)
@@ -194,10 +194,10 @@ public:
 
   _WRAP_METHOD(void set_overwrite(bool overwrite = true), gtk_text_view_set_overwrite)
   _WRAP_METHOD(bool get_overwrite() const, gtk_text_view_get_overwrite)
-  
+
   _WRAP_METHOD(void set_accepts_tab(bool accepts_tab = true), gtk_text_view_set_accepts_tab)
   _WRAP_METHOD(bool get_accepts_tab() const, gtk_text_view_get_accepts_tab)
-    
+
   _WRAP_SIGNAL(void set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment), "set_scroll_adjustments")
   _WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup")
 
@@ -205,7 +205,7 @@ public:
 
 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void insert_at_cursor(const Glib::ustring& str), "insert_at_cursor")
-  
+
   //Keybinding signals:
   _IGNORE_SIGNAL("move_cursor")
   _IGNORE_SIGNAL("page_horizontally")
@@ -219,7 +219,8 @@ public:
   _IGNORE_SIGNAL("select_all")
   _IGNORE_SIGNAL("backspace")
   _IGNORE_SIGNAL("toggle_cursor_visible")
-  
+  _IGNORE_SIGNAL("preedit-changed")
+
   _WRAP_PROPERTY("pixels-above-lines", int)
   _WRAP_PROPERTY("pixels-below-lines", int)
   _WRAP_PROPERTY("pixels-inside-wrap", int)
@@ -238,4 +239,3 @@ public:
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/viewport.hg b/gtk/src/viewport.hg
index 0325368..8917888 100644
--- a/gtk/src/viewport.hg
+++ b/gtk/src/viewport.hg
@@ -1,7 +1,7 @@
 /* $Id: viewport.hg,v 1.3 2006/04/12 11:11:25 murrayc Exp $ */
 
 /* viewport.h
- * 
+ *
  * Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ namespace Gtk {
 class Adjustment;
 
 /** An adapter which makes widgets scrollable.
- * 
+ *
  * @ingroup Widgets
  * @ingroup Containers
  */
@@ -66,6 +66,9 @@ public:
   _WRAP_METHOD(ShadowType get_shadow_type() const,
                gtk_viewport_get_shadow_type)
 
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_bin_window(), gtk_viewport_get_bin_window, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_bin_window() const, gtk_viewport_get_bin_window, refreturn, constversion)
+
   _WRAP_SIGNAL(void set_scroll_adjustments(Gtk::Adjustment* hadjustment,
                                            Gtk::Adjustment* vadjustment),
                "set_scroll_adjustments")
@@ -76,4 +79,3 @@ public:
 };
 
 }  /* namespace Gtk */
-
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index af796f9..133f037 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -278,16 +278,19 @@ void Widget::unset_cursor()
   gtk_widget_modify_cursor(gobj(), 0, 0);
 }
 
+_DEPRECATE_IFDEF_START
+//deprecated:
 bool Widget::has_no_window() const
-  { return GTK_WIDGET_NO_WINDOW(gobj()); }
+  { return !get_has_window(); }
 
+//deprecated:
 bool Widget::is_realized() const
-  { return GTK_WIDGET_REALIZED(gobj()); }
+  { return get_realized(); }
 
+//deprecated:
 bool Widget::is_mapped() const
-  { return GTK_WIDGET_MAPPED(gobj()); }
+  { return get_mapped(); }
 
-_DEPRECATE_IFDEF_START
 //deprecated:
 bool Widget::is_drawable() const
 {
@@ -328,19 +331,20 @@ bool Widget::rc_style() const
 
 //deprecated:
 bool Widget::is_composite_child() const
-  { return GTK_WIDGET_COMPOSITE_CHILD(gobj()); }
-
-_DEPRECATE_IFDEF_END
-
-Allocation Widget::get_allocation() const
 {
-  Allocation allocation;
-  gtk_widget_get_allocation(const_cast<GtkWidget*>(gobj()), allocation.gobj());
-  return allocation;
+  return property_composite_child().get_value();
 }
 
+//deprecated:
 bool Widget::parent_sensitive() const
-  { return GTK_WIDGET_PARENT_SENSITIVE(gobj()); }
+{
+  const Gtk::Widget* parent = get_parent();
+  if(!parent)
+    return false;
+
+  return parent->get_sensitive();
+}
+
 
 WidgetFlags Widget::get_flags() const
   { return static_cast<WidgetFlags>(GTK_WIDGET_FLAGS(gobj())); }
@@ -351,11 +355,23 @@ void Widget::set_flags(WidgetFlags flags)
 void Widget::unset_flags(WidgetFlags flags)
   { GTK_WIDGET_UNSET_FLAGS(gobj(), static_cast<guint32>(flags)); }
 
+_DEPRECATE_IFDEF_END
+
+Allocation Widget::get_allocation() const
+{
+  Allocation allocation;
+  gtk_widget_get_allocation(const_cast<GtkWidget*>(gobj()), allocation.gobj());
+  return allocation;
+}
+
+
+
+
 int Widget::get_width() const
-  { return gobj()->allocation.width; }
+  { return get_allocation().get_width(); }
 
 int Widget::get_height() const
-  { return gobj()->allocation.height; }
+  { return get_allocation().get_height(); }
 
 
 void Widget::drag_dest_set(DestDefaults flags, Gdk::DragAction actions)
@@ -473,7 +489,8 @@ void Widget_Class::dispose_vfunc_callback(GObject* self)
       // GTKMM_LIFECYCLE
       // Remove the widget from its parent container so that it
       // won't be destroyed later by gtk_container_destroy().
-      if(pWidget->parent)
+      GtkWidget* parent = gtk_widget_get_parent(pWidget);
+      if(parent)
       {
         // Normally, we would have to ref the child widget because
         // gtk_container_remove() unrefs it.  But since we only remove
@@ -481,10 +498,10 @@ void Widget_Class::dispose_vfunc_callback(GObject* self)
         // reference it has acquired before in gtk_container_add().
 
         #ifdef GLIBMM_DEBUG_REFCOUNTING
-        g_warning("Widget_Class::dispose_vfunc_callback(): removing gobject_: %p from parent: %p", (void*)self, (void*)pWidget->parent);
+        g_warning("Widget_Class::dispose_vfunc_callback(): removing gobject_: %p from parent: %p", (void*)self, (void*)parent);
         #endif
 
-        gtk_container_remove(GTK_CONTAINER(pWidget->parent), pWidget);
+        gtk_container_remove(GTK_CONTAINER(parent), pWidget);
 
         #ifdef GLIBMM_DEBUG_REFCOUNTING
         g_warning("Widget_Class::dispose_vfunc_callback(): after removing from parent.");
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index d07b08c..0a0d4b8 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -18,8 +18,16 @@
 #m4 _PUSH(SECTION_CC_PRE_INCLUDES)
 #undef GTK_DISABLE_DEPRECATED
 #m4 _POP()
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to set the struct fields.
+//TODO: Remove these functions anyway in an ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 _CONFIGINCLUDE(gtkmmconfig.h)
 
+
 #include <pangomm/context.h>
 #include <pangomm/layout.h>
 
@@ -587,18 +595,19 @@ public:
   _WRAP_METHOD(void set_has_tooltip(bool has_tooltip = TRUE), gtk_widget_set_has_tooltip)
   _WRAP_METHOD(bool get_has_tooltip() const, gtk_widget_get_has_tooltip)
 
-  /* FLAGS */
-
- //: Returns property {flags.nowindow}.
+_DEPRECATE_IFDEF_START
+  /** @deprecated Use !get_has_window() instead.
+   */
   bool has_no_window() const;
 
-  //: Returns property {flags.realized}.
+  /** @deprecated Use get_realized() instead.
+   */
   bool is_realized() const;
 
-  //: Returns property {flags.mapped}.
+  /** @deprecated Use get_mapped() instead.
+   */
   bool is_mapped() const;
 
-_DEPRECATE_IFDEF_START
   /** @deprecated: Use get_is_toplevel() instead.
    */
   bool is_toplevel() const;
@@ -627,10 +636,12 @@ _DEPRECATE_IFDEF_START
    */
   bool double_buffered() const;
 
-  _DEPRECATE_IFDEF_END
-
+  /** @deprecated Call get_sensitive() on the result of get_parent() instead.
+   */
   bool parent_sensitive() const;
 
+  _DEPRECATE_IFDEF_END
+
   /** @deprecated: Use has_rc_style() instead.
    */
   bool rc_style() const;
@@ -640,12 +651,32 @@ _DEPRECATE_IFDEF_START
    * @deprecated Use the "composite-child" property instead.
    */
   bool is_composite_child() const;
-  _DEPRECATE_IFDEF_END
 
+  /**  @deprecated: Use the proper method to test individual states, suchas 
+   * get_app_paintable(), get_can_default(),
+   * get_can_focus(), get_double_buffered(),
+   * has_default(), is_drawable(),
+   * has_focus(), has_grab(), get_mapped(),
+   * get_has_window(), has_rc_style(),
+   * get_realized(), get_receives_default(),
+   * get_sensitive(), is_sensitive(),
+   * is_toplevel() or get_visible().
+   */
   WidgetFlags get_flags() const;
+
+  //TODO: Document the deprecation when GTK+ does.
   void set_flags(WidgetFlags flags);
+
+  //TODO: Document the deprecation when GTK+ does.
   void unset_flags(WidgetFlags flags);
 
+  //TODO: Remove this when we can break ABI:
+  /** @deprecated You should not need to call this method.
+   */
+  _MEMBER_GET(saved_state, saved_state, Gtk::StateType, guint8)
+
+  _DEPRECATE_IFDEF_END
+
   int get_width() const;
   int get_height() const;
 
@@ -655,8 +686,6 @@ _DEPRECATE_IFDEF_START
   _WRAP_METHOD(Glib::RefPtr<Action> get_action(), gtk_widget_get_action, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Action> get_action() const, gtk_widget_get_action, refreturn, constversion)
 
-  _MEMBER_GET(saved_state, saved_state, Gtk::StateType, guint8)
-
   //TODO: Move this to protected when we can break API:
   /**  Retrieves the widget's requisition.
    *
@@ -678,14 +707,14 @@ _DEPRECATE_IFDEF_START
   _WRAP_SIGNAL(void show(),"show")
   _WRAP_SIGNAL(void hide(),"hide")
 
-  //: Emitted on mapping of a widget to the screen.
+  /// Emitted on mapping of a widget to the screen.
   //- See {flags.mapped}.
   _WRAP_SIGNAL(void map(),"map")
 
   //- See {flags.mapped}.
   _WRAP_SIGNAL(void unmap(),"unmap")
 
-  //: Emitted on realization of a widget.
+  /// Emitted on realization of a widget.
   //- See {flags.realized}.  This is also responsible for
   //- setting {flags.realized} when it is done.  Therefore,
   //- when overriding the impl method, you should call the
@@ -706,7 +735,7 @@ _DEPRECATE_IFDEF_START
 
   _WRAP_SIGNAL(void state_changed(Gtk::StateType previous_state), "state_changed")
 
-  //: Informs objects that their parent changed.
+  /// Informs objects that their parent changed.
   //- The widget passed is the former parent, which may be 0 if
   //- there was no parent. (was parent_set in GTK+)
   _WRAP_SIGNAL(void parent_changed(Widget* previous_parent), "parent_set")
@@ -745,15 +774,15 @@ _DEPRECATE_IFDEF_START
   _WRAP_SIGNAL(bool event(GdkEvent* event), "event")
   _WRAP_SIGNAL(void event_after(GdkEvent* event), "event_after", no_default_handler)
 
-  //: Event triggered by user pressing button.
+  /// Event triggered by user pressing button.
   _WRAP_SIGNAL(bool button_press_event(GdkEventButton* event),"button_press_event")
 
-  //: Event triggered by user releasing button.
+  /// Event triggered by user releasing button.
   _WRAP_SIGNAL(bool button_release_event(GdkEventButton* event), "button_release_event")
 
   _WRAP_SIGNAL(bool scroll_event(GdkEventScroll* event), "scroll_event")
 
-  //: Event triggered by user moving pointer.
+  /// Event triggered by user moving pointer.
   _WRAP_SIGNAL(bool motion_notify_event(GdkEventMotion* event), "motion_notify_event")
 
  /** The delete_event signal is emitted if a user requests that
@@ -782,7 +811,7 @@ dnl
   _POP()
 #m4end
 
-  //: Event triggered by window requiring a refresh.
+  /// Event triggered by window requiring a refresh.
   //- Expose events cover a rectangular area that was covered
   //- or obscured by another window.  That area is now exposed
   //- and thus is needs to be redrawn.
@@ -793,19 +822,19 @@ dnl
   //- Gtk::DrawingArea.
   _WRAP_SIGNAL(bool expose_event(GdkEventExpose* event), "expose_event")
 
-  //: Event triggered by a key press will widget has focus.
+  /// Event triggered by a key press will widget has focus.
   _WRAP_SIGNAL(bool key_press_event(GdkEventKey* event), "key_press_event")
 
-  //: Event triggered by a key release will widget has focus.
+  /// Event triggered by a key release will widget has focus.
   _WRAP_SIGNAL(bool key_release_event(GdkEventKey* event), "key_release_event")
 
-  //: Event triggered by pointer entering widget area.
+  /// Event triggered by pointer entering widget area.
   _WRAP_SIGNAL(bool enter_notify_event(GdkEventCrossing* event), "enter_notify_event")
 
-  //: Event triggered by pointer leaving widget area.
+  /// Event triggered by pointer leaving widget area.
   _WRAP_SIGNAL(bool leave_notify_event(GdkEventCrossing* event), "leave_notify_event")
 
-  //: Event triggered by a window resizing.
+  /// Event triggered by a window resizing.
   _WRAP_SIGNAL(bool configure_event(GdkEventConfigure* event), "configure_event")
   _WRAP_SIGNAL(bool focus_in_event(GdkEventFocus* event), "focus_in_event")
   _WRAP_SIGNAL(bool focus_out_event(GdkEventFocus* event), "focus_out_event")
diff --git a/gtk/src/window.ccg b/gtk/src/window.ccg
index 2c865e5..5a20318 100644
--- a/gtk/src/window.ccg
+++ b/gtk/src/window.ccg
@@ -43,16 +43,20 @@ Glib::RefPtr<AccelGroup> Window::get_accel_group()
   return accel_group_;
 }
 
+_DEPRECATE_IFDEF_START
+
 bool Window::is_toplevel() const
 {
-  return gobj()->type == GTK_WINDOW_TOPLEVEL;
+  return Widget::get_is_toplevel();
 }
 
 bool Window::is_popup() const
 {
-  return gobj()->type == GTK_WINDOW_POPUP;
+  return get_window_type() == WINDOW_POPUP;
 }
 
+_DEPRECATE_IFDEF_END
+
 void Window::raise()
 {
   get_window()->raise();
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index f12e61b..237c9c2 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -26,6 +26,12 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/bin_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow us to set the struct fields.
+//TODO: Remove these functions anyway in an ABI break.
+#undef GSEAL_ENABLE
+#m4 _POP()
+
 namespace Gtk
 {
 
@@ -93,15 +99,22 @@ public:
   _WRAP_PROPERTY("focus-on-map", bool)
   _WRAP_PROPERTY("deletable", bool)
 
+_DEPRECATE_IFDEF_START
+
+  /** @deprecated Use Gtk::Widget::is_toplevel().
+   */
   bool is_toplevel() const;
-  bool is_dialog() const;
-  bool is_popup() const;
 
-  _MEMBER_GET(window_type, type, WindowType, guint)
+  /** @deprecated: Use get_window_type().
+   */
+  bool is_popup() const;
 
-  //: This is special to the GTK+ linux-fb port.
+  // This is special to the GTK+ linux-fb port.
+  /** @deprecated You should not need to call this method.
+   */
   _MEMBER_GET_GOBJECT(frame, frame, Gdk::Window, GdkWindow*)
 
+_DEPRECATE_IFDEF_END
 
   _WRAP_SIGNAL(void set_focus(Widget* focus), "set_focus")
   _WRAP_SIGNAL(bool frame_event(GdkEvent* event), "frame_event")
@@ -139,8 +152,6 @@ dnl
 
   _WRAP_METHOD(void set_role(const Glib::ustring& role), gtk_window_set_role)
 
-  //: Returns the role of the window.
-  //- See {set_role()} for further explanation.
   _WRAP_METHOD(Glib::ustring get_role() const, gtk_window_get_role)
 
 
@@ -342,6 +353,8 @@ dnl
   _WRAP_METHOD(Glib::RefPtr<WindowGroup> get_group(), gtk_window_get_group, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const WindowGroup> get_group() const, gtk_window_get_group, refreturn, constversion)
 
+  _WRAP_METHOD(WindowType get_window_type() const, gtk_window_get_window_type)
+
   _WRAP_METHOD(void reshow_with_initial_size(),
                gtk_window_reshow_with_initial_size)
 



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