1
0
Fork 0

tap-action: Use macros for subclassing boilerplate

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387>
This commit is contained in:
Bilal Elmoussaoui 2023-11-10 16:34:07 +01:00
parent 64ad3abded
commit a944889f49
2 changed files with 6 additions and 18 deletions

View file

@ -51,7 +51,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterScrollActor, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterShaderEffect, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterStage, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSwipeAction, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTapAction, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTextBuffer, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterText, g_object_unref)

View file

@ -42,21 +42,13 @@
G_BEGIN_DECLS
#define CLUTTER_TYPE_TAP_ACTION (clutter_tap_action_get_type ())
#define CLUTTER_TAP_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_TAP_ACTION, ClutterTapAction))
#define CLUTTER_IS_TAP_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_TAP_ACTION))
#define CLUTTER_TAP_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_TAP_ACTION, ClutterTapActionClass))
#define CLUTTER_IS_TAP_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_TAP_ACTION))
#define CLUTTER_TAP_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_TAP_ACTION, ClutterTapActionClass))
typedef struct _ClutterTapAction ClutterTapAction;
typedef struct _ClutterTapActionPrivate ClutterTapActionPrivate;
typedef struct _ClutterTapActionClass ClutterTapActionClass;
struct _ClutterTapAction
{
/*< private >*/
ClutterGestureAction parent_instance;
};
CLUTTER_EXPORT
G_DECLARE_DERIVABLE_TYPE (ClutterTapAction,
clutter_tap_action,
CLUTTER,
TAP_ACTION,
ClutterGestureAction)
/**
* ClutterTapActionClass:
@ -75,9 +67,6 @@ struct _ClutterTapActionClass
ClutterActor *actor);
};
CLUTTER_EXPORT
GType clutter_tap_action_get_type (void) G_GNUC_CONST;
CLUTTER_EXPORT
ClutterAction * clutter_tap_action_new (void);
G_END_DECLS