Commit Graph

7800 Commits

Author SHA1 Message Date
Emmanuele Bassi
fec0578bfe animatable: Disable deprecation warnings
We are using deprecated API internally.
2012-04-27 14:21:56 +01:00
Piotr Drąg
24885b13a6 Updated POTFILES.in 2012-04-27 14:58:55 +02:00
Emmanuele Bassi
0077c51278 Disable deprecation warnings in deprecated classes
We know we're using deprecated symbols.
2012-04-27 12:38:35 +01:00
Emmanuele Bassi
05df0c9c14 docs: Mention that patches must pass the conformance tests
People submitting patches should do a conformance test suite run, until
we have a buildbot and a way of running the conformance tests on a
headless setup.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
155e0eee89 docs: Add missing symbols to the sections file 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
70091245e8 docs: Specify scroll_to_point() coordinate space 2012-04-27 12:30:50 +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
a5630d962f docs: Clean up index
Move CairoTexture to the deprecated section.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
23f3edce61 docs: Add ScrollActor to the API reference 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
4d34a2229d interactive/table-layout: Enable animations 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
d28bce4a25 layout-manager: Deprecate the layout animation
This semi-aborted API was broken for various reasons:

  - it strongly depended on ClutterAlpha, a class we're trying to
    deprecate;
  - it requires a lot of boilerplate and copy-and-paste code;
  - it requires a full relayout of the actor tree for something
    that ought to be automatically handled by ClutterActor.

Now that clutter_actor_allocate() handles transitions using the easing
state of the actor, we can deprecate the LayoutManager API for the 1.x
series, and remove it for the 2.x series.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
30b78a7212 table-layout: Deprecate the animation API
Similar to what we did for ClutterBoxLayout.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
d1998712e1 box-layout: Deprecate the animation API
BoxLayout will use the easing state of the children it's allocating; the
current API is re-implemented in terms of an implicit easing state
forced on each child prior to allocating it.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
8ef2c46baa actor: Make :allocation animatable
Calling clutter_actor_allocate() should transition between the current
allocation and the new allocation, by using the defined implementation
of the easing state.

This means that:

  clutter_actor_save_easing_state (actor);
  clutter_actor_allocate (actor, &new_alloc, flags);
  clutter_actor_restore_easing_state (actor);

will cause "actor" to transition between the current allocation and the
desired new allocation.

The trick is to ensure that this happens without invalidating the
entire actor tree, but only the portion of the tree that has the
transitioned actor as the local root. For this reason, we just call the
allocate() implementation from within the transition frame advancement,
without invalidating flags: the actor, after all, *has* a valid
allocation for the duration of the transition.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
8cb9725699 actor: Ignore allocation flags
Allocation flags are informative, and are only meant to be used to
communicate additional information about the allocation process to
an actor.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
78aae84d43 actor: Coalesce needs_[xy]_expand() into one method
Use the orientation enumeration instead of a per-axis method.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
807d77c0f3 box-layout: Add the :orientation property
And deprecate the :vertical property.

An enumeration is clearer, and we can use it elsewhere in the API.
2012-04-27 12:30:49 +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
26d366a3a5 docs: XInclude the bin layout example 2012-04-27 12:30:49 +01:00
Emmanuele Bassi
4067dcdfe1 interactive/bin-layout: Improve the example code
Use modern API; clean up the code, and document it so that it's possible
to XInclude it into the API reference.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
6ddc694e68 bin-layout: Use the actor align/expand flags
If an actor is set to expand, we use the actor's horizontal and vertical
alignment values instead of the BinLayout's.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
473aaf7766 actor: Add private get_effective_x_align() method
A method to retrieve the effective horizontal alignment of the actor,
taking into consideration the text direction.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
90032e0019 actor: Add basic automatic expand flags
The :x-expand and :y-expand flags on ClutterActor are used to signal
that an actor should expand horizontally and/or vertically - i.e. that
its parent's layout management policy should try to assign extra space
to the actor when allocating it.

The expand flags are automatic: when set on a leaf node in the actor
tree, they will bubble up through the parent and grandparents up to the
top level actor; during allocation, the actors with children will lazily
compute whether their children needs to expand.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
217c4e7ba0 actor: Remove automatic transition init from add_transition()
Adding an explicit transition overrides any consideration of the easing
state of an actor.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
0b76ba332d Fixes for the API reference
Typos, missing symbols, and missing documentation.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
076179f20b docs: Clean up the animation section 2012-04-27 12:30:48 +01:00
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