mirror of https://github.com/GNOME/gimp.git
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:
parent
89f692cd73
commit
cb0ae619d1
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue