mirror of https://github.com/GNOME/gimp.git
libgimpcolor: Use G_DEFINE_BOXED_TYPE()
This isn't any functional change, but allows us to get rid of some of the GObject boilerplate.
This commit is contained in:
parent
9cf4b20a7a
commit
89f692cd73
|
@ -43,18 +43,7 @@
|
|||
static GimpCMYK * gimp_cmyk_copy (const GimpCMYK *cmyk);
|
||||
|
||||
|
||||
GType
|
||||
gimp_cmyk_get_type (void)
|
||||
{
|
||||
static GType cmyk_type = 0;
|
||||
|
||||
if (!cmyk_type)
|
||||
cmyk_type = g_boxed_type_register_static ("GimpCMYK",
|
||||
(GBoxedCopyFunc) gimp_cmyk_copy,
|
||||
(GBoxedFreeFunc) g_free);
|
||||
|
||||
return cmyk_type;
|
||||
}
|
||||
G_DEFINE_BOXED_TYPE (GimpCMYK, gimp_cmyk, gimp_cmyk_copy, g_free)
|
||||
|
||||
static GimpCMYK *
|
||||
gimp_cmyk_copy (const GimpCMYK *cmyk)
|
||||
|
|
|
@ -32,18 +32,7 @@
|
|||
static GimpHSL * gimp_hsl_copy (const GimpHSL *hsl);
|
||||
|
||||
|
||||
GType
|
||||
gimp_hsl_get_type (void)
|
||||
{
|
||||
static GType hsl_type = 0;
|
||||
|
||||
if (!hsl_type)
|
||||
hsl_type = g_boxed_type_register_static ("GimpHSL",
|
||||
(GBoxedCopyFunc) gimp_hsl_copy,
|
||||
(GBoxedFreeFunc) g_free);
|
||||
|
||||
return hsl_type;
|
||||
}
|
||||
G_DEFINE_BOXED_TYPE (GimpHSL, gimp_hsl, gimp_hsl_copy, g_free)
|
||||
|
||||
static GimpHSL *
|
||||
gimp_hsl_copy (const GimpHSL *hsl)
|
||||
|
|
|
@ -41,18 +41,7 @@
|
|||
static GimpHSV * gimp_hsv_copy (const GimpHSV *hsv);
|
||||
|
||||
|
||||
GType
|
||||
gimp_hsv_get_type (void)
|
||||
{
|
||||
static GType hsv_type = 0;
|
||||
|
||||
if (!hsv_type)
|
||||
hsv_type = g_boxed_type_register_static ("GimpHSV",
|
||||
(GBoxedCopyFunc) gimp_hsv_copy,
|
||||
(GBoxedFreeFunc) g_free);
|
||||
|
||||
return hsv_type;
|
||||
}
|
||||
G_DEFINE_BOXED_TYPE (GimpHSV, gimp_hsv, gimp_hsv_copy, g_free)
|
||||
|
||||
static GimpHSV *
|
||||
gimp_hsv_copy (const GimpHSV *hsv)
|
||||
|
|
|
@ -43,18 +43,7 @@
|
|||
static GimpRGB * gimp_rgb_copy (const GimpRGB *rgb);
|
||||
|
||||
|
||||
GType
|
||||
gimp_rgb_get_type (void)
|
||||
{
|
||||
static GType rgb_type = 0;
|
||||
|
||||
if (!rgb_type)
|
||||
rgb_type = g_boxed_type_register_static ("GimpRGB",
|
||||
(GBoxedCopyFunc) gimp_rgb_copy,
|
||||
(GBoxedFreeFunc) g_free);
|
||||
|
||||
return rgb_type;
|
||||
}
|
||||
G_DEFINE_BOXED_TYPE (GimpRGB, gimp_rgb, gimp_rgb_copy, g_free)
|
||||
|
||||
void
|
||||
gimp_value_get_rgb (const GValue *value,
|
||||
|
|
Loading…
Reference in New Issue