<!-- INDEX START -->
<h3 id="TOP">Index</h3>
-<ul><li><a href="#NAME">NAME</a></li>
+<ul><li><a href="#NAME">NAME</a>
+<ul><li><a href="#CATEGORY">CATEGORY</a></li>
+</ul>
+</li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#METHODS">METHODS</a>
</ul>
</li>
<li><a href="#Window_resize_events">Window resize events</a>
-<ul><li><a href="#resize_x_resize_y">resize_x, resize_y</a></li>
+<ul><li><a href="#resize_w_resize_h">resize_w, resize_h</a></li>
</ul>
</li>
<li><a href="#Window_expose_events">Window expose events</a></li>
<p>SDL::Event - General event structure</p>
</div>
+<h2 id="CATEGORY">CATEGORY</h2>
+<div id="CATEGORY_CONTENT">
+<p>Core, Events, Structure</p>
+
+</div>
<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SYNOPSIS_CONTENT">
<pre> use SDL::Event; # for the event object itself
</div>
<h2 id="Joystick_axis_events">Joystick axis events</h2>
<div id="Joystick_axis_events_CONTENT">
+<p>A <code>SDL_JOYAXISMOTION</code> event occurs whenever a user moves an axis on the joystick.</p>
</div>
<h3 id="jaxis_which">jaxis_which</h3>
<div id="jaxis_which_CONTENT">
+<p>The field <code>jaxis_which</code> is the index of the joystick that reported the event.</p>
</div>
<h3 id="jaxis_axis">jaxis_axis</h3>
<div id="jaxis_axis_CONTENT">
+<p>The <code>jaxis_axis</code> is the index of the axis (for a more detailed explaination see the Joystick section).</p>
</div>
<h3 id="jaxis_value">jaxis_value</h3>
<div id="jaxis_value_CONTENT">
+<p><code>jaxis_value</code> is the current position of the axis (range: -32768 to 32767).</p>
</div>
<h2 id="Joystick_button_events">Joystick button events</h2>
<div id="Joystick_button_events_CONTENT">
+<p>A <code>SDL_JOYBUTTONDOWN</code> or <code>SDL_JOYBUTTONUP</code> event occurs when ever a user presses
+or releases a button on a joystick.</p>
</div>
<h3 id="jbutton_which">jbutton_which</h3>
<div id="jbutton_which_CONTENT">
+<p>The field <code>jbutton_which</code> is the index of the joystick that reported the event.</p>
</div>
<h3 id="jbutton_button">jbutton_button</h3>
<div id="jbutton_button_CONTENT">
+<p>The <code>jbutton_button</code> is the index of the button (for a more detailed explanation see the Joystick section).</p>
</div>
<h3 id="jbutton_state">jbutton_state</h3>
<div id="jbutton_state_CONTENT">
+<p><code>jbutton_state</code> is the current state of the button which is either <code>jbutton_SDL_PRESSED</code>
+or <code>jbutton_SDL_RELEASED</code>. </p>
</div>
<h2 id="Joystick_hat_events">Joystick hat events</h2>
<div id="Joystick_hat_events_CONTENT">
+<p>A <code>SDL_JOYHATMOTION</code> event occurs when ever a user moves a hat on the joystick. </p>
</div>
<h3 id="jhat_which">jhat_which</h3>
<div id="jhat_which_CONTENT">
+<p>The field <code>jhat_which</code> is the index of the joystick that reported the event.</p>
</div>
<h3 id="jhat_hat">jhat_hat</h3>
<div id="jhat_hat_CONTENT">
+<p><code>jhat_hat</code> is the index of the hat (for a more detailed explanation see the Joystick section).</p>
</div>
<h3 id="jhat_value">jhat_value</h3>
<div id="jhat_value_CONTENT">
+<p><code>jhat_value</code> is the current position of the hat. It is a bitwise OR'd combination of the following
+values (whose meanings should be pretty obvious):</p>
+<ul>
+ <li><code>SDL_HAT_CENTERED</code> </li>
+ <li><code>SDL_HAT_UP</code> </li>
+ <li><code>SDL_HAT_RIGHT</code> </li>
+ <li><code>SDL_HAT_DOWN</code> </li>
+ <li><code>SDL_HAT_LEFT</code></li>
+</ul>
+
+<p>The following defines are also provided:</p>
+<ul>
+ <li><code>SDL_HAT_RIGHTUP</code> </li>
+ <li><code>SDL_HAT_RIGHTDOWN</code> </li>
+ <li><code>SDL_HAT_LEFTUP</code> </li>
+ <li><code>SDL_HAT_LEFTDOWN</code></li>
+</ul>
+
</div>
<h2 id="Joystrick_trackball_events">Joystrick trackball events</h2>
<div id="Joystrick_trackball_events_CONTENT">
+<p>A <code>SDL_JOYBALLMOTION</code> event occurs when a user moves a trackball on the joystick.</p>
</div>
<h3 id="jball_which">jball_which</h3>
<div id="jball_which_CONTENT">
+<p>The field <code>jball_which</code> is the index of the joystick that reported the event.</p>
</div>
<h3 id="jball_ball">jball_ball</h3>
<div id="jball_ball_CONTENT">
+<p><code>jball_ball</code> is the index of the trackball (for a more detailed explanation see the Joystick section).</p>
</div>
<h3 id="jball_xrel_jball_yrel">jball_xrel, jball_yrel</h3>
<div id="jball_xrel_jball_yrel_CONTENT">
+<p>Trackballs only return relative motion, this is the change in position on the ball since it was last
+polled (last cycle of the event loop) and it is stored in <code>jball_xrel</code> and <code>jball_yrel</code>.</p>
</div>
<h2 id="Window_resize_events">Window resize events</h2>
<div id="Window_resize_events_CONTENT">
</div>
-<h3 id="resize_x_resize_y">resize_x, resize_y</h3>
-<div id="resize_x_resize_y_CONTENT">
+<h3 id="resize_w_resize_h">resize_w, resize_h</h3>
+<div id="resize_w_resize_h_CONTENT">
+<p>When <code>SDL_RESIZABLE</code> is passed as a flag to <code>SDL_SetVideoMode</code> the user is allowed to resize the
+applications window. When the window is resized an <code>SDL_VIDEORESIZE</code> is reported, with the new
+window width and height values stored in the resize structure's <code>resize_w</code> and <code>resize_h</code>.
+When an <code>SDL_VIDEORESIZE</code> is received the window should be resized to the new dimensions using
+SDL_SetVideoMode. </p>
</div>
<h2 id="Window_expose_events">Window expose events</h2>
<div id="Window_expose_events_CONTENT">
+<p>A <code>VIDEOEXPOSE</code> event is triggered when the screen has been modified outside of the application,
+usually by the window manager and needs to be redrawn.</p>
</div>
<h2 id="System_window_manager_events">System window manager events</h2>
<div id="System_window_manager_events_CONTENT">
+<p>The system window manager event contains a system-specific information about unknown window manager
+events. If you enable this event using <code>SDL_EventState</code>, it will be generated whenever unhandled
+events are received from the window manager. This can be used, for example, to implement cut-and-paste
+in your application.</p>
+<p>If you want to obtain system-specific information about the window manager, you can fill in the
+version member of a SDL_SysWMinfo structure (details can be found in SDL_syswm.h, which must be included)
+using the SDL_VERSION() macro found in SDL_version.h, and pass it to the function:</p>
+<pre> int SDL_GetWMInfo(SDL_SysWMinfo *info);
+
+</pre>
+<p>See <a href="http://www.libsdl.org/cgi/docwiki.cgi/SDL_SysWMEvent">http://www.libsdl.org/cgi/docwiki.cgi/SDL_SysWMEvent</a></p>
</div>
<h3 id="syswm_msg">syswm_msg</h3>
</div>
<h2 id="User_defined_events">User defined events</h2>
<div id="User_defined_events_CONTENT">
+<p>This event is unique, it is never created by SDL but only by the user. The event can be pushed onto
+the event queue using <code>SDL::Events::push_event</code>. The contents of the structure members are completely up to the
+programmer, the only requirement is that type is a value from <code>SDL_USEREVENT</code> to <code>SDL_NUMEVENTS-1</code> (inclusive)</p>
+<pre> my $event = SDL::Event->new();
+ $event->type ( SDL_USEREVENT + 3 );
+ $event->event_code(10);
+ $event->data1('hello event');
+
+ SDL::Events::push_event($event);
+
+</pre>
</div>
<h3 id="user_code">user_code</h3>
<div id="user_code_CONTENT">
+<p>User defined event code (integer).</p>
</div>
<h3 id="user_data1_user_data2">user_data1, user_data2</h3>
<div id="user_data1_user_data2_CONTENT">
+<p>User defined data.</p>
</div>
<h2 id="Quit_event">Quit event</h2>
<div id="Quit_event_CONTENT">
-<p>Create a new SDL::Event object.</p>
+<p>As can be seen, the <code>SDL_QuitEvent</code> structure serves no useful purpose. The event itself, on the other hand,
+is very important. If you filter out or ignore a quit event then it is impossible for the user to close the
+window. On the other hand, if you do accept a quit event then the application window will be closed, and
+screen updates will still report success even though the application will no longer be visible.</p>
+<p><strong>Note</strong>: The macro SDL_QuitRequested will return non-zero if a quit event is pending </p>
</div>
<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
</div>
<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SEE_ALSO_CONTENT">
-<p><cite>perl</cite></p>
+<p><cite>perl</cite>
+</p>
</div>
</div>
\ No newline at end of file