[gegl-qt/pyside2: 2/2] TEMP: typedef GeglNode* GeglNodePtr
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-qt/pyside2: 2/2] TEMP: typedef GeglNode* GeglNodePtr
- Date: Tue, 30 Aug 2011 22:26:37 +0000 (UTC)
commit 0af8b8f48ebb175873b2ceb9166569add62087df
Author: Jon Nordby <jononor gmail com>
Date: Wed Aug 31 00:06:06 2011 +0200
TEMP: typedef GeglNode* GeglNodePtr
gegl-qt/geglqtview.h | 6 ++++--
pygegl-qt/geglnode_conversions.h | 8 ++++----
pygegl-qt/typesystem_gegl-qt.xml | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gegl-qt/geglqtview.h b/gegl-qt/geglqtview.h
index c5ead41..f2f7325 100644
--- a/gegl-qt/geglqtview.h
+++ b/gegl-qt/geglqtview.h
@@ -23,6 +23,8 @@
#include <gegl.h>
+typedef GeglNode * GeglNodePtr;
+
#include "geglqtviewoptions.h"
class GeglQtViewImplementation;
@@ -35,8 +37,8 @@ public:
GeglQtView(QWidget *parent = 0);
~GeglQtView();
- GeglNode *inputNode() const;
- void setInputNode(GeglNode *node);
+ GeglNodePtr inputNode() const;
+ void setInputNode(GeglNodePtr node);
GeglQtViewOptions *options() const;
diff --git a/pygegl-qt/geglnode_conversions.h b/pygegl-qt/geglnode_conversions.h
index c011999..24a210f 100644
--- a/pygegl-qt/geglnode_conversions.h
+++ b/pygegl-qt/geglnode_conversions.h
@@ -3,7 +3,7 @@
namespace Shiboken {
template<>
-struct Converter<GeglNode *>
+struct Converter<GeglNodePtr>
{
static inline bool checkType(PyObject* pyObj)
{
@@ -19,16 +19,16 @@ struct Converter<GeglNode *>
static inline PyObject* toPython(void* cppObj)
{
- return pygobject_new(G_OBJECT(reinterpret_cast<GeglNode *>(cppObj)));
+ return pygobject_new(G_OBJECT(reinterpret_cast<GeglNodePtr>(cppObj)));
}
- static inline PyObject* toPython(const GeglNode* geglNode)
+ static inline PyObject* toPython(const GeglNodePtr geglNode)
{
// Does the PyGObject method increments the Python object reference count?
return pygobject_new(G_OBJECT(geglNode));
}
- static inline GeglNode* toCpp(PyObject* pyObj)
+ static inline GeglNodePtr toCpp(PyObject* pyObj)
{
PyGObject *pygobj = (PyGObject *)pyObj;
return GEGL_NODE(pygobj->obj);
diff --git a/pygegl-qt/typesystem_gegl-qt.xml b/pygegl-qt/typesystem_gegl-qt.xml
index c0416d2..b6831c2 100644
--- a/pygegl-qt/typesystem_gegl-qt.xml
+++ b/pygegl-qt/typesystem_gegl-qt.xml
@@ -2,7 +2,7 @@
<typesystem package="GeglQt">
<load-typesystem name="typesystem_gui.xml" generate="no" />
- <primitive-type name="GeglNode">
+ <primitive-type name="GeglNodePtr">
<conversion-rule file="geglnode_conversions.h"/>
<include file-name="pygobject.h" location="global"/>
</primitive-type>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]