Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages
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 "csextern.h" 00024 #include "csutil/csunicode.h" 00025 #include "iutil/event.h" 00026 #include "iutil/csinput.h" 00027 00028 struct iObjectRegistry; 00029 class csEventQueue; 00030 00034 class CS_CRYSTALSPACE_EXPORT csEventOutlet : public iEventOutlet 00035 { 00036 private: 00038 unsigned EnableMask; 00040 iEventPlug *Plug; 00042 csEventQueue *Queue; 00044 iObjectRegistry* Registry; 00046 csRef<iKeyboardDriver> KeyboardDriver; 00048 csRef<iMouseDriver> MouseDriver; 00050 csRef<iJoystickDriver> JoystickDriver; 00051 00052 iKeyboardDriver* GetKeyboardDriver(); 00053 iMouseDriver* GetMouseDriver(); 00054 iJoystickDriver* GetJoystickDriver(); 00055 00056 public: 00057 SCF_DECLARE_IBASE; 00058 00060 csEventOutlet (iEventPlug*, csEventQueue*, iObjectRegistry*); 00062 virtual ~csEventOutlet (); 00063 00065 virtual csPtr<iEvent> CreateEvent (); 00067 virtual void Post (iEvent*); 00069 virtual void Key (utf32_char codeRaw, utf32_char codeCooked, bool iDown); 00071 virtual void Mouse (uint iButton, bool iDown, int x, int y); 00073 virtual void Mouse (uint iNumber, uint iButton, bool iDown, 00074 const int32 *axes, uint numAxes); 00076 virtual void Joystick (uint iNumber, uint iButton, bool iDown, 00077 const int32 *axes, uint numAxes); 00079 virtual void Broadcast (uint iCode, intptr_t iInfo); 00081 virtual void ImmediateBroadcast (uint iCode, intptr_t iInfo); 00082 }; 00083 00084 #endif // __CS_UTIL_EVOUTLET_H__
Generated for Crystal Space by doxygen 1.4.4