mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
bind-constraint: Use macros for subclassing boilerplate
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387>
This commit is contained in:
parent
1565756fea
commit
7e7e9795fe
@ -31,7 +31,6 @@
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindConstraint, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBlurEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBoxLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBrightnessContrastEffect, g_object_unref)
|
||||
|
@ -94,10 +94,6 @@
|
||||
#include "clutter/clutter-enum-types.h"
|
||||
#include "clutter/clutter-private.h"
|
||||
|
||||
#define CLUTTER_BIND_CONSTRAINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BIND_CONSTRAINT, ClutterBindConstraintClass))
|
||||
#define CLUTTER_IS_BIND_CONSTRAINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BIND_CONSTRAINT))
|
||||
#define CLUTTER_BIND_CONSTRAINT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BIND_CONSTRAINT, ClutterBindConstraintClass))
|
||||
|
||||
struct _ClutterBindConstraint
|
||||
{
|
||||
ClutterConstraint parent_instance;
|
||||
@ -108,11 +104,6 @@ struct _ClutterBindConstraint
|
||||
gfloat offset;
|
||||
};
|
||||
|
||||
struct _ClutterBindConstraintClass
|
||||
{
|
||||
ClutterConstraintClass parent_class;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
@ -126,7 +117,7 @@ enum
|
||||
|
||||
static GParamSpec *obj_props[PROP_LAST];
|
||||
|
||||
G_DEFINE_TYPE (ClutterBindConstraint,
|
||||
G_DEFINE_FINAL_TYPE (ClutterBindConstraint,
|
||||
clutter_bind_constraint,
|
||||
CLUTTER_TYPE_CONSTRAINT);
|
||||
|
||||
|
@ -33,14 +33,10 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_BIND_CONSTRAINT (clutter_bind_constraint_get_type ())
|
||||
#define CLUTTER_BIND_CONSTRAINT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BIND_CONSTRAINT, ClutterBindConstraint))
|
||||
#define CLUTTER_IS_BIND_CONSTRAINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BIND_CONSTRAINT))
|
||||
|
||||
typedef struct _ClutterBindConstraint ClutterBindConstraint;
|
||||
typedef struct _ClutterBindConstraintClass ClutterBindConstraintClass;
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_bind_constraint_get_type (void) G_GNUC_CONST;
|
||||
G_DECLARE_FINAL_TYPE (ClutterBindConstraint, clutter_bind_constraint,
|
||||
CLUTTER, BIND_CONSTRAINT, ClutterConstraint)
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterConstraint * clutter_bind_constraint_new (ClutterActor *source,
|
||||
|
Loading…
Reference in New Issue
Block a user