*** WARNING: THIS COMMIT CHANGES THE BUILD ***
Do not recurse into the backend directories to build private, internal
libraries.
We only recurse from clutter/ into the cogl sub-directory; from there,
we don't recurse any further. All the backend-specific code in Cogl and
Clutter is compiled conditionally depending on the macros defined by the
configure script.
We still recurse from the top-level directory into doc, clutter and
tests, because gtk-doc and tests do not deal nicely with non-recursive
layouts.
This change makes Clutter compile slightly faster, and cleans up the
build system, especially when dealing with introspection data.
Ideally, we also want to make Cogl part of the top-level build, so that
we can finally drop the sed trick to change the shared library from the
GIR before compiling it.
Currently disabled:
‣ OSX backend
‣ Fruity backend
Currently enabled but untested:
‣ EGL backend
‣ Windows backend
Now that we have private, per-event platform data, we can start putting
it to good use. The first, most simple use is to store the key group
given the event's modifiers. Since we assume a modern X11, we use XKB
to retrieve it, or we simply fall back to 0 by default.
The data is exposed as a ClutterX11-specific function, within the
sanctioned clutter_x11_* namespace.
Since using addresses that might change is something that finally
the FSF acknowledge as a plausible scenario (after changing address
twice), the license blurb in the source files should use the URI
for getting the license in case the library did not come with it.
Not that URIs cannot possibly change, but at least it's easier to
set up a redirection at the same place.
As a side note: this commit closes the oldes bug in Clutter's bug
report tool.
http://bugzilla.openedhand.com/show_bug.cgi?id=521
Use the device manager to store the input devices. Also, provide
two fallback devices when initializing the X11 backend: device 0
for the pointer and device 1 for the keyboard.
Since asking for ARGB by default is still somewhat experimental on X11
and not every toolkit or complex widgets (like WebKit) still do not like
dealing with ARGB visuals, we should switch back to RGB by default - now
that at least we know it works.
For applications (and toolkit integration libraries) that want to enable
the ClutterStage:use-alpha property there is a new function:
void clutter_x11_set_use_argb_visual (gboolean use_argb);
which needs to be called before clutter_init().
The CLUTTER_DISABLE_ARGB_VISUAL environment variable can still be used
to force this value off at run-time.
When requesting the GLXFBConfig for creating the GLX context, we should
always request one that links to an ARGB visual instead of a plain RGB
one.
By using an ARGB visual we allow the ClutterStage:use-alpha property to
work as intended when running Clutter under a compositing manager.
The default behaviour of requesting an ARGB visual can be disabled by
using the:
CLUTTER_DISABLE_ARGB_VISUAL
Environment variable.
The input device API is split halfway thorugh the backends in a very
weird way. The data structures are private, as they should, but most
of the information should be available in the main API since it's
generic enough.
The device type enumeration, for instance, should be common across
every backend; the accessors for device type and id should live in the
core API. The internal API should always use ClutterInputDevice and
not the private X11 implementation when dealing with public structures
like ClutterEvent.
By adding accessors for the device type and id, and by moving the
device type enumeration into the core API we can cut down the amount
of symbols private and/or visible only to the X11 backends; this way
when other backends start implementing multi-pointer support we can
share the same API across the code.
The clutter_get_current_event_time() function will return the event
timestamp coming from a Clutter event. Clutter might synthesize or
throttle events, so the function cannot be used when dealing with
backend-specific use cases.
The X11 backend is the only backend supported by Clutter that makes
use of timestamps, so it's altogether fitting that it should come
with a specific function to deal with the timestamps of the X events.
clutter-x11.h declares clutter_x11_set_display twice, which means code using
clutter doesn't compile cleanly with -Wredundant-decls.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/x11/clutter-backend-x11.c: Properly document the
usage of clutter_x11_set_display().
* clutter/x11/clutter-x11.h: clutter_x11_set_display() is
public API and should be declared in the header we install.
* clutter/glx/clutter-stage-glx.c:
* clutter/x11/clutter-backend-x11.c:
* clutter/x11/clutter-backend-x11.h:
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-x11.h:
* tests/test-devices.c:
Disable use of XInput and add an explicit clutter_x11_enable_xinput
to enable it.
Also fix up the x11 pre-init calls to not need g_type_init.
Bug 1000 - clutter-x11 should define gtypes for its enumerations
* clutter/x11/Makefile.am:
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-x11-enum-types.c.in:
* clutter/x11/clutter-x11-enum-types.h.in:
* clutter/x11/clutter-x11.h: Add the GTypes for the X11-specific
enumerations, so that they can be used by the bindings. (Andy
Wingo)
Bug 997 - automatic updates not working for named TFP pixmaps,
at least in x11
* clutter/glx/clutter-glx-texture-pixmap.c:
* clutter/glx/clutter-glx-texture-pixmap.h:
* clutter/x11/clutter-backend-x11.c:
* clutter/x11/clutter-x11-texture-pixmap.c:
* clutter/x11/clutter-x11-texture-pixmap.h:
* clutter/x11/clutter-x11.h:
* configure.ac:
* tests/test-pixmap.c:
Rework Andy Wingos patch a little adding more safety for now also
handling redirect Windows (as well as pixmaps)
* clutter/x11/clutter-backend-x11.h:
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-x11.h:
(clutter_x11_handle_event):
(clutter_x11_disable_event_retrieval):
Functions to allow to hook into external XEvent retrieval (for
example when using clutter with gtk); NB: this API is tentative.
* clutter/x11/clutter-x11.h:
* clutter/x11/clutter-backend-x11.c:
(clutter_x11_set_display):
Function to set X display connection prior to calling
clutter_init(); stripped loads of trailing space.
* clutter/Makefile.am:
* clutter/eglx/Makefile.am:
* clutter/eglx/clutter-backend-egl.c:
* clutter/eglx/clutter-backend-egl.h:
* clutter/eglx/clutter-eglx.h:
* clutter/eglx/clutter-event-egl.c:
* clutter/eglx/clutter-stage-egl.c:
* clutter/eglx/clutter-stage-egl.h:
* clutter/glx/Makefile.am:
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-backend-glx.h:
* clutter/glx/clutter-event-glx.c:
* clutter/glx/clutter-glx.h:
* clutter/glx/clutter-stage-glx.c:
* clutter/glx/clutter-stage-glx.h:
* clutter/x11/Makefile.am:
* clutter/x11/clutter-backend-x11-private.h:
* clutter/x11/clutter-backend-x11.c:
* clutter/x11/clutter-backend-x11.h:
* clutter/x11/clutter-event-x11.c:
* clutter/x11/clutter-stage-x11.c:
* clutter/x11/clutter-stage-x11.h:
* clutter/x11/clutter-x11.h:
Create a new X11 backend class of which EGL and GLX 'real' backends
then subclass. Effectively shares all X11 code between both backends
avoids code duplication and brings many missing features to EGL X
backend. Requires some cleanup and testing. (#518)
* clutter/cogl/gles/cogl.c: (cogl_color):
Add define to use color4ub only if configure finds it.
If not fall back to old code.
* configure.ac:
Drop support for vincent checks.
Drop sdles backend.
Specifically check for color4ub call.