Emmanuele Bassi [Mon, 14 Nov 2011 11:07:54 +0000 (11:07 +0000)]
Merge branch 'deprecate-default-stage'
* deprecate-default-stage:
evdev: do not associate device with stage
evdev: don't even process events without a default stage
docs: Note default stage deprecation in README
docs: Remove clutter_stage_get_default()
stage: Deprecate the default stage
script: Do not use clutter_stage_get_default()
cally/actor: Do not use the default stage as a fallback
Try to mop up the default stage mess
performance/*: Do not use clutter_stage_get_default()
interactive/*: Do not use clutter_stage_get_default()
Merge with a11y
micro-bench/*: Do not use clutter_stage_get_default()
accessibility/*: Do not use clutter_stage_get_default()
conform/*: Do not use clutter_stage_get_default()
Chun-wei Fan [Mon, 14 Nov 2011 05:36:52 +0000 (13:36 +0800)]
Fix clutter-bakend-win32.c
The VBLANK environmental variable is done universally in clutter-main.c
as in commits
e8562089 (main: Add a sync-to-vblank global flag) and
db211a21 (Remove per-backend CLUTTER_VBLANK envvar), so remove these things
here as well.
https://bugzilla.gnome.org/show_bug.cgi?id=663999
Fran Diéguez [Sun, 13 Nov 2011 17:52:21 +0000 (18:52 +0100)]
Updated Galician translations
Daniel Mustieles [Fri, 11 Nov 2011 17:16:06 +0000 (18:16 +0100)]
Updated Spanish translation
Piotr Drąg [Thu, 10 Nov 2011 18:54:53 +0000 (19:54 +0100)]
Updated POTFILES.in
Rico Tzschichholz [Thu, 10 Nov 2011 18:02:19 +0000 (19:02 +0100)]
po: update POTFILES.in
Rico Tzschichholz [Thu, 10 Nov 2011 18:01:48 +0000 (19:01 +0100)]
docs: fix some headers paths
Emmanuele Bassi [Thu, 10 Nov 2011 17:59:17 +0000 (17:59 +0000)]
build: Disable evdev input by default
It's an experimental input backend, so it should be enabled explicitly.
Lionel Landwerlin [Thu, 10 Nov 2011 15:41:41 +0000 (15:41 +0000)]
evdev: do not associate device with stage
Their might not be any stage at that time, so this avoids to create a
default one.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=651718
Lionel Landwerlin [Fri, 17 Jun 2011 10:31:34 +0000 (11:31 +0100)]
evdev: don't even process events without a default stage
The evdev system is a bit different from other input systems in
Clutter because it's completly decorrelated from anything graphic.
In the case of embedded devices with no proper windowing system, you
might want to not implicitly create a default stage when you're
receiving the first input event.
This patch changes this behavior by not forwarding any event if you
don't have a default stage.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=651718
Emmanuele Bassi [Thu, 10 Nov 2011 15:09:04 +0000 (15:09 +0000)]
docs: Note default stage deprecation in README
Mention the behaviour of Clutter when creating more than one stage on
platforms that only support one stage instance.
Emmanuele Bassi [Wed, 9 Nov 2011 17:49:25 +0000 (17:49 +0000)]
docs: Remove clutter_stage_get_default()
A lot of the example code in the cookbook and the API reference still
uses the default stage — sometimes as if it were a non-default one,
which once again demonstrates how the default stage was a flawed concept
that just confused people.
Emmanuele Bassi [Wed, 9 Nov 2011 17:12:45 +0000 (17:12 +0000)]
stage: Deprecate the default stage
Deprecate the clutter_stage_get_default() function, as well as the
clutter_stage_is_default() one, and replace its internal usage.
Emmanuele Bassi [Wed, 9 Nov 2011 17:09:37 +0000 (17:09 +0000)]
script: Do not use clutter_stage_get_default()
It's about to go away, so we should use the StageManager API instead.
Emmanuele Bassi [Wed, 9 Nov 2011 17:03:30 +0000 (17:03 +0000)]
cally/actor: Do not use the default stage as a fallback
Using the default stage as a fallback is wrong in all circumstances.
In this specific case, if an actor is not associated to a stage then it
cannot possibly be the key focus.
Emmanuele Bassi [Wed, 9 Nov 2011 14:04:05 +0000 (14:04 +0000)]
Try to mop up the default stage mess
The default stage was a neat concept when we started Clutter out,
somewhere in the Jurassic era; a singleton instance that gets created at
initialization time, and remains the same for the entire duration of the
process.
Worked well enough when Clutter was a small library meant to be used to
write fullscreen media browsers, but since the introduction of multiple
stages, and Clutter being used to create all sorts of applications, the
default stage is just a vestigial remainder of that past, like an
appendix; something that complicates the layout of the code and
introduces weird behaviour, so that you notice its existence only when
something goes wrong.
Some platforms we do support, though, only have one framebuffer, so it
makes sense for them to have only one stage.
At this point, the only sane thing to do is to go through the same code
paths on all platforms, and that code path is the stage instance
creation and initialization — i.e. clutter_stage_new() (or
g_object_new() with CLUTTER_TYPE_STAGE).
For platforms that support multiple stages, nothing has changed: the stage
created by clutter_stage_get_default() will be set as the default one;
if nobody calls it, the default stage is never created, and it just
lives on as a meaningless check.
For platforms that only support one stage, clutter_stage_new() and
clutter_stage_get_default() will behave exactly the same the first time
they are called: both will create a stage, and set it as the default.
Calling clutter_stage_new() a second time is treated as a programmer
error, and will result in Clutter aborting. This is a behavioural change
because the existing behaviour or creating a new ClutterStage instance
with the same ClutterStageWindow private implementation is, simply put,
utterly braindamaged and I should have *never* had written it, and I
apologize for it. In my defence, I didn't know any better at the time.
This is the first step towards the complete deprecation of
clutter_stage_get_default() and clutter_stage_is_default(), which will
come later.
Emmanuele Bassi [Wed, 9 Nov 2011 13:52:03 +0000 (13:52 +0000)]
performance/*: Do not use clutter_stage_get_default()
Emmanuele Bassi [Wed, 9 Nov 2011 13:41:15 +0000 (13:41 +0000)]
interactive/*: Do not use clutter_stage_get_default()
Emmanuele Bassi [Wed, 9 Nov 2011 10:55:49 +0000 (10:55 +0000)]
Merge with a11y
Emmanuele Bassi [Tue, 8 Nov 2011 17:23:52 +0000 (17:23 +0000)]
micro-bench/*: Do not use clutter_stage_get_default()
Emmanuele Bassi [Tue, 8 Nov 2011 17:11:34 +0000 (17:11 +0000)]
accessibility/*: Do not use clutter_stage_get_default()
Emmanuele Bassi [Tue, 8 Nov 2011 17:04:44 +0000 (17:04 +0000)]
conform/*: Do not use clutter_stage_get_default()
Use the correct stage creation/destruction API.
Emmanuele Bassi [Mon, 7 Nov 2011 19:06:22 +0000 (19:06 +0000)]
docs: Update the release notes in the README
Emmanuele Bassi [Mon, 7 Nov 2011 14:48:48 +0000 (14:48 +0000)]
osx: Clean up the backend implementation
Instead of implementing create_stage() and a constructor for
ClutterStageOSX, we can use the default implementations in
ClutterBackend, and spare us some code duplication.
Emmanuele Bassi [Mon, 7 Nov 2011 14:44:37 +0000 (14:44 +0000)]
wayland/backend: Remove create_stage()
The create_stage() implementation in ClutterBackendWayland isn't doing
anything special, so we can fall back to the default one.
Emmanuele Bassi [Fri, 4 Nov 2011 19:49:45 +0000 (19:49 +0000)]
build: Clean up the configuration summary
List the input backends, and remove the EGL backend options.
Emmanuele Bassi [Fri, 4 Nov 2011 19:25:54 +0000 (19:25 +0000)]
backend: Clean up the device manager creation
Create the device manager during the event initialization, where it
makes sense.
This allows us to get rid of the per-backend get_device_manager()
virtual function, and just store the DeviceManager pointer into the
ClutterBackend structure.
Emmanuele Bassi [Fri, 4 Nov 2011 19:01:32 +0000 (19:01 +0000)]
*/backend: Clean up the stage creation
Use the default implementation of create_stage() wherever possible.
Emmanuele Bassi [Fri, 4 Nov 2011 19:00:49 +0000 (19:00 +0000)]
backend: Provide a default create_stage()
We can now safely create a ClutterStageWindow in the shared code path,
instead of deferring to the backend.
Emmanuele Bassi [Fri, 4 Nov 2011 18:50:46 +0000 (18:50 +0000)]
stage-window: Add :backend and :wrapper properties
All StageWindow implementation already have back pointers, but we need a
unified API to actually set them from the generic code path; we can use
properties on the StageWindow interface — though this requires fixing
all backends at the same time, to avoid GObject complaining.
Emmanuele Bassi [Fri, 4 Nov 2011 18:50:02 +0000 (18:50 +0000)]
gdk/backend: Fix an invalid chain up
Emmanuele Bassi [Fri, 4 Nov 2011 18:27:08 +0000 (18:27 +0000)]
*/backend: Store the StageWindow implementation type
Emmanuele Bassi [Fri, 4 Nov 2011 18:26:33 +0000 (18:26 +0000)]
backend: Store the type of the StageWindow implementation
We can use it later on to create it and provide a default create_stage()
implementation.
Emmanuele Bassi [Fri, 4 Nov 2011 17:49:25 +0000 (17:49 +0000)]
egl/backend: Clean up
The "EGL native" backend is just a short-hand for a pure Cogl backend,
using whatever input mechanism was enabled at run-time.
Emmanuele Bassi [Fri, 4 Nov 2011 17:44:55 +0000 (17:44 +0000)]
Add a CEx100-specific backend
Instead of piggybacking on the EGL backend, let's create a small
ClutterBackend for the CEx100 platforms. This allows us to handle the
CEx100-specific details in a much cleaner way.
Emmanuele Bassi [Fri, 4 Nov 2011 16:52:44 +0000 (16:52 +0000)]
cogl/backend: Remove the ClutterBackendCogl class
All the functionality that ClutterBackendCogl provided has been moved
into ClutterBackend itself, so there is no need to have this class
around in the source.
Cogl-based backends can derive directly from ClutterBackend.
Emmanuele Bassi [Fri, 4 Nov 2011 16:41:52 +0000 (16:41 +0000)]
cogl/backend: Remove pre/post_parse
The CLUTTER_VBLANK environment variable is now handled in the common
code path.
Emmanuele Bassi [Fri, 4 Nov 2011 16:39:52 +0000 (16:39 +0000)]
Remove per-backend CLUTTER_VBLANK envvar
We have a global flag we can use.
Emmanuele Bassi [Fri, 4 Nov 2011 16:35:38 +0000 (16:35 +0000)]
main: Add a sync-to-vblank global flag
It replaces the per-backend CLUTTER_VBLANK environment variable.
Emmanuele Bassi [Fri, 4 Nov 2011 16:13:04 +0000 (16:13 +0000)]
backend: Provide a default get_features() implementation
Continue gutting ClutterBackendCogl; get_features() is the last bit that
still does something, but now we can use the Cogl API.
Emmanuele Bassi [Fri, 4 Nov 2011 15:57:01 +0000 (15:57 +0000)]
win32/backend: Use the default context creation
The win32 backend doesn't do anything special on context creation, so we
can just use the default implementation provided by ClutterBackend.
Emmanuele Bassi [Fri, 4 Nov 2011 15:54:58 +0000 (15:54 +0000)]
gdk/backend: Use the context creation hooks
Same as it has happened to the X11 backend.
Emmanuele Bassi [Fri, 4 Nov 2011 15:53:47 +0000 (15:53 +0000)]
x11/backend: Use the context creation hooks
Don't replace create_context(): given that the X11 backend already uses
Cogl for the context creation, we can just provide the right data
structures ourselves.
Emmanuele Bassi [Fri, 4 Nov 2011 15:50:47 +0000 (15:50 +0000)]
backend: Provide a default create_context()
Since we use Cogl for the context creation we can now provide a default
context creation that should just work, plus a couple of hooks to allow
plugging into the creation sequence for platforms supported by Cogl that
require special handling — like foreign displays or alpha-enabled swap
chains.
The various backends have now two choices: either replace the
create_context() in its entirety, or plug themselves into the default
context creation.
Emmanuele Bassi [Fri, 4 Nov 2011 12:21:11 +0000 (12:21 +0000)]
backend: Fix up the input backend detection ordering
And add a missing 'else' in the OSX check, to avoid a g_error().
Emmanuele Bassi [Thu, 3 Nov 2011 18:27:09 +0000 (18:27 +0000)]
Add a 'null' input backend symbol
We should have an input backend symbol that thoroughly disables all
input event handling.
Emmanuele Bassi [Thu, 3 Nov 2011 17:53:54 +0000 (17:53 +0000)]
backend: Unify the event initialization
Input backends are, in some cases, independent from the windowing system
backends; we can initialize input handling using a model similar to what
we use for windowing backends, including an environment variable and
compile-/run-time checks.
This model allows us to remove the backend-specific init_events(), and
use a generic implementation directly inside the base ClutterBackend
class, thus further reducing the backend-specific code that every
platform has to implement.
This requires some minor surgery to every single backend, to make sure
that the function exposed to initialize the event loop is similar and
performs roughly the same operations.
Emmanuele Bassi [Thu, 3 Nov 2011 16:48:20 +0000 (16:48 +0000)]
win32/backend: Remove ensure_context()
We have a fallback, now.
Emmanuele Bassi [Thu, 3 Nov 2011 16:47:57 +0000 (16:47 +0000)]
win32/stage: Implement get_active_framebuffer()
Emmanuele Bassi [Thu, 3 Nov 2011 16:47:18 +0000 (16:47 +0000)]
wayland/backend: Remove empty ensure_context()
There is a default fallback, now.
Emmanuele Bassi [Thu, 3 Nov 2011 16:46:48 +0000 (16:46 +0000)]
cogl/backend: Remove ensure_context()
We have a default implementation for it, now.
Emmanuele Bassi [Thu, 3 Nov 2011 16:45:56 +0000 (16:45 +0000)]
backend: Provide an implementation of ensure_backend()
We can do it for all Cogl-based backends.
Emmanuele Bassi [Thu, 10 Nov 2011 14:15:32 +0000 (14:15 +0000)]
conform/color: Check invalid strings
We need to make sure to fail consistently for invalid strings.
Emmanuele Bassi [Thu, 10 Nov 2011 14:13:45 +0000 (14:13 +0000)]
color: Validate hex formats
Right now, we pass through to Pango unrecognized hexadecimal formats
when parsing colors from strings. Since we parse all possible formats
ourselves, we can do validation ourselves as well, and avoid the Pango
path.
Emmanuele Bassi [Thu, 10 Nov 2011 12:56:47 +0000 (12:56 +0000)]
conform/color: Test hsla() format
Jasper St. Pierre [Wed, 9 Nov 2011 21:37:32 +0000 (16:37 -0500)]
clutter-stage-x11: Make sure to set geometry x and y
Otherwise, we could be dealing with uninitialized values, causing
havoc all over the place.
https://bugzilla.gnome.org/show_bug.cgi?id=663733
Craig R. Hughes [Tue, 8 Nov 2011 01:00:45 +0000 (17:00 -0800)]
Minor whitespace fix for clutter color parsing of hsla(h,s,l,a)
Previously, if there was whitespace between "l" and the comma before the
alpha value, parsing would fail. This patch allows that whitespace
making it consistent with whitespace being allowed everywhere else.
https://bugzilla.gnome.org/show_bug.cgi?id=663594
Matthias Clasen [Fri, 4 Nov 2011 11:14:47 +0000 (07:14 -0400)]
cally: Use the proper role for password entries
https://bugzilla.gnome.org/show_bug.cgi?id=663332
Emmanuele Bassi [Wed, 9 Nov 2011 09:09:37 +0000 (09:09 +0000)]
main: Add a debug note when reading the settings file
So that's easier to track in the debug log.
Emmanuele Bassi [Tue, 8 Nov 2011 14:46:55 +0000 (14:46 +0000)]
actor: Deprecate [sg]et_geometry()
These methods are short-hands for accessing the position and size,
which are already shorthands for accessing the various dimensional
and positional attributes. Plus, they use ClutterGeometry, which is a
fairly bad data type for a rectangle.
Emmanuele Bassi [Tue, 8 Nov 2011 14:46:16 +0000 (14:46 +0000)]
Replace usage of [sg]et_geometry()
The set_geometry() and get_geometry() methods are going to be
deprecated.
Emmanuele Bassi [Tue, 8 Nov 2011 14:20:32 +0000 (14:20 +0000)]
Replace ClutterGeometry with cairo_rectangle_int_t
We still use ClutterGeometry internally in a couple of places, but we
should really move away from that flawed rectangle data type, and use
the Cairo one.
Sadly, we still have some public API that we cannot remove yet.
Emmanuele Bassi [Tue, 8 Nov 2011 11:19:22 +0000 (11:19 +0000)]
build: Remove mention of missing file
There is no clutter-event-gdk.h in the build.
Emmanuele Bassi [Mon, 7 Nov 2011 20:24:13 +0000 (20:24 +0000)]
main: Deprecate clutter_set_default_frame_rate()
Setting the default frame rate does not do anything even remotely
useful, unless synchronization to the vertical refresh rate is also
disabled - which can only be done through environment variable or
through configuration file. Having a programmatic way to change the
default frame rate is, thus, completely pointless.
Changing the default frame rate through environment variable and
configuration file is still allowed.
Emmanuele Bassi [Fri, 4 Nov 2011 12:03:13 +0000 (12:03 +0000)]
osx/stage: Fix compilation
We need to include clutter-stage-window.h.
Colin Walters [Thu, 3 Nov 2011 18:42:07 +0000 (14:42 -0400)]
build: Ensure libdir exists before installing to it
Emmanuele Bassi [Thu, 3 Nov 2011 16:05:36 +0000 (16:05 +0000)]
docs: Fixes for the API reference build
Emmanuele Bassi [Thu, 3 Nov 2011 15:35:03 +0000 (15:35 +0000)]
tests: Remove #undef CLUTTER_DISABLE_DEPRECATED
We need to test deprecated API as well, and we don't use a guard any
more in the build.
Emmanuele Bassi [Thu, 3 Nov 2011 15:32:53 +0000 (15:32 +0000)]
Remove CLUTTER_DISABLE_DEPRECATED from the build flags
We don't use it any more.
Emmanuele Bassi [Thu, 3 Nov 2011 15:32:04 +0000 (15:32 +0000)]
Remove CLUTTER_DISABLE_DEPRECATED guard
Except for macros, we now entirely depend on the deprecation warnings
instead of a guard.
Emmanuele Bassi [Thu, 3 Nov 2011 15:16:02 +0000 (15:16 +0000)]
docs: Fix a wrongly named argument
Emmanuele Bassi [Thu, 3 Nov 2011 15:13:54 +0000 (15:13 +0000)]
stage: Move the deprecated macros to a separate header
The clutter-stage.h header still has a bunch of macros that have, for
reasons unknown[*], survived the 1.0 API cut and have long since been
deprecated. Let's hide them under the deprecated/ carpet and let us
never speak of them ever again.
[*] pretty sure alcohol or other psychotropic substances were involved
but I take the 5th on that.
Emmanuele Bassi [Thu, 3 Nov 2011 15:03:16 +0000 (15:03 +0000)]
build: Fix compilation
Emmanuele Bassi [Thu, 3 Nov 2011 15:02:35 +0000 (15:02 +0000)]
group: Move deprecated macro into its own header
Emmanuele Bassi [Thu, 3 Nov 2011 14:49:56 +0000 (14:49 +0000)]
Don't use a -deprecated suffix for headers
They are already in the deprecated/ directory, the suffix is redundant,
and there is no chance of collision.
Emmanuele Bassi [Thu, 3 Nov 2011 14:42:39 +0000 (14:42 +0000)]
Move clutter-keysyms-compat.h to the deprecated section
No reason to have it lingering in the main section.
Emmanuele Bassi [Thu, 3 Nov 2011 14:02:43 +0000 (14:02 +0000)]
x11/backend: Use an internal GError
Don't just return the error from Cogl, but proxy it so that it has the
correct error domain and code.
Emmanuele Bassi [Wed, 2 Nov 2011 17:31:29 +0000 (17:31 +0000)]
build: Clean up the per-backend summary
Emmanuele Bassi [Wed, 2 Nov 2011 17:30:30 +0000 (17:30 +0000)]
build: Use AC_CACHE_SAVE
Delimit the points in the configure script that should save the state,
so that running the script multiple times doesn't require starting from
scratch even if it didn't terminate successfully.
Emmanuele Bassi [Wed, 2 Nov 2011 13:17:27 +0000 (13:17 +0000)]
build: Disable tslib by default
The event handling through tslib hasn't been tested in a while, and it
hasn't been ported to the device manager machinery either. We are still
considering whether or not it should be entirely removed, since evdev is
supposed to be a better way to handle events not coming from an existing
windowing system.
Emmanuele Bassi [Mon, 17 Oct 2011 15:07:05 +0000 (16:07 +0100)]
interactive/pixmap: Make sure to work only on the X11 backend
Even if the test has been successfully compiled against the X11 backend,
we need to ensure that it is actually running against it, otherwise bad
things will happen.
Emmanuele Bassi [Mon, 17 Oct 2011 15:06:15 +0000 (16:06 +0100)]
interactive/devices: Build unconditionally
The test-devices interactive test does not rely on the X11 API being
present any more, after the introduction of the device manager API.
Emmanuele Bassi [Mon, 17 Oct 2011 15:03:19 +0000 (16:03 +0100)]
Clean up the windowing system defines
Instead of defining new symbols for the windowing systems enabled at
configure time, we can reuse the same symbols for both the compile time
and run time checks, e.g.:
#ifdef CLUTTER_WINDOWING_X11
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
/* use the clutter_x11_* API */
else
#endif
#ifdef CLUTTER_WINDOWING_WIN32
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_WIN32))
/* use the clutter_win32_* API */
#endif
This scheme allows us to ensure that the input system namespace is free
for us to use and select at run time in later versions of Clutter.
Emmanuele Bassi [Mon, 17 Oct 2011 12:25:15 +0000 (13:25 +0100)]
Clean up the backend creation
Move it to its own function.
Emmanuele Bassi [Fri, 14 Oct 2011 11:00:44 +0000 (12:00 +0100)]
build: Make sure to remove colliding shared libraries
The compatibility links should take over any existing installed
shared library with the same soname, to avoid ldd creating stale
links.
Emmanuele Bassi [Wed, 12 Oct 2011 16:56:07 +0000 (17:56 +0100)]
docs: Update the README section on configure switches
Emmanuele Bassi [Wed, 12 Oct 2011 07:48:56 +0000 (08:48 +0100)]
build: Implement proper platform checking
Perform the check for enabling platform-specific backends conditionally
on the 'check' value, instead of unconditionally.
Also, rename the configure switches for the backends to have a '-backend'
suffix, to avoid collisions and provide a more descriptive name.
Emmanuele Bassi [Mon, 3 Oct 2011 16:11:49 +0000 (17:11 +0100)]
build: Improve the compat libs rule
Use the same commands libtool uses when installing symbolic links for
the shared libraries.
Emmanuele Bassi [Mon, 3 Oct 2011 14:25:40 +0000 (15:25 +0100)]
gdk/events: Clean up the event handling code
We need debugging notes, to see what's happening when handling events.
We need to queue a (clipped) redraw when receiving a GDK_EXPOSE event.
We need to check the device (both master and source) of the event using
the GdkEvent API, and pass them to the ClutterEvent using the
corresponding Clutter API.
Emmanuele Bassi [Mon, 3 Oct 2011 11:25:53 +0000 (12:25 +0100)]
egl: First attempt at cleaning up the EGL native backend
At least, let's make it compile when built along with the other
backends. In reality, it still needs to be verified as working.
Emmanuele Bassi [Mon, 3 Oct 2011 09:23:46 +0000 (10:23 +0100)]
build: Move EGL-related files under egl/
Including the clutter-cex100.h.in header.
Emmanuele Bassi [Mon, 3 Oct 2011 09:17:56 +0000 (10:17 +0100)]
build: Move clutter-event-tslib.c out of egl/
Prepare for a full tslib device manager.
Emmanuele Bassi [Fri, 30 Sep 2011 16:29:40 +0000 (17:29 +0100)]
Coding style and cosmetic fixes
Emmanuele Bassi [Fri, 30 Sep 2011 13:50:31 +0000 (14:50 +0100)]
Minimal cosmetic fix to the configure output
Emmanuele Bassi [Fri, 30 Sep 2011 12:58:40 +0000 (13:58 +0100)]
Remove the X11-specific bit in ClutterStageCogl
Let's use a new virtual function in ClutterStageWindow to check whether
a platform-specific implementation does support clipped redraws.
Emmanuele Bassi [Thu, 29 Sep 2011 17:16:48 +0000 (18:16 +0100)]
gdk: Fix Stage foreign window support
The code is generally wrong, and does not work. We need to skip the
GdkWindow creation when we have a foreing window, but we still need to
create the Cogl onscreen buffer and connect it to the GdkWindow's native
resource.
Emmanuele Bassi [Thu, 29 Sep 2011 17:10:48 +0000 (18:10 +0100)]
gdk: Allow disabling event retrieval
Just like the other backends can disable the internal event handling,
and use clutter_<backend>_handle_event() to do the native → Clutter
event translation.
Emmanuele Bassi [Tue, 27 Sep 2011 12:24:52 +0000 (13:24 +0100)]
Cosmetic fixes
Emmanuele Bassi [Mon, 26 Sep 2011 12:14:26 +0000 (13:14 +0100)]
Allow checking the backend type at run-time
Portable code should be allowed to check type backend currently being
used, so that it can use platform-specific API (not just Clutter's).
We don't want to go down the GDK route, with public types for
ClutterBackend and ClutterStageWindow implementations, and use the type
system, e.g.:
#ifdef GDK_WINDOWING_X11
if (GDK_IS_WINDOW_X11 (window))
use_x11_api (window);
else
#endif
#ifdef GDK_WINDOWING_WIN32
if (GDK_IS_WINDOW_WIN32 (window))
use_win32_api (window);
else
#endif
g_critical ("Unsupported backend");
This system would make us expose the backend system, and we want to
still reserve us the option to change the backend system to increase its
granularity — e.g. choosing different input event systems regardless of
the windowing system.
This commit adds a simple function that checks the backend type against
a symbolic constant — the same constant string that can be used to
select the backend at run-time through the CLUTTER_BACKEND environment
variable.
Emmanuele Bassi [Wed, 21 Sep 2011 17:05:03 +0000 (18:05 +0100)]
Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.
This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.