evdev: Make the keymap available

Make the keymap available so that consumers don't have to duplicate it
if they need it.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
This commit is contained in:
Rui Matos 2014-01-15 17:54:25 +01:00
parent 2a7d5503d8
commit d67b38f960
2 changed files with 22 additions and 0 deletions

View File

@ -1513,6 +1513,26 @@ clutter_evdev_set_keyboard_map (ClutterDeviceManager *evdev,
}
}
/**
* clutter_evdev_get_keyboard_map: (skip)
* @evdev: the #ClutterDeviceManager created by the evdev backend
*
* Retrieves the #xkb_keymap in use by the evdev backend.
*
* Return value: the #xkb_keymap.
*/
struct xkb_keymap *
clutter_evdev_get_keyboard_map (ClutterDeviceManager *evdev)
{
ClutterDeviceManagerEvdev *manager_evdev;
g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER_EVDEV (evdev));
manager_evdev = CLUTTER_DEVICE_MANAGER_EVDEV (evdev);
return xkb_state_get_keymap (manager_evdev->priv->main_seat->xkb);
}
/**
* clutter_evdev_set_pointer_constrain_callback:
* @evdev: the #ClutterDeviceManager created by the evdev backend

View File

@ -85,6 +85,8 @@ void clutter_evdev_set_pointer_constrain_callback (ClutterDeviceManager
void clutter_evdev_set_keyboard_map (ClutterDeviceManager *evdev,
struct xkb_keymap *keymap);
struct xkb_keymap * clutter_evdev_get_keyboard_map (ClutterDeviceManager *evdev);
void clutter_evdev_set_keyboard_repeat (ClutterDeviceManager *evdev,
gboolean repeat,
guint32 delay,