clutter: Add ClutterVirtualInputDevice vmethod to notify keysyms

Evcodes don't cut it when we have something already specifying the
character to be printed, despite the current group/level. This API
allows some more control on the intended output.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
This commit is contained in:
Carlos Garnacho 2016-07-20 18:00:56 +02:00
parent 3c8b1462bc
commit 4abd31d863
2 changed files with 22 additions and 0 deletions

View File

@ -103,6 +103,18 @@ clutter_virtual_input_device_notify_key (ClutterVirtualInputDevice *virtual_devi
klass->notify_key (virtual_device, time_us, key, key_state);
}
void
clutter_virtual_input_device_notify_keyval (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
uint32_t keyval,
ClutterKeyState key_state)
{
ClutterVirtualInputDeviceClass *klass =
CLUTTER_VIRTUAL_INPUT_DEVICE_GET_CLASS (virtual_device);
klass->notify_keyval (virtual_device, time_us, keyval, key_state);
}
/**
* clutter_virtual_input_device_get_manager:
* @virtual_device: a virtual device

View File

@ -72,6 +72,10 @@ struct _ClutterVirtualInputDeviceClass
uint64_t time_us,
uint32_t key,
ClutterKeyState key_state);
void (*notify_keyval) (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
uint32_t keyval,
ClutterKeyState key_state);
};
CLUTTER_AVAILABLE_IN_ALL
@ -98,6 +102,12 @@ void clutter_virtual_input_device_notify_key (ClutterVirtualInputDevice *virtual
uint32_t key,
ClutterKeyState key_state);
CLUTTER_AVAILABLE_IN_ALL
void clutter_virtual_input_device_notify_keyval (ClutterVirtualInputDevice *virtual_device,
uint64_t time_us,
uint32_t keyval,
ClutterKeyState key_state);
CLUTTER_AVAILABLE_IN_ALL
ClutterDeviceManager * clutter_virtual_input_device_get_manager (ClutterVirtualInputDevice *virtual_device);