Commit Graph

8223 Commits

Author SHA1 Message Date
Emmanuele Bassi
de94b8e634 Add deprecation annotations 2012-04-27 12:30:48 +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
024f6d40d2 keyframe-transition: Add direct accessors for key frames
This should allow modifying key frame details without requiring a full
reset of the KeyframeTransition instance.
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
edfe618174 timeline: Add an internal function for advancing a timeline
There are cases when we want to advance a timeline from another time
source. We cannot use _clutter_timeline_do_tick() directly, as that
assumes that the timeline is already playing, so we'll need to create a
wrapper that toggles the playing flag around it.
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
d24eccd026 interval: Allow passing NULL values to the constructor
Given that we can create a ClutterInterval without an initial and final
values using g_object_new(), it stands to reason that we ought to be
able to create an instance when passing NULL GValue pointers to the
new_with_values() constructor as well.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
bf12e23199 easing: Add utility functions
We end up copying the same array-of-modes-and-functions code in various
places, so it's better to factor it out.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
865a682450 actor: Make add_transition() work regardless of easing state
We can add transitions to an actor even if the easing state hasn't been
set beforehand.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
fe6d284a83 docs: Use the Transition convenience API 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
2470398ede transition: Add interval convenience API
This should cut down the lines and number of objects we have to care
about when dealing with explicit transitions.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
a9cc06257f docs: Add a reference section for geometric types 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
764068a723 Add version annotation for newly added functions 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
b2feb463bd Add a rect-contains-rect function
Similar to the contains-point one.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
9c637ccb41 Use an epsilon for float comparison
We tend to use float comparison for structured data types like Vertex,
Point, and Size; we should take into consideration fluctuations in the
floating point representation as well.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
695621f5ea event: Add distance and angle accessors
Let's start using ClutterPoint in the API.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
d021cc7c02 Add a function to compute the distance between points 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
bc914bb8a2 Move towards an alloc/init pair for base types
Instead of a single new() constructor that both allocates and
initializes, split the allocation and initialization into two separate
functions for types that are typically used on the stack, and rarely
allocated on the heap, like ClutterPoint and friends.

This is also applied retroactively to ClutterActorBox and ClutterVertex,
given that the same considerations on usage apply to them as well; we
can add a return value to clutter_actor_box_init() and
clutter_vertex_init() in an ABI-compatible way, so that
clutter_actor_box_new() and clutter_vertex_new() can be effectively
reimplemented as "init (alloc ())".
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
0fc4053613 color: Add initializers for ClutterColor
Similar to the ones we have for the other boxed types in Clutter.
2012-04-27 12:30:47 +01:00
Emmanuele Bassi
2276f24ffd script: Support ClutterPoint and ClutterSize
Point and Size can be described both as an array of values or as an
object.
2012-04-27 12:30:46 +01:00
Emmanuele Bassi
7814ec2eb5 actor: Add position and size animatable properties
Using a compound type property for position and size has various
advantages: it reduces the amount of checks; it reduces the amount
of notify signals to connect to; it reduces the amount of transitions
generated.
2012-04-27 12:30:46 +01:00
Emmanuele Bassi
0f3f0d54d2 actor: Use ClutterSize for minimum and natural fixed sizes 2012-04-27 12:30:46 +01:00
Emmanuele Bassi
b7b641d5d3 actor: Use ClutterPoint for the fixed position 2012-04-27 12:30:46 +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
d77ca7f7b8 Move the progress function registration to clutter-types.h
Near the definition of ClutterProgressFunc.
2012-04-27 12:28:49 +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
0fca11ec2f path: Avoid integer overflow in get_distance()
The get_distance() API uses machine integers to compute the distance;
this means that on 32bit we can overflow the integer size. This gets
hidden by the fact that get_distance() returns an unsigned integer as
well.

In reality, ClutterPath is an unmitigated mess, and the only way to
actually fix it is to break API.

https://bugzilla.gnome.org/show_bug.cgi?id=652521
2012-04-27 12:28:49 +01:00
Alejandro Piñeiro
9428aaa3cb a11y: stop to use text as the default accessible-name for ClutterText
https://bugzilla.gnome.org/show_bug.cgi?id=672994
2012-04-26 20:01:28 +02:00
Emmanuele Bassi
3cf2bfa3b6 media: Define CLUTTER_DISABLE_DEPRECATION_WARNINGS
We know we're building deprecated API.
2012-04-26 16:59:08 +01:00
Emmanuele Bassi
56b7a4985b macros: Define MIN_REQUIRED as the current version
Otherwise we'll not warn on deprecations introduced in the current
development cycle.
2012-04-26 16:58:23 +01:00
Emmanuele Bassi
14572f4db0 actor: Call show() on set parent conditionally
This commit adds a further conditional check for calling
clutter_actor_show() when adding a child to an actor. We cannot
unconditionally change the value of the show-on-set-parent property like
the original solution of commit 81b19a78f5
as that breaks the document invariant that show-on-set-parent will be
changed iff an actor is without a parent.

The new ADD_CHILD_SHOW_ON_SET_PARENT flag is part of the default and
legacy flags, thus retaining the default behaviour when adding a child;
the flag is not passed when reordering the list of children, which means
we ignore the state of the show-on-set-parent property.

The conformance test suite fully passes, including the newly added test
to verify that changing the paint order does not trigger visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
2012-04-26 14:06:00 +01:00
Emmanuele Bassi
a2f54c59f5 Revert "actor: Unconditionally set show_on_set_parent"
This reverts commit 81b19a78f5.

The commit breaks the conformance test unit for the invariants we
guarantee for the 1.x API:

ERROR:actor-invariants.c:307:actor_show_on_set_parent: assertion failed: (show_on_set_parent)
2012-04-26 14:02:07 +01:00
Emmanuele Bassi
854c246a2b docs: Add the 1.12 symbols index to the API reference 2012-04-26 13:58:06 +01:00
Emmanuele Bassi
26d8ad7479 Be resilient in case there is no device manager
It's possible to run Clutter with the 'null' input backend, which means
that clutter_device_manager_get_default() may return NULL. In the future
we may add a default dummy device manager, but right now it's safer to
just add a simple NULL check in the places where we ask for the device
manager.
2012-04-26 13:56:00 +01:00
Neil Roberts
f7f8179898 Remove calls to cogl_disable_fog
I can't think of any reason why it would do this and there's no
comment explaining it so let's just remove it. The global fog state
has been removed in Cogl 2.0 so it will cause problems later.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-04-25 17:30:17 +01:00
Neil Roberts
107f43a838 clutter-stage-cogl: Use CoglPrimitive for the debug redraw code
CoglVertexBuffer is deprecated so here is a fairly simple replacement
to use the experimental CoglPrimitive API.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-04-25 17:30:17 +01:00
Cosimo Cecchi
032870dccc device-manager: select/unselect device events as device change
When a device is added or changes, select/unselect events from X
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-24 18:49:42 -04:00
Cosimo Cecchi
b746044415 device-manager: don't select events for disabled devices
I.e. only select events for core devices or devices explicitly enabled
by clients.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-24 18:49:41 -04:00
Jasper St. Pierre
85323f09a5 conform: Make sure that raising/lowering children doesn't change state
Namely, visibility and show-on-set-parent.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
2012-04-24 11:25:42 -04:00
Jasper St. Pierre
81b19a78f5 actor: Unconditionally set show_on_set_parent
Otherwise, doing something like adjusting the child's position
on a hidden actor will re-show it, which is not what we want.

https://bugzilla.gnome.org/show_bug.cgi?id=674510
2012-04-24 11:25:42 -04:00
Jasper St. Pierre
0287dc26ad actor: Not-actors don't have metas 2012-04-24 11:25:42 -04:00
Emmanuele Bassi
340775d09b cally: Fix the pkg-config file
Drop a bunch of variables that are not meant to be used by Cally; also,
drop the wrong library name from the Libs key: Clutter has a single
shared library, now.

https://bugzilla.gnome.org/show_bug.cgi?id=674105
2012-04-21 13:46:00 +01:00
Cosimo Cecchi
d61515322a x11/device-manager-xi2: Flip deltas around
Up/down is Y.
2012-04-20 18:33:16 +01:00
Piotr Drąg
7641a1ffe9 Updated POTFILES.in 2012-04-17 19:52:47 +02: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
Jasper St. Pierre
164c6ee741 text: Bubble up a click and quit early for just static text
Static text shouldn't need a cursor position or anything like that,
and it always eats a button press event.

https://bugzilla.gnome.org/show_bug.cgi?id=673190
2012-04-13 14:34:46 -04:00
Christian Kirbach
2a12747ae3 [l10n] Updated German translation 2012-04-13 19:46:47 +02:00
Emmanuele Bassi
7fffb7290e actor: Return a valid paint volume by default
It's been a year and change, and two stable releases, since we
introduced the paint volume mechanism to allow actors to paint outside
their allocation safely in environments that support clipped redraws.

The time has come to flip the switch, and return a valid paint volume,
matching the actor's allocation, by default - at least for Actor
instances from classes that do not override paint() and
get_paint_volume().

If an actor has a paint signal handler then it's the user responsability
not to paint outside the allocation - and to suffer the consequences of
doing so; in an ideal world, paint() would not be a signal in the first
place anyway. Plus, the idea that painting can happen at any time and
still have a valid surface greatly conflicts with the design goal of
making Clutter's rendering operations fully retained into a render tree.

We can still revert this commit before spinning 1.12, if need be.
2012-04-12 17:50:43 +01:00
Emmanuele Bassi
0bf5008159 interactive/snap-constaint: Modernize code 2012-04-12 17:08:33 +01:00