page-turn-effect: Use macros for subclassing boilerplate
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387>
This commit is contained in:
parent
581343dc9a
commit
9bd12d7e88
@ -41,7 +41,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFlowLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterGridLayout, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterInputDevice, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterInterval, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPageTurnEffect, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterScrollActor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterStage, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterText, g_object_unref)
|
||||
|
@ -42,10 +42,6 @@
|
||||
#include "clutter/clutter-debug.h"
|
||||
#include "clutter/clutter-private.h"
|
||||
|
||||
#define CLUTTER_PAGE_TURN_EFFECT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CLUTTER_TYPE_PAGE_TURN_EFFECT, ClutterPageTurnEffectClass))
|
||||
#define CLUTTER_IS_PAGE_TURN_EFFECT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CLUTTER_TYPE_PAGE_TURN_EFFECT))
|
||||
#define CLUTTER_PAGE_TURN_EFFECT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CLUTTER_TYPE_PAGE_TURN_EFFECT, ClutterPageTurnEffectClass))
|
||||
|
||||
struct _ClutterPageTurnEffect
|
||||
{
|
||||
ClutterDeformEffect parent_instance;
|
||||
@ -56,11 +52,6 @@ struct _ClutterPageTurnEffect
|
||||
gfloat radius;
|
||||
};
|
||||
|
||||
struct _ClutterPageTurnEffectClass
|
||||
{
|
||||
ClutterDeformEffectClass parent_class;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
|
@ -36,14 +36,12 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_PAGE_TURN_EFFECT (clutter_page_turn_effect_get_type ())
|
||||
#define CLUTTER_PAGE_TURN_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_PAGE_TURN_EFFECT, ClutterPageTurnEffect))
|
||||
#define CLUTTER_IS_PAGE_TURN_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_PAGE_TURN_EFFECT))
|
||||
|
||||
typedef struct _ClutterPageTurnEffect ClutterPageTurnEffect;
|
||||
typedef struct _ClutterPageTurnEffectClass ClutterPageTurnEffectClass;
|
||||
|
||||
CLUTTER_EXPORT
|
||||
GType clutter_page_turn_effect_get_type (void) G_GNUC_CONST;
|
||||
G_DECLARE_FINAL_TYPE (ClutterPageTurnEffect,
|
||||
clutter_page_turn_effect,
|
||||
CLUTTER, PAGE_TURN_EFFECT,
|
||||
ClutterDeformEffect)
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterEffect *clutter_page_turn_effect_new (gdouble period,
|
||||
|
Loading…
Reference in New Issue
Block a user