1 package org.newdawn.slick; 2 3 /** 4 * Description of classes capable of responding to controller events 5 * 6 * @author kevin 7 */ 8 public interface ControllerListener extends ControlledInputReceiver { 9 10 /** 11 * Notification that the left control has been pressed on 12 * the controller. 13 * 14 * @param controller The index of the controller on which the control 15 * was pressed. 16 */ 17 public abstract void controllerLeftPressed(int controller); 18 19 /** 20 * Notification that the left control has been released on 21 * the controller. 22 * 23 * @param controller The index of the controller on which the control 24 * was released. 25 */ 26 public abstract void controllerLeftReleased(int controller); 27 28 /** 29 * Notification that the right control has been pressed on 30 * the controller. 31 * 32 * @param controller The index of the controller on which the control 33 * was pressed. 34 */ 35 public abstract void controllerRightPressed(int controller); 36 37 /** 38 * Notification that the right control has been released on 39 * the controller. 40 * 41 * @param controller The index of the controller on which the control 42 * was released. 43 */ 44 public abstract void controllerRightReleased(int controller); 45 46 /** 47 * Notification that the up control has been pressed on 48 * the controller. 49 * 50 * @param controller The index of the controller on which the control 51 * was pressed. 52 */ 53 public abstract void controllerUpPressed(int controller); 54 55 /** 56 * Notification that the up control has been released on 57 * the controller. 58 * 59 * @param controller The index of the controller on which the control 60 * was released. 61 */ 62 public abstract void controllerUpReleased(int controller); 63 64 /** 65 * Notification that the down control has been pressed on 66 * the controller. 67 * 68 * @param controller The index of the controller on which the control 69 * was pressed. 70 */ 71 public abstract void controllerDownPressed(int controller); 72 73 /** 74 * Notification that the down control has been released on 75 * the controller. 76 * 77 * @param controller The index of the controller on which the control 78 * was released. 79 */ 80 public abstract void controllerDownReleased(int controller); 81 82 /** 83 * Notification that a button control has been pressed on 84 * the controller. 85 * 86 * @param controller The index of the controller on which the control 87 * was pressed. 88 * @param button The index of the button pressed (starting at 1) 89 */ 90 public abstract void controllerButtonPressed(int controller, int button); 91 92 /** 93 * Notification that a button control has been released on 94 * the controller. 95 * 96 * @param controller The index of the controller on which the control 97 * was released. 98 * @param button The index of the button released (starting at 1) 99 */ 100 public abstract void controllerButtonReleased(int controller, int button); 101 102 }