Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-release > by-pkgid > c6769e2011cd0bbbaff4458281ce4746 > files > 47

libSDLmm-devel-0.1.8-5.mga6.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 class Reference</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  Class Reference</h1>The general <a class="el" href="classSDLmm_1_1Event.html">Event</a> class. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="sdlmm__event_8h-source.html">sdlmm_event.h</a>&gt;</code>
<p>
<a href="classSDLmm_1_1Event-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#a0">Poll</a> (bool fetch=true)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Polls for currently pending events.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#a1">Wait</a> (bool fetch=true)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Waits indefinitely for the next available event.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#a2">Push</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Push this event onto the event queue.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Event Methods</div></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d0">PumpEvents</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Pumps the event loop, gathering events from the input devices.</em> <a href="#d0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d1">SetEventFilter</a> (SDL_EventFilter filter)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets up a filter to process all events before they are posted to the event queue.</em> <a href="#d1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>SDL_EventFilter&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d2">GetEventFilter</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieves a pointer to the event filter.</em> <a href="#d2">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>Uint8&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d3">EventState</a> (Uint8 type, int state)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set the state of processing for certain events.</em> <a href="#d3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d4">HandleEvents</a> (<a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> &amp;handler)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Handle all queued events using the specified <a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a>.</em> <a href="#d4">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Keyboard Methods</div></td></tr>
<tr><td nowrap align=right valign=top>Uint8*&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d5">GetKeyState</a> (int &amp;numkeys)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get a snapshot of the current keyboard state.</em> <a href="#d5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>Uint8*&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d6">GetKeyState</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get a snapshot of the current keyboard state.</em> <a href="#d6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>SDLMod&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d7">GetModState</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get the state of modifier keys.</em> <a href="#d7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d8">SetModState</a> (SDLMod modstate)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set the current key modifier state.</em> <a href="#d8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char*&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d9">GetKeyName</a> (SDLKey key)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get the name of an SDL virtual key symbol.</em> <a href="#d9">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d10">EnableUNICODE</a> (bool enable=true)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Enable UNICODE keyboard translation.</em> <a href="#d10">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d11">DisableUNICODE</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Disable UNICODE translation.</em> <a href="#d11">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d12">QueryUNICODE</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Query the current UNICODE translation mode.</em> <a href="#d12">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d13">EnableKeyRepeat</a> (int delay=SDL_DEFAULT_REPEAT_DELAY, int interval=SDL_DEFAULT_REPEAT_DELAY)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Set keyboard repeat rate.</em> <a href="#d13">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Mouse Methods</div></td></tr>
<tr><td nowrap align=right valign=top>Uint8&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d14">GetMouseState</a> (int *x=0, int *y=0)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieve the current state of the mouse.</em> <a href="#d14">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>Uint8&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d15">GetRelativeMouseState</a> (int *x, int *y)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieve the current state of the mouse.</em> <a href="#d15">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Other Methods</div></td></tr>
<tr><td nowrap align=right valign=top>Uint8&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d16">GetAppState</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get the state of the application.</em> <a href="#d16">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#d17">JoystickEventState</a> (int state)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Enable / disable joystick event polling.</em> <a href="#d17">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>SDL_Event&nbsp;</td><td valign=bottom><a class="el" href="classSDLmm_1_1Event.html#m0">me</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The event structure.</em> <a href="#m0">More...</a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The general <a class="el" href="classSDLmm_1_1Event.html">Event</a> class.
<p>
The <a class="el" href="classSDLmm_1_1Event.html">Event</a> class is the core to all event handling is <a class="el" href="namespace__SDLmm.html">SDLmm</a>. It's probably the most important class after <a class="el" href="classSDLmm_1_1Surface.html">Surface</a>. The <a class="el" href="classSDLmm_1_1Event.html">Event</a> class can be used to store any type of event. 
<p>
<hr><h2>Member Function Documentation</h2>
<a name="d11" doxytag="SDLmm::Event::DisableUNICODE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::DisableUNICODE (
          </b></td>
          <td valign="bottom"><b>
)<code> [inline, static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Disable UNICODE translation.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
true if UNICODE translation was previously enabled, false otherwise. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d10">EnableUNICODE</a>, <a class="el" href="classSDLmm_1_1Event.html#d12">QueryUNICODE</a> </dl>    </td>
  </tr>
</table>
<a name="d13" doxytag="SDLmm::Event::EnableKeyRepeat"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::EnableKeyRepeat (
          </b></td>
          <td valign="bottom"><b>
int <em>delay</em> = SDL_DEFAULT_REPEAT_DELAY, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int <em>interval</em> = SDL_DEFAULT_REPEAT_DELAY&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set keyboard repeat rate.
<p>
Enables or disables the keyboard repeat rate. <em>delay</em> specifies how long the key must be pressed before it begins repeating. It then repeats at the speed specified by <em>interval</em>. Both <em>delay</em> and <em>interval</em> are expressed in milliseconds.
<p>
Setting delay to 0 disables key repeating completely. If called without parameters, the default values uses are SDL_DEFAULT_REPEAT_DELAY and SDL_DEFAULT_REPEAT_INTERVAL.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
true on success, false on failure. </dl><dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>delay</em>
&nbsp;</td><td>
delay before key repeating starts in ms. </td></tr>
<tr><td valign=top><em>interval</em>
&nbsp;</td><td>
delay between repeats in ms. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="d10" doxytag="SDLmm::Event::EnableUNICODE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::EnableUNICODE (
          </b></td>
          <td valign="bottom"><b>
bool <em>enable</em> = true&nbsp;)<code> [inline, static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Enable UNICODE keyboard translation.
<p>
If you wish to translate a keysym to it's printable representation, you need to enable UNICODE translation using this function and then look in the unicode member of the SDL_keysym structure. This value will be zero for keysyms that do not have a printable representation. UNICODE translation is disabled by default as the conversion can cause a slight overhead.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>enable</em>
&nbsp;</td><td>
if false, disable UNICODE translation (SDL compatibility)
<p>
</td></tr>
</table>
</dl><dl compact><dt>
<b>Returns: </b><dd>
true if UNICODE translation was previously enabled, false otherwise. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d11">DisableUNICODE</a>, <a class="el" href="classSDLmm_1_1Event.html#d12">QueryUNICODE</a> </dl>    </td>
  </tr>
</table>
<a name="d3" doxytag="SDLmm::Event::EventState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
Uint8 SDLmm::Event::EventState (
          </b></td>
          <td valign="bottom"><b>
Uint8 <em>type</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int <em>state</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the state of processing for certain events.
<p>
This function allows you to set the state of processing certain event types.
<p>
If <em>state</em> is set to SDL_IGNORE, that event type will be automatically dropped from the event queue and will not be filtered.
<p>
If <em>state</em> is set to SDL_ENABLE, that event type will be processed normally.
<p>
If <em>state</em> is set to SDL_QUERY, <a class="el" href="classSDLmm_1_1Event.html#d3">EventState</a>() will return the current processing state of the specified event type.
<p>
A list of event types can be found in the SDL_Event section in the SDL documentation.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>type</em>
&nbsp;</td><td>
the event type </td></tr>
<tr><td valign=top><em>state</em>
&nbsp;</td><td>
the state as documented above. </td></tr>
</table>
</dl><dl compact><dt>
<b>Returns: </b><dd>
the current processing state for the specified event <em>type</em> </dl>    </td>
  </tr>
</table>
<a name="d16" doxytag="SDLmm::Event::GetAppState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
Uint8 SDLmm::Event::GetAppState (
          </b></td>
          <td valign="bottom"><b>
)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the state of the application.
<p>
This function returns the current state of the application. The value returned is a bitwise combination of:
<p>
<ul>
<li><b>SDL_APPMOUSEFOCUS</b> -  the application has mouse focus.<li><b>SDL_APPINPUTFOCUS</b> -  the application has keyboard focus<li><b>SDL_APPACTIVE</b> -  the application is visible</ul>
<dl compact><dt>
<b>Returns: </b><dd>
The current state of the application. </dl>    </td>
  </tr>
</table>
<a name="d2" doxytag="SDLmm::Event::GetEventFilter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
SDL_EventFilter SDLmm::Event::GetEventFilter (
          </b></td>
          <td valign="bottom"><b>
)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Retrieves a pointer to the event filter.
<p>
This function retrieves a pointer to the event filter that was previously set using <a class="el" href="classSDLmm_1_1Event.html#d1">SetEventFilter</a>(). An SDL_EventFilter function is defined as:
<p>
<div class="fragment"><pre>      <font class="keyword">typedef</font> int (*SDL_EventFilter)(<font class="keyword">const</font> SDL_Event *event);</pre></div> <dl compact><dt>
<b>Returns: </b><dd>
Returns a pointer to the event filter or 0 if no filter has been set. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d1">SetEventFilter</a>() </dl>    </td>
  </tr>
</table>
<a name="d9" doxytag="SDLmm::Event::GetKeyName"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
char * SDLmm::Event::GetKeyName (
          </b></td>
          <td valign="bottom"><b>
SDLKey <em>key</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the name of an SDL virtual key symbol.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
the SDL defined name of the <em>key</em>. </dl><dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>key</em>
&nbsp;</td><td>
the SDLkey key symbol </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="d6" doxytag="SDLmm::Event::GetKeyState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
Uint8 * SDLmm::Event::GetKeyState (
          </b></td>
          <td valign="bottom"><b>
)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get a snapshot of the current keyboard state.
<p>
Same as the <a class="el" href="classSDLmm_1_1Event.html#d5">GetKeyState</a>(int &amp;numkeys) method, used when you don't care how many keys were returned (i.e you want to check the state of a key that is known to exist). <dl compact><dt>
<b>Example:</b><dd>
 <div class="fragment"><pre>      Uint8 *keystate;
      keystate = Event::GetKeyState();
      <font class="keywordflow">if</font> (keystate[SDLK_RETURN])
        cout &lt;&lt; <font class="stringliteral">"Return Key Pressed.\n"</font>;</pre></div> </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d7">GetModState</a>() </dl>    </td>
  </tr>
</table>
<a name="d5" doxytag="SDLmm::Event::GetKeyState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
Uint8 * SDLmm::Event::GetKeyState (
          </b></td>
          <td valign="bottom"><b>
int &amp; <em>numkeys</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get a snapshot of the current keyboard state.
<p>
Gets a snapshot of the current keyboard state. The current state is returned as a pointer to an array. The size of this array is stored in <em>numkeys</em>. The array is indexed by the SDLK_* symbols. A value of 1 means the key is pressed and a value of 0 means its not.
<p>
<dl compact><dt>
<b>Note: </b><dd>
Use <a class="el" href="classSDLmm_1_1Event.html#d0">PumpEvents</a>() to update the state array. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d0">PumpEvents</a>() </dl><dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>numkeys</em>
&nbsp;</td><td>
a reference to an integer used to store the size of the returned array. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="d7" doxytag="SDLmm::Event::GetModState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
SDLMod SDLmm::Event::GetModState (
          </b></td>
          <td valign="bottom"><b>
)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the state of modifier keys.
<p>
Returns the current of the modifier keys (CTRL, ALT, etc.). <dl compact><dt>
<b>Returns: </b><dd>
The return value can be an OR'd combination of the SDLMod enum or one of the convenience defines:<ul>
<li>KMOD_NONE<li>KMOD_LSHIFT<li>KMOD_RSHIFT<li>KMOD_LCTRL<li>KMOD_RCTRL<li>KMOD_LALT<li>KMOD_RALT<li>KMOD_LMETA<li>KMOD_RMETA<li>KMOD_NUM<li>KMOD_CAPS<li>KMOD_MODE<li>KMOD_CTRL (KMOD_LCTRL | KMOD_RCTRL)<li>KMOD_SHIFT (KMOD_LSHIFT | KMOD_RSHIFT)<li>KMOD_ALT (KMOD_LALT | KMOD_RALT)<li>KMOD_META (KMOD_LMETA | KMOD_RMETA) </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d8">SetModState</a>(), <a class="el" href="classSDLmm_1_1Event.html#d7">GetModState</a>() </dl>
</dl>
    </td>
  </tr>
</table>
<a name="d14" doxytag="SDLmm::Event::GetMouseState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
Uint8 SDLmm::Event::GetMouseState (
          </b></td>
          <td valign="bottom"><b>
int * <em>x</em> = 0, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int * <em>y</em> = 0&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Retrieve the current state of the mouse.
<p>
The current button state is returned as a button bitmask, which can be tested using the SDL_BUTTON(X) macros, and <em>x</em> and <em>y</em> are set to the current mouse cursor position. You can pass zero for either <em>x</em> or <em>y</em>.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
the button bitmask. </dl><dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>x, y</em>
&nbsp;</td><td>
pointers to integers where the current mouse coordinates will be stored. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="d15" doxytag="SDLmm::Event::GetRelativeMouseState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
Uint8 SDLmm::Event::GetRelativeMouseState (
          </b></td>
          <td valign="bottom"><b>
int * <em>x</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
int * <em>y</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Retrieve the current state of the mouse.
<p>
The current button state is returned as a button bitmask, which can be tested using the SDL_BUTTON(X) macros, and <em>x</em> and <em>y</em> are set to the change in the mouse position since the last call to SDL_GetRelativeMouseState or since event initialization. You can pass zero for either <em>x</em> or <em>y</em>.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
the button bitmask. </dl><dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>x, y</em>
&nbsp;</td><td>
pointers to integers for mouse coordinates or relative change. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="d4" doxytag="SDLmm::Event::HandleEvents"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void SDLmm::Event::HandleEvents (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> &amp; <em>handler</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Handle all queued events using the specified <a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a>.
<p>
This function polls for active events and calls the event callback methods. To actually handle any events, you need to create a derivate of the <a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> class reimplementing the callbacks for the events you're interested in. See the <a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> documentation for more details. <dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>handler</em>
&nbsp;</td><td>
the <a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> which should handle the events. </td></tr>
</table>
</dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> </dl>    </td>
  </tr>
</table>
<a name="d17" doxytag="SDLmm::Event::JoystickEventState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
int SDLmm::Event::JoystickEventState (
          </b></td>
          <td valign="bottom"><b>
int <em>state</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Enable / disable joystick event polling.
<p>
    </td>
  </tr>
</table>
<a name="a0" doxytag="SDLmm::Event::Poll"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::Poll (
          </b></td>
          <td valign="bottom"><b>
bool <em>fetch</em> = true&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Polls for currently pending events.
<p>
If there are any pending events, it will by default be removed from the queue and stored in this class instance. <dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>fetch</em>
&nbsp;</td><td>
if false, only poll for pending events but don't fetch it. </td></tr>
</table>
</dl><dl compact><dt>
<b>Returns: </b><dd>
true if any events were pending. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a>, <a class="el" href="classSDLmm_1_1Event.html#d4">HandleEvents</a>(), <a class="el" href="classSDLmm_1_1Event.html#a1">Wait</a>() </dl>    </td>
  </tr>
</table>
<a name="d0" doxytag="SDLmm::Event::PumpEvents"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void SDLmm::Event::PumpEvents (
          </b></td>
          <td valign="bottom"><b>
)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Pumps the event loop, gathering events from the input devices.
<p>
<a class="el" href="classSDLmm_1_1Event.html#d0">PumpEvents</a>() gathers all the pending input information from devices and places it on the event queue. Without calls to <a class="el" href="classSDLmm_1_1Event.html#d0">PumpEvents</a>() no events would ever be placed on the queue. Often the calls to <a class="el" href="classSDLmm_1_1Event.html#d0">PumpEvents</a>() is hidden from the user since Poll and Wait implicitly call Pump. However, if you are not polling or waiting for events (e.g. your filtering them), then you must call Pump to force an event queue update.
<p>
<dl compact><dt>
<b>Note: </b><dd>
You can only call this function in the thread that set the video mode. </dl>    </td>
  </tr>
</table>
<a name="a2" doxytag="SDLmm::Event::Push"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::Push (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Push this event onto the event queue.
<p>
The event queue can actually be used as a two way communication channel. Not only can events be read from the queue, but the user can also push their own events onto it.
<p>
<dl compact><dt>
<b>Note: </b><dd>
Pushing device input events onto the queue doesn't modify the state of the device within SDL. </dl><dl compact><dt>
<b>Warning: </b><dd>
Make sure to initialize the <a class="el" href="classSDLmm_1_1Event.html">Event</a> before pushing it! </dl><dl compact><dt>
<b>Returns: </b><dd>
true on success, falese if the <a class="el" href="classSDLmm_1_1Event.html">Event</a> couldn't be pushed. </dl>    </td>
  </tr>
</table>
<a name="d12" doxytag="SDLmm::Event::QueryUNICODE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::QueryUNICODE (
          </b></td>
          <td valign="bottom"><b>
)<code> [inline, static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Query the current UNICODE translation mode.
<p>
This function checks whether UNICODE translation is enabled or disabled. <dl compact><dt>
<b>Returns: </b><dd>
true if UNICODE translation is enabled, false otherwise. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d10">EnableUNICODE</a>, <a class="el" href="classSDLmm_1_1Event.html#d11">DisableUNICODE</a> </dl>    </td>
  </tr>
</table>
<a name="d1" doxytag="SDLmm::Event::SetEventFilter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void SDLmm::Event::SetEventFilter (
          </b></td>
          <td valign="bottom"><b>
SDL_EventFilter <em>filter</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets up a filter to process all events before they are posted to the event queue.
<p>
This function sets up a filter to process all events before they are posted to the event queue. This is a very powerful and flexible feature. The filter is prototyped as:
<p>
<div class="fragment"><pre>      <font class="keyword">typedef</font> int (*SDL_EventFilter)(<font class="keyword">const</font> SDL_Event *event);</pre></div>
<p>
If the filter returns 1, then the event will be added to the internal queue. If it returns 0, then the event will be dropped from the queue. This allows selective filtering of dynamically.
<p>
There is one caveat when dealing with the SDL_QUITEVENT event type. The event filter is only called when the window manager desires to close the application window. If the event filter returns 1, then the window will be closed, otherwise the window will remain open if possible. If the quit event is generated by an interrupt signal, it will bypass the internal queue and be delivered to the application at the next event poll.
<p>
<dl compact><dt>
<b>Note: </b><dd>
Events pushed onto the queue with <a class="el" href="classSDLmm_1_1Event.html#a2">Push</a>() or Peep() do not get passed through the event filter.
<p>
</dl><dl compact><dt>
<b>Warning: </b><dd>
Be careful! The event filter function may run in a different thread so be careful what you do within it. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d2">GetEventFilter</a>() </dl>    </td>
  </tr>
</table>
<a name="d8" doxytag="SDLmm::Event::SetModState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void SDLmm::Event::SetModState (
          </b></td>
          <td valign="bottom"><b>
SDLMod <em>modstate</em>&nbsp;)<code> [static]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the current key modifier state.
<p>
The inverse of <a class="el" href="classSDLmm_1_1Event.html#d7">GetModState</a>(), <a class="el" href="classSDLmm_1_1Event.html#d8">SetModState</a>() allows you to impose modifier key states on your application.
<p>
Simply pass your desired modifier states into <em>modstate</em>. This value my be a logical OR'd combination of the symbols documented in <a class="el" href="classSDLmm_1_1Event.html#d7">GetModState</a>(). <dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>modstate</em>
&nbsp;</td><td>
the new key modifier state. </td></tr>
</table>
</dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1Event.html#d7">GetModState</a>() </dl>    </td>
  </tr>
</table>
<a name="a1" doxytag="SDLmm::Event::Wait"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
bool SDLmm::Event::Wait (
          </b></td>
          <td valign="bottom"><b>
bool <em>fetch</em> = true&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Waits indefinitely for the next available event.
<p>
This function will wait for an event to become available. It will not return until an event is queued. <dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>fetch</em>
&nbsp;</td><td>
if false, don't fetch and dequeue the event once it becomes available. </td></tr>
</table>
</dl><dl compact><dt>
<b>Returns: </b><dd>
true when an event became available and false if something went wrong. </dl><dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a>, <a class="el" href="classSDLmm_1_1Event.html#d4">HandleEvents</a>(), <a class="el" href="classSDLmm_1_1Event.html#a0">Poll</a>() </dl>    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="m0" doxytag="SDLmm::Event::me"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
SDL_Event SDLmm::Event::me
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The event structure.
<p>
If you use the event polling method, this is where the result is stored. You should consider using the more elegant <a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a> method instead however. <dl compact><dt>
<b>See also: </b><dd>
<a class="el" href="classSDLmm_1_1EventHandler.html">EventHandler</a>, <a class="el" href="classSDLmm_1_1Event.html#d4">HandleEvents</a>(), <a class="el" href="classSDLmm_1_1Event.html#a0">Poll</a>(), <a class="el" href="classSDLmm_1_1Event.html#a1">Wait</a>() </dl>    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="sdlmm__event_8h-source.html">sdlmm_event.h</a><li><a class="el" href="sdlmm__event_8cpp.html">sdlmm_event.cpp</a></ul>
<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>