1
|
package org.distorted.library;
|
2
|
|
3
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
4
|
/**
|
5
|
* This interface lets users of the Distorted library get notified when something happens to one of the effects.
|
6
|
* To receive the notifications, we first have to register with a call to {@link DistortedBitmap#addEventListener(EffectListener)}.
|
7
|
* List of all possible events that can happen is defined in {@link EffectMessage}
|
8
|
*/
|
9
|
|
10
|
public interface EffectListener
|
11
|
{
|
12
|
|
13
|
/**
|
14
|
* Gets called when event of type 'em' happens to effect 'effectID'.
|
15
|
*
|
16
|
* @param eventMessage Type of event that happened.
|
17
|
* @param effectID ID of the effect the event happened to. This ID must have been previously returned by one
|
18
|
* of the DistortedBitmap.{deform,distort,move,...} functions.
|
19
|
* @param effectType Type of the effect as defined in EffectNames, e.g. if effectType==EffectNames.MOVE.ordinal(),
|
20
|
* then the event happened to a MOVE effect.
|
21
|
* @param bitmapID the ID of the DistortedBitmap object, as returned by {@link DistortedBitmap#getID()}, this event
|
22
|
* happened to. If the object has been created using a copy constructor from another instance of
|
23
|
* DistortedBitmap, the ID here will be the one of the original object.
|
24
|
*
|
25
|
* @see EffectMessage
|
26
|
* @see EffectNames
|
27
|
*/
|
28
|
|
29
|
void effectMessage(EffectMessage eventMessage, long effectID, int effectType, long bitmapID);
|
30
|
}
|
31
|
|
32
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|