From 82ca43c3b6c1aaf7bd15d6be61ee791137e9bab8 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 18 Aug 2023 12:42:48 +0200 Subject: [PATCH] cogl: Port (OnscreenDirtyClosure|FrameClosure) away from Cogl boxed type Part-of: --- cogl/cogl/cogl-onscreen.c | 16 +++++++++------- cogl/cogl/cogl-onscreen.h | 8 ++++---- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c index a80471bd5..a0baab8a8 100644 --- a/cogl/cogl/cogl-onscreen.c +++ b/cogl/cogl/cogl-onscreen.c @@ -70,13 +70,15 @@ cogl_dummy_free (gpointer data) { } -COGL_GTYPE_DEFINE_BOXED (FrameClosure, frame_closure, - cogl_dummy_copy, - cogl_dummy_free); -COGL_GTYPE_DEFINE_BOXED (OnscreenDirtyClosure, - onscreen_dirty_closure, - cogl_dummy_copy, - cogl_dummy_free); +G_DEFINE_BOXED_TYPE (CoglFrameClosure, + cogl_frame_closure, + cogl_dummy_copy, + cogl_dummy_free) + +G_DEFINE_BOXED_TYPE (CoglOnscreenDirtyClosure, + cogl_onscreen_dirty_closure, + cogl_dummy_copy, + cogl_dummy_free) G_DEFINE_QUARK (cogl-scanout-error-quark, cogl_scanout_error) diff --git a/cogl/cogl/cogl-onscreen.h b/cogl/cogl/cogl-onscreen.h index b58270c3c..7a5a2b083 100644 --- a/cogl/cogl/cogl-onscreen.h +++ b/cogl/cogl/cogl-onscreen.h @@ -398,12 +398,12 @@ typedef void (*CoglFrameCallback) (CoglOnscreen *onscreen, typedef struct _CoglClosure CoglFrameClosure; /** - * cogl_frame_closure_get_gtype: + * cogl_frame_closure_get_type: * * Returns: a #GType that can be used with the GLib type system. */ COGL_EXPORT -GType cogl_frame_closure_get_gtype (void); +GType cogl_frame_closure_get_type (void); /** * cogl_onscreen_add_frame_callback: @@ -510,12 +510,12 @@ typedef void (*CoglOnscreenDirtyCallback) (CoglOnscreen *onscreen, typedef struct _CoglClosure CoglOnscreenDirtyClosure; /** - * cogl_onscreen_dirty_closure_get_gtype: + * cogl_onscreen_dirty_closure_get_type: * * Returns: a #GType that can be used with the GLib type system. */ COGL_EXPORT -GType cogl_onscreen_dirty_closure_get_gtype (void); +GType cogl_onscreen_dirty_closure_get_type (void); /** * cogl_onscreen_add_dirty_callback: