<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: csutil/event.h Source File (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>csutil/event.h</h1><a href="csutil_2event_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> Event system related helpers</span> <a name="l00003"></a>00003 <span class="comment"> Copyright (C) 2003 by Jorrit Tyberghein</span> <a name="l00004"></a>00004 <span class="comment"> (C) 2003 by Frank Richter</span> <a name="l00005"></a>00005 <span class="comment"> (C) 2005 by Adam D. Bradley <artdodge@cs.bu.edu></span> <a name="l00006"></a>00006 <span class="comment"></span> <a name="l00007"></a>00007 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00008"></a>00008 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00009"></a>00009 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00010"></a>00010 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00011"></a>00011 <span class="comment"> </span> <a name="l00012"></a>00012 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00013"></a>00013 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00014"></a>00014 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00015"></a>00015 <span class="comment"> Library General Public License for more details.</span> <a name="l00016"></a>00016 <span class="comment"> </span> <a name="l00017"></a>00017 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00018"></a>00018 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00019"></a>00019 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00020"></a>00020 <span class="comment">*/</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#ifndef __CS_CSUTIL_EVENT_H__</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define __CS_CSUTIL_EVENT_H__</span> <a name="l00024"></a>00024 <span class="preprocessor"></span> <a name="l00025"></a>00025 <span class="preprocessor">#include "csextern.h"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="iutil_2event_8h.html" title="Event system related interfaces.">iutil/event.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="iutil_2eventhandlers_8h.html" title="General event handler naming, name management, indexing, and instantiation interface...">iutil/eventhandlers.h</a>"</span> <a name="l00028"></a>00028 <a name="l00041"></a><a class="code" href="classcsKeyEventHelper.html">00041</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsKeyEventHelper.html" title="Helper class to conveniently deal with keyboard events.">csKeyEventHelper</a> <a name="l00042"></a>00042 { <a name="l00043"></a>00043 <span class="keyword">public</span>: <a name="l00045"></a>00045 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> GetRawCode (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00047"></a>00047 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> GetCookedCode (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00049"></a>00049 <span class="keyword">static</span> <span class="keywordtype">void</span> GetModifiers (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event, <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a>& modifiers); <a name="l00051"></a>00051 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__event__handling.html#ge77b5898945ed86046a25788a491cb4e" title="Keyboard event type - stored as keyEventType attribute in keyboard events.">csKeyEventType</a> GetEventType (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00056"></a>00056 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> GetAutoRepeat (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00058"></a>00058 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="evdefs_8h.html#01c809d9f3c8b5c7985bc34b611ecdd4" title="Character types.">csKeyCharType</a> GetCharacterType (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00060"></a>00060 <span class="keyword">static</span> <span class="keywordtype">bool</span> GetEventData (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event, <a class="code" href="structcsKeyEventData.html" title="Structure that collects the data a keyboard event carries.">csKeyEventData</a>& data); <a name="l00066"></a>00066 <span class="keyword">static</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> GetModifiersBits ( <a name="l00067"></a>00067 <span class="keyword">const</span> <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a>& modifiers); <a name="l00072"></a>00072 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> GetModifiersBits (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00080"></a>00080 <span class="keyword">static</span> <span class="keywordtype">void</span> GetModifiers (<a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> mask, <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a>& modifiers); <a name="l00081"></a>00081 }; <a name="l00084"></a>00084 <span class="comment">/* forward declaration */</span> <a name="l00085"></a>00085 <span class="keyword">class </span><a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a>; <a name="l00086"></a>00086 <a name="l00092"></a><a class="code" href="classcsMouseEventHelper.html">00092</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsMouseEventHelper.html" title="Helper class to conveniently deal with mouse events.">csMouseEventHelper</a> <a name="l00093"></a>00093 { <a name="l00094"></a>00094 <span class="keyword">public</span>: <a name="l00096"></a>00096 <a name="l00097"></a>00097 <span class="keyword">static</span> <a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a> *NewEvent (<a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventNameRegistry></a> &reg, <a name="l00098"></a>00098 <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a>, <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> name, <a class="code" href="group__event__handling.html#g876689e689d4e712a992b821b1ee4f77" title="Mouse event type - stored as mEventType attribute in mouse events.">csMouseEventType</a> etype, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <a name="l00099"></a>00099 <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> AxesChanged, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> button, <span class="keywordtype">bool</span> buttonstate, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> buttonMask, <a name="l00100"></a>00100 <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> modifiers); <a name="l00101"></a>00101 <span class="keyword">static</span> <a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a> *NewEvent (<a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventNameRegistry></a> &reg, <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a>, <a name="l00102"></a>00102 <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> name, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> n, <a class="code" href="group__event__handling.html#g876689e689d4e712a992b821b1ee4f77" title="Mouse event type - stored as mEventType attribute in mouse events.">csMouseEventType</a> etype, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <a name="l00103"></a>00103 <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> axesChanged, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> button, <span class="keywordtype">bool</span> buttonstate, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> buttonMask, <a name="l00104"></a>00104 <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> modifiers); <a name="l00105"></a>00105 <span class="keyword">static</span> <a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a> *NewEvent (<a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventNameRegistry></a> &reg, <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a>, <a name="l00106"></a>00106 <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> name, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> n, <a class="code" href="group__event__handling.html#g876689e689d4e712a992b821b1ee4f77" title="Mouse event type - stored as mEventType attribute in mouse events.">csMouseEventType</a> etype, <span class="keyword">const</span> <a class="code" href="group__util.html#g56f1a81c92849566ae864511088eb7e8" title="signed 32-bit integer (-2 147 483 648..2 147 483 647)">int32</a> *axes, <a name="l00107"></a>00107 <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> numAxes, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> axesChanged, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> button, <span class="keywordtype">bool</span> buttonstate, <a name="l00108"></a>00108 <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> buttonMask, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> modifiers); <a name="l00110"></a>00110 <a name="l00112"></a>00112 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__event__handling.html#g876689e689d4e712a992b821b1ee4f77" title="Mouse event type - stored as mEventType attribute in mouse events.">csMouseEventType</a> GetEventType (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event); <a name="l00114"></a>00114 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetNumber(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00116"></a><a class="code" href="classcsMouseEventHelper.html#4dfa65edf6150512c49eda567e4ea4bd">00116</a> <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">int</span> GetX(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event) <a name="l00117"></a>00117 { <span class="keywordflow">return</span> <a class="code" href="classcsMouseEventHelper.html#0cd04669d983710afa0ccabcabccdb53" title="retrieve any axis (basis 0) value">csMouseEventHelper::GetAxis</a>(event, 0); } <a name="l00119"></a><a class="code" href="classcsMouseEventHelper.html#c58d6ac198d2d8064394bbab9cd4e8e1">00119</a> <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">int</span> GetY(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event) <a name="l00120"></a>00120 { <span class="keywordflow">return</span> <a class="code" href="classcsMouseEventHelper.html#0cd04669d983710afa0ccabcabccdb53" title="retrieve any axis (basis 0) value">csMouseEventHelper::GetAxis</a>(event, 1); } <a name="l00122"></a>00122 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">int</span> GetAxis(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> axis); <a name="l00124"></a>00124 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetNumAxes(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00126"></a>00126 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetButton(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00128"></a>00128 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> GetButtonState(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00130"></a>00130 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> GetButtonMask(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00132"></a><a class="code" href="classcsMouseEventHelper.html#00412554bb74e140f33e766c00dc8368">00132</a> <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">void</span> GetModifiers(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event, <a name="l00133"></a>00133 <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a>& modifiers) <a name="l00134"></a>00134 { <a class="code" href="classcsKeyEventHelper.html#34b0d20268575c6d02c4a09e3181e57f" title="Retrieve the key&#39;s raw code.">csKeyEventHelper::GetModifiers</a>(event, modifiers); } <a name="l00136"></a><a class="code" href="classcsMouseEventHelper.html#575aa1aa3133de9870ab91418ff2a739">00136</a> <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> GetModifiers(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event) <a name="l00137"></a>00137 { <a name="l00138"></a>00138 <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> modifiers; <a name="l00139"></a>00139 <a class="code" href="classcsKeyEventHelper.html#34b0d20268575c6d02c4a09e3181e57f" title="Retrieve the key&#39;s raw code.">csKeyEventHelper::GetModifiers</a>(event, modifiers); <a name="l00140"></a>00140 <span class="keywordflow">return</span> <a class="code" href="classcsKeyEventHelper.html#cbf0a3254b47e6c0fe1d02c9570535d7" title="Get a bitmask corresponding to the pressed modifier keys from the keyboard modifiers...">csKeyEventHelper::GetModifiersBits</a>(modifiers); <a name="l00141"></a>00141 } <a name="l00143"></a>00143 <span class="keyword">static</span> <span class="keywordtype">bool</span> GetEventData (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event, <a name="l00144"></a>00144 <a class="code" href="structcsMouseEventData.html" title="Structure that collects the data a mouse event carries.">csMouseEventData</a>& data); <a name="l00145"></a>00145 }; <a name="l00146"></a>00146 <a name="l00154"></a><a class="code" href="classcsJoystickEventHelper.html">00154</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsJoystickEventHelper.html" title="Helper class to conveniently deal with joystick events.">csJoystickEventHelper</a> <a name="l00155"></a>00155 { <a name="l00156"></a>00156 <span class="keyword">public</span>: <a name="l00158"></a>00158 <a name="l00159"></a>00159 <span class="keyword">static</span> <a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a> *NewEvent (<a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventNameRegistry></a> &reg, <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a>, <a name="l00160"></a>00160 <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> name, <span class="keywordtype">int</span> n, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> axesChanged, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> button, <a name="l00161"></a>00161 <span class="keywordtype">bool</span> buttonState, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> buttonMask, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> modifiers); <a name="l00162"></a>00162 <span class="keyword">static</span> <a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a> *NewEvent (<a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventNameRegistry></a> &reg, <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a>, <a name="l00163"></a>00163 <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> name, <span class="keywordtype">int</span> n, <span class="keyword">const</span> <a class="code" href="group__util.html#g56f1a81c92849566ae864511088eb7e8" title="signed 32-bit integer (-2 147 483 648..2 147 483 647)">int32</a>* axes, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> numAxes, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> axesChanged, <a name="l00164"></a>00164 <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> button, <span class="keywordtype">bool</span> buttonState, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> buttonMask, <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> modifiers); <a name="l00166"></a>00166 <a name="l00168"></a>00168 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetNumber(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00170"></a>00170 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">int</span> GetAxis(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a>); <a name="l00172"></a>00172 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetNumAxes(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *); <a name="l00174"></a>00174 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetButton(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00176"></a>00176 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> GetButtonState(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00178"></a>00178 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> GetButtonMask(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00180"></a><a class="code" href="classcsJoystickEventHelper.html#c06c2fe68519adf1a0c8bea5aac860c4">00180</a> <span class="keyword">static</span> <span class="keywordtype">void</span> GetModifiers(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event, <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a>& modifiers) <a name="l00181"></a>00181 { <a class="code" href="classcsKeyEventHelper.html#34b0d20268575c6d02c4a09e3181e57f" title="Retrieve the key&#39;s raw code.">csKeyEventHelper::GetModifiers</a>(event, modifiers); } <a name="l00183"></a><a class="code" href="classcsJoystickEventHelper.html#f9f3bf47bef01aad8f7def8a3a106531">00183</a> <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> GetModifiers(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event) <a name="l00184"></a>00184 { <a name="l00185"></a>00185 <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> modifiers; <a name="l00186"></a>00186 <a class="code" href="classcsKeyEventHelper.html#34b0d20268575c6d02c4a09e3181e57f" title="Retrieve the key&#39;s raw code.">csKeyEventHelper::GetModifiers</a>(event, modifiers); <a name="l00187"></a>00187 <span class="keywordflow">return</span> <a class="code" href="classcsKeyEventHelper.html#cbf0a3254b47e6c0fe1d02c9570535d7" title="Get a bitmask corresponding to the pressed modifier keys from the keyboard modifiers...">csKeyEventHelper::GetModifiersBits</a>(modifiers); <a name="l00188"></a>00188 } <a name="l00190"></a>00190 <span class="keyword">static</span> <span class="keywordtype">bool</span> GetEventData (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event, <a class="code" href="structcsJoystickEventData.html" title="Structure that collects the data a joystick event carries.">csJoystickEventData</a>& data); <a name="l00191"></a>00191 }; <a name="l00192"></a>00192 <a name="l00200"></a><a class="code" href="classcsInputEventHelper.html">00200</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsInputEventHelper.html" title="Helper class to conveniently pull generic data out of input events.">csInputEventHelper</a> <a name="l00201"></a>00201 { <a name="l00202"></a>00202 <span class="keyword">public</span>: <a name="l00204"></a>00204 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetButton (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a> *, <a name="l00205"></a>00205 <span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00207"></a>00207 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> GetButtonState (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a> *, <a name="l00208"></a>00208 <span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00209"></a>00209 }; <a name="l00210"></a>00210 <a name="l00218"></a><a class="code" href="classcsCommandEventHelper.html">00218</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsCommandEventHelper.html" title="Helper class to conveniently deal with command events.">csCommandEventHelper</a> <a name="l00219"></a>00219 { <a name="l00220"></a>00220 <span class="keyword">public</span>: <a name="l00222"></a>00222 <span class="keyword">static</span> <a class="code" href="classcsEvent.html" title="This class represents a system event.">csEvent</a> *NewEvent (<a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a>, <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> name, <span class="keywordtype">bool</span> Broadcast, <a name="l00223"></a>00223 <a class="code" href="group__util.html#g0fbe4a4f8dd857ee04923a901f27465f" title="Integer at least as wide as a pointer.">intptr_t</a> info = 0); <a name="l00224"></a>00224 <a name="l00226"></a>00226 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetCode(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00228"></a>00228 <a class="code" href="cssysdef_8h.html#b3427ad7a206cd0ebf118b9d40084164" title="Use the CS_PURE_METHOD macro in front of method declarations to indicate that they...">CS_PURE_METHOD</a> <span class="keyword">static</span> <a class="code" href="group__util.html#g0fbe4a4f8dd857ee04923a901f27465f" title="Integer at least as wide as a pointer.">intptr_t</a> GetInfo(<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event); <a name="l00230"></a>00230 <span class="keyword">static</span> <span class="keywordtype">bool</span> GetEventData (<span class="keyword">const</span> <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>* event, <a class="code" href="structcsCommandEventData.html" title="Structure that collects the data a command event carries.">csCommandEventData</a>& data); <a name="l00231"></a>00231 }; <a name="l00232"></a>00232 <a name="l00235"></a>00235 <span class="keyword">struct </span><a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a>; <a name="l00236"></a>00236 <span class="keyword">struct </span><a class="code" href="structiObjectRegistry.html" title="This interface serves as a registry of other objects.">iObjectRegistry</a>; <a name="l00237"></a>00237 <a name="l00238"></a>00238 <span class="keyword">namespace </span>CS <a name="l00239"></a>00239 { <a name="l00240"></a>00240 <a name="l00246"></a>00246 <a class="code" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a> CS_CRYSTALSPACE_EXPORT <a class="code" href="namespaceCS.html#2d55e184219c75f56d60f02a67fc42ae" title="Helper function for registering an event handler using a weak reference.">RegisterWeakListener</a> (<a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a> *q, <a name="l00247"></a>00247 <a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *listener, <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventHandler></a> &handler); <a name="l00248"></a>00248 <a class="code" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a> CS_CRYSTALSPACE_EXPORT <a class="code" href="namespaceCS.html#2d55e184219c75f56d60f02a67fc42ae" title="Helper function for registering an event handler using a weak reference.">RegisterWeakListener</a> (<a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a> *q, <a name="l00249"></a>00249 <a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *listener, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> &ename, <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventHandler></a> &handler); <a name="l00250"></a>00250 <a class="code" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a> CS_CRYSTALSPACE_EXPORT <a class="code" href="namespaceCS.html#2d55e184219c75f56d60f02a67fc42ae" title="Helper function for registering an event handler using a weak reference.">RegisterWeakListener</a> (<a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a> *q, <a name="l00251"></a>00251 <a class="code" href="structiEventHandler.html" title="This interface describes an entity that can receive events.">iEventHandler</a> *listener, <span class="keyword">const</span> <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&#39;s hierarchical name...">csEventID</a> ename[], <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventHandler></a> &handler); <a name="l00252"></a>00252 <a name="l00257"></a>00257 <span class="keywordtype">void</span> CS_CRYSTALSPACE_EXPORT <a class="code" href="namespaceCS.html#82f6e5ca930984b58b34962fd8bab92e" title="Helper function for removing an event handler that was registered with RegisterWeakListener()...">RemoveWeakListener</a> (<a class="code" href="structiEventQueue.html" title="This interface represents a general event queue.">iEventQueue</a> *q, <a name="l00258"></a>00258 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iEventHandler></a> &handler); <a name="l00259"></a>00259 <a name="l00260"></a>00260 } <span class="comment">// namespace CS</span> <a name="l00261"></a>00261 <a name="l00264"></a>00264 <span class="preprocessor">#endif // __CS_CSUTIL_EVENT_H__</span> </pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>