From ac07f10de397ff40427481bde2472183eeaeacfc Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 29 Nov 2024 20:20:32 -0300 Subject: [PATCH] cogl/pipeline: Use G_DECLARE_FINAL_TYPE Lets us get rid of the boilerplate. Part-of: --- cogl/cogl/cogl-pipeline-private.h | 5 ----- cogl/cogl/cogl-pipeline.h | 13 ++----------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h index 3e012d389..75cf7a937 100644 --- a/cogl/cogl/cogl-pipeline-private.h +++ b/cogl/cogl/cogl-pipeline-private.h @@ -382,11 +382,6 @@ struct _CoglPipeline const char *name; }; -struct _CoglPipelineClass -{ - GObjectClass parent_class; -}; - typedef struct _CoglPipelineFragend { void (*start) (CoglPipeline *pipeline, diff --git a/cogl/cogl/cogl-pipeline.h b/cogl/cogl/cogl-pipeline.h index fd099a296..42363b229 100644 --- a/cogl/cogl/cogl-pipeline.h +++ b/cogl/cogl/cogl-pipeline.h @@ -55,20 +55,11 @@ G_BEGIN_DECLS * performs fragment processing including depth testing and texture * mapping. Finally it blends the result with the framebuffer. */ -#define COGL_TYPE_PIPELINE (cogl_pipeline_get_type ()) -#define COGL_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COGL_TYPE_PIPELINE, CoglPipeline)) -#define COGL_PIPELINE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COGL_TYPE_PIPELINE, CoglPipeline const)) -#define COGL_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), COGL_TYPE_PIPELINE, CoglPipelineClass)) -#define COGL_IS_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), COGL_TYPE_PIPELINE)) -#define COGL_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), COGL_TYPE_PIPELINE)) -#define COGL_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), COGL_TYPE_PIPELINE, CoglPipelineClass)) -typedef struct _CoglPipelineClass CoglPipelineClass; - -G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoglPipeline, g_object_unref) +#define COGL_TYPE_PIPELINE (cogl_pipeline_get_type ()) COGL_EXPORT -GType cogl_pipeline_get_type (void) G_GNUC_CONST; +G_DECLARE_FINAL_TYPE (CoglPipeline, cogl_pipeline, COGL, PIPELINE, GObject) /** * cogl_pipeline_new: (constructor)