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
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>
Avoid double argument checking, and a deprecation warning when
implementing create() as a wrapper around create_region(), by using
a simple internal function.
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.
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>
We use an atexit() handler to print out the profile report coming from
Uprof. The g_atexit() call has been deprecated by GLib, but since this
use case is pretty specific and it's not meant to be turned on by
default (or distributed) then we can safely disable the deprecation
warnings inside clutter-profile.c.
The g_atexit() function has been deprecated in GLib as it is a fairly
bad idea in basically all cases.
We could probably use a GCC destructor if we didn't care about
portability, but for the time being we just remove the atexit() handler
that disposed the backend.
There are a couple of gotchas in the 'mapped' flag that are not properly
documented, or are documented only in the actor_invariants.txt file; we
should have a proper description in the API reference as well, to avoid
confusion.
Since the Windows GUI system is assuming multithreadedness, initializing
locks after entering the GUI portion on Windows is likely to cause
problems[1][2], which results many Clutter programs to crash due to
releasing resources that they did not own.
[1]: Multi-threaded use of GTK+ on Win32 in README.win32 of GTK+
source package
[2]: Explanation of Windows GUI system regarding its multithreadness
assumptions-
http://mail.gnome.org/archives/gtk-list/2011-June/msg00005.html
Or, better, the fact that the behaviour of any Clutter function will be
undefined in case the initialization fails.
The value returned by clutter_init() and friends has to be handled
properly.
This removes the create_texture implementation for ClutterBlurEffect
because we already account for padding in the get_paint_volume
implementation so we were creating textures larger than necessary.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Just like ClutterBindConstraint has two shorthand enumerations for binding
position and size and avoid using multiple instances, ClutterAlignConstraint
should have a way to align an actor with the same alignment factor on both
axis at the same time; this is especially useful for centering actors.
The CLUTTER_DEBUG class of debugging flags is meant for debugging notes,
while the CLUTTER_PAINT debugging flags are for changing the output of
the paint cycle. Painting the DeformEffect tiles should go in the latter.
This function is called when the backend is being disposed - as a way
of releasing all ClutterShader. This doesn't take into account three
things:
- ClutterShader is deprecated
- the Backend is *never* disposed
- once the process terminates, all its resources are automatically
released by the OS
So the _clutter_shader_release_all() function is a pointless exercise
in futility.
Just like GLIB_DEPRECATED and GLIB_DEPRECATED_FOR, Clutter should have
its own wrappers for G_DEPRECATED and G_DEPRECATED_FOR, to allow opting
out of deprecation warnings.
Deprecation warnings are enabled by default, now, even when building
Clutter.
This moves a couple of definitions to the common types header, and makes
sure that ClutterBehaviour subclasses include clutter-behaviour.h first,
so that their types can be fully expanded without necessarily have the
ClutterBehaviour header header included by their public headers. This is
the necessary prelude to have clutter-behaviour.[ch] moved to the
deprecated section.
The code that has been deprecated should live into its own directory,
both in the repository and when installed. This should make it clear
which functionality is actually maintained and which is not.
We start with an oldie: the frame source API.
On top of the existing "Settings" group in the settings.ini file we
should have two more groups:
Environment - contains all the configuration possible through
environment variables
Debug - contains all the possible debug variables
ClutterSettings should be able to load its initial state by using
configuration files in SYSCONFDIR and XDG_CONFIG_HOME. This allows
Clutter to have a system (and user) configuration on platforms that
do not have XSETTINGS bridges.
We already have two mechanisms for controlling the font rendering
quality on a per-application basis:
• ClutterSettings properties
• clutter_backend_set_font_options()
The font flags were always a stop-gap solution, and one that tried to
simplify a fairly complex issue beyond the point of actually being
useful.
https://bugzilla.gnome.org/show_bug.cgi?id=660786