Commit Graph

7335 Commits

Author SHA1 Message Date
Emmanuele Bassi
cb8dea0379 interactive/transitions: An easing demo without animate()
Use the newly added implicit animations support in ClutterActor.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
043cf6b284 docs: Update the API reference 2012-03-15 17:01:13 +00:00
Emmanuele Bassi
dda4db378c symbols: Update 2012-03-15 17:01:13 +00:00
Emmanuele Bassi
67113ed690 actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:

  for creating fast, compelling, portable, and dynamic graphical
  user interfaces

and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.

This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.

So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:

  clutter_actor_set_position (actor, newX, newY);

should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.

Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:

  clutter_actor_save_easing_state (actor);

    clutter_actor_set_easing_duration (actor, 500);
    clutter_actor_set_position (actor, newX, newY);
    clutter_actor_set_opacity (actor, newOpacity);

  clutter_actor_restore_easing_state (actor);

And we can even start stacking animations, e.g.:

  clutter_actor_save_easing_state (actor);

    clutter_actor_set_easing_duration (actor, 500);
    clutter_actor_set_position (actor, newX, newY);

    clutter_actor_save_easing_state (actor);

      clutter_actor_set_easing_duration (actor, 500);
      clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
      clutter_actor_set_opacity (actor, newOpacity);
      clutter_actor_set_depth (actor, newDepth);

    clutter_actor_restore_easing_state (actor);

  clutter_actor_restore_easing_state (actor);

And so on, and so forth.

The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 17:01:12 +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
Emmanuele Bassi
e546d28771 types: Declare new Transition classes 2012-03-15 17:01:12 +00:00
Emmanuele Bassi
beb91d7676 interval: Add variadic arguments for initial/final setters
As a convenience for the C API.

Language bindings should already be using the GValue variants.

This commit also moves the custom progress functions out of the
clutter-interval.c, as they are meant to be generic interpolation
functions and not ClutterInterval-specific.
2012-03-15 17:01:12 +00:00
Emmanuele Bassi
06314e9ed8 docs: Update reference symbols 2012-03-15 17:00:38 +00:00
Chun-wei Fan
8e48afd066 Fix "install" paths in VS 2010 property sheets 2012-03-15 16:55:55 +08:00
Emmanuele Bassi
708d385866 actor: Annotate signals to enable some optimization
The ::paint, ::queue-redraw, and ::queue-relayout signals should be
marked as no-recurse and no-hooks; these signals are emitted *a lot*
during each frame, and since GLib has a bunch of optimizations for
signals with no closures, we should try and squeeze every single CPU
cycle we can.
2012-03-14 11:35:33 +00:00
Stefano Facchini
5d26aeca34 Install clutter-version.h 2012-03-13 18:22:19 +01:00
Chun-wei Fan
c4de95f275 Dist clutter-version.h
Dist clutter-version.h for use under non-autotools-based build
environments (e.g. MSVC) as this header is now generic under the
systems Clutter supports

Checked with Emmanuele Bassi on IRC.
2012-03-13 23:20:00 +08:00
Chun-wei Fan
53e16b6019 clutter-master-clock.c: Set frame_budget conditionally
The frame_budget member of ClutterMasterClock is only enabled when
CLUTTER_ENABLE_DEBUG is enabled, so fix the build with this.

Checked with Emmanuele Bassi on IRC.
2012-03-13 23:19:52 +08:00
Kenneth Nielsen
eaecd1efef Updated Danish translation 2012-03-13 09:08:31 +01:00
Antonio Fernandes C. Neto
80b4e75132 Updated Brazilian Portuguese translation 2012-03-09 10:29:33 -03:00
Emmanuele Bassi
945caff989 Bump up the GDK dependency
Commit ac6ce79aa3 introduced a dependency
on the latest GDK symbols, so we need to bump up the required version of
GDK.
2012-03-12 14:28:22 +00:00
Stefano Facchini
ac6ce79aa3 gdk: add new device types (GDK_SOURCE_TOUCHSCREEN, GDK_SOURCE_TOUCHPAD)
https://bugzilla.gnome.org/show_bug.cgi?id=671779
2012-03-12 13:19:34 +01:00
ManojKumar Giri
440c47e941 Updated Odia Translation 2012-03-12 17:44:54 +05:30
Timo Jyrinki
a3be0e0919 Add partial Finnish translation 2012-03-12 11:29:54 +02:00
Yuri Myasoedov
66d1e311d6 Updated Russian translation 2012-03-11 23:36:53 +04:00
Мирослав Николић
9707822eba Updated Serbian translation 2012-03-10 23:07:27 +01:00
Khoem Sokhem
1ee842116a Add initial Khmer translation 2012-03-10 13:53:53 +01:00
Gil Forcada
8216d961e7 Updated Catalan translation 2012-03-10 13:44:09 +01:00
Ihar Hrachyshka
639a82ed01 Updated Belarusian translation. 2012-03-09 21:55:55 +03:00
Piotr Drąg
ffc8fd2455 Updated Polish translation 2012-03-09 19:09:40 +01:00
Florian Müllner
52b1d7186c Add skeleton translations for RTL locales
RTL locales need to translate the "default:LTR" string to have
clutter_actor_get_text_direction() return the expected result;
as GNOME Shell now makes use of that API, users of RTL locales
would be up for an unpleasant surprise, so add all locales that
translate "default:LTR" to "default:RTL" in GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=671736
2012-03-09 18:53:21 +01:00
Florian Müllner
52f142c14c Update Hebrew translations
RTL locales need to translate the "default:LTR" string to have
clutter_actor_get_text_direction() return the expected result;
as GNOME Shell now makes use of that API, users of RTL locales
would be up for an unpleasant surprise, so add the required
translation.

https://bugzilla.gnome.org/show_bug.cgi?id=671736
2012-03-09 18:53:21 +01:00
Emmanuele Bassi
d303fdc22d po: Update bug tracker in Makevars 2012-03-09 17:33:08 +00:00
Tristan Van Berkom
2b22b60e6e Fixed leaking GValue content in clutter_animation_setup_valist().
Normally this leak goes unnoticed because basic fundamental types
are typically used with clutter_actor_animate(), the leak shows up
if boxed or object types are passed (such as ClutterVertex in the
case I stumbled upon).
2012-03-10 02:11:19 +09:00
Emmanuele Bassi
620e57ac13 text: Use CoglFramebuffer API for the path-based clip 2012-03-09 16:26:53 +00:00
Bruce Cowan
4b0badba4a Updated British English translation 2012-03-09 16:24:35 +00:00
Fran Diéguez
610ed1e1c5 Updated Galician translations 2012-03-08 23:25:57 +01:00
Alexander Shopov
4ff1cc08f8 Updated Bulgarian translation 2012-03-08 22:45:17 +02:00
Matej Urbančič
7b33f2fa1f Updated Slovenian translation 2012-03-08 15:42:14 +01:00
Chun-wei Fan
e1c99ed3c4 Fixup VS 2010 property sheets
There are some properties which were not correctly set.  My bad for not
fixing these sooner.
2012-03-08 17:44:32 +08:00
Daniel Mustieles
e2e49253b6 Updated Spanish translation 2012-03-08 10:29:08 +01:00
Chun-wei Fan
d279a13938 Update VS property sheets
"Install" the new headers that were introduced lately.
2012-03-08 17:07:34 +08:00
Nilamdyuti Goswami
9a551689c2 Assamese translation completed 2012-03-08 14:13:30 +05:30
Chao-Hsiung Liao
86e8f35d66 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-03-08 15:53:04 +08:00
Piotr Drąg
734a26fe97 Updated POTFILES.in 2012-03-08 00:04:55 +01:00
Ihar Hrachyshka
009b0297f1 Updated Belarusian translation. 2012-03-07 23:40:08 +03:00
Joseph Scheuhammer
32f57595fe Add brightness/contrast effect
The ClutterBrightnessContrastEffect effect class allows changing the
brightness and contrast levels of an actor.

Modified-by: Emmanuele Bassi <ebassi@linux.intel.com>
Modified-by: Neil Roberts <neil@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=656156
2012-03-07 14:02:55 +00:00
Emmanuele Bassi
41f06138b4 cally/text: Constify string members 2012-03-07 12:59:25 +00:00
Emmanuele Bassi
90e5088a51 build: Increase the anal-retentiveness of the maintainer flags
The new rules have already caught a couple of issues.
2012-03-07 12:36:43 +00:00
Emmanuele Bassi
de90be9586 build: Remove maintainer flags from test build
Part of the test infrastructure relies on relaxed build conditions, so
there's no point to enforce the anal retentive maintainer flags.
2012-03-07 12:36:43 +00:00
Emmanuele Bassi
2567049ce3 Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
Emmanuele Bassi
266ea8a3d9 cally: Fix redundant declarations 2012-03-07 12:36:43 +00:00
Emmanuele Bassi
4da1c3efb8 snap-constraint: Fix typo that broke the get_edges() method
We were declaring a get_edges() method, but the definition was called
get_edge().
2012-03-07 12:36:43 +00:00
Emmanuele Bassi
3a86d88b43 x11/device-manager-core: Avoid a signed/unsigned comparison 2012-03-07 12:36:43 +00:00