[cogl/wip/lionel/introspection-1.18: 5/5] onscreen: make closure types visible to introspection
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/lionel/introspection-1.18: 5/5] onscreen: make closure types visible to introspection
- Date: Mon, 24 Feb 2014 00:03:58 +0000 (UTC)
commit 71806a11e7071e287805b81212e5cc0bb186e150
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Sun Feb 23 23:59:06 2014 +0000
onscreen: make closure types visible to introspection
cogl/cogl-onscreen.c | 23 +++++++++++++++++++++++
cogl/cogl-onscreen.h | 27 +++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-onscreen.c b/cogl/cogl-onscreen.c
index 05dd320..669ae3a 100644
--- a/cogl/cogl-onscreen.c
+++ b/cogl/cogl-onscreen.c
@@ -45,6 +45,29 @@ COGL_OBJECT_DEFINE_WITH_CODE_GTYPE (Onscreen, onscreen,
COGL_GTYPE_DEFINE_CLASS (Onscreen, onscreen,
COGL_GTYPE_IMPLEMENT_INTERFACE (framebuffer));
+static gpointer
+cogl_dummy_copy (gpointer data)
+{
+ return data;
+}
+
+static void
+cogl_dummy_free (gpointer data)
+{
+}
+
+COGL_GTYPE_DEFINE_BOXED (FrameClosure, frame_closure,
+ cogl_dummy_copy,
+ cogl_dummy_free);
+COGL_GTYPE_DEFINE_BOXED (OnscreenResizeClosure,
+ onscreen_resize_closure,
+ cogl_dummy_copy,
+ cogl_dummy_free);
+COGL_GTYPE_DEFINE_BOXED (OnscreenDirtyClosure,
+ onscreen_dirty_closure,
+ cogl_dummy_copy,
+ cogl_dummy_free);
+
static void
_cogl_onscreen_init_from_template (CoglOnscreen *onscreen,
CoglOnscreenTemplate *onscreen_template)
diff --git a/cogl/cogl-onscreen.h b/cogl/cogl-onscreen.h
index 5bea318..c1cec5d 100644
--- a/cogl/cogl-onscreen.h
+++ b/cogl/cogl-onscreen.h
@@ -559,6 +559,15 @@ typedef void (*CoglFrameCallback) (CoglOnscreen *onscreen,
*/
typedef struct _CoglClosure CoglFrameClosure;
+#ifdef COGL_HAS_GTYPE_SUPPORT
+/**
+ * cogl_frame_closure_get_gtype:
+ *
+ * Returns: a #GType that can be used with the GLib type system.
+ */
+GType cogl_frame_closure_get_gtype (void);
+#endif
+
/**
* cogl_onscreen_add_frame_callback:
* @onscreen: A #CoglOnscreen framebuffer
@@ -777,6 +786,15 @@ typedef void (*CoglOnscreenResizeCallback) (CoglOnscreen *onscreen,
*/
typedef struct _CoglClosure CoglOnscreenResizeClosure;
+#ifdef COGL_HAS_GTYPE_SUPPORT
+/**
+ * cogl_onscreen_resize_closure_get_gtype:
+ *
+ * Returns: a #GType that can be used with the GLib type system.
+ */
+GType cogl_onscreen_resize_closure_get_gtype (void);
+#endif
+
/**
* cogl_onscreen_add_resize_callback:
* @onscreen: A #CoglOnscreen framebuffer
@@ -884,6 +902,15 @@ typedef void (*CoglOnscreenDirtyCallback) (CoglOnscreen *onscreen,
*/
typedef struct _CoglClosure CoglOnscreenDirtyClosure;
+#ifdef COGL_HAS_GTYPE_SUPPORT
+/**
+ * cogl_onscreen_dirty_closure_get_gtype:
+ *
+ * Returns: a #GType that can be used with the GLib type system.
+ */
+GType cogl_onscreen_dirty_closure_get_gtype (void);
+#endif
+
/**
* cogl_onscreen_add_dirty_callback:
* @onscreen: A #CoglOnscreen framebuffer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]