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/event.h"
00027 #include "iutil/eventh.h"
00028 #include "cssys/system.h"
00029 #include "cssys/djgpp/doshelp.h"
00030
00031 class SysSystemDriver;
00032 struct iObjectRegistry;
00033 struct iEvent;
00034
00038 class DosHelper : public iDosHelper
00039 {
00040 private:
00041 SysSystemDriver* sys;
00042
00043 public:
00044 DosHelper (SysSystemDriver* sys);
00045 virtual ~DosHelper ();
00046
00047 SCF_DECLARE_IBASE;
00048 virtual void SetMousePosition (int x, int y);
00049 virtual void DoEnablePrintf (bool en);
00050 };
00051
00053 class SysSystemDriver : public csSystemDriver, public iEventPlug
00054 {
00055 public:
00056 SysSystemDriver (iObjectRegistry* object_reg);
00057 virtual ~SysSystemDriver ();
00058
00059 bool HandleEvent (iEvent& ev);
00060 virtual bool Initialize ();
00061
00063 void SetMousePosition (int x, int y);
00065 void DoEnablePrintf (bool en);
00066
00067 SCF_DECLARE_IBASE_EXT (csSystemDriver);
00068
00069
00070
00071 virtual unsigned GetPotentiallyConflictingEvents ()
00072 { return CSEVTYPE_Keyboard | CSEVTYPE_Mouse; }
00073 virtual unsigned QueryEventPriority (unsigned )
00074 { return 100; }
00075
00076 struct eiEventHandler : public iEventHandler
00077 {
00078 SCF_DECLARE_EMBEDDED_IBASE (SysSystemDriver);
00079 virtual bool HandleEvent (iEvent& e) { return scfParent->HandleEvent (e); }
00080 } scfiEventHandler;
00081
00082 private:
00083 bool KeyboardOpened;
00084 bool MouseOpened;
00085 bool MouseExists;
00086 float SensivityFactor;
00087 int mouse_sensivity_x;
00088 int mouse_sensivity_y;
00089 int mouse_sensivity_threshold;
00090 iEventOutlet *EventOutlet;
00091 };
00092
00093 #endif // DJGPP_H