Commit cb0ae619 authored by Niels De Graef's avatar Niels De Graef Committed by Jehan

app: Use G_DEFINE_BOXED_TYPE()

This isn't any functional change, but allows us to get rid of some of
the GObject boilerplate.
parent 89f692cd
......@@ -29,18 +29,7 @@
#include "gimpboundary.h"
GType
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;
}
G_DEFINE_BOXED_TYPE (GimpBezierDesc, gimp_bezier_desc, gimp_bezier_desc_copy, gimp_bezier_desc_free)
GimpBezierDesc *
gimp_bezier_desc_new (cairo_path_data_t *data,
......
......@@ -30,18 +30,8 @@
#include "gimpdashpattern.h"
GType
gimp_dash_pattern_get_type (void)
{
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;
}
typedef GArray GimpDashPattern;
G_DEFINE_BOXED_TYPE (GimpDashPattern, gimp_dash_pattern, gimp_dash_pattern_copy, gimp_dash_pattern_free)
GArray *
gimp_dash_pattern_new_from_preset (GimpDashPreset preset)
......
......@@ -27,18 +27,7 @@
#include "gimpanchor.h"
GType
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;
}
G_DEFINE_BOXED_TYPE (GimpAnchor, gimp_anchor, gimp_anchor_copy, gimp_anchor_free)
GimpAnchor *
gimp_anchor_new (GimpAnchorType type,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment