box-layout: Add knobs for controlling animations

ClutterLayoutManager does not have any state associated with it, and
defers all the state to its sub-classes.

The BoxLayout is thus in charge of controlling:

  • whether or not animations should be used
  • the duration of the animation
  • the easing mode of the animation

By adding three new properties:

  • ClutterBoxLayout:use-animations
  • ClutterBoxLayout:easing-duration
  • ClutterBoxLayout:easing-mode

And their relative accessors pairs we can make BoxLayout decide whether
or not, and with which parameters, call the begin_animation() method of
ClutterLayoutManager.

The test-box-layout has been modified to reflect this new functionality,
by checking the key-press event for the 'a' key symbol to toggle the use
of animations.
This commit is contained in:
Emmanuele Bassi
2009-12-13 01:07:44 +00:00
parent 3c2e91aef5
commit 2e6397c391
4 changed files with 368 additions and 52 deletions

View File

@ -1937,6 +1937,14 @@ clutter_box_layout_get_expand
clutter_box_layout_set_fill
clutter_box_layout_get_fill
<SUBSECTION>
clutter_box_layout_set_use_animations
clutter_box_layout_get_use_animations
clutter_box_layout_set_easing_duration
clutter_box_layout_get_easing_duration
clutter_box_layout_set_easing_mode
clutter_box_layout_get_easing_mode
<SUBSECTION Standard>
CLUTTER_TYPE_BOX_LAYOUT
CLUTTER_BOX_LAYOUT