00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DJGPP_H
00023 #define DJGPP_H
00024
00025 #include "csutil/csinput.h"
00026 #include "iutil/eventh.h"
00027 #include "cssys/system.h"
00028 #include "cssys/djgpp/doshelp.h"
00029
00030 class SysSystemDriver;
00031 struct iObjectRegistry;
00032 struct iEvent;
00033
00037 class DosHelper : public DosHelper
00038 {
00039 private:
00040 SysSystemDriver* sys;
00041
00042 public:
00043 DosHelper (SysSystemDriver* sys);
00044 virtual ~DosHelper ();
00045
00046 SCF_DECLARE_IBASE;
00047 virtual void SetMousePosition (int x, int y);
00048 virtual void EnablePrintf (bool en);
00049 };
00050
00052 class SysSystemDriver : public csSystemDriver, public iEventPlug
00053 {
00054 public:
00055 SysSystemDriver (iObjectRegistry* object_reg);
00056 virtual ~SysSystemDriver ();
00057
00058 bool HandleEvent (iEvent& ev);
00059 virtual bool Initialize ();
00060
00062 void SetMousePosition (int x, int y);
00064 void DoEnablePrintf (bool en);
00065
00066 SCF_DECLARE_IBASE_EXT (csSystemDriver);
00067
00068
00069
00070 virtual unsigned GetPotentiallyConflictingEvents ()
00071 { return CSEVTYPE_Keyboard | CSEVTYPE_Mouse; }
00072 virtual unsigned QueryEventPriority (unsigned )
00073 { return 100; }
00074
00075 struct eiEventHandler : public iEventHandler
00076 {
00077 SCF_DECLARE_EMBEDDED_IBASE (SysSystemDriver);
00078 virtual bool HandleEvent (iEvent& e) { return scfParent->HandleEvent (e); }
00079 } scfiEventHandler;
00080
00081 private:
00082 bool KeyboardOpened;
00083 bool MouseOpened;
00084 bool MouseExists;
00085 float SensivityFactor;
00086 int mouse_sensivity_x;
00087 int mouse_sensivity_y;
00088 int mouse_sensivity_threshold;
00089 iEventOutlet *EventOutlet;
00090 };
00091
00092 #endif // DJGPP_H