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
|
||||
{
|
||||
MetaInputDevice parent_instance;
|
||||
|
||||
ClutterInputDevice device;
|
||||
|
||||
int32_t device_id;
|
||||
@ -71,10 +73,6 @@ typedef struct _MetaX11ScrollInfo
|
||||
guint last_value_valid : 1;
|
||||
} MetaX11ScrollInfo;
|
||||
|
||||
struct _MetaInputDeviceX11Class
|
||||
{
|
||||
ClutterInputDeviceClass device_class;
|
||||
};
|
||||
|
||||
#define N_BUTTONS 5
|
||||
|
||||
@ -87,9 +85,9 @@ enum
|
||||
|
||||
static GParamSpec *props[N_PROPS] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE (MetaInputDeviceX11,
|
||||
meta_input_device_x11,
|
||||
META_TYPE_INPUT_DEVICE)
|
||||
G_DEFINE_FINAL_TYPE (MetaInputDeviceX11,
|
||||
meta_input_device_x11,
|
||||
META_TYPE_INPUT_DEVICE)
|
||||
|
||||
static void
|
||||
meta_input_device_x11_constructed (GObject *object)
|
||||
|
@ -31,16 +31,13 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#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))
|
||||
#define META_INPUT_DEVICE_X11_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), META_TYPE_INPUT_DEVICE_X11, MetaInputDeviceX11Class))
|
||||
#define META_IS_INPUT_DEVICE_X11_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), META_TYPE_INPUT_DEVICE_X11))
|
||||
#define META_INPUT_DEVICE_X11_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), META_TYPE_INPUT_DEVICE_X11, MetaInputDeviceX11Class))
|
||||
|
||||
G_DECLARE_FINAL_TYPE (MetaInputDeviceX11,
|
||||
meta_input_device_x11,
|
||||
META, INPUT_DEVICE_X11,
|
||||
MetaInputDevice)
|
||||
|
||||
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,
|
||||
ClutterInputDeviceTool *tool);
|
||||
|
Loading…
Reference in New Issue
Block a user