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 keyboard (unsigned char key, int x, int y); 00025 void keyboardUp (unsigned char key, int x, int y); 00026 void special (int key, int x, int y); 00027 void specialUp (int key, int x, int y); 00028 00029 00030 DevicePlugIn inputPlugIn = { 00031 openDevice, 00032 closeDevice, 00033 update, 00034 name, 00035 axes, 00036 buttons, 00037 axis, 00038 buttonPressed 00039 }; 00040 00041 #endif