Removing intermediate base class breaks ABI?



GtkHBox and GtkVBox (and others) are deprecated in GTK+ 3.1.x. Yes, I
find that rather tedious too. They were used as base classes in GTK+
3.0, but in 3.1 those hierarchies have been changed to use Box instead.
That's apparently not an ABI break with C/GObject.

But I strongly suspect that the equivalent change (see the attached
patch) would break our C++ ABI. Does anyone know otherwise?

It looks like we'll have to keep Gtk::HBox and Gtk::VBox deprecated just
by documentation, without putting the ifdefs around them.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com
>From cc939e1964dcf0a839000444ec8b23ae73baa0ec Mon Sep 17 00:00:00 2001
From: Murray Cumming <murrayc murrayc com>
Date: Fri, 10 Jun 2011 22:55:01 +0200
Subject: [PATCH] Several classes: Derive from Box instead of HBox or VBox.

	* gtk/src/colorselection.hg:
	* gtk/src/filechooserbutton.hg:
	* gtk/src/filechooserwidget.hg:
	* gtk/src/fontselection.hg:
	* gtk/src/infobar.hg:
	* gtk/src/recentchooserwidget.hg:
	* gtk/src/statusbar.hg: The base class was changed in GTK+ in
        GTK+ 3.1.x. And HBox and VBox are deprecated now.
---
 ChangeLog                      |   13 +++++++++++++
 gtk/src/colorselection.hg      |    4 ++--
 gtk/src/filechooserbutton.hg   |    4 ++--
 gtk/src/filechooserwidget.hg   |    4 ++--
 gtk/src/fontselection.hg       |    4 ++--
 gtk/src/infobar.hg             |    4 ++--
 gtk/src/recentchooserwidget.hg |    4 ++--
 gtk/src/statusbar.hg           |    4 ++--
 8 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 076b0b6..a1d6966 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2011-06-10  Murray Cumming  <murrayc murrayc com>
 
+	Several classes: Derive from Box instead of HBox or VBox.
+
+	* gtk/src/colorselection.hg:
+	* gtk/src/filechooserbutton.hg:
+	* gtk/src/filechooserwidget.hg:
+	* gtk/src/fontselection.hg:
+	* gtk/src/infobar.hg:
+	* gtk/src/recentchooserwidget.hg:
+	* gtk/src/statusbar.hg: The base class was changed in GTK+ in
+        GTK+ 3.1.x. And HBox and VBox are deprecated now.
+
+2011-06-10  Murray Cumming  <murrayc murrayc com>
+
 	box.h, etc: Include the deprecated H/V classes.
 
 	* gtk/src/box.hg:
diff --git a/gtk/src/colorselection.hg b/gtk/src/colorselection.hg
index 15a291f..884473c 100644
--- a/gtk/src/colorselection.hg
+++ b/gtk/src/colorselection.hg
@@ -41,9 +41,9 @@ namespace Gtk
  *
  * @ingroup Widgets
  */
-class ColorSelection : public VBox
+class ColorSelection : public Box
 {
-  _CLASS_GTKOBJECT(ColorSelection,GtkColorSelection,GTK_COLOR_SELECTION,Gtk::VBox,GtkVBox)
+  _CLASS_GTKOBJECT(ColorSelection,GtkColorSelection,GTK_COLOR_SELECTION,Gtk::Box,GtkBox)
   _IGNORE(gtk_color_selection_get_current_color, gtk_color_selection_get_previous_color,
           gtk_color_selection_set_color, gtk_color_selection_get_color, gtk_color_selection_set_update_policy)
 public:
diff --git a/gtk/src/filechooserbutton.hg b/gtk/src/filechooserbutton.hg
index 961ea62..493125a 100644
--- a/gtk/src/filechooserbutton.hg
+++ b/gtk/src/filechooserbutton.hg
@@ -46,10 +46,10 @@ namespace Gtk
  * @ingroup Widgets
  */
 class FileChooserButton
-  : public HBox, //Note: The C object really derives from this convenience type.
+  : public Box,
     public FileChooser
 {
-  _CLASS_GTKOBJECT(FileChooserButton, GtkFileChooserButton, GTK_FILE_CHOOSER_BUTTON, Gtk::HBox, GtkHBox)
+  _CLASS_GTKOBJECT(FileChooserButton, GtkFileChooserButton, GTK_FILE_CHOOSER_BUTTON, Gtk::Box, GtkBox)
   _IMPLEMENTS_INTERFACE(FileChooser)
 public:
 
diff --git a/gtk/src/filechooserwidget.hg b/gtk/src/filechooserwidget.hg
index 7d750b9..c7112b0 100644
--- a/gtk/src/filechooserwidget.hg
+++ b/gtk/src/filechooserwidget.hg
@@ -39,10 +39,10 @@ namespace Gtk
  * @ingroup Widgets
  */
 class FileChooserWidget
-: public VBox,
+: public Box,
   public FileChooser
 {
-  _CLASS_GTKOBJECT(FileChooserWidget, GtkFileChooserWidget, GTK_FILE_CHOOSER_WIDGET, Gtk::VBox, GtkVBox)
+  _CLASS_GTKOBJECT(FileChooserWidget, GtkFileChooserWidget, GTK_FILE_CHOOSER_WIDGET, Gtk::Box, GtkBox)
   _IMPLEMENTS_INTERFACE(FileChooser)
 public:
   _CTOR_DEFAULT;
diff --git a/gtk/src/fontselection.hg b/gtk/src/fontselection.hg
index d6713bc..d20f68a 100644
--- a/gtk/src/fontselection.hg
+++ b/gtk/src/fontselection.hg
@@ -44,9 +44,9 @@ class RadioButton;
  *
  * @ingroup Widgets
  */
-class FontSelection : public VBox
+class FontSelection : public Box
 {
-  _CLASS_GTKOBJECT(FontSelection,GtkFontSelection,GTK_FONT_SELECTION,Gtk::VBox,GtkVBox)
+  _CLASS_GTKOBJECT(FontSelection,GtkFontSelection,GTK_FONT_SELECTION,Gtk::Box,GtkBox)
   _IGNORE(gtk_font_selection_get_font) //deprecated
 public:
   _CTOR_DEFAULT()
diff --git a/gtk/src/infobar.hg b/gtk/src/infobar.hg
index a4e07b2..7361115 100644
--- a/gtk/src/infobar.hg
+++ b/gtk/src/infobar.hg
@@ -51,9 +51,9 @@ namespace Gtk
  *
  * @ingroup Widgets
  */
-class InfoBar : public HBox //Note: The C object really derives from this convenience type.
+class InfoBar : public Box
 {
-  _CLASS_GTKOBJECT(InfoBar, GtkInfoBar, GTK_INFO_BAR, Gtk::HBox, GtkHBox)
+  _CLASS_GTKOBJECT(InfoBar, GtkInfoBar, GTK_INFO_BAR, Gtk::Box, GtkBox)
 public:
 
   _CTOR_DEFAULT
diff --git a/gtk/src/recentchooserwidget.hg b/gtk/src/recentchooserwidget.hg
index 3c0e275..bf0d2b1 100644
--- a/gtk/src/recentchooserwidget.hg
+++ b/gtk/src/recentchooserwidget.hg
@@ -37,10 +37,10 @@ namespace Gtk
  * @ingroup RecentFiles
  */
 class RecentChooserWidget
-: public VBox,
+: public Box,
   public RecentChooser
 {
-  _CLASS_GTKOBJECT(RecentChooserWidget, GtkRecentChooserWidget, GTK_RECENT_CHOOSER_WIDGET, Gtk::VBox, GtkVBox)
+  _CLASS_GTKOBJECT(RecentChooserWidget, GtkRecentChooserWidget, GTK_RECENT_CHOOSER_WIDGET, Gtk::Box, GtkBox)
   _IMPLEMENTS_INTERFACE(RecentChooser)
 public:
   _CTOR_DEFAULT;
diff --git a/gtk/src/statusbar.hg b/gtk/src/statusbar.hg
index ad5ea82..f43b831 100644
--- a/gtk/src/statusbar.hg
+++ b/gtk/src/statusbar.hg
@@ -41,9 +41,9 @@ namespace Gtk
  *
  * @ingroup Widgets
  */
-class Statusbar : public HBox //Note: The C object really derives from this convenience type.
+class Statusbar : public Box
 {
-  _CLASS_GTKOBJECT(Statusbar,GtkStatusbar,GTK_STATUSBAR,Gtk::HBox,GtkHBox)
+  _CLASS_GTKOBJECT(Statusbar,GtkStatusbar,GTK_STATUSBAR,Gtk::Box,GtkBox)
   _IGNORE(gtk_statusbar_push)
 public:
   _CTOR_DEFAULT
-- 
1.7.5.2



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