mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 15:37:00 -05:00
boxes: Use G_DEFINE_BOXED_TYPE to define the type
https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
This commit is contained in:
parent
85c2aef4bc
commit
0aa4a526c6
@ -55,17 +55,8 @@ meta_rectangle_free (MetaRectangle *rect)
|
||||
g_free (rect);
|
||||
}
|
||||
|
||||
GType
|
||||
meta_rectangle_get_type (void)
|
||||
{
|
||||
static GType type_id = 0;
|
||||
|
||||
if (!type_id)
|
||||
type_id = g_boxed_type_register_static (g_intern_static_string ("MetaRectangle"),
|
||||
(GBoxedCopyFunc) meta_rectangle_copy,
|
||||
(GBoxedFreeFunc) meta_rectangle_free);
|
||||
return type_id;
|
||||
}
|
||||
G_DEFINE_BOXED_TYPE (MetaRectangle, meta_rectangle,
|
||||
meta_rectangle_copy, meta_rectangle_free);
|
||||
|
||||
char*
|
||||
meta_rectangle_to_string (const MetaRectangle *rect,
|
||||
|
Loading…
Reference in New Issue
Block a user