Commit Graph

4781 Commits

Author SHA1 Message Date
Jasper St. Pierre
b96773f9c9 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
2011-11-10 12:57:34 +00:00
Craig R. Hughes
33303f92f3 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
2011-11-10 12:57:34 +00:00
Matthias Clasen
d596401a3c cally: Use the proper role for password entries
https://bugzilla.gnome.org/show_bug.cgi?id=663332
2011-11-10 12:57:34 +00:00
Emmanuele Bassi
7b5e5b7727 main: Add a debug note when reading the settings file
So that's easier to track in the debug log.
2011-11-09 09:09:37 +00:00
Emmanuele Bassi
ba8d682c09 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.
2011-11-08 14:46:55 +00:00
Emmanuele Bassi
101f39ea92 Replace usage of [sg]et_geometry()
The set_geometry() and get_geometry() methods are going to be
deprecated.
2011-11-08 14:46:16 +00:00
Emmanuele Bassi
4fe7a77302 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.
2011-11-08 14:20:32 +00:00
Emmanuele Bassi
76e85f68ea build: Remove mention of missing file
There is no clutter-event-gdk.h in the build.
2011-11-08 11:19:22 +00:00
Emmanuele Bassi
67d5a4993c 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.
2011-11-07 20:31:15 +00:00
Emmanuele Bassi
e0bfdbfeba osx/stage: Fix compilation
We need to include clutter-stage-window.h.
2011-11-04 12:03:13 +00:00
Colin Walters
6f8f8295c0 build: Ensure libdir exists before installing to it 2011-11-03 14:45:29 -04:00
Emmanuele Bassi
683642ba54 docs: Fixes for the API reference build 2011-11-03 16:05:36 +00:00
Emmanuele Bassi
7ab84f981c Remove CLUTTER_DISABLE_DEPRECATED from the build flags
We don't use it any more.
2011-11-03 15:35:01 +00:00
Emmanuele Bassi
2403d4875b Remove CLUTTER_DISABLE_DEPRECATED guard
Except for macros, we now entirely depend on the deprecation warnings
instead of a guard.
2011-11-03 15:32:04 +00:00
Emmanuele Bassi
9ea2bb694e docs: Fix a wrongly named argument 2011-11-03 15:16:02 +00:00
Emmanuele Bassi
98b467f9b8 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.
2011-11-03 15:13:54 +00:00
Emmanuele Bassi
0157615fae build: Fix compilation 2011-11-03 15:03:16 +00:00
Emmanuele Bassi
11420a7057 group: Move deprecated macro into its own header 2011-11-03 15:02:35 +00:00
Emmanuele Bassi
530b07f12b 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.
2011-11-03 14:49:56 +00:00
Emmanuele Bassi
142cd0bf82 Move clutter-keysyms-compat.h to the deprecated section
No reason to have it lingering in the main section.
2011-11-03 14:42:39 +00:00
Emmanuele Bassi
983510fad4 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.
2011-11-03 14:02:43 +00:00
Emmanuele Bassi
8249e48802 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.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
98c177def5 Clean up the backend creation
Move it to its own function.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
3987db1659 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.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
4b0d7f2929 build: Improve the compat libs rule
Use the same commands libtool uses when installing symbolic links for
the shared libraries.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
8eb71af23d 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.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
405e72f2e4 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.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
19508132df build: Move EGL-related files under egl/
Including the clutter-cex100.h.in header.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
4ee00b67b5 build: Move clutter-event-tslib.c out of egl/
Prepare for a full tslib device manager.
2011-11-03 13:45:20 +00:00
Emmanuele Bassi
6e9f474d90 Coding style and cosmetic fixes 2011-11-03 13:45:20 +00:00
Emmanuele Bassi
fedfac3b7c 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.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
f58d393187 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.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
f14cbf5bdb 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.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
a73f1e6768 Cosmetic fixes 2011-11-03 13:45:19 +00:00
Emmanuele Bassi
21a24c862e 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.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
a09bbffd92 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.
2011-11-03 13:45:19 +00:00
Giovanni Campagna
9c102b7c51 Rework the interaction between the Cogl and GDK / X11 backends.
Previously, the Cogl backend was at times a subclass of the X11
backend, and at times a standalone one. Now it is the other way
round, with GDK and X11 backends providing the concrete classes,
layered on top of the generic Cogl backend. A new EglNative backend
was introduced for direct to framebuffer rendering. This greatly
simplifies the API design (at the expense of some casts needed)
and reduces the amount of #ifdefs, without duplicating code.

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:45:17 +00:00
Giovanni Campagna
610a9c17ba Add a new GDK backend
This commit introduces a new flavour for Clutter, that uses GDK
for handling all window system specific interactions (except for
creating the cogl context, as cogl does not know about GDK), including
in particular events. This is not compatible with the X11 (glx)
flavour, and this is reflected by the different soname (libclutter-gdk-1.0.so),
as all X11 specific functions and classes are not available. If you
wish to be compatible, you should check for CLUTTER_WINDOWING_X11.
Other than that, this backend should be on feature parity with X11,
including XInput 2, XSettings and EMWH (with much, much less code)

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:42:13 +00:00
Robert Bragg
db53ca382c cogl: fallback to non-transparent stages if unsupported
If our check of the CoglOnscreenTemplate during initialization fails
then we disable the request for an alpha component in the swap chain and
try the check again.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-11-02 17:38:56 +00:00
Emmanuele Bassi
4ce95306a3 tslib: Remove mention of clutter-stage-egl.h
That header has long since disappeared from the build.
2011-11-02 13:00:47 +00:00
Emmanuele Bassi
0b4b19700f utils: Remove CLUTTER_DISABLE_DEPRECATED
We use deprecation warnings now.
2011-11-02 13:00:47 +00:00
Emmanuele Bassi
377a292b4e texture: Remove CLUTTER_DISABLE_DEPRECATED
We use deprecation warnings now.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
4a4289cfa5 stage-manager: Remove CLUTTER_DISABLE_DEPRECATED
We use deprecation warnings now.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
1ba9a123ed cairo-texture: Remove CLUTTER_DISABLE_DEPRECATED
We use deprecation warnings now.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
f4d8ba7db4 animatable: Remove CLUTTER_DISABLE_DEPRECATED
We use deprecation warnings, now.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
f4e971a7e5 cairo-texture: Use an internal function for create_region()
Avoid double argument checking, and a deprecation warning when
implementing create() as a wrapper around create_region(), by using
a simple internal function.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
b19c919645 actor: Move deprecated symbols into separate headers
The clutter-actor.h header is already pretty big, so let's try to keep
the deprecated symbols out of it.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
40d703a005 backend: Move deprecated symbols to a separate header 2011-11-02 13:00:46 +00:00
Emmanuele Bassi
a39be454cf main: Move deprecated symbols to a separate header
The number of deprecations in clutter-main.h makes the header harder to
parse, and more confusing. We can use a separate header under the
deprecated subdirectory to hold all the deprecated symbols.
2011-11-02 13:00:46 +00:00
Robert Bragg
6e28121ff3 cogl: include <cogl/cogl-xlib.h> for xlib specific symbols
Since Xlib.h is such a terrible citizen when it comes to symbol
namespacing it's not desirable to include Xlib.h if it is not absolutely
required. Cogl now has a standalone cogl-xlib.h that should be included
whenever any xlib specific symbols are required.

This patch updates clutter to include <cogl/cogl-xlib.h> wherever
clutter needs to use xlib specific cogl apis.

Acked-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-11-01 16:24:00 +00:00