csutil/evoutlet.h
00001 /* 00002 Crystal Space event outlet class 00003 Written by Andrew Zabolotny <bit@eltech.ru> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __CS_UTIL_EVOUTLET_H__ 00021 #define __CS_UTIL_EVOUTLET_H__ 00022 00023 #include "csunicode.h" 00024 #include "iutil/event.h" 00025 #include "iutil/csinput.h" 00026 struct iObjectRegistry; 00027 class csEventQueue; 00028 00032 class csEventOutlet : public iEventOutlet 00033 { 00034 private: 00036 unsigned EnableMask; 00038 iEventPlug *Plug; 00040 csEventQueue *Queue; 00042 iObjectRegistry* Registry; 00044 csRef<iKeyboardDriver> KeyboardDriver; 00046 csRef<iMouseDriver> MouseDriver; 00048 csRef<iJoystickDriver> JoystickDriver; 00049 00050 iKeyboardDriver* GetKeyboardDriver(); 00051 iMouseDriver* GetMouseDriver(); 00052 iJoystickDriver* GetJoystickDriver(); 00053 00054 public: 00055 SCF_DECLARE_IBASE; 00056 00058 csEventOutlet (iEventPlug*, csEventQueue*, iObjectRegistry*); 00060 virtual ~csEventOutlet (); 00061 00063 virtual csPtr<iEvent> CreateEvent (); 00065 virtual void Post (iEvent*); 00067 virtual void Key (utf32_char codeRaw, utf32_char codeCooked, bool iDown); 00069 virtual void Mouse (int iButton, bool iDown, int x, int y); 00071 virtual void Joystick (int iNumber, int iButton, bool iDown, int x, int y); 00073 virtual void Broadcast (int iCode, void *iInfo); 00075 virtual void ImmediateBroadcast (int iCode, void *iInfo); 00076 }; 00077 00078 #endif // __CS_UTIL_EVOUTLET_H__
Generated for Crystal Space by doxygen 1.2.18