00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __CS_UTIL_EVOUTLET_H__
00021 #define __CS_UTIL_EVOUTLET_H__
00022
00023 #include "iutil/event.h"
00024 struct iJoystickDriver;
00025 struct iKeyboardDriver;
00026 struct iMouseDriver;
00027 struct iObjectRegistry;
00028 class csEventQueue;
00029
00033 class csEventOutlet : public iEventOutlet
00034 {
00035 private:
00037 unsigned EnableMask;
00039 iEventPlug *Plug;
00041 csEventQueue *Queue;
00043 iObjectRegistry* Registry;
00045 csRef<iKeyboardDriver> KeyboardDriver;
00047 csRef<iMouseDriver> MouseDriver;
00049 csRef<iJoystickDriver> JoystickDriver;
00050
00051 iKeyboardDriver* GetKeyboardDriver();
00052 iMouseDriver* GetMouseDriver();
00053 iJoystickDriver* GetJoystickDriver();
00054
00055 public:
00056 SCF_DECLARE_IBASE;
00057
00059 csEventOutlet (iEventPlug*, csEventQueue*, iObjectRegistry*);
00061 virtual ~csEventOutlet ();
00062
00064 virtual csPtr<iEvent> CreateEvent ();
00066 virtual void Post (iEvent*);
00068 virtual void Key (int iKey, int iChar, bool iDown);
00070 virtual void Mouse (int iButton, bool iDown, int x, int y);
00072 virtual void Joystick (int iNumber, int iButton, bool iDown, int x, int y);
00074 virtual void Broadcast (int iCode, void *iInfo);
00076 virtual void ImmediateBroadcast (int iCode, void *iInfo);
00077 };
00078
00079 #endif // __CS_UTIL_EVOUTLET_H__