x11: Use subclassing macros for InputDeviceX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
This commit is contained in:
parent
5387135220
commit
b1fc022ee6
@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
struct _MetaInputDeviceX11
|
struct _MetaInputDeviceX11
|
||||||
{
|
{
|
||||||
|
MetaInputDevice parent_instance;
|
||||||
|
|
||||||
ClutterInputDevice device;
|
ClutterInputDevice device;
|
||||||
|
|
||||||
int32_t device_id;
|
int32_t device_id;
|
||||||
@ -71,10 +73,6 @@ typedef struct _MetaX11ScrollInfo
|
|||||||
guint last_value_valid : 1;
|
guint last_value_valid : 1;
|
||||||
} MetaX11ScrollInfo;
|
} MetaX11ScrollInfo;
|
||||||
|
|
||||||
struct _MetaInputDeviceX11Class
|
|
||||||
{
|
|
||||||
ClutterInputDeviceClass device_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define N_BUTTONS 5
|
#define N_BUTTONS 5
|
||||||
|
|
||||||
@ -87,9 +85,9 @@ enum
|
|||||||
|
|
||||||
static GParamSpec *props[N_PROPS] = { 0 };
|
static GParamSpec *props[N_PROPS] = { 0 };
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaInputDeviceX11,
|
G_DEFINE_FINAL_TYPE (MetaInputDeviceX11,
|
||||||
meta_input_device_x11,
|
meta_input_device_x11,
|
||||||
META_TYPE_INPUT_DEVICE)
|
META_TYPE_INPUT_DEVICE)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_input_device_x11_constructed (GObject *object)
|
meta_input_device_x11_constructed (GObject *object)
|
||||||
|
@ -31,16 +31,13 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define META_TYPE_INPUT_DEVICE_X11 (meta_input_device_x11_get_type ())
|
#define META_TYPE_INPUT_DEVICE_X11 (meta_input_device_x11_get_type ())
|
||||||
#define META_INPUT_DEVICE_X11(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), META_TYPE_INPUT_DEVICE_X11, MetaInputDeviceX11))
|
|
||||||
#define META_IS_INPUT_DEVICE_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), META_TYPE_INPUT_DEVICE_X11))
|
G_DECLARE_FINAL_TYPE (MetaInputDeviceX11,
|
||||||
#define META_INPUT_DEVICE_X11_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), META_TYPE_INPUT_DEVICE_X11, MetaInputDeviceX11Class))
|
meta_input_device_x11,
|
||||||
#define META_IS_INPUT_DEVICE_X11_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), META_TYPE_INPUT_DEVICE_X11))
|
META, INPUT_DEVICE_X11,
|
||||||
#define META_INPUT_DEVICE_X11_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), META_TYPE_INPUT_DEVICE_X11, MetaInputDeviceX11Class))
|
MetaInputDevice)
|
||||||
|
|
||||||
typedef struct _MetaInputDeviceX11 MetaInputDeviceX11;
|
typedef struct _MetaInputDeviceX11 MetaInputDeviceX11;
|
||||||
typedef struct _MetaInputDeviceX11Class MetaInputDeviceX11Class;
|
|
||||||
|
|
||||||
GType meta_input_device_x11_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
void meta_input_device_x11_update_tool (ClutterInputDevice *device,
|
void meta_input_device_x11_update_tool (ClutterInputDevice *device,
|
||||||
ClutterInputDeviceTool *tool);
|
ClutterInputDeviceTool *tool);
|
||||||
|
Loading…
Reference in New Issue
Block a user