Commit Graph

5526 Commits

Author SHA1 Message Date
Emmanuele Bassi
7b07d4a7c5 transition: Check if we're setting the same interval
If we do, then don't bother.
2012-06-18 23:00:08 +01:00
Emmanuele Bassi
b658023324 property-transition: Lazily convert the interpolated value
If the Interval used has a different type than the property we are
animating through a PropertyTransition then we should transform the
interpolated value before applying it, to avoid warnings down the
line.
2012-06-18 22:21:14 +01:00
Emmanuele Bassi
bebe90e565 interval: Do not leak the result GValue
The compute() method will cache the result, to avoid multiple
allocations and copies; this means, though, that we need to unset the
GValue when destroying the Interval.
2012-06-18 18:04:54 +01:00
Emmanuele Bassi
cfc4e86b31 interval: Compute progress for signed char
Not just for unsigned ones, though both are pretty pointless.
2012-06-18 18:04:54 +01:00
Emmanuele Bassi
44642b6a57 interval: Validate more fundamental types
64bit integers and floating point values should be validated as well.
2012-06-18 18:04:54 +01:00
Emmanuele Bassi
54e22590b9 interval: Remove unnecessary check
Now that the interval can transform the initial and final values to the
type declared when constructing it, there is no need to check for the
value type inside set_initial_value() and set_final_value().
2012-06-18 18:04:54 +01:00
Emmanuele Bassi
a0c620b157 interval: Transform values on set, if needed
It's possible that GValues passed to a ClutterInterval setter are not
of the same type as the interval - for instance, if they come from
language bindings, or from untrusted sources; we can use the same
transformation functions we already use inside ClutterTransition to
ensure that the ClutterInterval always stores values of the same type
used to create the interval itself.
2012-06-18 17:25:47 +01:00
Alejandro Piñeiro
0d4d467dd5 a11y: Remove key event listener hash table if no longer required
https://bugzilla.gnome.org/show_bug.cgi?id=675183
2012-06-18 12:44:59 +02:00
Alejandro Piñeiro
cafcf14e0e a11y: atk_add_key_event_listener listener_id should not return 0 as a valid value
cally_util_add_key_event_listener first id returned was 0, but as
the documentation says, this is a reserved value for a wrong id

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=675183
2012-06-18 12:44:55 +02:00
Emmanuele Bassi
725f4a07f3 canvas: Propagate Cairo errors when diagnostic mode is enabled
It can be a useful debugging tool to report the eventual error state of
the cairo_t after the ::draw signal emission ended.
2012-06-14 14:57:28 +01:00
Emmanuele Bassi
60967127b4 docs: Mention the Timeline::stopped signal in the class description
Now that we have the ::stopped signal, it would be good if the
documentation mentioned it explicitly as the dual of the ::started
signal.
2012-06-13 09:09:56 +01:00
Emmanuele Bassi
e01f9f330d timeline: Emit last ::completed before ::stopped
The ::stopped signal should be emitted at the end of the Timeline, after
the last ::completed signal emission, in order to have a proper
chronological progress of signal emissions:

  started → new-frame → [ ... ] → completed → stopped

This way, ::stopped can perform a proper teardown of the state set up
during ::started, without interfering with the potential cyclical
emission of ::completed.
2012-06-13 08:42:29 +01:00
Evan Nemerson
252eafa520 introspection: assorted annotation fixes ported from Vala
https://bugzilla.gnome.org/show_bug.cgi?id=677778
2012-06-12 17:44:16 -07:00
Bastian Winkler
1bdd214811 grid-layout: Insert new rows/columns at the appropriate position 2012-06-12 23:50:44 +02:00
Bastian Winkler
7c8f761d43 grid-layout: Fix attach position for horizontal orientation
Switch the attach position. A new child should be positioned right of
it's previous sibling in ltr mode.
2012-06-12 23:50:44 +02:00
Emmanuele Bassi
c73549f9d3 Update keysyms headers 2012-06-11 13:47:29 +01:00
Emmanuele Bassi
716ee65a98 keysyms-update: Add deprecation guards to the deprecated header
We still need to add them in case the header is directly included.
2012-06-11 13:46:38 +01:00
Emmanuele Bassi
7118bab23c docs: Change GridLayout's short description
Clutter doesn't have widgets.
2012-06-11 10:02:38 +01:00
Emmanuele Bassi
231f0cbd0c docs: Document user_data argument for BindingActionFunc 2012-06-10 23:34:47 +01:00
Emmanuele Bassi
5eb07a3010 base-types: Don't free zero point and rect
Calling clutter_point_free(clutter_point_zero()) or calling
clutter_rect_free(clutter_rect_zero()) should be safe, exactly like it's
safe to call those functions with a NULL argument.
2012-06-10 17:54:22 +01:00
Emmanuele Bassi
17539bca95 base-types: Add zero point and rect
A constant ClutterPoint for (0, 0) and a constant degenerate ClutterRect
can be useful as guards for pointers, freeing the NULL value to mean
"unset".
2012-06-10 17:54:22 +01:00
Emmanuele Bassi
24495918bb docs: Further clarifications on implicit vs explicit animations
The wording is a bit terse, so it's better to clarify it.
2012-06-10 17:54:21 +01:00
Emmanuele Bassi
7043a3a1ed docs: Add notes on implicit vs. explicit animations
The implicit animations only apply to properties that are documented as
'animatable'; the explicit animations apply to any property defined
through GObject or ClutterAnimatable.
2012-06-10 17:54:21 +01:00
Emmanuele Bassi
9412b1a4c3 actor: Provide an initial easing state
For 1.x, we still have a duration of 0 msecs, but we have a valid easing
state, so we can change the easing parameters without calling save and
restore.
2012-06-10 17:54:21 +01:00
Evan Nemerson
0a5967ef50 binding-pool: add user_data parameter to ClutterBindingActionFunc
https://bugzilla.gnome.org/show_bug.cgi?id=677659
2012-06-09 13:25:17 -07:00
Emmanuele Bassi
b21cb29479 property-transition: Verify the interval on compute_value()
By checking if the interval is valid inside compute_value() we can catch
the cases where the interval values of a PropertyTransition are set
after the transition has been added to an Animatable instance - i.e. the
following code:

  let transition = new Clutter.PropertyTransition();
  transition.set_property_name('opacity');
  actor.add_transition('opacityAnim', transition);
  transition.set_to_value(0);

should be equivalent to:

  let transition = new Clutter.PropertyTransition();
  transition.set_property_name('opacity');
  transition.set_to_value(0);
  actor.add_transition('opacityAnim', transition);

instead of emitting a warning.
2012-06-08 17:33:30 +01:00
Emmanuele Bassi
762053cd28 interval: Add is_valid() method
The is_valid() method checks if the Interval has an initial and final
values and it's not still uninitialized.
2012-06-08 17:32:51 +01:00
Emmanuele Bassi
dfab055443 interval: Add initial and final properties
This allows creating a ClutterInterval from language bindings without
using the setter functions.
2012-06-08 15:03:22 +01:00
Emmanuele Bassi
7660f5d0c6 transition: Use current values if no interval is defined
Once a ClutterPropertyTransition is attached to a ClutterAnimatable, if
no interval is set we can simply use the current state of the property
to define the from and to values. This allows the creation of property
transitions from the current state of the Animatable instance without
excessive verbosity.
2012-06-08 14:33:01 +01:00
Emmanuele Bassi
189a93677f text: Chain up in the ScriptableIface implementation
We need ClutterActor's implementation to run as well.
2012-06-08 14:33:01 +01:00
Emmanuele Bassi
c6e1d02fed canvas: Use the actor's content repeat policy
Similarly to what ClutterImage does.
2012-06-08 14:33:00 +01:00
Emmanuele Bassi
92fc2c760c image: Use the actor's content repeat policy
When painting we can now use the ClutterActor content-repeat property to
decide whether or not to repeat the texture data.
2012-06-08 14:33:00 +01:00
Emmanuele Bassi
e7aa21203c actor: Add content-repeat
ClutterContent implementations may allow repeating their contents when
painting; we should provide the repeat policy on the actor, like we do
for scaling filters and content gravity.
2012-06-08 14:33:00 +01:00
Emmanuele Bassi
ec296646f6 table: Deprecate the align, expand, and fill layout properties
ClutterActor exposes their equivalent, and ClutterTableLayout honours
them since commit 8e24de86b6.
2012-06-08 12:05:50 +01:00
Emmanuele Bassi
75c3339c66 text: Use actor alignments when painting the layout
ClutterActor's x-align and y-align properties should be used to control
the alignment of the PangoLayout when painting it within a larger
allocation, and the ClutterText has the x-expand or the y-expand flags
set.
2012-06-08 12:05:50 +01:00
Alexander Larsson
c0b3e2e83a Don't allocate size to invisible BinLayout children
This is similar to what other layouts do, and avoids problems with
Gtk+ actor children which warn about being allocated not enough
space.
2012-06-08 11:34:40 +02:00
Alexander Larsson
76f1a42ef8 BinLayout: Always use fixed_x/y for FIXED if set
We want to use the actually set value for x/y, not the current allocation,
as that might be a transition from an earlier allocation animation.
2012-06-07 16:44:08 +02:00
Alexander Larsson
fd8dcfcc56 Ensure that fixed positions always start at 0,0
Fixed positions are defined to be initialized at 0,0 whenever
enabled, by setting fixed_position_enabled to true, or by setting
just one of x/y. This normally happens in the defaults, but we need
to make sure it also happens if a fixed position was once set but
then disabled. We do this by always resetting it back to 0,0 when
fixed_position_set is unset.
2012-06-07 16:32:01 +02:00
Alexander Larsson
962bcb1222 Add _clutter_actor_peek_layout_info
This will be needed later to get a layout_info without creating one
if there is none already.
2012-06-07 16:31:22 +02:00
Emmanuele Bassi
9371029a89 actor: Improve debug message for create_transition()
Add the property and easing state information.
2012-06-07 12:06:56 +01:00
Emmanuele Bassi
42b933eeaf debug: Group debug messages by timestamps
Instead of showing the full timestamp for debugging messages that happen
within a second, showing the delta from the previous full timestamp can
be more useful when debugging; this allows immediately seeing the time
difference, instead of doing the math in our heads.
2012-06-07 11:57:53 +01:00
Emmanuele Bassi
a3a2fbfd5a actor: Improve the debug name
Only for debug builds, the debug name should include a) actor name, b)
type name, and c) pointer address.

For non-debug builds we can live with the actor/type name.
2012-06-07 11:57:53 +01:00
Emmanuele Bassi
008afe80e3 docs: Fix wrong rotation-* properties name
Copy and paste typos from the old documentation.
2012-06-06 11:19:33 +01:00
Danielle Madeley
38724e2639 evdev: Use new xkbcommon include path
Inspired by a similar patch in Wayland.
2012-06-06 11:04:57 +10:00
Emmanuele Bassi
7ed77e98fe symbols: Add missing functions 2012-06-05 19:40:14 +01:00
Emmanuele Bassi
0247d07016 docs: Add ClutterTimelineClass.stopped annotation 2012-06-05 19:27:28 +01:00
Tomeu Vizoso
0ec01a2e42 events: Deliver touch events to actors
https://bugzilla.gnome.org/show_bug.cgi?id=677390
2012-06-05 15:59:52 +02: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
Alexander Larsson
8ef55e4e98 Don't allocate size for invisible BinLayout children 2012-06-05 10:55:17 +02:00
Bastian Winkler
c7c3d85225 box-layout: Deprecate expand/fill/align child properties
These are covered by ClutterActor:[xy]-align and
ClutterActor:[xy]-expand

https://bugzilla.gnome.org/show_bug.cgi?id=677283
2012-06-04 16:16:41 +02:00