mirror of
https://github.com/brl/mutter.git
synced 2025-02-19 14:44:10 +00:00
backends: Export function to query the mapped MetaOutput of a tablet
Or NULL if the tablet is mapped to the full desktop size.
This commit is contained in:
parent
522989494f
commit
02ce6c5865
@ -105,6 +105,9 @@ MetaInputSettings * meta_input_settings_get (void);
|
|||||||
|
|
||||||
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
|
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
|
||||||
ClutterInputDevice *device);
|
ClutterInputDevice *device);
|
||||||
|
MetaOutput * meta_input_settings_get_tablet_output (MetaInputSettings *settings,
|
||||||
|
ClutterInputDevice *device);
|
||||||
|
|
||||||
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
||||||
ClutterInputDevice *device);
|
ClutterInputDevice *device);
|
||||||
|
|
||||||
|
@ -1219,6 +1219,24 @@ meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
|
|||||||
return info ? g_object_ref (info->settings) : NULL;
|
return info ? g_object_ref (info->settings) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetaOutput *
|
||||||
|
meta_input_settings_get_tablet_output (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);
|
||||||
|
if (!info)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return meta_input_settings_find_output (settings, info->settings, device);
|
||||||
|
}
|
||||||
|
|
||||||
GDesktopTabletMapping
|
GDesktopTabletMapping
|
||||||
meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
||||||
ClutterInputDevice *device)
|
ClutterInputDevice *device)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user