Commit Graph

394 Commits

Author SHA1 Message Date
Emmanuele Bassi
253292802c Drop the UProf dependency
Nobody has been compiling Clutter with profiling enabled in a long time.

UProf itself hasn't been updated in 5 years, and it still depends on
deprecated components like dbus-glib, with no port to GDBus in sight.

The profiling code was moderately useful in the past, but these days
it's probably better to profile Cogl than Clutter itself; timing
information can be extracted by the timestamp on each diagnostic message
that is now available by default in the CLUTTER_NOTE macro, and we can
add ad hoc counters where needed.
2015-03-03 17:44:15 +00:00
Emmanuele Bassi
df15f04fc0 build: Use libtool macros to find libm
Instead of using `-lm` everywhere, use LT_LIB_M inside configure.ac, and
$(LIBM) inside Makefile.am.
2015-03-03 17:23:37 +00:00
Marco Trevisan (Treviño)
77db999339 clutter: add Mir windowing/input backend
Added support for Mir, now clutter can natively draw on MirSurfaces.
This depends on latest cogl git.

Run your clutter apps using CLUTTER_BACKEND=mir

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2015-02-21 00:46:17 +00:00
Lionel Landwerlin
018cd7bb5c gdk: implement a MasterClock based on GdkFrameClock
https://bugzilla.gnome.org/show_bug.cgi?id=744668
2015-02-17 19:12:40 +00:00
Lionel Landwerlin
e94285693f main: Make the MasterClock an interface
Move the implementation of the MasterClock into MasterClockDefault, so
backends can provide their own implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=744668
2015-02-17 18:55:23 +00:00
Emmanuele Bassi
82fffaedb6 constraint: Add a private header
And move the only private ClutterConstraint method to it.

This commit also sneaks in a change that makes sense for the debugging
of the update_allocation() method, which checks if the allocation was
effectively changed.
2014-12-16 00:37:06 +00:00
Emmanuele Bassi
2f490c9dcc build: More out of tree build fixes 2014-12-16 00:15:58 +00:00
Emmanuele Bassi
e2eb0b0ada build: Use subdir-objects 2014-12-15 23:13:30 +00:00
Emmanuele Bassi
f065a34e46 Remove clutter.symbols
The Visual Studio build files have been updated to not use it, so we can
remove it from the repository.
2014-04-02 18:48:59 +01:00
Emmanuele Bassi
8fc47244b0 build: Remove abicheck.sh
We now control the visibility of symbols directly from the header files,
so we always have the correct ABI.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
386be83f24 New visibility handling in Clutter
Instead of listing every public symbol inside an ancillary file, we can
use compiler annotations. This scheme is also used by GLib and GTK+.

The symbols file is left in tree until the Visual Studio rules are
fixed, but it's not used any more during distcheck.

I double-checked that the exposed ABI is the same before and after this
change, except for symbols that were never meant to be public in the
first place, and that escaped our attention when we generated the first
version of the symbols file.
2014-03-17 19:26:49 +00:00
Adel Gadllah
e4497baaf0 eglnative: Add clutter-stage-window implementation
Add a ClutterStageEglNative implemennation that implements
can_clip_redraws so that clipped redraws can work
on eglnative.

https://bugzilla.gnome.org/show_bug.cgi?id=726341
2014-03-14 17:55:19 +01:00
Emmanuele Bassi
ad39d3d1ae Make abicheck.sh output TAP
So that we can run it under the TAP harness like the rest of the
conformance test suite.
2013-12-12 18:51:11 +00:00
Emmanuele Bassi
2a660fa298 Fully rework the conformance test suite
The current conformance test suite is suboptimal in many ways.

All tests are built into the same binary, which makes adding new tests,
builting tests, and running groups of tests much more awkward than it
needs to be. The first issue, especially, raises the bar of contribution
in a significant way, while the other two take their toll on the
maintainer. All of these changes were introduced back when we had both
Clutter and Cogl tests in tree, and because we were building the test
suite for every single change; since then, Cogl moved out of tree with
all its tests, and we build the conformance test suite only when running
the `check` make target.

This admittedly large-ish commit changes the way the conformance test
suite works, taking advantage of the changes in the GTest API and test
harness.

First of all, all tests are now built separately, using their own test
suite as defined by each separate file. All tests run under the TAP
harness provided by GTest and Automake, to gather a proper report using
the Test Anything Protocol without using the `gtester` harness and the
`gtester-report` script. We also use the Makefile rules provided by GLib
to vastly simplify the build environment for the conformance test suite.

On top of the changes for the build and harness, we also provide new API
for creating and running test suites for Clutter. The API is public,
because the test suite has to use it, but it's minimal and mostly
provides convenience wrappers around GTest that make writing test units
for Clutter easier.

This commit disables all tests in the conformance test suite, as well as
moving the data files outside of the tests/data directory; the next few
commits will re-establish the conformance test suite separately so we
can check that everything works in a reliable way.
2013-12-12 18:51:11 +00:00
Emmanuele Bassi
7af55d23e4 Deprecate ClutterTableLayout
The table layout manager has various issues:

  • no support for RTL flipping
  • most of the layout API is legacy, and has been replaced by the
    alignment and expansion flags on ClutterActor
  • the animation API is legacy, and has been replaced by the
    implicitly animatable allocation
  • the spanning cells handling is a bit awkward, as is its API

On top of that, we imported the grid layout management policy from GTK+
into ClutterGridLayout, which provides all the required features in a
more well-designed API.

Instead of wasting time and resources updating TableLayout, we should
deprecate it and point developers of the GridLayout.
2013-11-19 00:31:53 +00:00
Neil Roberts
fa8809d716 Add COGL_DISABLE_DEPRECATION_WARNINGS to the build flags
Cogl 1.16 has deprecated a lot of API which it will be difficult for
Clutter to catch up with. For the time being the warnings are just
being disabled to keep the build output clean.

https://bugzilla.gnome.org/show_bug.cgi?id=703877
2013-07-10 13:28:12 +01:00
Emmanuele Bassi
323ec19dcc build: Remove INCLUDES directives
They have been deprecated for a while, replaced by AM_CPPFLAGS.
2013-05-15 15:18:13 +01:00
Daniel Stone
dfb145988e wayland: Only include Wayland headers in private
As wayland-client.h and wayland-server.h can't be included together,
split the Wayland backend file into clutter-backend-wayland.h, which
only defines the types, and clutter-backend-wayland-priv.h, which
actually uses the Wayland client types.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692851
2013-02-20 23:06:28 +00:00
Emanuele Aina
61f2d751d0 tap-action: Add TapAction, to handle mouse/touch tapping
TapAction is a GestureAction-subclass that handles clicks and
tap gestures. It is meant to provide a replacement for ClickAction
using GestureAction:

• it handles events trasparently without capturing them, so that it
  can coexists with other GestureActions;

• the ::tap signal is not emitted if the drag threshold is exceeded;

• building upon GestureAction the amount of code is greatly reduced.

TapAction provides:

• tap signal, notifying users when a tap has been performed.

The image-content example program has been updated replacing its
ClickAction usage with TapAction.

https://bugzilla.gnome.org/show_bug.cgi?id=683948
2012-10-19 13:41:31 +02:00
Emanuele Aina
abcf1d589f gesture-action: Let subclasses override the GestureTriggerEdge handling
Let gesture subclasses override how the drag threshold should
be handled:

• CLUTTER_GESTURE_TRIGGER_NONE tells GestureAction that the gesture
  must begin immediately and there's no drag limit that will cause
  its cancellation;
• CLUTTER_GESTURE_TRIGGER_AFTER is the default GestureAction behaviour,
  where it needs to wait until the drag threshold has been exceeded
  before considering the gesture valid;
• CLUTTER_GESTURE_TRIGGER_BEFORE will make GestureAction cancel
  the gesture once the drag exceed the configured threshold.

For example, ZoomAction and RotateAction could set
CLUTTER_GESTURE_TRIGGER_NONE since the use of two fingers makes the
begin of the action more self-evident, while an hypothetical Tap
gesture may use CLUTTER_GESTURE_TRIGGER_BEFORE to cancel the tap if
the pointer moves too much.

https://bugzilla.gnome.org/show_bug.cgi?id=685028
2012-10-19 11:27:35 +02:00
Emanuele Aina
9ca06d2895 pan-action: add PanAction, to handle panning in scrollable actors
PanAction is a GestureAction-subclass that implements the panning
concept for scrollable actors, with the ability to emit interpolated
signals to emulate the kinetic inertia of the panning. PanAction provides:

• pan signal, notifying users of the panning gesture status;

• pan-stopped signal, emitted at the end of the interpolated phase
  of the panning gesture, if enabled;

• pan-axis property, to allow constraining the dragging to a specific
  axis;

• interpolated property, to enable or disable the inertial behaviour;

• deceleration property, to customize the rate at which the momentum
  of the panning will be slowed down;

• acceleration-factor property, applied to the inertial momentum when
  starting the interpolated sequence.

An interactive test is also provided.

https://bugzilla.gnome.org/show_bug.cgi?id=681648
2012-08-28 10:11:16 -03:00
Lionel Landwerlin
84325057af Add zoom action
https://bugzilla.gnome.org/show_bug.cgi?id=678427
2012-08-20 18:28:22 +01:00
Emmanuele Bassi
9f83b64182 build: Move config.h under clutter/
We should not have header files in the project root.
2012-07-30 10:54:18 +01:00
Emmanuele Bassi
f99abad4a4 Split off LayoutManager deprecated functions to a separate file
This should make it easier to clean up later when we branch off for
1.99.
2012-07-18 17:23:35 -04:00
Lionel Landwerlin
9e02ef459e input-device: add enter/leave events generation for touch events
This patch brings 'enter-event' and 'leave-event' generation for touch
based devices. This leads to adding a new API to retrieve coordinates
of a touch point.

https://bugzilla.gnome.org/show_bug.cgi?id=679797
2012-07-17 21:49:26 +01:00
Lionel Landwerlin
e2264c0484 Add rotate action
Allow rotation of an actor using 2 points (touch or pointers) events.

Also refactor the accumulators from various actions.

https://bugzilla.gnome.org/show_bug.cgi?id=678587
2012-07-17 16:52:41 +01:00
Emmanuele Bassi
b985c4035e Deprecate ClutterTexture's API
ClutterTexture is full of side effects that have been picked up over the
years; they make improving ClutterTexture harder than necessary, as well
as making subclassing impossible without introducing weird behaviours in
the child classes as well.

Since Clutter 1.10 we have the ClutterImage content type, which is
side-effects free, given that it just paints texture data using the
state of the actor.

Sadly, we still have subclasses of ClutterTexture, both deprecated and
not, so we cannot deprecate ClutterTexture right out; the type and
structures will still be available, like we do for ClutterGroup, but the
whole API should be moved to the deprecated section, waiting for the
time in which we can get rid of it all.
2012-07-11 13:22:21 +01:00
Emmanuele Bassi
550168eee3 Clean up deprecated header inclusion
The build should not add deprecated/ into the default INCLUDE paths, so
that deprecated headers are clearly separated; this will make it easier
to get rid of them when we branch out for 2.0.
2012-06-23 08:23:11 +01:00
Emmanuele Bassi
c4acae7752 build: Remove gcov from the build
We want to switch to lcov, so let's start with a clean slate.
2012-06-19 14:55:10 +01:00
Bastian Winkler
1eb869ec8f Add ClutterGridLayout
ClutterGridLayout is port of GtkGrid to a Clutter layout manager. All
the logic is taken from gtkgrid.c, so all the credits should go to
Matthias Clasen for writing this nice piece of code.

ClutterGridLayout supports adding children with it's own methods
GridLayout.attach() and GridLayout.attach_next_to() as well as
Actor.add_child() and friends. The latter adds children in a similar
fashion to ClutterBoxLayout

https://bugzilla.gnome.org/show_bug.cgi?id=677372
2012-06-05 12:28:25 +02:00
Chun-wei Fan
ee72d9b4af Visual C++ support: Add support to build GDK backend
-Add configuration in Clutter projects to add option to build Clutter with
 the GDK3 backend in addition to the Win32 backend
-Add another preconfigured clutter-config.h.win32_GDK which contains
 backend configs for both GDK3 and Win32 windowing and input.
2012-05-14 16:18:13 +08:00
Emmanuele Bassi
0dd74ca3fb docs: Annotation fixes
The introspection scanner has become slightly more annoying, in the hope
that people start fixing their annotations. As it turns out, it was the
right move.
2012-04-30 17:17:41 +01:00
Emmanuele Bassi
bca93c1a75 Deprecate ClutterAlpha
It's time. Now that we have clutter_actor_allocate() respecting the
easing state of an actor, and that the LayoutManager animation virtual
functions have been deprecated, we can put ClutterAlpha on the chopping
block, and be done with it, once and for all.

So long, ClutterAlpha; and thanks for all the fish.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
999bbe20a5 Add ClutterScrollActor
ClutterScrollActor is an actor that allows showing a portion of its
contents.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
5d8b177679 bin-layout: Deprecate BinLayout alignments
We should use the ClutterActor's API for this.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
b4f12cfb83 Deprecate ClutterAnimation, as well as clutter_actor_animate()
ClutterPropertyTransition, and the implicit animation API based on
ClutterTransition and ClutterAnimatable, are enough to replace this
whole API.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
63e909576a Deprecate State and Animator
The PropertyTransition, KeyframeTransition, and TransitionGroup classes
can effectively replace Animator and State in their common usage.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
c500fc1844 Add ClutterTransitionGroup
The TransitionGroup class is a logical container for running multiple
transitions.

TransitionGroup is not a Score: it is a Transition that advances each
Transition it contains using the delta between frames, and ensures that
all transitions are in a consistent state; these transitions are not
advanced by the master clock.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
270894342e Add ClutterKeyframeTransition
A simple transition class that interpolates a property between key
frames.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
61f17e345a Add base geometric types
Clutter should provide some more basic geometric types - Point, Size,
Rect - so that we can use them in properties and accessors.
2012-04-27 12:30:46 +01:00
Emmanuele Bassi
e2564dd265 Deprecate ClutterCairoTexture
The ClutterCanvas content implementation should be used instead, to
avoid stringing along the ClutterTexture API and implementation.

This change requires some minor surgery, as the deprecated section
already contains an header for the previously deprecated methods; plus,
we don't want to deprecate clutter_cairo_set_source_color(). This means
creating a new header to be used for Cairo-related API.
2012-04-27 12:28:49 +01:00
Emmanuele Bassi
2a1dcf4008 Deprecate ClutterMedia
The interface looked like a good idea around the time Clutter 0.2 was
out, but in reality we never had a proper, and supported implementation
outside of clutter-gst - thus, ClutterMedia was acting like a wrapper
around GStreamer, leading to hilarious issues of impedence mismatch
between API and all sorts of indirection issues typical of wrong
abstractions.

In theory, ClutterMedia should have been deprecated and removed before
we hit 1.0, but we kept flip-flopping on the issue.

For 2.0, it's time to take it out.

And shoot it in the face.
2012-04-17 18:10:39 +01:00
Neil Roberts
04f2be34b2 configure: Fix the -o operator in a call to test
The disjunction operator was misspelt as -O which tests whether the
following file is owned by the calling user. This doesn't take enough
arguments so bash was showing an error and the test was always
failing. This meant that NEED_XKB_UTILS was always false which should
have broken the build but the Makefile was mistakenly including
clutter-xkb-utils.c again if SUPPORT_WAYLAND is defined.

See 1b77565e for reference.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-23 16:42:35 +00:00
Emmanuele Bassi
cadae5b325 Add ClutterImage, and image data content 2012-03-16 12:33:37 +00:00
Emmanuele Bassi
07bb35bbe3 Add ClutterCanvas, a drawing content 2012-03-16 12:33:37 +00:00
Emmanuele Bassi
be4746b15f Add ClutterContent
ClutterContent is an interface for creating delegate objects that handle
what an actor is going to paint.

Since they are a newly added type, they only hook into the new PaintNode
based API.

The position and size of the content is controlled in part by the
content's own preferred size, and by the ClutterContentGravity
enumeration.
2012-03-16 12:33:36 +00:00
Emmanuele Bassi
b83dc6abfa Add PaintNode, an element on the render object tree
Now that we have a proper scene graph API, we should split out the
rendering part from the logical and event handling part.

ClutterPaintNode is a lightweight fundamental type that encodes only the
paint operations: pipeline state and geometry. At its most simple, is a
way to structure setting up the programmable pipeline using a
CoglPipeline, and submitting Cogl primitives. The important take away
from this API is that you are not allowed to call Cogl API like
cogl_set_source() or cogl_primitive_draw() directly.

The interesting approach to this is that, in the future, we should be
able to move to a purely retained mode: we will decide which actors need
to be painted, they will update their own branch of the render graph,
and we'll take the render graph and build all the rendering commands
from that.

For the 1.x API, we will have to maintain invariants and the existing
behaviour, but as soon as we can break API, the old paint signal will
just go away, and Actors will only be allowed to manipulate the render
tree.
2012-03-16 12:33:35 +00:00
Emmanuele Bassi
40bcbf9c0d Add ClutterPropertyTransition
ClutterPropertyTransition is a ClutterTransition that animates a
property of a ClutterAnimatable implementation.
2012-03-15 17:01:12 +00:00
Emmanuele Bassi
0c8443f71a Add ClutterTransition
ClutterTransition is a Timeline sub-class that allows interpolation of a
value between the initial and final states held by a ClutterInterval.
2012-03-15 17:01:12 +00:00
Stefano Facchini
5d26aeca34 Install clutter-version.h 2012-03-13 18:22:19 +01:00