[mutter] 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] backends: Export call to retrieve the base GSettings for a tablet
- Date: Fri, 22 Jul 2016 12:02:23 +0000 (UTC)
commit 323c608b0cdd2492efa70c0f5a54940fbfb637f8
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 82f58f9..e34dddf 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_create (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 f7e39df..559d92d 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -1278,6 +1278,22 @@ meta_input_settings_create (void)
return NULL;
}
+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]