Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 44bd5d625680eebe550891a3ff0d6d21 > files > 126

libSDLmm0.1-devel-0.1.8-12mdv2008.0.i586.rpm

<!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>sdlmm_event.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.8.1 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>sdlmm_event.h</h1><a href="sdlmm__event_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
00002 <font class="comment"> * SDLmm - a C++ wrapper for SDL and related libraries</font>
00003 <font class="comment"> * Copyright © 2001 David Hedbor &lt;david@hedbor.org&gt;</font>
00004 <font class="comment"> * </font>
00005 <font class="comment"> * This program is free software; you can redistribute it and/or</font>
00006 <font class="comment"> * modify it under the terms of the GNU General Public License as</font>
00007 <font class="comment"> * published by the Free Software Foundation; either version 2 of the</font>
00008 <font class="comment"> * License, or (at your option) any later version.</font>
00009 <font class="comment"> * </font>
00010 <font class="comment"> * This program is distributed in the hope that it will be useful, but</font>
00011 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00012 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>
00013 <font class="comment"> * General Public License for more details.</font>
00014 <font class="comment"> * </font>
00015 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00016 <font class="comment"> * along with this program; if not, write to the Free Software</font>
00017 <font class="comment"> * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</font>
00018 <font class="comment"> *</font>
00019 <font class="comment"> */</font>
00020 
00021 <font class="preprocessor">#ifndef SDLMM_EVENT_H</font>
00022 <font class="preprocessor"></font><font class="preprocessor">#define SDLMM_EVENT_H</font>
00023 <font class="preprocessor"></font><font class="preprocessor">#include &lt;cstring&gt;</font>
00024 
00025 <font class="keyword">namespace </font>SDLmm {
00027 
<a name="l00032"></a><a class="code" href="classSDLmm_1_1Event.html">00032</a>   <font class="keyword">class </font>Event {
00033   <font class="keyword">public</font>:
00035 
<a name="l00041"></a><a class="code" href="classSDLmm_1_1Event.html#m0">00041</a>     SDL_Event me;
00042 
00044 
00052     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#a0">Poll</a>(<font class="keywordtype">bool</font> fetch = <font class="keyword">true</font>);
00053     
00055 
00064     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#a1">Wait</a>(<font class="keywordtype">bool</font> fetch = <font class="keyword">true</font>);
00065 
00067 
00077     <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#a2">Push</a>();
00078 
00080 
00081 
00082 
00094     <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Event.html#d0">PumpEvents</a>();
00095 
00098 
00126     <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Event.html#d1">SetEventFilter</a>(SDL_EventFilter filter);
00127 
00129 
00141     <font class="keyword">static</font> SDL_EventFilter  <a class="code" href="classSDLmm_1_1Event.html#d2">GetEventFilter</a>();
00142 
00144 
00166     <font class="keyword">static</font> Uint8 <a class="code" href="classSDLmm_1_1Event.html#d3">EventState</a>(Uint8 type, <font class="keywordtype">int</font> state);
00167 
00169 
00178     <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Event.html#d4">HandleEvents</a>(EventHandler &amp;handler);
00179     
00181 
00183 
00184     
00186 
00198     <font class="keyword">static</font> Uint8 *<a class="code" href="classSDLmm_1_1Event.html#d6">GetKeyState</a>(<font class="keywordtype">int</font> &amp;numkeys);
00199 
00201 
00214     <font class="keyword">static</font> Uint8 *<a class="code" href="classSDLmm_1_1Event.html#d6">GetKeyState</a>();
00215 
00217 
00239     <font class="keyword">static</font> SDLMod <a class="code" href="classSDLmm_1_1Event.html#d7">GetModState</a>();
00240 
00242 
00252     <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classSDLmm_1_1Event.html#d8">SetModState</a>(SDLMod modstate);
00253 
00255 
00259     <font class="keyword">static</font> <font class="keywordtype">char</font> *<a class="code" href="classSDLmm_1_1Event.html#d9">GetKeyName</a>(SDLKey key);
00260 
00262 
<a name="l00277"></a><a class="code" href="classSDLmm_1_1Event.html#d10">00277</a>     <font class="keyword">static</font> <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#d10">EnableUNICODE</a>(<font class="keywordtype">bool</font> enable=<font class="keyword">true</font>)<font class="keyword"> </font>{ <font class="keywordflow">return</font> SDL_EnableUNICODE(enable) != 0; }
00278 
00280 
<a name="l00285"></a><a class="code" href="classSDLmm_1_1Event.html#d11">00285</a>     <font class="keyword">static</font> <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#d11">DisableUNICODE</a>()<font class="keyword"> </font>{ <font class="keywordflow">return</font> SDL_EnableUNICODE(0) != 0; }
00286 
00288 
<a name="l00294"></a><a class="code" href="classSDLmm_1_1Event.html#d12">00294</a>     <font class="keyword">static</font> <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#d12">QueryUNICODE</a>()<font class="keyword"> </font>{ <font class="keywordflow">return</font> SDL_EnableUNICODE(-1) != 0; }
00295 
00297 
00312     <font class="keyword">static</font> <font class="keywordtype">bool</font> <a class="code" href="classSDLmm_1_1Event.html#d13">EnableKeyRepeat</a>(<font class="keywordtype">int</font> delay = SDL_DEFAULT_REPEAT_DELAY,
00313                                 <font class="keywordtype">int</font> interval = SDL_DEFAULT_REPEAT_DELAY);
00315 
00317 
00318 
00319 
00329     <font class="keyword">static</font> Uint8 <a class="code" href="classSDLmm_1_1Event.html#d14">GetMouseState</a>(<font class="keywordtype">int</font> *x = 0, <font class="keywordtype">int</font> *y = 0);
00330 
00332 
00343     <font class="keyword">static</font> Uint8 <a class="code" href="classSDLmm_1_1Event.html#d15">GetRelativeMouseState</a>(<font class="keywordtype">int</font> *x, <font class="keywordtype">int</font> *y);    
00345 
00347 
00348 
00350 
00363     <font class="keyword">static</font> Uint8 <a class="code" href="classSDLmm_1_1Event.html#d16">GetAppState</a>();
00364 
00366     <font class="comment">/*</font>
00367 <font class="comment">      This function is used to enable or disable joystick event</font>
00368 <font class="comment">      processing. With joystick event processing disabled you will</font>
00369 <font class="comment">      have to update joystick states with Joystick::JoystickUpdate()</font>
00370 <font class="comment">      and read the joystick information manually. \a state is either</font>
00371 <font class="comment">      SDL_QUERY, SDL_ENABLE or SDL_IGNORE.</font>
00372 <font class="comment"></font>
00373 <font class="comment">      \note Joystick event handling is preferred.</font>
00374 <font class="comment">      \return If \a state is SDL_QUERY then the current state is</font>
00375 <font class="comment">      returned, otherwise the new processing \a state is returned.</font>
00376 <font class="comment">      \param state the state as documented above.</font>
00377 <font class="comment">    */</font>
00378     
00379     <font class="keyword">static</font> <font class="keywordtype">int</font> <a class="code" href="classSDLmm_1_1Event.html#d17">JoystickEventState</a>(<font class="keywordtype">int</font> state);
00380     
00382   };
00383 }
00384 
00385 <font class="preprocessor">#endif // SDLMM_EVENT_H</font>
00386 <font class="preprocessor"></font>
</pre></div><hr>
<table cellspacing=10 cellpadding=0 border=0 width=100%>
<tr valign=middle><td><font size=-1>Documentation automatically generated by <a
href="http://www.stack.nl/~dimitri/doxygen/"><img border=0 align=center src="doxygen.gif" alt="doxygen"></a> written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>.</font></td>
<td align=right><font size=-1>Project hosted at <br><a href="http://sourceforge.net"><img align=middle src="http://sourceforge.net/sflogo.php?group_id=25445&type=1" width="88" height="31" border="0"  alt="Hosted by SourceForge"></a></font></td></tr></table>