00001 #ifndef DEVICEJOYSTICK_H 00002 #define DEVICEJOYSTICK_H 00003 00004 #include "../../devicePlugIn.h" 00005 00006 #include <string> 00007 00008 #define MAXAXES 10 // maximum number of axes 00009 #define MAXBUTTONS 20 // maximum number of buttons 00010 00011 bool openDevice (void); // open device 00012 void closeDevice (void); // closes device 00013 00014 bool update (void); // get actual state 00015 00016 string name (void); // get joystick name 00017 int axes (void); // get number of axes 00018 int buttons (void); // get number of axes 00019 00020 long axis (int nr); // get value of axis <nr> 00021 bool buttonPressed (int nr); // get state of button <nr> 00022 00023 00024 DevicePlugIn inputPlugIn = { 00025 openDevice, 00026 closeDevice, 00027 update, 00028 name, 00029 axes, 00030 buttons, 00031 axis, 00032 buttonPressed 00033 }; 00034 00035 #endif