[mutter/wip/tablet-protocol-v2: 135/149] backends: Export call to retrieve the base GSettings for a tablet
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 135/149] backends: Export call to retrieve the base GSettings for a tablet
- Date: Wed, 20 Jul 2016 17:44:50 +0000 (UTC)
commit 522989494f28b351503a1cbb7cf44e12097a6ef6
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 29 13:49:20 2016 +0200
backends: Export call to retrieve the base GSettings for a tablet
src/backends/meta-input-settings-private.h | 2 ++
src/backends/meta-input-settings.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-input-settings-private.h b/src/backends/meta-input-settings-private.h
index 40c681c..bc15860 100644
--- a/src/backends/meta-input-settings-private.h
+++ b/src/backends/meta-input-settings-private.h
@@ -103,6 +103,8 @@ GType meta_input_settings_get_type (void) G_GNUC_CONST;
MetaInputSettings * meta_input_settings_get (void);
+GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
+ ClutterInputDevice *device);
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
ClutterInputDevice *device);
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index 921d799..b626416 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -1203,6 +1203,22 @@ meta_input_settings_get (void)
return input_settings;
}
+GSettings *
+meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
+ ClutterInputDevice *device)
+{
+ MetaInputSettingsPrivate *priv;
+ DeviceMappingInfo *info;
+
+ g_return_val_if_fail (META_IS_INPUT_SETTINGS (settings), NULL);
+ g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL);
+
+ priv = meta_input_settings_get_instance_private (settings);
+ info = g_hash_table_lookup (priv->mappable_devices, device);
+
+ return info ? g_object_ref (info->settings) : NULL;
+}
+
GDesktopTabletMapping
meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
ClutterInputDevice *device)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]