native: Use subclassing macros for InputSettingsNative

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3520>
This commit is contained in:
Bilal Elmoussaoui 2024-01-08 13:51:02 +01:00 committed by Marge Bot
parent c8c5560916
commit 59bdc69544
2 changed files with 13 additions and 19 deletions

View File

@ -28,7 +28,15 @@
#include "backends/native/meta-input-thread.h" #include "backends/native/meta-input-thread.h"
#include "backends/native/meta-input-settings-native.h" #include "backends/native/meta-input-settings-native.h"
G_DEFINE_TYPE (MetaInputSettingsNative, meta_input_settings_native, META_TYPE_INPUT_SETTINGS) struct _MetaInputSettingsNative
{
MetaInputSettings parent_instance;
MetaSeatImpl *seat_impl;
};
G_DEFINE_FINAL_TYPE (MetaInputSettingsNative,
meta_input_settings_native,
META_TYPE_INPUT_SETTINGS)
enum enum
{ {

View File

@ -28,26 +28,12 @@
#include "backends/meta-input-settings-private.h" #include "backends/meta-input-settings-private.h"
#define META_TYPE_INPUT_SETTINGS_NATIVE (meta_input_settings_native_get_type ()) #define META_TYPE_INPUT_SETTINGS_NATIVE (meta_input_settings_native_get_type ())
#define META_INPUT_SETTINGS_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_INPUT_SETTINGS_NATIVE, MetaInputSettingsNative))
#define META_INPUT_SETTINGS_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_INPUT_SETTINGS_NATIVE, MetaInputSettingsNativeClass))
#define META_IS_INPUT_SETTINGS_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_INPUT_SETTINGS_NATIVE))
#define META_IS_INPUT_SETTINGS_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_INPUT_SETTINGS_NATIVE))
#define META_INPUT_SETTINGS_NATIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_INPUT_SETTINGS_NATIVE, MetaInputSettingsNativeClass))
typedef struct _MetaInputSettingsNative MetaInputSettingsNative; typedef struct _MetaInputSettingsNative MetaInputSettingsNative;
typedef struct _MetaInputSettingsNativeClass MetaInputSettingsNativeClass;
struct _MetaInputSettingsNative G_DECLARE_FINAL_TYPE (MetaInputSettingsNative,
{ meta_input_settings_native,
MetaInputSettings parent_instance; META, INPUT_SETTINGS_NATIVE,
MetaSeatImpl *seat_impl; MetaInputSettings)
};
struct _MetaInputSettingsNativeClass
{
MetaInputSettingsClass parent_class;
};
GType meta_input_settings_native_get_type (void) G_GNUC_CONST;
MetaInputSettings * meta_input_settings_native_new_in_impl (MetaSeatImpl *seat_impl); MetaInputSettings * meta_input_settings_native_new_in_impl (MetaSeatImpl *seat_impl);