Skip to content
Commit e0257326 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[libkwineffects] Introduce timeline redirect modes

Summary:
The redirect modes control behavior of the timeline when its direction
is changed at the start or target position. For example, consider the
following piece of code:

    TimeLine timeLine(1000ms, TimeLine::Forward);
    timeLine.setDirection(TimeLine::Backward);

What should happen when the direction of the timeline was changed to go
backward? Should the current value of the timeline go from 1 to 0, or
should the timeline stop its "execution"?

In the relaxed mode, the timeline will go from 1 to 0.
In the strict mode, the timeline will stop its execution.

Different effects may prefer different modes for source and target
positions. For example, most C++ effect would prefer relaxed mode for
source position, and strict mode for target position. On the other side,
scripted effects(AnimationEffect) would prefer strict mode for source
position, and relaxed mode for target position(because of set).

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16447
parent aa58a8c4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment