[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.
This commit is contained in:
Emmanuele Bassi 2009-07-20 12:47:53 +01:00
parent afe10f9897
commit 1da8ce3429
3 changed files with 12 additions and 14 deletions

View File

@ -295,6 +295,17 @@ typedef enum {
COGL_FOG_MODE_EXPONENTIAL_SQUARED COGL_FOG_MODE_EXPONENTIAL_SQUARED
} CoglFogMode; } 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 G_END_DECLS
#endif /* __COGL_TYPES_H__ */ #endif /* __COGL_TYPES_H__ */

View File

@ -122,7 +122,7 @@ static CoglBlendStringFunctionInfo blend_functions[] = {
#undef DEFINE_FUNCTION #undef DEFINE_FUNCTION
GQuark GQuark
_cogl_blend_string_error_quark (void) cogl_blend_string_error_quark (void)
{ {
return g_quark_from_static_string ("cogl-blend-string-error-quark"); return g_quark_from_static_string ("cogl-blend-string-error-quark");
} }

View File

@ -36,16 +36,6 @@ typedef enum _CoglBlendStringContext
COGL_BLEND_STRING_CONTEXT_TEXTURE_COMBINE COGL_BLEND_STRING_CONTEXT_TEXTURE_COMBINE
} CoglBlendStringContext; } 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 /* NB: debug stringify code will get upset if these
* are re-ordered */ * are re-ordered */
typedef enum _CoglBlendStringChannelMask typedef enum _CoglBlendStringChannelMask
@ -144,8 +134,5 @@ _cogl_blend_string_split_rgba_statement (CoglBlendStringStatement *statement,
CoglBlendStringStatement *rgb, CoglBlendStringStatement *rgb,
CoglBlendStringStatement *a); CoglBlendStringStatement *a);
GQuark
_cogl_blend_string_error_quark (void);
#endif /* COGL_BLEND_STRING_H */ #endif /* COGL_BLEND_STRING_H */