events: Add platform-data to allocated Events

Events allocated by Clutter should have a pointer to platform-specific
data; this would allow backends to add separate structures for holding
ancillary data, whilst retaining the ClutterEvent structure for use on
the stack.

In theory, for Clutter 2.x we might just want to drop Event and use an
opaque structure, or a typed data structure inheriting from
GTypeInstance instead.
This commit is contained in:
Emmanuele Bassi
2010-06-14 18:01:17 +01:00
parent fd65138589
commit f44ccba42e
4 changed files with 112 additions and 3 deletions

View File

@ -85,6 +85,12 @@ struct _ClutterBackendClass
ClutterStage *stage);
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
void (* copy_event_data) (ClutterBackend *backend,
ClutterEvent *src,
ClutterEvent *dest);
void (* free_event_data) (ClutterBackend *backend,
ClutterEvent *event);
/* signals */
void (* resolution_changed) (ClutterBackend *backend);
void (* font_changed) (ClutterBackend *backend);