Skip to content
Permalink
Browse files

Updated from the SDL Documentation Project

  • Loading branch information
slouken committed Sep 14, 2001
1 parent 279dbd0 commit 30dd107dd27d76404da5844cf3f4f77c2848a82e
Showing 355 changed files with 2,317 additions and 1,398 deletions.
@@ -70,6 +70,7 @@ EXTRA_DIST = \
sdlenableunicode.html \
sdlevent.html \
sdleventstate.html \
sdlexposeevent.html \
sdlfillrect.html \
sdlflip.html \
sdlfreecursor.html \
@@ -80,6 +81,7 @@ EXTRA_DIST = \
sdlgetaudiostatus.html \
sdlgetcliprect.html \
sdlgetcursor.html \
sdlgeterror.html \
sdlgeteventfilter.html \
sdlgetgammaramp.html \
sdlgetkeyname.html \
@@ -85,7 +85,7 @@
></DT
><DT
><A
HREF="event.html#AEN3269"
HREF="event.html#AEN3307"
>Introduction</A
></DT
><DT
@@ -105,7 +105,7 @@
><H1
CLASS="SECT1"
><A
NAME="AEN3269"
NAME="AEN3307"
>Introduction</A
></H1
><P
@@ -114,7 +114,7 @@
CLASS="PROGRAMLISTING"
>SDL_Init(SDL_INIT_VIDEO);</PRE
>
Interally, SDL stores all the events waiting to be handled in an event queue. Using functions like <A
Internally, SDL stores all the events waiting to be handled in an event queue. Using functions like <A
HREF="sdlpollevent.html"
><TT
CLASS="FUNCTION"
@@ -173,6 +173,243 @@
> &#8212; Enable/disable joystick event polling</DT
></DL
></DIV
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN4928"
></A
><P
></P
><TABLE
BORDER="0"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlpumpevents.html"
>SDL_PumpEvents</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Pumps the event loop, gathering events from the input devices</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlpeepevents.html"
>SDL_PeepEvents</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Checks the event queue for messages and optionally returns them</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlpollevent.html"
>SDL_PollEvent</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Polls for currently pending events</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlwaitevent.html"
>SDL_WaitEvent</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Waits indefinitely for the next available event</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlpushevent.html"
>SDL_PushEvent</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Pushes an event onto the event queue</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlseteventfilter.html"
>SDL_SetEventFilter</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Sets up a filter to process all events</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdleventstate.html"
>SDL_EventState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Allows you to set the state of processing certain events</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlgetkeystate.html"
>SDL_GetKeyState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Get a snapshot of the current keyboard state</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlgetmodstate.html"
>SDL_GetModState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Get the state of modifier keys</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlsetmodstate.html"
>SDL_SetModState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Set the state of modifier keys</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlgetkeyname.html"
>SDL_GetKeyName</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Get the name of an SDL virtual keysym</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlenableunicode.html"
>SDL_EnableUNICODE</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Enable UNICODE translation</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlenablekeyrepeat.html"
>SDL_EnableKeyRepeat</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Set keyboard repeat rate</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlgetmousestate.html"
>SDL_GetMouseState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Retrieve the current state of the mouse</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlgetrelativemousestate.html"
>SDL_GetRelativeMouseState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Retrieve the current state of the mouse</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdlgetappstate.html"
>SDL_GetAppState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Get the state of the application</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="sdljoystickeventstate.html"
>SDL_JoystickEventState</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>Enable/disable joystick event polling</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
@@ -132,6 +132,11 @@
> &#8212; Window resize event structure</DT
><DT
><A
HREF="sdlexposeevent.html"
>SDL_ExposeEvent</A
> &#8212; Quit requested event</DT
><DT
><A
HREF="sdlsyswmevent.html"
>SDL_SysWMEvent</A
> &#8212; Platform-dependent window manager event.</DT
@@ -108,6 +108,11 @@
HREF="sdlwasinit.html"
>SDL_WasInit</A
> &#8212; Check which subsystems are initialized</DT
><DT
><A
HREF="sdlgeterror.html"
>SDL_GetError</A
> &#8212; Get SDL error string</DT
></DL
></DIV
><P
@@ -132,7 +132,7 @@

/* Mix as much data as possible */
len = ( len &#62; audio_len ? audio_len : len );
SDL_MixAudio(stream, audio_pos, len, SDL_MIX_MAXVOLUME)
SDL_MixAudio(stream, audio_pos, len, SDL_MIX_MAXVOLUME);
audio_pos += len;
audio_len -= len;
}
@@ -86,7 +86,7 @@
CLASS="FUNCTION"
>SDL_InitSubSystem</TT
></A
>. <TT
>). <TT
CLASS="FUNCTION"
>SDL_Init</TT
> must be called before any other SDL function. It automatically initializes the Event Handling, File I/O and Threading subsystems and it takes a parameter specifying which other subsystems to initialize. So, to initialize the default subsystems and the Video subsystems you would call:
@@ -201,7 +201,7 @@

// Play first and second track and 10 seconds of third track:
if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
SDL_CDPlayTracks(cdrom, 0, 0, 2, 10);</PRE
SDL_CDPlayTracks(cdrom, 0, 0, 2, CD_FPS * 10);</PRE
></P
></DIV
></DIV
@@ -436,7 +436,7 @@
>Advanced Joystick Functions</A
></H2
><P
>That takes care of the controls that you can count on being on every joystick under the sun, but there are a few extra things that SDL can support. Joyballs are next on our list, they are alot like axis we a few minor differences. Joyballs store relative changes unlike the the absolute postion stored in a axis event. Also one trackball event contains both the change in x and they change in y. Our case for it is as follows:</P
>That takes care of the controls that you can count on being on every joystick under the sun, but there are a few extra things that SDL can support. Joyballs are next on our list, they are alot like axis with a few minor differences. Joyballs store relative changes unlike the the absolute postion stored in a axis event. Also one trackball event contains both the change in x and they change in y. Our case for it is as follows:</P
><DIV
CLASS="EXAMPLE"
><A
@@ -569,17 +569,17 @@
><PRE
CLASS="PROGRAMLISTING"
> case SDL_JOYHATMOTION: /* Handle Hat Motion */
if ( event.jhat.hat | SDL_HAT_UP )
if ( event.jhat.hat &#38; SDL_HAT_UP )
{
/* Do up stuff here */
}

if ( event.jhat.hat | SDL_HAT_LEFT )
if ( event.jhat.hat &#38; SDL_HAT_LEFT )
{
/* Do left stuff here */
}

if ( event.jhat.hat | SDL_HAT_RIGHTDOWN )
if ( event.jhat.hat &#38; SDL_HAT_RIGHTDOWN )
{
/* Do right and down together stuff here */
}

0 comments on commit 30dd107

Please sign in to comment.