cally/util: Use macros for subclassing boilerplate
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3387>
This commit is contained in:
parent
566b14e48d
commit
105c8583ee
@ -30,23 +30,16 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define CALLY_TYPE_UTIL (cally_util_get_type ())
|
#define CALLY_TYPE_UTIL (cally_util_get_type ())
|
||||||
#define CALLY_UTIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALLY_TYPE_UTIL, CallyUtil))
|
|
||||||
#define CALLY_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALLY_TYPE_UTIL, CallyUtilClass))
|
|
||||||
#define CALLY_IS_UTIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALLY_TYPE_UTIL))
|
|
||||||
#define CALLY_IS_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALLY_TYPE_UTIL))
|
|
||||||
#define CALLY_UTIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALLY_TYPE_UTIL, CallyUtilClass))
|
|
||||||
|
|
||||||
typedef struct _CallyUtil CallyUtil;
|
typedef struct _CallyUtil CallyUtil;
|
||||||
typedef struct _CallyUtilClass CallyUtilClass;
|
typedef struct _CallyUtilClass CallyUtilClass;
|
||||||
typedef struct _CallyUtilPrivate CallyUtilPrivate;
|
|
||||||
|
|
||||||
struct _CallyUtil
|
CLUTTER_EXPORT
|
||||||
{
|
G_DECLARE_DERIVABLE_TYPE (CallyUtil,
|
||||||
/*< private >*/
|
cally_util,
|
||||||
AtkUtil parent;
|
CALLY,
|
||||||
|
UTIL,
|
||||||
CallyUtilPrivate *priv;
|
AtkUtil)
|
||||||
};
|
|
||||||
|
|
||||||
struct _CallyUtilClass
|
struct _CallyUtilClass
|
||||||
{
|
{
|
||||||
@ -54,9 +47,6 @@ struct _CallyUtilClass
|
|||||||
AtkUtilClass parent_class;
|
AtkUtilClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
|
||||||
GType cally_util_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
void _cally_util_override_atk_util (void);
|
void _cally_util_override_atk_util (void);
|
||||||
|
|
||||||
gboolean cally_snoop_key_event (ClutterStage *stage,
|
gboolean cally_snoop_key_event (ClutterStage *stage,
|
||||||
|
Loading…
Reference in New Issue
Block a user