Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

InputObject.h

Go to the documentation of this file.
00001 
00010 #ifndef __INPUTOBJECT_H__
00011 #define __INPUTOBJECT_H__
00012 
00013 #include <vector>
00014 using namespace std;
00015 
00016 #include "Network/vpf.h"
00017 
00022 enum InputSource {
00023     IS_MIDI = 0,                    
00024     IS_JOYSTICK = 1                 
00025 };
00026 
00031 struct InputEvent {
00032     InputSource source_type;        
00033     short       source_id;          
00034     short       source_channel;     
00035     float       value;              
00036 };
00037 
00042 typedef vector<InputEvent> EventVector;
00043 
00044 
00046 
00049 class InputObject
00050 {
00051 public:
00052     unsigned int    id;     
00054 public:
00056     virtual void start() = 0;
00057 
00059     virtual void stop()  = 0;
00060 
00062 
00066     virtual unsigned int poll(EventVector *events) = 0;
00067 };
00068 
00069 #endif /* __INPUTOBJECT_H__ */

Generated on Tue Oct 16 14:06:18 2001 for PuppetMaster by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001