Cleanups: fix deprecated g_type_class_add_private()
- use G_DECLARE_ and G_DEFINE_ macros - move all data into ClassNamePrivate - use _get_instance_private() This should not introduce any functional changes or breakage. Skipped two classes (EekKeyboard and EekboardContextService) for now in order not to break the build. These two classes are used in some very funky WIP code that tries to circumvent encapsulation. (Funky code is in eekboard/key-emitter.c and eekboard/eekboard-context-service.c)
This commit is contained in:
@ -31,23 +31,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define EEK_TYPE_XKB_LAYOUT (eek_xkb_layout_get_type())
|
||||
#define EEK_XKB_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEK_TYPE_XKB_LAYOUT, EekXkbLayout))
|
||||
#define EEK_XKB_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEK_TYPE_XKB_LAYOUT, EekXkbLayoutClass))
|
||||
#define EEK_IS_XKB_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEK_TYPE_XKB_LAYOUT))
|
||||
#define EEK_IS_XKB_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEK_TYPE_XKB_LAYOUT))
|
||||
#define EEK_XKB_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEK_TYPE_XKB_LAYOUT, EekXkbLayoutClass))
|
||||
|
||||
typedef struct _EekXkbLayout EekXkbLayout;
|
||||
typedef struct _EekXkbLayoutClass EekXkbLayoutClass;
|
||||
typedef struct _EekXkbLayoutPrivate EekXkbLayoutPrivate;
|
||||
|
||||
struct _EekXkbLayout
|
||||
{
|
||||
/*< private >*/
|
||||
EekLayout parent;
|
||||
|
||||
EekXkbLayoutPrivate *priv;
|
||||
};
|
||||
G_DECLARE_DERIVABLE_TYPE (EekXkbLayout, eek_xkb_layout, EEK, XKB_LAYOUT, EekLayout)
|
||||
|
||||
struct _EekXkbLayoutClass
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user