Home | History | Annotate | Download | only in tweenengine
      1 package aurelienribon.tweenengine;
      2 
      3 /**
      4  * TweenCallbacks are used to trigger actions at some specific times. They are
      5  * used in both Tweens and Timelines. The moment when the callback is
      6  * triggered depends on its registered triggers:
      7  * <p/>
      8  *
      9  * <b>BEGIN</b>: right after the delay (if any)<br/>
     10  * <b>START</b>: at each iteration beginning<br/>
     11  * <b>END</b>: at each iteration ending, before the repeat delay<br/>
     12  * <b>COMPLETE</b>: at last END event<br/>
     13  * <b>BACK_BEGIN</b>: at the beginning of the first backward iteration<br/>
     14  * <b>BACK_START</b>: at each backward iteration beginning, after the repeat delay<br/>
     15  * <b>BACK_END</b>: at each backward iteration ending<br/>
     16  * <b>BACK_COMPLETE</b>: at last BACK_END event
     17  * <p/>
     18  *
     19  * <pre> {@code
     20  * forward :      BEGIN                                   COMPLETE
     21  * forward :      START    END      START    END      START    END
     22  * |--------------[XXXXXXXXXX]------[XXXXXXXXXX]------[XXXXXXXXXX]
     23  * backward:      bEND  bSTART      bEND  bSTART      bEND  bSTART
     24  * backward:      bCOMPLETE                                 bBEGIN
     25  * }</pre>
     26  *
     27  * @see Tween
     28  * @see Timeline
     29  * @author Aurelien Ribon | http://www.aurelienribon.com/
     30  */
     31 public interface TweenCallback {
     32 	public static final int BEGIN = 0x01;
     33 	public static final int START = 0x02;
     34 	public static final int END = 0x04;
     35 	public static final int COMPLETE = 0x08;
     36 	public static final int BACK_BEGIN = 0x10;
     37 	public static final int BACK_START = 0x20;
     38 	public static final int BACK_END = 0x40;
     39 	public static final int BACK_COMPLETE = 0x80;
     40 	public static final int ANY_FORWARD = 0x0F;
     41 	public static final int ANY_BACKWARD = 0xF0;
     42 	public static final int ANY = 0xFF;
     43 
     44 	public void onEvent(int type, BaseTween<?> source);
     45 }
     46