actor-meta-group: Use macros for subclassing boilerplate
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387>
This commit is contained in:
parent
c40be814c1
commit
35b9d24cae
@ -29,11 +29,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_META_GROUP (_clutter_meta_group_get_type ())
|
||||
#define CLUTTER_META_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_META_GROUP, ClutterMetaGroup))
|
||||
#define CLUTTER_IS_META_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_META_GROUP))
|
||||
|
||||
typedef struct _ClutterMetaGroup ClutterMetaGroup;
|
||||
typedef struct _ClutterMetaGroupClass ClutterMetaGroupClass;
|
||||
|
||||
struct _ClutterMetaGroup
|
||||
{
|
||||
@ -44,10 +40,10 @@ struct _ClutterMetaGroup
|
||||
GList *meta;
|
||||
};
|
||||
|
||||
struct _ClutterMetaGroupClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
G_DECLARE_FINAL_TYPE (ClutterMetaGroup,
|
||||
_clutter_meta_group,
|
||||
CLUTTER, META_GROUP,
|
||||
GObject)
|
||||
|
||||
/* Each actor meta has a priority with zero as a default. A higher
|
||||
number means higher priority. Higher priority metas stay at the
|
||||
@ -63,8 +59,6 @@ struct _ClutterMetaGroupClass
|
||||
#define CLUTTER_ACTOR_META_PRIORITY_INTERNAL_HIGH (G_MAXINT / 2)
|
||||
#define CLUTTER_ACTOR_META_PRIORITY_INTERNAL_LOW (G_MININT / 2)
|
||||
|
||||
GType _clutter_meta_group_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void _clutter_meta_group_add_meta (ClutterMetaGroup *group,
|
||||
ClutterActorMeta *meta);
|
||||
void _clutter_meta_group_remove_meta (ClutterMetaGroup *group,
|
||||
|
@ -433,7 +433,7 @@ _clutter_actor_meta_is_internal (ClutterActorMeta *meta)
|
||||
* ClutterMetaGroup: a collection of ClutterActorMeta instances
|
||||
*/
|
||||
|
||||
G_DEFINE_TYPE (ClutterMetaGroup, _clutter_meta_group, G_TYPE_OBJECT);
|
||||
G_DEFINE_FINAL_TYPE (ClutterMetaGroup, _clutter_meta_group, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
_clutter_meta_group_dispose (GObject *gobject)
|
||||
|
Loading…
Reference in New Issue
Block a user