app: 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:
@ -29,18 +29,7 @@
|
|||||||
#include "gimpboundary.h"
|
#include "gimpboundary.h"
|
||||||
|
|
||||||
|
|
||||||
GType
|
G_DEFINE_BOXED_TYPE (GimpBezierDesc, gimp_bezier_desc, gimp_bezier_desc_copy, gimp_bezier_desc_free)
|
||||||
gimp_bezier_desc_get_type (void)
|
|
||||||
{
|
|
||||||
static GType type = 0;
|
|
||||||
|
|
||||||
if (! type)
|
|
||||||
type = g_boxed_type_register_static ("GimpBezierDesc",
|
|
||||||
(GBoxedCopyFunc) gimp_bezier_desc_copy,
|
|
||||||
(GBoxedFreeFunc) gimp_bezier_desc_free);
|
|
||||||
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
GimpBezierDesc *
|
GimpBezierDesc *
|
||||||
gimp_bezier_desc_new (cairo_path_data_t *data,
|
gimp_bezier_desc_new (cairo_path_data_t *data,
|
||||||
|
@ -30,18 +30,8 @@
|
|||||||
#include "gimpdashpattern.h"
|
#include "gimpdashpattern.h"
|
||||||
|
|
||||||
|
|
||||||
GType
|
typedef GArray GimpDashPattern;
|
||||||
gimp_dash_pattern_get_type (void)
|
G_DEFINE_BOXED_TYPE (GimpDashPattern, gimp_dash_pattern, gimp_dash_pattern_copy, gimp_dash_pattern_free)
|
||||||
{
|
|
||||||
static GType type = 0;
|
|
||||||
|
|
||||||
if (! type)
|
|
||||||
type = g_boxed_type_register_static ("GimpDashPattern",
|
|
||||||
(GBoxedCopyFunc) gimp_dash_pattern_copy,
|
|
||||||
(GBoxedFreeFunc) gimp_dash_pattern_free);
|
|
||||||
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
GArray *
|
GArray *
|
||||||
gimp_dash_pattern_new_from_preset (GimpDashPreset preset)
|
gimp_dash_pattern_new_from_preset (GimpDashPreset preset)
|
||||||
|
@ -27,18 +27,7 @@
|
|||||||
#include "gimpanchor.h"
|
#include "gimpanchor.h"
|
||||||
|
|
||||||
|
|
||||||
GType
|
G_DEFINE_BOXED_TYPE (GimpAnchor, gimp_anchor, gimp_anchor_copy, gimp_anchor_free)
|
||||||
gimp_anchor_get_type (void)
|
|
||||||
{
|
|
||||||
static GType anchor_type = 0;
|
|
||||||
|
|
||||||
if (!anchor_type)
|
|
||||||
anchor_type = g_boxed_type_register_static ("GimpAnchor",
|
|
||||||
(GBoxedCopyFunc) gimp_anchor_copy,
|
|
||||||
(GBoxedFreeFunc) gimp_anchor_free);
|
|
||||||
|
|
||||||
return anchor_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
GimpAnchor *
|
GimpAnchor *
|
||||||
gimp_anchor_new (GimpAnchorType type,
|
gimp_anchor_new (GimpAnchorType type,
|
||||||
|
Reference in New Issue
Block a user