device: Allow updating devices from embedding toolkits

Embedding toolkits most likely will disable the event handling, so all
the input device code will not be executed. Unfortunately, the newly
added synthetic event generation of ENTER and LEAVE event pairs depends
on having input devices.

In order to unbreak things without reintroducing the madness of the
previous code we should allow embedding toolkits to just update the
state of an InputDevice by using the data contained inside the
ClutterEvent. This strategy has two obvious reasons:

  • the embedding toolkit is creating a ClutterEvent by translating
    a toolkit-native event anyway

  • this is exactly what ClutterStage does when processing events

We are, essentially, deferring input device handling to the embedding
toolkits, just like we're deferring event handling to them.
This commit is contained in:
Emmanuele Bassi
2010-02-17 18:21:50 +00:00
parent b398292089
commit 51a3e49c82
5 changed files with 68 additions and 2 deletions

View File

@ -1005,6 +1005,8 @@ clutter_input_device_get_device_type
clutter_input_device_get_device_name
clutter_input_device_get_device_coords
clutter_input_device_get_pointer_actor
clutter_input_device_get_pointer_stage
clutter_input_device_update_from_event
<SUBSECTION Standard>
CLUTTER_TYPE_INPUT_DEVICE