Home | History | Annotate | Download | only in android
      1 /*******************************************************************************
      2  * Copyright 2011 See AUTHORS file.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *   http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  ******************************************************************************/
     16 
     17 package com.badlogic.gdx.controllers.android;
     18 
     19 import com.badlogic.gdx.controllers.PovDirection;
     20 
     21 class AndroidControllerEvent {
     22 	public static final int BUTTON_DOWN = 0;
     23 	public static final int BUTTON_UP = 1;
     24 	public static final int AXIS = 2;
     25 	public static final int POV = 3;
     26 	public static final int CONNECTED = 4;
     27 	public static final int DISCONNECTED = 5;
     28 
     29 	/** the controller the event belongs to **/
     30 	public AndroidController controller;
     31 	/** the event type, see constants above **/
     32 	public int type;
     33 	/** the code for the even source, e.g. button keycode, axis index **/
     34 	public int code;
     35 	/** the axis value if this is an #AXIS event **/
     36 	public float axisValue;
     37 	/** the POV direction if this is a #POV event **/
     38 	public PovDirection povDirection;
     39 }