1
0
Fork 0
Commit graph

285 commits

Author SHA1 Message Date
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
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
Emmanuele Bassi
d28e04be72 Move all enumerations to a separate file
This should allow sharing types, and we can avoid glib-mkenums thrawling
the whole repository for enumerations.
2011-10-11 17:59:46 +01:00
Emmanuele Bassi
a21f1d1580 Move clutter-fixed.[ch] to the deprecated section 2011-10-11 17:58:40 +01:00
Emmanuele Bassi
62d72b8690 Move ClutterBehaviour to the deprecated section 2011-10-11 17:58:40 +01:00
Emmanuele Bassi
bcd7845d91 Move ClutterBehaviour subclasses to the deprecated section
Moving ClutterBehaviour itself will require some minor header surgery,
so we'll do that next.
2011-10-11 17:58:40 +01:00
Emmanuele Bassi
e57f8c26f6 Move ClutterShader to the deprecated section 2011-10-11 17:58:40 +01:00
Emmanuele Bassi
4b33a9c5f4 Move ClutterScore to the deprecated section 2011-10-11 17:58:39 +01:00
Emmanuele Bassi
4b748f4334 Move timeout pool to the deprecated section 2011-10-11 17:58:39 +01:00
Emmanuele Bassi
50cda9fed1 build: Move deprecated code into its own prefix
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.
2011-10-11 17:58:35 +01:00
Emmanuele Bassi
f5eee5aec7 Add a configuration file for ClutterSettings
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.
2011-10-11 17:20:20 +01:00
Emmanuele Bassi
b1fbbe23b4 Revert "Add lightness, brightness, and contrast effects"
Discussed a bit with Neil, and I might have jumped the gun a little.
We might want a different API for 1.10. See comment 12 on:

https://bugzilla.gnome.org/show_bug.cgi?id=656156

This reverts commit 4829ae1c79.
2011-09-28 15:54:32 +01:00
Joseph Scheuhammer
4829ae1c79 Add lightness, brightness, and contrast effects
Added three classes for new clutter effects:  inverse lightness,
modify brightness, and modify contrast.

https://bugzilla.gnome.org/show_bug.cgi?id=656156
2011-09-28 10:32:15 -04:00
Emmanuele Bassi
96810e1d4d build: Add -lm to clutter's LIBADD rule
We need to explicitly link against libm when building Clutter, since we
use libm API.

https://bugzilla.gnome.org/show_bug.cgi?id=657529
2011-08-29 22:17:53 +01:00
Emmanuele Bassi
87f35a3434 build: Fix the path to the tslib event source 2011-07-04 16:09:41 +01:00
Robert Bragg
d65161a7fd build: fix Makefile.am to build glx tfp code on x11 platforms
It was already the intention that the ClutterGLXTexturePixmap API should
be built and made available on any X11 based platforms since there was
nothing specific about the API and it is useful to have for
compatibility. There was a mistake in the Makefile.am though which meant
only the header was getting installed but the code wasn't being built.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-07-04 15:41:38 +01:00
Emmanuele Bassi
478014041b build: Create and install clutter-glx pkg-config file
For backward compatibility.
2011-06-24 19:22:22 +01:00
Emmanuele Bassi
7b064a0bda build: Build the GLX symbols
The change from the GLX backend to the Cogl backend left out the GLX
source code from the list of source files to be built.
2011-06-20 18:26:34 +01:00
Emmanuele Bassi
1238e0ddf9 Add ClutterDropAction
ClutterDropAction is an Action sub-class that allows writing actors that
react to dragged actors being dropped on them.

https://bugzilla.gnome.org/show_bug.cgi?id=652842
2011-06-20 15:25:53 +01:00
Robert Bragg
2d8083bab8 unify egl and glx backends as "cogl" backend
Since GLX and EGL are abstracted by Cogl the two backends are both
implementing everything using the Cogl API and they are almost
identical.

This updates the egl backend to support everything that the glx backend
supports. Now that EGL and GLX are abstracted by Cogl, the plan is that
we will squash the clutter-egl/glx backends into one. Since the EGL
backend in clutter can conditionally not depend on X11 we will use the
EGL backend as the starting point of our common backend.

https://bugzilla.gnome.org/show_bug.cgi?id=649826
2011-06-14 20:35:18 +01:00
Emmanuele Bassi
a7fc76a1c5 build: Disable deprecated symbols during development cycles
And add a configure switch to toggle them.
2011-06-14 14:50:10 +01:00
Tomeu Vizoso
ba72235b66 Add ClutterSwipeAction and ClutterGestureAction
To allow actors to handle gestures in a more organized way.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2585
2011-06-10 14:02:17 +01:00
Neil Roberts
7f78237ee5 clutter-actor: Add an 'offscreen-redirect' property
This adds a property which can be used to redirect the actor through
an FBO before painting so that it becomes flattened in an image. The
image can be used as a cache to avoid having to repaint the actor if
something unrelated in the scene changes. It can also be used to
implement correct opacity even if the actor has overlapping
primitives. The property is an enum that takes three values:

CLUTTER_OFFSCREEN_REDIRECT_NEVER: The default behaviour which is to
  never flatten the actor.

CLUTTER_OFFSCREEN_REDIRECT_ALWAYS: The actor is always redirected
  through an FBO.

CLUTTER_OFFSCREEN_REDIRECT_ONLY_FOR_OPACITY: The actor is only
  redirected through an FBO if the paint opacity is not 255. This
  value would be used if the actor wants correct opacity. It will
  avoid the overhead of using an FBO whenever the actor is fully
  opaque.

The property is implemented by installing a ClutterFlattenEffect.
ClutterFlattenEffect is a new internal class which subclasses
ClutterOffscreen to redirect the painting to an FBO. When
ClutterOffscreen paints, the effect sets an opacity override on the
actor so that the image will always contain the actor at full
opacity. The opacity is then applied to the resulting image before
painting it to the stage. This means the actor does not need to be
redrawn while the opacity is being animated.

The effect has a high internal priority so that it will always occur
before any other effects and it gets hidden from the application.
2011-05-13 01:46:32 +01:00
Emmanuele Bassi
ea502fd492 build: Depend on cogl-pango-1.0
For both builds and introspection.
2011-05-06 17:21:00 +01:00
Emmanuele Bassi
21786cccd6 build: Fix introspection rules
Remove some cruft after the surgery that split Cogl out of tree.
2011-05-06 16:55:10 +01:00
Robert Bragg
223e14811c Removes Cogl from the repository
Cogl has now been split out into a standalone project with a separate
repository at git://git.gnome.org/cogl. From now on the Clutter build
will now simply look for a cogl-1.0 pkg-config file to find a suitable
Cogl library to link against at build time.
2011-05-06 15:44:08 +01:00
Robert Bragg
136cf1b2d6 clutter/Makefile.am: mark clutter-cex100.h as BUILT_SOURCES
clutter-xcex100.h is generated from clutter-cex100.h.in when running
./configure so it should be added to automake's BUILT_SOURCES variable.
2011-05-05 14:46:03 +01:00
Robert Bragg
c55cffbb6b Moves all EGL code down from Clutter to Cogl
As was recently done for the GLX window system code, this commit moves
the EGL window system code down from the Clutter backend code into a
Cogl winsys.

Note: currently the cogl/configure.ac is hard coded to only build the GLX
winsys so currently this is only available when building Cogl as part
of Clutter.
2011-05-05 14:46:01 +01:00
Robert Bragg
af366ad750 backend: remove untested fruity backend
This backend hasn't been used for years now and so because it is
untested code and almost certainly doesn't work any more it would be a
burdon to continue trying to maintain it. Considering that we are now
looking at moving OpenGL window system integration code down from
Clutter backends into Cogl that will be easier if we don't have to
consider this backend.
2011-04-11 17:54:36 +01:00
Robert Bragg
70767f08dc Adds a --with-system-cogl config option for Clutter
This makes it possible to build Clutter against a standalone build of
Cogl instead of having the Clutter build traverse into the clutter/cogl
subdirectory.
2011-04-11 17:54:36 +01:00
Robert Bragg
31da46c799 Adds the ability to build Cogl standalone
This adds an autogen.sh, configure.ac and build/autotool files etc under
clutter/cogl and makes some corresponding Makefile.am changes that make
it possible to build and install Cogl as a standalone library.

Some notable things about this are:
A standalone installation of Cogl installs 3 pkg-config files;
cogl-1.0.pc, cogl-gl-1.0.pc and cogl-2.0.pc. The second is only for
compatibility with what clutter installed though I'm not sure that
anything uses it so maybe we could remove it. cogl-1.0.pc is what
Clutter would use if it were updated to build against a standalone cogl
library. cogl-2.0.pc is what you would use if you were writing a
standalone Cogl application.

A standalone installation results in two libraries currently, libcogl.so
and libcogl-pango.so. Notably we don't include a major number in the
sonames because libcogl supports two major API versions; 1.x as used by
Clutter and the experimental 2.x API for standalone applications.
Parallel installation of later versions e.g. 3.x and beyond will be
supportable either with new sonames or if we can maintain ABI then we'll
continue to share libcogl.so.

The headers are similarly not installed into a directory with a major
version number since the same headers are shared to export the 1.x and
2.x APIs (The only difference is that cogl-2.0.pc ensures that
-DCOGL_ENABLE_EXPERIMENTAL_2_0_API is used). Parallel installation of
later versions is not precluded though since we can either continue
sharing or later add a major version suffix.
2011-04-11 17:54:36 +01:00
Robert Bragg
e51749d33c win32: mkdir -p win32 needed for out of tree builds
if cross compiling clutter using mingw using an out of tree build
directory then a pre-requisite for creating the resources.o file
containing the transparent cursor is for the win32 directory itself to
be created at $(top_builddir)/clutter/win32.
2011-03-16 11:22:20 +00:00
Emmanuele Bassi
e2b5762571 Move the keysym ↔ Unicode table to .rodata
The table we use for converting between keysyms and Unicode should be
static and constified, so that it can live in the .rodata section of
the ELF shared object, and be shared among processes.

This change moves the table to a source file, instead of an header; the
change also requires the clutter_keysym_to_unicode() function to be
moved from clutter-event.c into this new source file. The declaration is
still in clutter-event.h, so we don't need to do anything special.
2011-02-28 14:16:24 +00:00
Emmanuele Bassi
20f19fe06c offscreen-effect: Add private API for getting the target size
Since the FBO target might have a different size than the mere paint box
of the actor, we need API to get it out of the ClutterOffscreenEffect
private data structure and on to sub-classes.

Since we cannot add new API in a stable cycle, we need a private
function; we'll leave it there even when opening 1.7, since it's useful
for internal purposes.
2011-02-19 09:15:34 +00:00
Emmanuele Bassi
3e5aa9ed63 Add private header for event-related API 2011-02-18 16:35:36 +00:00
Emmanuele Bassi
d27b335b61 Move ClutterEffect private symbols to a private header
No point in cluttering up clutter-private.h even more than necessary.
2011-02-18 16:00:39 +00:00
Emmanuele Bassi
92d13a1966 build: Re-enable --warn-all for g-ir-scanner
Now that I don't have to see a bunch of false positives any more, we can
finally use warnings to catch issues.
2011-02-15 12:40:12 +00:00
Viatcheslav Gachkaylo
901ed32568 Fixed bugs with mouse events.
Enter/leave events are now being received. Mouse move events
now work properly.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>

http://bugzilla.clutter-project.org/show_bug.cgi?id=2545
2011-02-03 10:58:38 +00:00
Viatcheslav Gachkaylo
634e4ffd1a osx: Improve the event loop
Implementation of event loop which works with GLib events, native OS X
events and Clutter events.

The event loop source code comes from the equivalent code in the Quartz
GDK backend from GTK+ 2.22.1, which is LGPL v2.1+ and thus compatible
with Clutter's licensing terms.

The code has been tested with libsoup, which did not work before together
with Clutter.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>

http://bugzilla.clutter-project.org/show_bug.cgi?id=2490
2011-01-31 13:43:12 +00:00
Emmanuele Bassi
1b1e77b469 event/x11: Rework the way we translate X11 events
This is a lump commit that is fairly difficult to break down without
either breaking bisecting or breaking the test cases.

The new design for handling X11 event translation works this way:

  - ClutterBackend::translate_event() has been added as the central
    point used by a ClutterBackend implementation to translate a
    native event into a ClutterEvent;

  - ClutterEventTranslator is a private interface that should be
    implemented by backend-specific objects, like stage
    implementations and ClutterDeviceManager sub-classes, and
    allows dealing with class-specific event translation;

  - ClutterStageX11 implements EventTranslator, and deals with the
    stage-relative X11 events coming from the X11 event source;

  - ClutterStageGLX overrides EventTranslator, in order to
    deal with the INTEL_GLX_swap_event extension, and it chains up
    to the X11 default implementation;

  - ClutterDeviceManagerX11 has been split into two separate classes,
    one that deals with core and (optionally) XI1 events, and the
    other that deals with XI2 events; the selection is done at run-time,
    since the core+XI1 and XI2 mechanisms are mutually exclusive.

All the other backends we officially support still use their own
custom event source and translation function, but the end goal is to
migrate them to the translate_event() virtual function, and have the
event source be a shared part of Clutter core.
2011-01-21 10:25:43 +00:00
Emmanuele Bassi
94b905b9e1 build: Generate an instealled config header
Clutter has some platform-specific API that is accessible only if the
right backend has been compiled in. Third party applications that wish
to be portable across backends might want to use defines and other
pre-processor tricks to determine header inclusion and API usage.

While Clutter has an internal set of symbols it can use, third party
applications don't have the luxury of being able to access the config.h
generated by Clutter's configure script.

For this reason, Clutter should install a configuration header with a
series of namespaced defines that can be picked up by applications and
other third party code.
2011-01-19 14:33:27 +00:00
Emmanuele Bassi
d5a4183047 introspection: Add cairo-1.0 to the dependencies 2010-12-10 17:15:23 +00:00
Emmanuele Bassi
3795c9b975 build: Do not hardcode --warn-all for g-ir-scanner
It's possible to use --warn-all through the introspection scanner
options from outside the build environment.
2010-12-09 12:37:41 +00:00
Damien Lespiau
afd279dd76 evdev: Merge clutter-event-evdev.[ch] into the device manager
The device manager now fully owns the GSources corresponding to the
devices it manages. This will allow not only to remove the source when
udev signals a device removal but also handle read() errors gracefully
by removing the faulty device from the manager.
2010-11-30 14:40:38 +00:00
Damien Lespiau
c6493885c3 evdev: First stab at an evdev backend
This backend is a event backend that can be enabled for EGL (for now).
It uses udev (gudev) to query input devices on a linux system, listens to
keyboard events from input devices and xkbcommon to translate raw key
codes into key keysyms.

This commit only supports key events, more to follow.
2010-11-30 14:40:37 +00:00
Damien Lespiau
ef5256ec25 evdev: Factor out the xkbcommon code from the wayland client backend
The wayland client code has support for translating raw linux input
device key codes coming from the wayland compositor into key symbols
thanks to libxkbcommon.

A backend directly listening to linux input devices (called evdev, just
like the Xorg one) could use exactly the same code for the translation,
so abstract it a bit in a separate file.
2010-11-30 14:40:37 +00:00
Emmanuele Bassi
3c15c0c9bb Add SnapConstraint
A SnapConstraint is a constraint that "snaps" the edges of two actors
together.
2010-11-15 16:00:49 +00:00
Emmanuele Bassi
985518c601 color: Add named, global colors
Since EGA colors are apparently all the rage in other toolkits, Clutter
should not be left out. On top of the usual CGA/EGA palette the static
colors also include the Tango Icon palette, which at least is more
pleasant to the eye.

Static colors are accessed through an enumeration by using
clutter_color_get_static(), or using the short-hand pre-processor
macros.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2066
2010-11-11 13:14:23 +00:00