1 |
d333eb6b
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2 |
|
|
// Copyright 2016 Leszek Koltunski //
|
3 |
|
|
// //
|
4 |
|
|
// This file is part of Distorted. //
|
5 |
|
|
// //
|
6 |
|
|
// Distorted is free software: you can redistribute it and/or modify //
|
7 |
|
|
// it under the terms of the GNU General Public License as published by //
|
8 |
|
|
// the Free Software Foundation, either version 2 of the License, or //
|
9 |
|
|
// (at your option) any later version. //
|
10 |
|
|
// //
|
11 |
|
|
// Distorted is distributed in the hope that it will be useful, //
|
12 |
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
13 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
14 |
|
|
// GNU General Public License for more details. //
|
15 |
|
|
// //
|
16 |
|
|
// You should have received a copy of the GNU General Public License //
|
17 |
|
|
// along with Distorted. If not, see <http://www.gnu.org/licenses/>. //
|
18 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19 |
|
|
|
20 |
6a06a912
|
Leszek Koltunski
|
package org.distorted.library;
|
21 |
|
|
|
22 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23 |
|
|
/**
|
24 |
|
|
* Defines all possible events a class implementing the {@link EffectListener} interface can receive.
|
25 |
|
|
*/
|
26 |
|
|
|
27 |
|
|
public enum EffectMessage
|
28 |
|
|
{
|
29 |
|
|
/**
|
30 |
|
|
* The effect has been removed. This can happen if:
|
31 |
|
|
* <ul>
|
32 |
|
|
* <li> someone explicitly removed the effect with a call to {@link DistortedBitmap#abortEffect(long)} (or one of the other 'abort' methods)
|
33 |
c6e1c219
|
Leszek Koltunski
|
* <li> the interpolation of the effect has finished and the end result is equal to the effect's unity.
|
34 |
6a06a912
|
Leszek Koltunski
|
* </ul>
|
35 |
|
|
*/
|
36 |
|
|
EFFECT_REMOVED,
|
37 |
|
|
|
38 |
|
|
/**
|
39 |
|
|
* Interpolation of the effect has finished.
|
40 |
|
|
* <p>
|
41 |
|
|
* If you set up an interpolated effect and set its Interpolator to do 3.5 interpolations of 1000 ms each
|
42 |
d7bbef2f
|
Leszek Koltunski
|
* with calls to {@link Interpolator#setCount(float)} and {@link Interpolator#setDuration(long)},
|
43 |
6a06a912
|
Leszek Koltunski
|
* then you are going to get this message exactly once after 3.5*1000 = 3500 milliseconds when the interpolation
|
44 |
|
|
* finishes. You will never get this message if you set the effect to go on indefinitely with a call to
|
45 |
d7bbef2f
|
Leszek Koltunski
|
* {@link Interpolator#setCount(float)}.
|
46 |
6a06a912
|
Leszek Koltunski
|
* <p>
|
47 |
c6e1c219
|
Leszek Koltunski
|
* If then the end effect is equal to the effect's unity, then immediately after this message you
|
48 |
6a06a912
|
Leszek Koltunski
|
* will also get a EFFECT_REMOVED message.
|
49 |
|
|
*/
|
50 |
57dc1301
|
Leszek Koltunski
|
EFFECT_FINISHED,
|
51 |
|
|
|
52 |
|
|
/**
|
53 |
|
|
* The effect has failed to properly execute.
|
54 |
|
|
* <p>
|
55 |
|
|
* Currently only OTHER effects (saving to PNG file and to a MP4 movie) can fail.
|
56 |
|
|
*/
|
57 |
c6e1c219
|
Leszek Koltunski
|
EFFECT_FAILED
|
58 |
6a06a912
|
Leszek Koltunski
|
}
|
59 |
|
|
|
60 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|