From cdb239756b8c369566ae2c45b3562d2a838674cc Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 20 Jul 2009 12:47:53 +0100 Subject: [PATCH] [cogl] Make the blend string error domain public The error domain and codes must present in a publicly installed header otherwise they won't be usable to match a GError. --- clutter/cogl/cogl-types.h | 11 +++++++++++ clutter/cogl/common/cogl-blend-string.c | 2 +- clutter/cogl/common/cogl-blend-string.h | 13 ------------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/clutter/cogl/cogl-types.h b/clutter/cogl/cogl-types.h index 0a1360dde..db54351f2 100644 --- a/clutter/cogl/cogl-types.h +++ b/clutter/cogl/cogl-types.h @@ -295,6 +295,17 @@ typedef enum { COGL_FOG_MODE_EXPONENTIAL_SQUARED } CoglFogMode; +#define COGL_BLEND_STRING_ERROR (cogl_blend_string_error_quark ()) + +typedef enum { /*< prefix=COGL_BLEND_STRING_ERROR >*/ + COGL_BLEND_STRING_ERROR_PARSE_ERROR, + COGL_BLEND_STRING_ERROR_ARGUMENT_PARSE_ERROR, + COGL_BLEND_STRING_ERROR_INVALID_ERROR, + COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR +} CoglBlendStringError; + +GQuark cogl_blend_string_error_quark (void); + G_END_DECLS #endif /* __COGL_TYPES_H__ */ diff --git a/clutter/cogl/common/cogl-blend-string.c b/clutter/cogl/common/cogl-blend-string.c index a8ac2a64d..05fed58b3 100644 --- a/clutter/cogl/common/cogl-blend-string.c +++ b/clutter/cogl/common/cogl-blend-string.c @@ -122,7 +122,7 @@ static CoglBlendStringFunctionInfo blend_functions[] = { #undef DEFINE_FUNCTION GQuark -_cogl_blend_string_error_quark (void) +cogl_blend_string_error_quark (void) { return g_quark_from_static_string ("cogl-blend-string-error-quark"); } diff --git a/clutter/cogl/common/cogl-blend-string.h b/clutter/cogl/common/cogl-blend-string.h index a3e3888f8..8469cf5e5 100644 --- a/clutter/cogl/common/cogl-blend-string.h +++ b/clutter/cogl/common/cogl-blend-string.h @@ -36,16 +36,6 @@ typedef enum _CoglBlendStringContext COGL_BLEND_STRING_CONTEXT_TEXTURE_COMBINE } CoglBlendStringContext; -#define COGL_BLEND_STRING_ERROR _cogl_blend_string_error_quark () - -typedef enum _CoglBlendStringError -{ - COGL_BLEND_STRING_ERROR_PARSE_ERROR, - COGL_BLEND_STRING_ERROR_ARGUMENT_PARSE_ERROR, - COGL_BLEND_STRING_ERROR_INVALID_ERROR, - COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR -} CoglBlendStringError; - /* NB: debug stringify code will get upset if these * are re-ordered */ typedef enum _CoglBlendStringChannelMask @@ -144,8 +134,5 @@ _cogl_blend_string_split_rgba_statement (CoglBlendStringStatement *statement, CoglBlendStringStatement *rgb, CoglBlendStringStatement *a); -GQuark -_cogl_blend_string_error_quark (void); - #endif /* COGL_BLEND_STRING_H */