event: Add a setter for the device field

When synthesizing events coming from input devices it should be
possible to just call a setter function, to avoid a huge switch
on the type of the event.

Clutter should also store the device pointer inside the private
data, for faster access of the pointer in allocated events.

Finally, the get_device_id() and get_device_type() accessors should
just be wrappers around clutter_event_get_device(), to reduce the
amount of code duplication.
This commit is contained in:
Emmanuele Bassi
2011-01-27 17:21:08 +00:00
parent 3502f326b2
commit b3784bd2b4
3 changed files with 64 additions and 38 deletions

View File

@ -1054,6 +1054,7 @@ clutter_event_get_related
clutter_event_get_scroll_direction
<SUBSECTION>
clutter_event_set_device
clutter_event_get_device
clutter_event_get_device_id
clutter_event_get_device_type