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