]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/input.hxx
new FSF address
[flightgear.git] / src / Input / input.hxx
index e61d9c95d646d27d16e0e995608885aabaecbc40..a23540e29d358a396c6336286580a86b5e06174e 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -33,6 +33,7 @@
 
 #include <simgear/compiler.h>
 
+#include <simgear/misc/sg_path.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/structure/commands.hxx>
 #include <simgear/props/condition.hxx>
@@ -52,9 +53,11 @@ SG_USING_STD(vector);
 \f
 
 #if defined( UL_WIN32 )
-#define TGT_PLATFORM   "Windows"
+#define TGT_PLATFORM   "windows"
+#elif defined ( UL_MAC_OSX )
+#define TGT_PLATFORM    "mac"
 #else
-#define TGT_PLATFORM   "UNIX"
+#define TGT_PLATFORM   "unix"
 #endif
 
 
@@ -92,7 +95,7 @@ public:
   /**
    * Destructor.
    */
-  virtual ~FGBinding () {}
+  virtual ~FGBinding ();
 
 
   /**
@@ -192,6 +195,8 @@ public:
   // Implementation of SGSubsystem.
   //
   virtual void init ();
+  virtual void reinit ();
+  virtual void postinit ();
   virtual void update (double dt);
   virtual void suspend ();
   virtual void resume ();
@@ -337,6 +342,9 @@ private:
     SGPropertyNode * mouse_button_nodes[MAX_MOUSE_BUTTONS];
     int nModes;
     int current_mode;
+    double timeout;
+    int save_x;
+    int save_y;
     mouse_mode * modes;
   };
 
@@ -353,6 +361,13 @@ private:
   void _init_joystick ();
 
 
+  /**
+   * Scan directory recursively for "named joystick" configuration files,
+   * and read them into /input/joysticks/js-named[index]++.
+   */
+  void _scan_joystick_dir (SGPath *path, SGPropertyNode* node, int *index);
+
+
   /**
    * Initialize mouse bindings.
    */
@@ -366,6 +381,11 @@ private:
                            button &b,
                            const string name);
 
+  /**
+   * Initialize nasal parts that had to wait for the nasal to get
+   * functional.
+   */
+  void _postinit_joystick ();
 
   /**
    * Update the keyboard.
@@ -382,7 +402,7 @@ private:
   /**
    * Update the mouse.
    */
-  void _update_mouse ();
+  void _update_mouse (double dt);
 
 
   /**
@@ -409,6 +429,10 @@ private:
   joystick _joystick_bindings[MAX_JOYSTICKS];
   mouse _mouse_bindings[MAX_MICE];
 
+  /**
+   * Nasal module name/namespace.
+   */
+  char _module[32];
 };
 
 #endif // _INPUT_HXX