mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
backends: Add function to lookup the mapping for a given tablet
At least for wayland, this needs implementing within mutter. So add a function to look this setting up.
This commit is contained in:
parent
1dd121002f
commit
f6e471fca4
@ -99,4 +99,7 @@ GType meta_input_settings_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaInputSettings * meta_input_settings_create (void);
|
||||
|
||||
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
||||
ClutterInputDevice *device);
|
||||
|
||||
#endif /* META_INPUT_SETTINGS_PRIVATE_H */
|
||||
|
@ -1018,3 +1018,22 @@ meta_input_settings_create (void)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GDesktopTabletMapping
|
||||
meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
||||
ClutterInputDevice *device)
|
||||
{
|
||||
MetaInputSettingsPrivate *priv;
|
||||
DeviceMappingInfo *info;
|
||||
|
||||
g_return_val_if_fail (META_IS_INPUT_SETTINGS (settings),
|
||||
G_DESKTOP_TABLET_MAPPING_ABSOLUTE);
|
||||
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device),
|
||||
G_DESKTOP_TABLET_MAPPING_ABSOLUTE);
|
||||
|
||||
priv = meta_input_settings_get_instance_private (settings);
|
||||
info = g_hash_table_lookup (priv->mappable_devices, device);
|
||||
g_return_val_if_fail (info != NULL, G_DESKTOP_TABLET_MAPPING_ABSOLUTE);
|
||||
|
||||
return g_settings_get_enum (info->settings, "mapping");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user