pad_linux.h
Go to the documentation of this file.
00001 /************************************************************************************
00002 GamePad RT-Component
00003 Copyright (c) 2010, Segway-Japan, Ltd.
00004 All rights reserved.
00005 
00006 Contact us if you use this software for sell.
00007 If you use this software not for sell, you can use this software under BSD lisence.
00008 See the files LICENSE.TXT and LICENSE-BSD.TXT for more details.                     
00009 ************************************************************************************/
00010 #ifndef __PAD_LINUX_H__
00011 #define __PAD_LINUX_H__
00012 
00013 
00014 
00015 
00016 enum {
00017     PAD_SDL_JS_HAT_UP    = 1<<0,
00018     PAD_SDL_JS_HAT_RIGHT = 1<<1,
00019     PAD_SDL_JS_HAT_DOWN  = 1<<2,
00020     PAD_SDL_JS_HAT_LEFT  = 1<<3,
00021 
00022     PAD_SDL_JS_AXIS1_X = 0,
00023     PAD_SDL_JS_AXIS1_Y = 1,
00024     PAD_SDL_JS_AXIS2_X = 2,
00025     PAD_SDL_JS_AXIS2_Y = 3,
00026     PAD_SDL_JS_AXIS_MAX = 32767,
00027     PAD_SDL_JS_AXIS_MIN = -32767
00028 };
00029 
00030 int pad_sdl_js_open(const char* device = "/dev/input/js0");
00031 void pad_sdl_js_close();
00032 
00033 bool pad_sdl_js_isok();
00034 void pad_sdl_js_setok(bool b);
00035 
00036 void pad_sdl_js_update();
00037 int pad_sdl_js_axis(int n);
00038 
00039 float pad_sdl_js_axisf(int n);
00040 
00041 
00042 int pad_sdl_js_button(int n);
00043 int pad_sdl_js_hat(int n);
00044 //push
00045 int pad_sdl_js_hat_push(int n);
00046 int pad_sdl_js_button_push(int n);
00047 
00048 
00049 
00050 
00051 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


RS003
Author(s):
autogenerated on Thu Jun 27 2013 14:58:49