[gtkmm] Restore support for the extra _CLASS_GOBJECT() parameter.



commit 3dc302e25477c9703d9003bf6199fbcc00d08251
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jan 17 09:29:44 2011 +0100

    Restore support for the extra _CLASS_GOBJECT() parameter.
    
    * tools/m4/class_gtkobject.m4: This is still needed for the weird GtkWindow
    declaration in gtk+-2.0, though that is fixed in gtk+-3.0.
    And even though gtkmm-3.0 doesn't use that, this file must adapt to it.

 ChangeLog                   |   14 ++++++++++++++
 tools/m4/class_gtkobject.m4 |    8 +++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e354365..7449bdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-17  Murray Cumming  <murrayc murrayc com>
+
+	Restore support for the extra _CLASS_GOBJECT() parameter.
+
+	* tools/m4/class_gtkobject.m4: This is still needed for the weird GtkWindow
+	declaration in gtk+-2.0, though that is fixed in gtk+-3.0.
+	And even though gtkmm-3.0 doesn't use that, this file must adapt to it.
+	
+2011-01-17  Murray Cumming  <murrayc murrayc-desktop>
+
+	reviewed by: <delete if not using a buddy>
+
+	* tools/m4/class_gtkobject.m4:
+
 2011-01-16  Murray Cumming  <murrayc murrayc com>
 
 	Added NumerableIcon.
diff --git a/tools/m4/class_gtkobject.m4 b/tools/m4/class_gtkobject.m4
index d3698f2..8737969 100644
--- a/tools/m4/class_gtkobject.m4
+++ b/tools/m4/class_gtkobject.m4
@@ -14,6 +14,12 @@ define(`__CPPPARENT__',`$4')
 define(`__CPARENT__',`$5')
 define(`__PCAST__',`($5*)')
 
+dnl Some C types, e.g. GdkWindow or GdkPixmap, are a typedef to their base type,
+dnl rather than the real instance type.  That is really ugly, yes.  We get around
+dnl the problem by supporting optional __REAL_* arguments to this macro.
+define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6'))
+define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7'))
+
 
 dnl
 dnl ----------------------- Constructors -------------------------
@@ -177,7 +183,7 @@ public:
   typedef __CPPNAME__ CppObjectType;
   typedef __CPPNAME__`'_Class CppClassType;
   typedef __CNAME__ BaseObjectType;
-  typedef __CNAME__`'Class BaseClassType;
+  typedef __REAL_CNAME__`'Class BaseClassType;
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
   virtual ~__CPPNAME__`'();



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