summaryrefslogtreecommitdiff
path: root/cogl/winsys
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2013-09-02 16:02:42 +0100
committerNeil Roberts <neil@linux.intel.com>2014-03-20 18:27:12 +0000
commit1b2dd815b4a81048f445890b91d12237a8a06a8b (patch)
tree2d8e74039cf945ed4b628863e47532dc75e1b13a /cogl/winsys
parentbb10532f4b11cba169ace6d9e26543fe6f70ad8f (diff)
Registers gtypes for all public objects and structs
This adds much more comprehensive support for gobject-introspection based bindings by registering all objects as fundamental types that inherit from CoglObject, and all structs as boxed types. Co-Author: Robert Bragg <robert@linux.intel.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/winsys')
-rw-r--r--cogl/winsys/cogl-texture-pixmap-x11.c2
-rw-r--r--cogl/winsys/cogl-texture-pixmap-x11.h13
2 files changed, 15 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
index 896fdba7..6c1edeb0 100644
--- a/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -57,6 +57,7 @@
#include "cogl-error-private.h"
#include "cogl-texture-gl-private.h"
#include "cogl-private.h"
+#include "cogl-gtype-private.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -71,6 +72,7 @@
static void _cogl_texture_pixmap_x11_free (CoglTexturePixmapX11 *tex_pixmap);
COGL_TEXTURE_DEFINE (TexturePixmapX11, texture_pixmap_x11);
+COGL_GTYPE_DEFINE_CLASS (TexturePixmapX11, texture_pixmap_x11);
static const CoglTextureVtable cogl_texture_pixmap_x11_vtable;
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.h b/cogl/winsys/cogl-texture-pixmap-x11.h
index 12dd4166..35155cda 100644
--- a/cogl/winsys/cogl-texture-pixmap-x11.h
+++ b/cogl/winsys/cogl-texture-pixmap-x11.h
@@ -50,6 +50,10 @@
#include <cogl/cogl-context.h>
+#ifdef COGL_HAS_GTYPE_SUPPORT
+#include <glib-object.h>
+#endif
+
COGL_BEGIN_DECLS
#ifdef COGL_ENABLE_EXPERIMENTAL_API
@@ -68,6 +72,15 @@ typedef struct _CoglTexturePixmapX11 CoglTexturePixmapX11;
#define COGL_TEXTURE_PIXMAP_X11(X) ((CoglTexturePixmapX11 *)X)
+#ifdef COGL_HAS_GTYPE_SUPPORT
+/**
+ * cogl_texture_pixmap_x11_get_gtype:
+ *
+ * Returns: a #GType that can be used with the GLib type system.
+ */
+GType cogl_texture_pixmap_x11_get_gtype (void);
+#endif
+
typedef enum
{
COGL_TEXTURE_PIXMAP_X11_DAMAGE_RAW_RECTANGLES,