[cogl/lionel/introspection-next: 24/42] quaternion: add introspection support



commit a249346760c429bca2cfe8025d7d87ccd5f3d210
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Tue Sep 3 15:51:39 2013 +0100

    quaternion: add introspection support

 cogl/cogl-quaternion.c |    5 +++++
 cogl/cogl-quaternion.h |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-quaternion.c b/cogl/cogl-quaternion.c
index 8a918c6..0e1b057 100644
--- a/cogl/cogl-quaternion.c
+++ b/cogl/cogl-quaternion.c
@@ -44,12 +44,17 @@
 #include <cogl-matrix.h>
 #include <cogl-vector.h>
 #include <cogl-euler.h>
+#include "cogl-gtype-private.h"
 
 #include <string.h>
 #include <math.h>
 
 #define FLOAT_EPSILON 1e-03
 
+COGL_GTYPE_DEFINE_BOXED ("Quaternion", quaternion,
+                         cogl_quaternion_copy,
+                         cogl_quaternion_free);
+
 static CoglQuaternion zero_quaternion =
 {
   0.0,  0.0, 0.0, 0.0,
diff --git a/cogl/cogl-quaternion.h b/cogl/cogl-quaternion.h
index b5848c1..49f7522 100644
--- a/cogl/cogl-quaternion.h
+++ b/cogl/cogl-quaternion.h
@@ -123,6 +123,7 @@ COGL_BEGIN_DECLS
  */
 struct _CoglQuaternion
 {
+  /*< public >*/
   float w;
 
   float x;
@@ -137,6 +138,8 @@ struct _CoglQuaternion
 };
 COGL_STRUCT_SIZE_ASSERT (CoglQuaternion, 32);
 
+COGL_GTYPE_DECLARE_TYPE (quaternion);
+
 /**
  * cogl_quaternion_init:
  * @quaternion: An uninitialized #CoglQuaternion


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