cogl: Port Color to GBoxed

Also removes a part of the docs in the private structure as it ends up
being detected as the docs for the public structure causing conflict

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193>
This commit is contained in:
Bilal Elmoussaoui 2023-08-18 10:41:04 +02:00 committed by Marge Bot
parent 4afc187062
commit 946b6c945a
3 changed files with 12 additions and 17 deletions

View File

@ -35,9 +35,12 @@
#include "cogl/cogl-util.h"
#include "cogl/cogl-color.h"
#include "cogl/cogl-color-private.h"
#include "cogl/cogl-gtype-private.h"
COGL_GTYPE_DEFINE_BOXED (Color, color, cogl_color_copy, cogl_color_free);
G_DEFINE_BOXED_TYPE (CoglColor,
cogl_color,
cogl_color_copy,
cogl_color_free)
CoglColor *
cogl_color_new (void)

View File

@ -35,8 +35,9 @@
#endif
/**
* SECTION:cogl-color
* @short_description: A generic color definition
* CoglColor:
*
* A generic color definition
*
* #CoglColor is a simple structure holding the definition of a color such
* that it can be efficiently used by GL
@ -49,13 +50,15 @@
G_BEGIN_DECLS
#define COGL_TYPE_COLOR (cogl_color_get_type ())
/**
* cogl_color_get_gtype:
* cogl_color_get_type:
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_color_get_gtype (void);
GType cogl_color_get_type (void);
/**
* cogl_color_new:

View File

@ -121,17 +121,6 @@ typedef enum
COGL_OFFSCREEN_BUFFER = (1 << 2)
} CoglBufferTarget;
/**
* CoglColor:
* @red: amount of red
* @green: amount of green
* @blue: amount of green
* @alpha: alpha
*
* A structure for holding a color definition. The contents of
* the CoglColor structure are private and should never by accessed
* directly.
*/
struct _CoglColor
{
/*< private >*/