summaryrefslogtreecommitdiff
path: root/cogl/cogl-matrix.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-11-29 21:42:06 +0000
committerRobert Bragg <robert@linux.intel.com>2010-12-07 12:16:50 +0000
commitfd10e3a545f071e3006694cd1c0baa8dd2bd0914 (patch)
tree1722a33e089fc9cf090c8518a87bd1734b95186e /cogl/cogl-matrix.h
parent3ac023163fc64b0bddfa891430b5a2e1ca9e0fd1 (diff)
matrix gtype: registers a boxed type for CoglMatrix
To allow us to have gobject properties that accept a CoglMatrix value we need to register a GType. This adds a cogl_gtype_matrix_get_type function that will register a static boxed type called "CoglMatrix". This adds a new section to the reference manual for GType integration functions.
Diffstat (limited to 'cogl/cogl-matrix.h')
-rw-r--r--cogl/cogl-matrix.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cogl/cogl-matrix.h b/cogl/cogl-matrix.h
index b54f4b94..24c01e6c 100644
--- a/cogl/cogl-matrix.h
+++ b/cogl/cogl-matrix.h
@@ -484,6 +484,22 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
#endif /* COGL_ENABLE_EXPERIMENTAL_API */
+#ifdef _COGL_SUPPORTS_GTYPE_INTEGRATION
+
+#define COGL_GTYPE_TYPE_MATRIX (cogl_gtype_matrix_get_type ())
+
+/**
+ * cogl_gtype_matrix_get_type:
+ *
+ * Returns the GType for the registered "CoglMatrix" boxed type. This
+ * can be used for example to define GObject properties that accept a
+ * #CoglMatrix value.
+ */
+GType
+cogl_gtype_matrix_get_type (void);
+
+#endif /* _COGL_SUPPORTS_GTYPE_INTEGRATION */
+
G_END_DECLS
#endif /* __COGL_MATRIX_H */