X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2FFGEventInput.hxx;h=973821bd0584452c7bb10a8ecfc3ed3edc150aa5;hb=11d15b451347674fba77648700d23c5aaec3c6c2;hp=72ded7847a47e216f7f185e5bc845c43757d60e8;hpb=b772e5872a042badd6022405bc6de0355810082c;p=flightgear.git diff --git a/src/Input/FGEventInput.hxx b/src/Input/FGEventInput.hxx index 72ded7847..973821bd0 100644 --- a/src/Input/FGEventInput.hxx +++ b/src/Input/FGEventInput.hxx @@ -191,13 +191,15 @@ public: handledEvents[handledEvent->GetName()] = handledEvent; } + virtual void Configure( SGPropertyNode_ptr deviceNode ); + virtual void update( double dt ); bool GetDebugEvents () const { return debugEvents; } - void SetDebugEvents( bool value ) { debugEvents = value; } bool GetGrab() const { return grab; } - void SetGrab( bool value ) { grab = value; } + + const string & GetNasalModule() const { return nasalModule; } private: // A map of events, this device handles @@ -213,6 +215,9 @@ private: // grab the device exclusively, if O/S supports this // so events are not sent to other applications bool grab; + + SGPropertyNode_ptr deviceNode; + string nasalModule; }; typedef SGSharedPtr FGInputDevice_ptr; @@ -229,12 +234,18 @@ public: virtual void postinit(); virtual void update( double dt ); + const static unsigned MAX_DEVICES = 1000; + const static unsigned INVALID_DEVICE_INDEX = MAX_DEVICES + 1; protected: static const char * PROPERTY_ROOT; - void AddDevice( FGInputDevice * inputDevice ); + unsigned AddDevice( FGInputDevice * inputDevice ); + void RemoveDevice( unsigned index ); + map input_devices; FGDeviceConfigurationMap configMap; + + SGPropertyNode_ptr nasalClose; }; #endif