x11: Use subclassing macros for InputDeviceToolX11

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
This commit is contained in:
Bilal Elmoussaoui 2024-01-10 11:13:05 +01:00 committed by Marge Bot
parent 4f96b43222
commit 5387135220
2 changed files with 11 additions and 20 deletions

View File

@ -21,7 +21,12 @@
#include "meta-input-device-tool-x11.h" #include "meta-input-device-tool-x11.h"
G_DEFINE_TYPE (MetaInputDeviceToolX11, meta_input_device_tool_x11, struct _MetaInputDeviceToolX11
{
ClutterInputDeviceTool parent_instance;
};
G_DEFINE_FINAL_TYPE (MetaInputDeviceToolX11, meta_input_device_tool_x11,
CLUTTER_TYPE_INPUT_DEVICE_TOOL) CLUTTER_TYPE_INPUT_DEVICE_TOOL)
static void static void

View File

@ -23,26 +23,12 @@
#define META_TYPE_INPUT_DEVICE_TOOL_X11 (meta_input_device_tool_x11_get_type ()) #define META_TYPE_INPUT_DEVICE_TOOL_X11 (meta_input_device_tool_x11_get_type ())
#define META_INPUT_DEVICE_TOOL_X11(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), META_TYPE_INPUT_DEVICE_TOOL_X11, MetaInputDeviceToolX11)) G_DECLARE_FINAL_TYPE (MetaInputDeviceToolX11,
#define META_IS_INPUT_DEVICE_TOOL_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), META_TYPE_INPUT_DEVICE_TOOL_X11)) meta_input_device_tool_x11,
#define META_INPUT_DEVICE_TOOL_X11_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), META_TYPE_INPUT_DEVICE_TOOL_X11, MetaInputDeviceToolX11Class)) META, INPUT_DEVICE_TOOL_X11,
#define META_IS_INPUT_DEVICE_TOOL_X11_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), META_TYPE_INPUT_DEVICE_TOOL_X1)) ClutterInputDeviceTool)
#define META_INPUT_DEVICE_TOOL_X11_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), META_TYPE_INPUT_DEVICE_TOOL_X11, MetaInputDeviceToolX11Class))
typedef struct _MetaInputDeviceToolX11 MetaInputDeviceToolX11; typedef struct _MetaInputDeviceToolX11 MetaInputDeviceToolX11;
typedef struct _MetaInputDeviceToolX11Class MetaInputDeviceToolX11Class;
struct _MetaInputDeviceToolX11
{
ClutterInputDeviceTool parent_instance;
};
struct _MetaInputDeviceToolX11Class
{
ClutterInputDeviceToolClass parent_class;
};
GType meta_input_device_tool_x11_get_type (void) G_GNUC_CONST;
ClutterInputDeviceTool * meta_input_device_tool_x11_new (guint serial, ClutterInputDeviceTool * meta_input_device_tool_x11_new (guint serial,
ClutterInputDeviceToolType type); ClutterInputDeviceToolType type);