When we are in the the event translation function sometimes we need to
synthesise events: the double and triple click events are synthetic events
placed on the queue after a sequence of events has been received, for
instance.
Until now, the events were placed on the queue after the translation from
the native events was successful. This led to a loss of ordering because
we put the synthesised event on the queue before the last event that
triggered it.
This patch puts the events on the queue before translating them, with a
"pending" flag set; if the translation sequence is completed then the flag
is removed - otherwise the event is removed from the queue altogether. The
queue manipulation functions have been modified to ignore the "pending"
flag when looking for events.
This patch also adds a private structure overlayed on the ClutterEvent
struct so that we can extend the events with private data without exposing
it in the public API.
* clutter/eglnative/clutter-backend-egl.c:
* clutter/eglx/clutter-backend-egl.c:
* clutter/sdl/clutter-backend-sdl.c: Set the default resolution
as 96.0 dpi for every backend (we already were under this
assumption anyway, and this makes it easier to change this
setting per-backend).
* clutter/pango/pangoclutter-fontmap.c:
* clutter/pango/pangoclutter.h: Allow setting the resolution
for the PangoClutterFontMap object and provide the implementation
for the PangoFcFontMap::get_resolution() virtual function. This
allows to set the resolution of the PangoContext when retrieving
it.
* clutter/clutter-label.c (clutter_label_init): Set the
resolution of the font map with the one the backend gives us.
* clutter/clutter-entry.c (clutter_entry_init): Ditto.
* clutter/clutter-feature.h:
Add new stage feature flags and document.
* clutter/eglnative/clutter-backend-egl.c:
* clutter/eglx/clutter-backend-egl.c:
* clutter/sdl/clutter-backend-sdl.c:
Set new feature flags.
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-stage-glx.c:
* clutter/clutter-stage.c:
* clutter/clutter-stage.h:
Add a 'user_resizeable' setting to the backend and implement
for glx backend.
* clutter/eglx/clutter-backend-egl.c:
* clutter/eglnative/clutter-backend-egl.c:
* clutter/sdl/clutter-backend-sdl.c: Destroy the stage in every
backend.
* clutter/Makefile.am:
* clutter/eglnative/Makefile.am:
* clutter/eglnative/clutter-backend-egl.c:
* clutter/eglnative/clutter-backend-egl.h:
* clutter/eglnative/clutter-egl.h:
* clutter/eglnative/clutter-event-egl.c:
* clutter/eglnative/clutter-stage-egl.c:
* clutter/eglnative/clutter-stage-egl.h:
* clutter/eglx/Makefile.am:
* clutter/eglx/clutter-backend-egl.c:
* clutter/eglx/clutter-egl.h:
* clutter/eglx/clutter-event-egl.c:
* clutter/eglx/clutter-stage-egl.c:
* configure.ac:
Add a new 'native' EGL backend for non X based EGL's
(i.e on framebuffer).
Rename old backend to 'eglx' and namespace public funcs with this.
* clutter/pango/pangoclutter-private.h:
Add extra checks for expected defines.