[gtkmm/gtkmm-2-24] Restore support for the extra _CLASS_GOBJECT() parameter.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-2-24] Restore support for the extra _CLASS_GOBJECT() parameter.
- Date: Fri, 14 Jan 2011 12:49:00 +0000 (UTC)
commit cee801284f034d204607f8749a78f7b9807ee810
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jan 14 13:35:21 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.
ChangeLog | 7 +++++++
tools/m4/class_gtkobject.m4 | 8 +++++++-
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c7e53f1..75ade22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-14 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.
+
2011-01-14 Murray Cumming <murrayc murrayc com>
Use the m4 convert files from atkmm and pangomm instead of repeating them.
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]