Use the XSETTINGS machinery to get notification from foreign
environments about settings that might interest Clutter itself - namely:
the default font name, the font DPI, and the Xft font options that can
be mapped on cairo_font_options_t.
The installed _HEADERS should be the public ones and the enumeration
types; repeating clutter-x11-texture-pixmap.h breaks with automake 1.11
and doesn't strictly make any sense.
http://bugzilla.openedhand.com/show_bug.cgi?id=2002
The DeviceManager class should be abstract in Clutter, and implemented
by each backend, as different backends will have different ways to
detect, initialize and list devices; the X11 backend alone has *two*
ways of dealing with devices.
This commit makes DeviceManager an abstract class and delegates the
device initialization and enumeration to per-backend sub-classes.
The responsible for creating the device manager is, obviously, the
backend singleton.
The X11 and Win32 backends have been updated to the new layout; the
Win32 backend has been updated blindly, so it might require additional
testing.
As part of an incremental process to have Cogl be a standalone project we
want to re-consider how we organise the Cogl source code.
Currently this is the structure I'm aiming for:
cogl/
cogl/
<put common source here>
winsys/
cogl-glx.c
cogl-wgl.c
driver/
gl/
gles/
os/ ?
utils/
cogl-fixed
cogl-matrix-stack?
cogl-journal?
cogl-primitives?
pango/
The new winsys component is a starting point for migrating window system
code (i.e. x11,glx,wgl,osx,egl etc) from Clutter to Cogl.
The utils/ and pango/ directories aren't added by this commit, but they are
noted because I plan to add them soon.
Overview of the planned structure:
* The winsys/ API is the API that binds OpenGL to a specific window system,
be that X11 or win32 etc. Example are glx, wgl and egl. Much of the logic
under clutter/{glx,osx,win32 etc} should migrate here.
* Note there is also the idea of a winsys-base that may represent a window
system for which there are multiple winsys APIs. An example of this is
x11, since glx and egl may both be used with x11. (currently only Clutter
has the idea of a winsys-base)
* The driver/ represents a specific varient of OpenGL. Currently we have "gl"
representing OpenGL 1.4-2.1 (mostly fixed function) and "gles" representing
GLES 1.1 (fixed funciton) and 2.0 (fully shader based)
* Everything under cogl/ should fundamentally be supporting access to the
GPU. Essentially Cogl's most basic requirement is to provide a nice GPU
Graphics API and drawing a line between this and the utility functionality
we add to support Clutter should help keep this lean and maintainable.
* Code under utils/ as suggested builds on cogl/ adding more convenient
APIs or mechanism to optimize special cases. Broadly speaking you can
compare cogl/ to OpenGL and utils/ to GLU.
* clutter/pango will be moved to clutter/cogl/pango
How some of the internal configure.ac/pkg-config terminology has changed:
backendextra -> CLUTTER_WINSYS_BASE # e.g. "x11"
backendextralib -> CLUTTER_WINSYS_BASE_LIB # e.g. "x11/libclutter-x11.la"
clutterbackend -> {CLUTTER,COGL}_WINSYS # e.g. "glx"
CLUTTER_FLAVOUR -> {CLUTTER,COGL}_WINSYS
clutterbackendlib -> CLUTTER_WINSYS_LIB
CLUTTER_COGL -> COGL_DRIVER # e.g. "gl"
Note: The CLUTTER_FLAVOUR and CLUTTER_COGL defines are kept for apps
As the first thing to take advantage of the new winsys component in Cogl;
cogl_get_proc_address() has been moved from cogl/{gl,gles}/cogl.c into
cogl/common/cogl.c and this common implementation first trys
_cogl_winsys_get_proc_address() but if that fails then it falls back to
gmodule.
The call to "cmp" to compare a built file with its current version
should use the -s (silent) command line switch. This avoids a ugly
message on the console when building Clutter the first time.
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)
* clutter/glx/Makefile.am:
* clutter/x11/Makefile.am:
Install glx and x11 specific includes into clutter/glx and
clutter/x11 so that header files that include glx/*.h or x11/*.h
when installed.
* Makefile.am: Use variables, instead of substitutions.
* clutter/clutter-private.h:
* clutter/clutter-main.h: Make clutter_do_event() public again,
as we need it in clutter-gtk.
* configure.ac:
* clutter/x11/Makefile.am:
* clutter/x11/clutter-x11.pc.in: Add a clutter-x11 pkg-config
file for clutter-gtk, as it depends on the X11 backend API, as
implemented by the GLX and EGLX backends.
* clutter/x11/clutter-event-x11.c (event_translate): Do not
propagate DestroyNotify events if the stage doesn't own the
window.
* tests/test-scale.c (main): Set values different from the default.
* 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.