mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
device-map: Add meta_device_map_list_devices()
This function returns a list of the devices currently handled by the device map.
This commit is contained in:
parent
855095ad1a
commit
1dd50cf006
@ -291,6 +291,28 @@ meta_device_map_get_display (MetaDeviceMap *device_map)
|
||||
return priv->display;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_device_map_list_devices:
|
||||
* @device_map: a #MetaDeviceMap
|
||||
*
|
||||
* Returns the list of devices that @device_map holds.
|
||||
*
|
||||
* Returns: (element-type Meta.Device) (transfer container): the list
|
||||
* of devices, the contained objects are owned by @device_map
|
||||
* and should not be unref'ed. The list must be freed with
|
||||
* g_list_free().
|
||||
**/
|
||||
GList *
|
||||
meta_device_map_list_devices (MetaDeviceMap *device_map)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_MAP (device_map), NULL);
|
||||
|
||||
priv = device_map->priv;
|
||||
return g_hash_table_get_values (priv->devices);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_device_map_grab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
|
@ -41,5 +41,6 @@ MetaDevice * meta_device_map_lookup (MetaDeviceMap *device_map,
|
||||
gint device_id);
|
||||
|
||||
MetaDisplay * meta_device_map_get_display (MetaDeviceMap *device_map);
|
||||
GList * meta_device_map_list_devices (MetaDeviceMap *device_map);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user