The SDL 1.3 documentation will be primarily online wiki based:
authorSam Lantinga <slouken@libsdl.org>
Wed, 07 Oct 2009 14:29:59 +0000
changeset 33526dc250ebdd80
parent 3351 8e0182c236d8
child 3353 6b14223dd5c7
The SDL 1.3 documentation will be primarily online wiki based:
http://wiki.libsdl.org/

Please contact Lauren MacDonell laleh_aziz cox.net who is coordinating it.
Makefile.in
docs.html
docs/html/audio.html
docs/html/cdrom.html
docs/html/event.html
docs/html/eventfunctions.html
docs/html/eventstructures.html
docs/html/general.html
docs/html/guide.html
docs/html/guideaboutsdldoc.html
docs/html/guideaudioexamples.html
docs/html/guidebasicsinit.html
docs/html/guidecdromexamples.html
docs/html/guidecredits.html
docs/html/guideeventexamples.html
docs/html/guideexamples.html
docs/html/guideinput.html
docs/html/guideinputkeyboard.html
docs/html/guidepreface.html
docs/html/guidethebasics.html
docs/html/guidetimeexamples.html
docs/html/guidevideo.html
docs/html/guidevideoopengl.html
docs/html/index.html
docs/html/joystick.html
docs/html/reference.html
docs/html/sdlactiveevent.html
docs/html/sdladdtimer.html
docs/html/sdlaudiocvt.html
docs/html/sdlaudiospec.html
docs/html/sdlblitsurface.html
docs/html/sdlbuildaudiocvt.html
docs/html/sdlcd.html
docs/html/sdlcdclose.html
docs/html/sdlcdeject.html
docs/html/sdlcdname.html
docs/html/sdlcdnumdrives.html
docs/html/sdlcdopen.html
docs/html/sdlcdpause.html
docs/html/sdlcdplay.html
docs/html/sdlcdplaytracks.html
docs/html/sdlcdresume.html
docs/html/sdlcdstatus.html
docs/html/sdlcdstop.html
docs/html/sdlcdtrack.html
docs/html/sdlcloseaudio.html
docs/html/sdlcolor.html
docs/html/sdlcondbroadcast.html
docs/html/sdlcondsignal.html
docs/html/sdlcondwait.html
docs/html/sdlcondwaittimeout.html
docs/html/sdlconvertaudio.html
docs/html/sdlconvertsurface.html
docs/html/sdlcreatecond.html
docs/html/sdlcreatecursor.html
docs/html/sdlcreatemutex.html
docs/html/sdlcreatergbsurface.html
docs/html/sdlcreatergbsurfacefrom.html
docs/html/sdlcreatesemaphore.html
docs/html/sdlcreatethread.html
docs/html/sdlcreateyuvoverlay.html
docs/html/sdldelay.html
docs/html/sdldestroycond.html
docs/html/sdldestroymutex.html
docs/html/sdldestroysemaphore.html
docs/html/sdldisplayformat.html
docs/html/sdldisplayformatalpha.html
docs/html/sdldisplayyuvoverlay.html
docs/html/sdlenablekeyrepeat.html
docs/html/sdlenableunicode.html
docs/html/sdlenvvars.html
docs/html/sdlevent.html
docs/html/sdleventstate.html
docs/html/sdlexposeevent.html
docs/html/sdlfillrect.html
docs/html/sdlflip.html
docs/html/sdlfreecursor.html
docs/html/sdlfreesurface.html
docs/html/sdlfreewav.html
docs/html/sdlfreeyuvoverlay.html
docs/html/sdlgetappstate.html
docs/html/sdlgetaudiostatus.html
docs/html/sdlgetcliprect.html
docs/html/sdlgetcursor.html
docs/html/sdlgeterror.html
docs/html/sdlgeteventfilter.html
docs/html/sdlgetgammaramp.html
docs/html/sdlgetkeyname.html
docs/html/sdlgetkeystate.html
docs/html/sdlgetmodstate.html
docs/html/sdlgetmousestate.html
docs/html/sdlgetrelativemousestate.html
docs/html/sdlgetrgb.html
docs/html/sdlgetrgba.html
docs/html/sdlgetthreadid.html
docs/html/sdlgetticks.html
docs/html/sdlgetvideoinfo.html
docs/html/sdlgetvideosurface.html
docs/html/sdlglattr.html
docs/html/sdlglgetattribute.html
docs/html/sdlglgetprocaddress.html
docs/html/sdlglloadlibrary.html
docs/html/sdlglsetattribute.html
docs/html/sdlglswapbuffers.html
docs/html/sdlinit.html
docs/html/sdlinitsubsystem.html
docs/html/sdljoyaxisevent.html
docs/html/sdljoyballevent.html
docs/html/sdljoybuttonevent.html
docs/html/sdljoyhatevent.html
docs/html/sdljoystickclose.html
docs/html/sdljoystickeventstate.html
docs/html/sdljoystickgetaxis.html
docs/html/sdljoystickgetball.html
docs/html/sdljoystickgetbutton.html
docs/html/sdljoystickgethat.html
docs/html/sdljoystickindex.html
docs/html/sdljoystickname.html
docs/html/sdljoysticknumaxes.html
docs/html/sdljoysticknumballs.html
docs/html/sdljoysticknumbuttons.html
docs/html/sdljoysticknumhats.html
docs/html/sdljoystickopen.html
docs/html/sdljoystickopened.html
docs/html/sdljoystickupdate.html
docs/html/sdlkey.html
docs/html/sdlkeyboardevent.html
docs/html/sdlkeysym.html
docs/html/sdlkillthread.html
docs/html/sdllistmodes.html
docs/html/sdlloadbmp.html
docs/html/sdlloadwav.html
docs/html/sdllockaudio.html
docs/html/sdllocksurface.html
docs/html/sdllockyuvoverlay.html
docs/html/sdlmaprgb.html
docs/html/sdlmaprgba.html
docs/html/sdlmixaudio.html
docs/html/sdlmousebuttonevent.html
docs/html/sdlmousemotionevent.html
docs/html/sdlmutexp.html
docs/html/sdlmutexv.html
docs/html/sdlnumjoysticks.html
docs/html/sdlopenaudio.html
docs/html/sdloverlay.html
docs/html/sdlpalette.html
docs/html/sdlpauseaudio.html
docs/html/sdlpeepevents.html
docs/html/sdlpixelformat.html
docs/html/sdlpollevent.html
docs/html/sdlpumpevents.html
docs/html/sdlpushevent.html
docs/html/sdlquit.html
docs/html/sdlquitevent.html
docs/html/sdlquitsubsystem.html
docs/html/sdlrect.html
docs/html/sdlremovetimer.html
docs/html/sdlresizeevent.html
docs/html/sdlsavebmp.html
docs/html/sdlsempost.html
docs/html/sdlsemtrywait.html
docs/html/sdlsemvalue.html
docs/html/sdlsemwait.html
docs/html/sdlsemwaittimeout.html
docs/html/sdlsetalpha.html
docs/html/sdlsetcliprect.html
docs/html/sdlsetcolorkey.html
docs/html/sdlsetcolors.html
docs/html/sdlsetcursor.html
docs/html/sdlseteventfilter.html
docs/html/sdlsetgamma.html
docs/html/sdlsetgammaramp.html
docs/html/sdlsetmodstate.html
docs/html/sdlsetpalette.html
docs/html/sdlsettimer.html
docs/html/sdlsetvideomode.html
docs/html/sdlshowcursor.html
docs/html/sdlsurface.html
docs/html/sdlsyswmevent.html
docs/html/sdlthreadid.html
docs/html/sdlunlockaudio.html
docs/html/sdlunlocksurface.html
docs/html/sdlunlockyuvoverlay.html
docs/html/sdlupdaterect.html
docs/html/sdlupdaterects.html
docs/html/sdluserevent.html
docs/html/sdlvideodrivername.html
docs/html/sdlvideoinfo.html
docs/html/sdlvideomodeok.html
docs/html/sdlwaitevent.html
docs/html/sdlwaitthread.html
docs/html/sdlwarpmouse.html
docs/html/sdlwasinit.html
docs/html/sdlwmgetcaption.html
docs/html/sdlwmgrabinput.html
docs/html/sdlwmiconifywindow.html
docs/html/sdlwmsetcaption.html
docs/html/sdlwmseticon.html
docs/html/sdlwmtogglefullscreen.html
docs/html/thread.html
docs/html/time.html
docs/html/video.html
docs/html/wm.html
docs/images/rainbow.gif
docs/index.html
docs/man3/SDLKey.3
docs/man3/SDL_ActiveEvent.3
docs/man3/SDL_AddTimer.3
docs/man3/SDL_AudioCVT.3
docs/man3/SDL_AudioSpec.3
docs/man3/SDL_BlitSurface.3
docs/man3/SDL_BuildAudioCVT.3
docs/man3/SDL_CD.3
docs/man3/SDL_CDClose.3
docs/man3/SDL_CDEject.3
docs/man3/SDL_CDName.3
docs/man3/SDL_CDNumDrives.3
docs/man3/SDL_CDOpen.3
docs/man3/SDL_CDPause.3
docs/man3/SDL_CDPlay.3
docs/man3/SDL_CDPlayTracks.3
docs/man3/SDL_CDResume.3
docs/man3/SDL_CDStatus.3
docs/man3/SDL_CDStop.3
docs/man3/SDL_CDtrack.3
docs/man3/SDL_CloseAudio.3
docs/man3/SDL_Color.3
docs/man3/SDL_CondBroadcast.3
docs/man3/SDL_CondSignal.3
docs/man3/SDL_CondWait.3
docs/man3/SDL_CondWaitTimeout.3
docs/man3/SDL_ConvertAudio.3
docs/man3/SDL_ConvertSurface.3
docs/man3/SDL_CreateCond.3
docs/man3/SDL_CreateCursor.3
docs/man3/SDL_CreateMutex.3
docs/man3/SDL_CreateRGBSurface.3
docs/man3/SDL_CreateRGBSurfaceFrom.3
docs/man3/SDL_CreateSemaphore.3
docs/man3/SDL_CreateThread.3
docs/man3/SDL_CreateYUVOverlay.3
docs/man3/SDL_Delay.3
docs/man3/SDL_DestroyCond.3
docs/man3/SDL_DestroyMutex.3
docs/man3/SDL_DestroySemaphore.3
docs/man3/SDL_DisplayFormat.3
docs/man3/SDL_DisplayFormatAlpha.3
docs/man3/SDL_DisplayYUVOverlay.3
docs/man3/SDL_EnableKeyRepeat.3
docs/man3/SDL_EnableUNICODE.3
docs/man3/SDL_Event.3
docs/man3/SDL_EventState.3
docs/man3/SDL_ExposeEvent.3
docs/man3/SDL_FillRect.3
docs/man3/SDL_Flip.3
docs/man3/SDL_FreeCursor.3
docs/man3/SDL_FreeSurface.3
docs/man3/SDL_FreeWAV.3
docs/man3/SDL_FreeYUVOverlay.3
docs/man3/SDL_GL_GetAttribute.3
docs/man3/SDL_GL_GetProcAddress.3
docs/man3/SDL_GL_LoadLibrary.3
docs/man3/SDL_GL_SetAttribute.3
docs/man3/SDL_GL_SwapBuffers.3
docs/man3/SDL_GLattr.3
docs/man3/SDL_GetAppState.3
docs/man3/SDL_GetAudioStatus.3
docs/man3/SDL_GetClipRect.3
docs/man3/SDL_GetCursor.3
docs/man3/SDL_GetError.3
docs/man3/SDL_GetEventFilter.3
docs/man3/SDL_GetGamma.3
docs/man3/SDL_GetGammaRamp.3
docs/man3/SDL_GetKeyName.3
docs/man3/SDL_GetKeyState.3
docs/man3/SDL_GetModState.3
docs/man3/SDL_GetMouseState.3
docs/man3/SDL_GetRGB.3
docs/man3/SDL_GetRGBA.3
docs/man3/SDL_GetRelativeMouseState.3
docs/man3/SDL_GetThreadID.3
docs/man3/SDL_GetTicks.3
docs/man3/SDL_GetVideoInfo.3
docs/man3/SDL_GetVideoSurface.3
docs/man3/SDL_Init.3
docs/man3/SDL_InitSubSystem.3
docs/man3/SDL_JoyAxisEvent.3
docs/man3/SDL_JoyBallEvent.3
docs/man3/SDL_JoyButtonEvent.3
docs/man3/SDL_JoyHatEvent.3
docs/man3/SDL_JoystickClose.3
docs/man3/SDL_JoystickEventState.3
docs/man3/SDL_JoystickGetAxis.3
docs/man3/SDL_JoystickGetBall.3
docs/man3/SDL_JoystickGetButton.3
docs/man3/SDL_JoystickGetHat.3
docs/man3/SDL_JoystickIndex.3
docs/man3/SDL_JoystickName.3
docs/man3/SDL_JoystickNumAxes.3
docs/man3/SDL_JoystickNumBalls.3
docs/man3/SDL_JoystickNumButtons.3
docs/man3/SDL_JoystickNumHats.3
docs/man3/SDL_JoystickOpen.3
docs/man3/SDL_JoystickOpened.3
docs/man3/SDL_JoystickUpdate.3
docs/man3/SDL_KeyboardEvent.3
docs/man3/SDL_KillThread.3
docs/man3/SDL_ListModes.3
docs/man3/SDL_LoadBMP.3
docs/man3/SDL_LoadWAV.3
docs/man3/SDL_LockAudio.3
docs/man3/SDL_LockSurface.3
docs/man3/SDL_LockYUVOverlay.3
docs/man3/SDL_MapRGB.3
docs/man3/SDL_MapRGBA.3
docs/man3/SDL_MixAudio.3
docs/man3/SDL_MouseButtonEvent.3
docs/man3/SDL_MouseMotionEvent.3
docs/man3/SDL_NumJoysticks.3
docs/man3/SDL_OpenAudio.3
docs/man3/SDL_Overlay.3
docs/man3/SDL_Palette.3
docs/man3/SDL_PauseAudio.3
docs/man3/SDL_PeepEvents.3
docs/man3/SDL_PixelFormat.3
docs/man3/SDL_PollEvent.3
docs/man3/SDL_PumpEvents.3
docs/man3/SDL_PushEvent.3
docs/man3/SDL_Quit.3
docs/man3/SDL_QuitEvent.3
docs/man3/SDL_QuitSubSystem.3
docs/man3/SDL_RWFromFile.3
docs/man3/SDL_Rect.3
docs/man3/SDL_RemoveTimer.3
docs/man3/SDL_ResizeEvent.3
docs/man3/SDL_SaveBMP.3
docs/man3/SDL_SemPost.3
docs/man3/SDL_SemTryWait.3
docs/man3/SDL_SemValue.3
docs/man3/SDL_SemWait.3
docs/man3/SDL_SemWaitTimeout.3
docs/man3/SDL_SetAlpha.3
docs/man3/SDL_SetClipRect.3
docs/man3/SDL_SetColorKey.3
docs/man3/SDL_SetColors.3
docs/man3/SDL_SetCursor.3
docs/man3/SDL_SetEventFilter.3
docs/man3/SDL_SetGamma.3
docs/man3/SDL_SetGammaRamp.3
docs/man3/SDL_SetModState.3
docs/man3/SDL_SetPalette.3
docs/man3/SDL_SetTimer.3
docs/man3/SDL_SetVideoMode.3
docs/man3/SDL_ShowCursor.3
docs/man3/SDL_Surface.3
docs/man3/SDL_SysWMEvent.3
docs/man3/SDL_ThreadID.3
docs/man3/SDL_UnlockAudio.3
docs/man3/SDL_UnlockSurface.3
docs/man3/SDL_UnlockYUVOverlay.3
docs/man3/SDL_UpdateRect.3
docs/man3/SDL_UpdateRects.3
docs/man3/SDL_UserEvent.3
docs/man3/SDL_VideoDriverName.3
docs/man3/SDL_VideoInfo.3
docs/man3/SDL_VideoModeOK.3
docs/man3/SDL_WM_GetCaption.3
docs/man3/SDL_WM_GrabInput.3
docs/man3/SDL_WM_IconifyWindow.3
docs/man3/SDL_WM_SetCaption.3
docs/man3/SDL_WM_SetIcon.3
docs/man3/SDL_WM_ToggleFullScreen.3
docs/man3/SDL_WaitEvent.3
docs/man3/SDL_WaitThread.3
docs/man3/SDL_WarpMouse.3
docs/man3/SDL_WasInit.3
docs/man3/SDL_keysym.3
docs/man3/SDL_mutexP.3
docs/man3/SDL_mutexV.3
     1.1 --- a/Makefile.in	Wed Oct 07 06:11:53 2009 +0000
     1.2 +++ b/Makefile.in	Wed Oct 07 14:29:59 2009 +0000
     1.3 @@ -10,7 +10,6 @@
     1.4  includedir = @includedir@
     1.5  datarootdir = @datarootdir@
     1.6  datadir	= @datadir@
     1.7 -mandir	= @mandir@
     1.8  auxdir	= @ac_aux_dir@
     1.9  distpath = $(srcdir)/..
    1.10  distdir = SDL-@SDL_VERSION@
    1.11 @@ -72,7 +71,7 @@
    1.12  update-revision:
    1.13  	$(SHELL) $(auxdir)/updaterev.sh
    1.14  
    1.15 -.PHONY: all update-revision install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
    1.16 +.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist
    1.17  
    1.18  -include $(OBJECTS:.lo=.d)
    1.19  @DEPENDS@
    1.20 @@ -86,7 +85,7 @@
    1.21  	$(AR) cru $@ $(SDLMAIN_OBJECTS)
    1.22  	$(RANLIB) $@
    1.23  
    1.24 -install: all install-bin install-hdrs install-lib install-data install-man
    1.25 +install: all install-bin install-hdrs install-lib install-data
    1.26  install-bin:
    1.27  	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
    1.28  	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
    1.29 @@ -106,14 +105,8 @@
    1.30  	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
    1.31  	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
    1.32  	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
    1.33 -install-man:
    1.34 -	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(mandir)/man3
    1.35 -	for src in $(srcdir)/docs/man3/*.3; do \
    1.36 -	    file=`echo $$src | sed -e 's|^.*/||'`; \
    1.37 -	    $(INSTALL) -m 644 $$src $(DESTDIR)$(mandir)/man3/$$file; \
    1.38 -	done
    1.39  
    1.40 -uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man
    1.41 +uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
    1.42  uninstall-bin:
    1.43  	rm -f $(DESTDIR)$(bindir)/sdl-config
    1.44  uninstall-hdrs:
    1.45 @@ -127,11 +120,6 @@
    1.46  	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
    1.47  uninstall-data:
    1.48  	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
    1.49 -uninstall-man:
    1.50 -	for src in $(srcdir)/docs/man3/*.3; do \
    1.51 -	    file=`echo $$src | sed -e 's|^.*/||'`; \
    1.52 -	    rm -f $(DESTDIR)$(mandir)/man3/$$file; \
    1.53 -	done
    1.54  
    1.55  clean:
    1.56  	rm -rf $(objects)
     2.1 --- a/docs.html	Wed Oct 07 06:11:53 2009 +0000
     2.2 +++ b/docs.html	Wed Oct 07 14:29:59 2009 +0000
     2.3 @@ -12,7 +12,7 @@
     2.4  	<a href="http://www.libsdl.org/">SDL website</A>.
     2.5  </P>
     2.6  
     2.7 -<H2> <A HREF="docs/index.html">API Documentation</A> </H2>
     2.8 +<H2> <A HREF="http://wiki.libsdl.org/">Online Documentation</A> </H2>
     2.9  
    2.10  <H2> SDL 1.2.10 Release Notes </H2>
    2.11  <P>
     3.1 --- a/docs/html/audio.html	Wed Oct 07 06:11:53 2009 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,242 +0,0 @@
     3.4 -<HTML
     3.5 -><HEAD
     3.6 -><TITLE
     3.7 ->Audio</TITLE
     3.8 -><META
     3.9 -NAME="GENERATOR"
    3.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    3.11 -"><LINK
    3.12 -REL="HOME"
    3.13 -TITLE="SDL Library Documentation"
    3.14 -HREF="index.html"><LINK
    3.15 -REL="UP"
    3.16 -TITLE="SDL Reference"
    3.17 -HREF="reference.html"><LINK
    3.18 -REL="PREVIOUS"
    3.19 -TITLE="SDL_JoystickClose"
    3.20 -HREF="sdljoystickclose.html"><LINK
    3.21 -REL="NEXT"
    3.22 -TITLE="SDL_AudioSpec"
    3.23 -HREF="sdlaudiospec.html"><META
    3.24 -NAME="KEYWORD"
    3.25 -CONTENT="audio"><META
    3.26 -NAME="KEYWORD"
    3.27 -CONTENT="function"></HEAD
    3.28 -><BODY
    3.29 -CLASS="CHAPTER"
    3.30 -BGCOLOR="#FFF8DC"
    3.31 -TEXT="#000000"
    3.32 -LINK="#0000ee"
    3.33 -VLINK="#551a8b"
    3.34 -ALINK="#ff0000"
    3.35 -><DIV
    3.36 -CLASS="NAVHEADER"
    3.37 -><TABLE
    3.38 -SUMMARY="Header navigation table"
    3.39 -WIDTH="100%"
    3.40 -BORDER="0"
    3.41 -CELLPADDING="0"
    3.42 -CELLSPACING="0"
    3.43 -><TR
    3.44 -><TH
    3.45 -COLSPAN="3"
    3.46 -ALIGN="center"
    3.47 ->SDL Library Documentation</TH
    3.48 -></TR
    3.49 -><TR
    3.50 -><TD
    3.51 -WIDTH="10%"
    3.52 -ALIGN="left"
    3.53 -VALIGN="bottom"
    3.54 -><A
    3.55 -HREF="sdljoystickclose.html"
    3.56 -ACCESSKEY="P"
    3.57 ->Prev</A
    3.58 -></TD
    3.59 -><TD
    3.60 -WIDTH="80%"
    3.61 -ALIGN="center"
    3.62 -VALIGN="bottom"
    3.63 -></TD
    3.64 -><TD
    3.65 -WIDTH="10%"
    3.66 -ALIGN="right"
    3.67 -VALIGN="bottom"
    3.68 -><A
    3.69 -HREF="sdlaudiospec.html"
    3.70 -ACCESSKEY="N"
    3.71 ->Next</A
    3.72 -></TD
    3.73 -></TR
    3.74 -></TABLE
    3.75 -><HR
    3.76 -ALIGN="LEFT"
    3.77 -WIDTH="100%"></DIV
    3.78 -><DIV
    3.79 -CLASS="CHAPTER"
    3.80 -><H1
    3.81 -><A
    3.82 -NAME="AUDIO"
    3.83 -></A
    3.84 ->Chapter 10. Audio</H1
    3.85 -><DIV
    3.86 -CLASS="TOC"
    3.87 -><DL
    3.88 -><DT
    3.89 -><B
    3.90 ->Table of Contents</B
    3.91 -></DT
    3.92 -><DT
    3.93 -><A
    3.94 -HREF="sdlaudiospec.html"
    3.95 ->SDL_AudioSpec</A
    3.96 ->&nbsp;--&nbsp;Audio Specification Structure</DT
    3.97 -><DT
    3.98 -><A
    3.99 -HREF="sdlopenaudio.html"
   3.100 ->SDL_OpenAudio</A
   3.101 ->&nbsp;--&nbsp;Opens the audio device with the desired parameters.</DT
   3.102 -><DT
   3.103 -><A
   3.104 -HREF="sdlpauseaudio.html"
   3.105 ->SDL_PauseAudio</A
   3.106 ->&nbsp;--&nbsp;Pauses and unpauses the audio callback processing</DT
   3.107 -><DT
   3.108 -><A
   3.109 -HREF="sdlgetaudiostatus.html"
   3.110 ->SDL_GetAudioStatus</A
   3.111 ->&nbsp;--&nbsp;Get the current audio state</DT
   3.112 -><DT
   3.113 -><A
   3.114 -HREF="sdlloadwav.html"
   3.115 ->SDL_LoadWAV</A
   3.116 ->&nbsp;--&nbsp;Load a WAVE file</DT
   3.117 -><DT
   3.118 -><A
   3.119 -HREF="sdlfreewav.html"
   3.120 ->SDL_FreeWAV</A
   3.121 ->&nbsp;--&nbsp;Frees previously opened WAV data</DT
   3.122 -><DT
   3.123 -><A
   3.124 -HREF="sdlaudiocvt.html"
   3.125 ->SDL_AudioCVT</A
   3.126 ->&nbsp;--&nbsp;Audio Conversion Structure</DT
   3.127 -><DT
   3.128 -><A
   3.129 -HREF="sdlbuildaudiocvt.html"
   3.130 ->SDL_BuildAudioCVT</A
   3.131 ->&nbsp;--&nbsp;Initializes a SDL_AudioCVT structure for conversion</DT
   3.132 -><DT
   3.133 -><A
   3.134 -HREF="sdlconvertaudio.html"
   3.135 ->SDL_ConvertAudio</A
   3.136 ->&nbsp;--&nbsp;Convert audio data to a desired audio format.</DT
   3.137 -><DT
   3.138 -><A
   3.139 -HREF="sdlmixaudio.html"
   3.140 ->SDL_MixAudio</A
   3.141 ->&nbsp;--&nbsp;Mix audio data</DT
   3.142 -><DT
   3.143 -><A
   3.144 -HREF="sdllockaudio.html"
   3.145 ->SDL_LockAudio</A
   3.146 ->&nbsp;--&nbsp;Lock out the callback function</DT
   3.147 -><DT
   3.148 -><A
   3.149 -HREF="sdlunlockaudio.html"
   3.150 ->SDL_UnlockAudio</A
   3.151 ->&nbsp;--&nbsp;Unlock the callback function</DT
   3.152 -><DT
   3.153 -><A
   3.154 -HREF="sdlcloseaudio.html"
   3.155 ->SDL_CloseAudio</A
   3.156 ->&nbsp;--&nbsp;Shuts down audio processing and closes the audio device.</DT
   3.157 -></DL
   3.158 -></DIV
   3.159 -><P
   3.160 ->Sound on the computer is translated from waves that you hear into a series of 
   3.161 -values, or samples, each representing the amplitude of the wave.  When these
   3.162 -samples are sent in a stream to a sound card, an approximation of the original
   3.163 -wave can be recreated.  The more bits used to represent the amplitude, and the
   3.164 -greater frequency these samples are gathered, the closer the approximated
   3.165 -sound is to the original, and the better the quality of sound.</P
   3.166 -><P
   3.167 ->This library supports both 8 and 16 bit signed and unsigned sound samples,
   3.168 -at frequencies ranging from 11025 Hz to 44100 Hz, depending on the 
   3.169 -underlying hardware.  If the hardware doesn't support the desired audio
   3.170 -format or frequency, it can be emulated if desired (See 
   3.171 -<A
   3.172 -HREF="sdlopenaudio.html"
   3.173 -><TT
   3.174 -CLASS="FUNCTION"
   3.175 ->SDL_OpenAudio()</TT
   3.176 -></A
   3.177 ->)</P
   3.178 -><P
   3.179 ->A commonly supported audio format is 16 bits per sample at 22050 Hz.</P
   3.180 -></DIV
   3.181 -><DIV
   3.182 -CLASS="NAVFOOTER"
   3.183 -><HR
   3.184 -ALIGN="LEFT"
   3.185 -WIDTH="100%"><TABLE
   3.186 -SUMMARY="Footer navigation table"
   3.187 -WIDTH="100%"
   3.188 -BORDER="0"
   3.189 -CELLPADDING="0"
   3.190 -CELLSPACING="0"
   3.191 -><TR
   3.192 -><TD
   3.193 -WIDTH="33%"
   3.194 -ALIGN="left"
   3.195 -VALIGN="top"
   3.196 -><A
   3.197 -HREF="sdljoystickclose.html"
   3.198 -ACCESSKEY="P"
   3.199 ->Prev</A
   3.200 -></TD
   3.201 -><TD
   3.202 -WIDTH="34%"
   3.203 -ALIGN="center"
   3.204 -VALIGN="top"
   3.205 -><A
   3.206 -HREF="index.html"
   3.207 -ACCESSKEY="H"
   3.208 ->Home</A
   3.209 -></TD
   3.210 -><TD
   3.211 -WIDTH="33%"
   3.212 -ALIGN="right"
   3.213 -VALIGN="top"
   3.214 -><A
   3.215 -HREF="sdlaudiospec.html"
   3.216 -ACCESSKEY="N"
   3.217 ->Next</A
   3.218 -></TD
   3.219 -></TR
   3.220 -><TR
   3.221 -><TD
   3.222 -WIDTH="33%"
   3.223 -ALIGN="left"
   3.224 -VALIGN="top"
   3.225 ->SDL_JoystickClose</TD
   3.226 -><TD
   3.227 -WIDTH="34%"
   3.228 -ALIGN="center"
   3.229 -VALIGN="top"
   3.230 -><A
   3.231 -HREF="reference.html"
   3.232 -ACCESSKEY="U"
   3.233 ->Up</A
   3.234 -></TD
   3.235 -><TD
   3.236 -WIDTH="33%"
   3.237 -ALIGN="right"
   3.238 -VALIGN="top"
   3.239 ->SDL_AudioSpec</TD
   3.240 -></TR
   3.241 -></TABLE
   3.242 -></DIV
   3.243 -></BODY
   3.244 -></HTML
   3.245 ->
   3.246 \ No newline at end of file
     4.1 --- a/docs/html/cdrom.html	Wed Oct 07 06:11:53 2009 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,260 +0,0 @@
     4.4 -<HTML
     4.5 -><HEAD
     4.6 -><TITLE
     4.7 ->CD-ROM</TITLE
     4.8 -><META
     4.9 -NAME="GENERATOR"
    4.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    4.11 -"><LINK
    4.12 -REL="HOME"
    4.13 -TITLE="SDL Library Documentation"
    4.14 -HREF="index.html"><LINK
    4.15 -REL="UP"
    4.16 -TITLE="SDL Reference"
    4.17 -HREF="reference.html"><LINK
    4.18 -REL="PREVIOUS"
    4.19 -TITLE="SDL_CloseAudio"
    4.20 -HREF="sdlcloseaudio.html"><LINK
    4.21 -REL="NEXT"
    4.22 -TITLE="SDL_CDNumDrives"
    4.23 -HREF="sdlcdnumdrives.html"><META
    4.24 -NAME="KEYWORD"
    4.25 -CONTENT="cdrom"><META
    4.26 -NAME="KEYWORD"
    4.27 -CONTENT="function"></HEAD
    4.28 -><BODY
    4.29 -CLASS="CHAPTER"
    4.30 -BGCOLOR="#FFF8DC"
    4.31 -TEXT="#000000"
    4.32 -LINK="#0000ee"
    4.33 -VLINK="#551a8b"
    4.34 -ALINK="#ff0000"
    4.35 -><DIV
    4.36 -CLASS="NAVHEADER"
    4.37 -><TABLE
    4.38 -SUMMARY="Header navigation table"
    4.39 -WIDTH="100%"
    4.40 -BORDER="0"
    4.41 -CELLPADDING="0"
    4.42 -CELLSPACING="0"
    4.43 -><TR
    4.44 -><TH
    4.45 -COLSPAN="3"
    4.46 -ALIGN="center"
    4.47 ->SDL Library Documentation</TH
    4.48 -></TR
    4.49 -><TR
    4.50 -><TD
    4.51 -WIDTH="10%"
    4.52 -ALIGN="left"
    4.53 -VALIGN="bottom"
    4.54 -><A
    4.55 -HREF="sdlcloseaudio.html"
    4.56 -ACCESSKEY="P"
    4.57 ->Prev</A
    4.58 -></TD
    4.59 -><TD
    4.60 -WIDTH="80%"
    4.61 -ALIGN="center"
    4.62 -VALIGN="bottom"
    4.63 -></TD
    4.64 -><TD
    4.65 -WIDTH="10%"
    4.66 -ALIGN="right"
    4.67 -VALIGN="bottom"
    4.68 -><A
    4.69 -HREF="sdlcdnumdrives.html"
    4.70 -ACCESSKEY="N"
    4.71 ->Next</A
    4.72 -></TD
    4.73 -></TR
    4.74 -></TABLE
    4.75 -><HR
    4.76 -ALIGN="LEFT"
    4.77 -WIDTH="100%"></DIV
    4.78 -><DIV
    4.79 -CLASS="CHAPTER"
    4.80 -><H1
    4.81 -><A
    4.82 -NAME="CDROM"
    4.83 -></A
    4.84 ->Chapter 11. CD-ROM</H1
    4.85 -><DIV
    4.86 -CLASS="TOC"
    4.87 -><DL
    4.88 -><DT
    4.89 -><B
    4.90 ->Table of Contents</B
    4.91 -></DT
    4.92 -><DT
    4.93 -><A
    4.94 -HREF="sdlcdnumdrives.html"
    4.95 ->SDL_CDNumDrives</A
    4.96 ->&nbsp;--&nbsp;Returns the number of CD-ROM drives on the system.</DT
    4.97 -><DT
    4.98 -><A
    4.99 -HREF="sdlcdname.html"
   4.100 ->SDL_CDName</A
   4.101 ->&nbsp;--&nbsp;Returns a human-readable, system-dependent identifier for the CD-ROM.</DT
   4.102 -><DT
   4.103 -><A
   4.104 -HREF="sdlcdopen.html"
   4.105 ->SDL_CDOpen</A
   4.106 ->&nbsp;--&nbsp;Opens a CD-ROM drive for access.</DT
   4.107 -><DT
   4.108 -><A
   4.109 -HREF="sdlcdstatus.html"
   4.110 ->SDL_CDStatus</A
   4.111 ->&nbsp;--&nbsp;Returns the current status of the given drive.</DT
   4.112 -><DT
   4.113 -><A
   4.114 -HREF="sdlcdplay.html"
   4.115 ->SDL_CDPlay</A
   4.116 ->&nbsp;--&nbsp;Play a CD</DT
   4.117 -><DT
   4.118 -><A
   4.119 -HREF="sdlcdplaytracks.html"
   4.120 ->SDL_CDPlayTracks</A
   4.121 ->&nbsp;--&nbsp;Play the given CD track(s)</DT
   4.122 -><DT
   4.123 -><A
   4.124 -HREF="sdlcdpause.html"
   4.125 ->SDL_CDPause</A
   4.126 ->&nbsp;--&nbsp;Pauses a CDROM</DT
   4.127 -><DT
   4.128 -><A
   4.129 -HREF="sdlcdresume.html"
   4.130 ->SDL_CDResume</A
   4.131 ->&nbsp;--&nbsp;Resumes a CDROM</DT
   4.132 -><DT
   4.133 -><A
   4.134 -HREF="sdlcdstop.html"
   4.135 ->SDL_CDStop</A
   4.136 ->&nbsp;--&nbsp;Stops a CDROM</DT
   4.137 -><DT
   4.138 -><A
   4.139 -HREF="sdlcdeject.html"
   4.140 ->SDL_CDEject</A
   4.141 ->&nbsp;--&nbsp;Ejects a CDROM</DT
   4.142 -><DT
   4.143 -><A
   4.144 -HREF="sdlcdclose.html"
   4.145 ->SDL_CDClose</A
   4.146 ->&nbsp;--&nbsp;Closes a SDL_CD handle</DT
   4.147 -><DT
   4.148 -><A
   4.149 -HREF="sdlcd.html"
   4.150 ->SDL_CD</A
   4.151 ->&nbsp;--&nbsp;CDROM Drive Information</DT
   4.152 -><DT
   4.153 -><A
   4.154 -HREF="sdlcdtrack.html"
   4.155 ->SDL_CDtrack</A
   4.156 ->&nbsp;--&nbsp;CD Track Information Structure</DT
   4.157 -></DL
   4.158 -></DIV
   4.159 -><P
   4.160 ->SDL supports audio control of up to 32 local CD-ROM drives at once.</P
   4.161 -><P
   4.162 ->You use this API to perform all the basic functions of a CD player,
   4.163 -including listing the tracks, playing, stopping, and ejecting the CD-ROM.
   4.164 -(Currently, multi-changer CD drives are not supported.)</P
   4.165 -><P
   4.166 ->Before you call any of the SDL CD-ROM functions, you must first call
   4.167 -"<TT
   4.168 -CLASS="FUNCTION"
   4.169 ->SDL_Init(SDL_INIT_CDROM)</TT
   4.170 ->", which scans the system for
   4.171 -CD-ROM drives, and sets the program up for audio control.  Check the 
   4.172 -return code, which should be <SPAN
   4.173 -CLASS="RETURNVALUE"
   4.174 ->0</SPAN
   4.175 ->, to see if there 
   4.176 -were any errors in starting up.</P
   4.177 -><P
   4.178 ->After you have initialized the library, you can find out how many drives
   4.179 -are available using the <TT
   4.180 -CLASS="FUNCTION"
   4.181 ->SDL_CDNumDrives()</TT
   4.182 -> function.  
   4.183 -The first drive listed is the system default CD-ROM drive.  After you have 
   4.184 -chosen a drive, and have opened it with <TT
   4.185 -CLASS="FUNCTION"
   4.186 ->SDL_CDOpen()</TT
   4.187 ->, 
   4.188 -you can check the status and start playing if there's a CD in the drive.</P
   4.189 -><P
   4.190 ->A CD-ROM is organized into one or more tracks, each consisting of a certain
   4.191 -number of "frames".  Each frame is ~2K in size, and at normal playing speed,
   4.192 -a CD plays 75 frames per second.  SDL works with the number of frames on a
   4.193 -CD, but this can easily be converted to the more familiar minutes/seconds
   4.194 -format by using the <TT
   4.195 -CLASS="FUNCTION"
   4.196 ->FRAMES_TO_MSF()</TT
   4.197 -> macro.</P
   4.198 -></DIV
   4.199 -><DIV
   4.200 -CLASS="NAVFOOTER"
   4.201 -><HR
   4.202 -ALIGN="LEFT"
   4.203 -WIDTH="100%"><TABLE
   4.204 -SUMMARY="Footer navigation table"
   4.205 -WIDTH="100%"
   4.206 -BORDER="0"
   4.207 -CELLPADDING="0"
   4.208 -CELLSPACING="0"
   4.209 -><TR
   4.210 -><TD
   4.211 -WIDTH="33%"
   4.212 -ALIGN="left"
   4.213 -VALIGN="top"
   4.214 -><A
   4.215 -HREF="sdlcloseaudio.html"
   4.216 -ACCESSKEY="P"
   4.217 ->Prev</A
   4.218 -></TD
   4.219 -><TD
   4.220 -WIDTH="34%"
   4.221 -ALIGN="center"
   4.222 -VALIGN="top"
   4.223 -><A
   4.224 -HREF="index.html"
   4.225 -ACCESSKEY="H"
   4.226 ->Home</A
   4.227 -></TD
   4.228 -><TD
   4.229 -WIDTH="33%"
   4.230 -ALIGN="right"
   4.231 -VALIGN="top"
   4.232 -><A
   4.233 -HREF="sdlcdnumdrives.html"
   4.234 -ACCESSKEY="N"
   4.235 ->Next</A
   4.236 -></TD
   4.237 -></TR
   4.238 -><TR
   4.239 -><TD
   4.240 -WIDTH="33%"
   4.241 -ALIGN="left"
   4.242 -VALIGN="top"
   4.243 ->SDL_CloseAudio</TD
   4.244 -><TD
   4.245 -WIDTH="34%"
   4.246 -ALIGN="center"
   4.247 -VALIGN="top"
   4.248 -><A
   4.249 -HREF="reference.html"
   4.250 -ACCESSKEY="U"
   4.251 ->Up</A
   4.252 -></TD
   4.253 -><TD
   4.254 -WIDTH="33%"
   4.255 -ALIGN="right"
   4.256 -VALIGN="top"
   4.257 ->SDL_CDNumDrives</TD
   4.258 -></TR
   4.259 -></TABLE
   4.260 -></DIV
   4.261 -></BODY
   4.262 -></HTML
   4.263 ->
   4.264 \ No newline at end of file
     5.1 --- a/docs/html/event.html	Wed Oct 07 06:11:53 2009 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,216 +0,0 @@
     5.4 -<HTML
     5.5 -><HEAD
     5.6 -><TITLE
     5.7 ->Events</TITLE
     5.8 -><META
     5.9 -NAME="GENERATOR"
    5.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    5.11 -"><LINK
    5.12 -REL="HOME"
    5.13 -TITLE="SDL Library Documentation"
    5.14 -HREF="index.html"><LINK
    5.15 -REL="UP"
    5.16 -TITLE="SDL Reference"
    5.17 -HREF="reference.html"><LINK
    5.18 -REL="PREVIOUS"
    5.19 -TITLE="SDL_WM_GrabInput"
    5.20 -HREF="sdlwmgrabinput.html"><LINK
    5.21 -REL="NEXT"
    5.22 -TITLE="SDL Event Structures."
    5.23 -HREF="eventstructures.html"><META
    5.24 -NAME="KEYWORD"
    5.25 -CONTENT="events"><META
    5.26 -NAME="KEYWORD"
    5.27 -CONTENT="function"></HEAD
    5.28 -><BODY
    5.29 -CLASS="CHAPTER"
    5.30 -BGCOLOR="#FFF8DC"
    5.31 -TEXT="#000000"
    5.32 -LINK="#0000ee"
    5.33 -VLINK="#551a8b"
    5.34 -ALINK="#ff0000"
    5.35 -><DIV
    5.36 -CLASS="NAVHEADER"
    5.37 -><TABLE
    5.38 -SUMMARY="Header navigation table"
    5.39 -WIDTH="100%"
    5.40 -BORDER="0"
    5.41 -CELLPADDING="0"
    5.42 -CELLSPACING="0"
    5.43 -><TR
    5.44 -><TH
    5.45 -COLSPAN="3"
    5.46 -ALIGN="center"
    5.47 ->SDL Library Documentation</TH
    5.48 -></TR
    5.49 -><TR
    5.50 -><TD
    5.51 -WIDTH="10%"
    5.52 -ALIGN="left"
    5.53 -VALIGN="bottom"
    5.54 -><A
    5.55 -HREF="sdlwmgrabinput.html"
    5.56 -ACCESSKEY="P"
    5.57 ->Prev</A
    5.58 -></TD
    5.59 -><TD
    5.60 -WIDTH="80%"
    5.61 -ALIGN="center"
    5.62 -VALIGN="bottom"
    5.63 -></TD
    5.64 -><TD
    5.65 -WIDTH="10%"
    5.66 -ALIGN="right"
    5.67 -VALIGN="bottom"
    5.68 -><A
    5.69 -HREF="eventstructures.html"
    5.70 -ACCESSKEY="N"
    5.71 ->Next</A
    5.72 -></TD
    5.73 -></TR
    5.74 -></TABLE
    5.75 -><HR
    5.76 -ALIGN="LEFT"
    5.77 -WIDTH="100%"></DIV
    5.78 -><DIV
    5.79 -CLASS="CHAPTER"
    5.80 -><H1
    5.81 -><A
    5.82 -NAME="EVENT"
    5.83 -></A
    5.84 ->Chapter 8. Events</H1
    5.85 -><DIV
    5.86 -CLASS="TOC"
    5.87 -><DL
    5.88 -><DT
    5.89 -><B
    5.90 ->Table of Contents</B
    5.91 -></DT
    5.92 -><DT
    5.93 -><A
    5.94 -HREF="event.html#AEN3691"
    5.95 ->Introduction</A
    5.96 -></DT
    5.97 -><DT
    5.98 -><A
    5.99 -HREF="eventstructures.html"
   5.100 ->SDL Event Structures.</A
   5.101 -></DT
   5.102 -><DT
   5.103 -><A
   5.104 -HREF="eventfunctions.html"
   5.105 ->Event Functions.</A
   5.106 -></DT
   5.107 -></DL
   5.108 -></DIV
   5.109 -><DIV
   5.110 -CLASS="SECT1"
   5.111 -><H1
   5.112 -CLASS="SECT1"
   5.113 -><A
   5.114 -NAME="AEN3691"
   5.115 -></A
   5.116 ->Introduction</H1
   5.117 -><P
   5.118 ->Event handling allows your application to receive input from the user. Event handling is initalised (along with video) with a call to:
   5.119 -<PRE
   5.120 -CLASS="PROGRAMLISTING"
   5.121 ->SDL_Init(SDL_INIT_VIDEO);</PRE
   5.122 ->
   5.123 -Internally, SDL stores all the events waiting to be handled in an event queue. Using functions like <A
   5.124 -HREF="sdlpollevent.html"
   5.125 -><TT
   5.126 -CLASS="FUNCTION"
   5.127 ->SDL_PollEvent</TT
   5.128 -></A
   5.129 -> and <A
   5.130 -HREF="sdlpeepevents.html"
   5.131 -><TT
   5.132 -CLASS="FUNCTION"
   5.133 ->SDL_PeepEvents</TT
   5.134 -></A
   5.135 -> you can observe and handle waiting input events.</P
   5.136 -><P
   5.137 ->The key to event handling in SDL is the <A
   5.138 -HREF="sdlevent.html"
   5.139 -><SPAN
   5.140 -CLASS="STRUCTNAME"
   5.141 ->SDL_Event</SPAN
   5.142 -></A
   5.143 -> union. The event queue itself is composed of a series of <SPAN
   5.144 -CLASS="STRUCTNAME"
   5.145 ->SDL_Event</SPAN
   5.146 -> unions, one for each waiting event. <SPAN
   5.147 -CLASS="STRUCTNAME"
   5.148 ->SDL_Event</SPAN
   5.149 -> unions are read from the queue with the <TT
   5.150 -CLASS="FUNCTION"
   5.151 ->SDL_PollEvent</TT
   5.152 -> function and it is then up to the application to process the information stored with them.</P
   5.153 -></DIV
   5.154 -></DIV
   5.155 -><DIV
   5.156 -CLASS="NAVFOOTER"
   5.157 -><HR
   5.158 -ALIGN="LEFT"
   5.159 -WIDTH="100%"><TABLE
   5.160 -SUMMARY="Footer navigation table"
   5.161 -WIDTH="100%"
   5.162 -BORDER="0"
   5.163 -CELLPADDING="0"
   5.164 -CELLSPACING="0"
   5.165 -><TR
   5.166 -><TD
   5.167 -WIDTH="33%"
   5.168 -ALIGN="left"
   5.169 -VALIGN="top"
   5.170 -><A
   5.171 -HREF="sdlwmgrabinput.html"
   5.172 -ACCESSKEY="P"
   5.173 ->Prev</A
   5.174 -></TD
   5.175 -><TD
   5.176 -WIDTH="34%"
   5.177 -ALIGN="center"
   5.178 -VALIGN="top"
   5.179 -><A
   5.180 -HREF="index.html"
   5.181 -ACCESSKEY="H"
   5.182 ->Home</A
   5.183 -></TD
   5.184 -><TD
   5.185 -WIDTH="33%"
   5.186 -ALIGN="right"
   5.187 -VALIGN="top"
   5.188 -><A
   5.189 -HREF="eventstructures.html"
   5.190 -ACCESSKEY="N"
   5.191 ->Next</A
   5.192 -></TD
   5.193 -></TR
   5.194 -><TR
   5.195 -><TD
   5.196 -WIDTH="33%"
   5.197 -ALIGN="left"
   5.198 -VALIGN="top"
   5.199 ->SDL_WM_GrabInput</TD
   5.200 -><TD
   5.201 -WIDTH="34%"
   5.202 -ALIGN="center"
   5.203 -VALIGN="top"
   5.204 -><A
   5.205 -HREF="reference.html"
   5.206 -ACCESSKEY="U"
   5.207 ->Up</A
   5.208 -></TD
   5.209 -><TD
   5.210 -WIDTH="33%"
   5.211 -ALIGN="right"
   5.212 -VALIGN="top"
   5.213 ->SDL Event Structures.</TD
   5.214 -></TR
   5.215 -></TABLE
   5.216 -></DIV
   5.217 -></BODY
   5.218 -></HTML
   5.219 ->
   5.220 \ No newline at end of file
     6.1 --- a/docs/html/eventfunctions.html	Wed Oct 07 06:11:53 2009 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,481 +0,0 @@
     6.4 -<HTML
     6.5 -><HEAD
     6.6 -><TITLE
     6.7 ->Event Functions.</TITLE
     6.8 -><META
     6.9 -NAME="GENERATOR"
    6.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    6.11 -"><LINK
    6.12 -REL="HOME"
    6.13 -TITLE="SDL Library Documentation"
    6.14 -HREF="index.html"><LINK
    6.15 -REL="UP"
    6.16 -TITLE="Events"
    6.17 -HREF="event.html"><LINK
    6.18 -REL="PREVIOUS"
    6.19 -TITLE="SDLKey"
    6.20 -HREF="sdlkey.html"><LINK
    6.21 -REL="NEXT"
    6.22 -TITLE="SDL_PumpEvents"
    6.23 -HREF="sdlpumpevents.html"></HEAD
    6.24 -><BODY
    6.25 -CLASS="SECT1"
    6.26 -BGCOLOR="#FFF8DC"
    6.27 -TEXT="#000000"
    6.28 -LINK="#0000ee"
    6.29 -VLINK="#551a8b"
    6.30 -ALINK="#ff0000"
    6.31 -><DIV
    6.32 -CLASS="NAVHEADER"
    6.33 -><TABLE
    6.34 -SUMMARY="Header navigation table"
    6.35 -WIDTH="100%"
    6.36 -BORDER="0"
    6.37 -CELLPADDING="0"
    6.38 -CELLSPACING="0"
    6.39 -><TR
    6.40 -><TH
    6.41 -COLSPAN="3"
    6.42 -ALIGN="center"
    6.43 ->SDL Library Documentation</TH
    6.44 -></TR
    6.45 -><TR
    6.46 -><TD
    6.47 -WIDTH="10%"
    6.48 -ALIGN="left"
    6.49 -VALIGN="bottom"
    6.50 -><A
    6.51 -HREF="sdlkey.html"
    6.52 -ACCESSKEY="P"
    6.53 ->Prev</A
    6.54 -></TD
    6.55 -><TD
    6.56 -WIDTH="80%"
    6.57 -ALIGN="center"
    6.58 -VALIGN="bottom"
    6.59 ->Chapter 8. Events</TD
    6.60 -><TD
    6.61 -WIDTH="10%"
    6.62 -ALIGN="right"
    6.63 -VALIGN="bottom"
    6.64 -><A
    6.65 -HREF="sdlpumpevents.html"
    6.66 -ACCESSKEY="N"
    6.67 ->Next</A
    6.68 -></TD
    6.69 -></TR
    6.70 -></TABLE
    6.71 -><HR
    6.72 -ALIGN="LEFT"
    6.73 -WIDTH="100%"></DIV
    6.74 -><DIV
    6.75 -CLASS="SECT1"
    6.76 -><H1
    6.77 -CLASS="SECT1"
    6.78 -><A
    6.79 -NAME="EVENTFUNCTIONS"
    6.80 -></A
    6.81 ->Event Functions.</H1
    6.82 -><DIV
    6.83 -CLASS="TOC"
    6.84 -><DL
    6.85 -><DT
    6.86 -><B
    6.87 ->Table of Contents</B
    6.88 -></DT
    6.89 -><DT
    6.90 -><A
    6.91 -HREF="sdlpumpevents.html"
    6.92 ->SDL_PumpEvents</A
    6.93 ->&nbsp;--&nbsp;Pumps the event loop, gathering events from the input devices.</DT
    6.94 -><DT
    6.95 -><A
    6.96 -HREF="sdlpeepevents.html"
    6.97 ->SDL_PeepEvents</A
    6.98 ->&nbsp;--&nbsp;Checks the event queue for messages and optionally returns them.</DT
    6.99 -><DT
   6.100 -><A
   6.101 -HREF="sdlpollevent.html"
   6.102 ->SDL_PollEvent</A
   6.103 ->&nbsp;--&nbsp;Polls for currently pending events.</DT
   6.104 -><DT
   6.105 -><A
   6.106 -HREF="sdlwaitevent.html"
   6.107 ->SDL_WaitEvent</A
   6.108 ->&nbsp;--&nbsp;Waits indefinitely for the next available event.</DT
   6.109 -><DT
   6.110 -><A
   6.111 -HREF="sdlpushevent.html"
   6.112 ->SDL_PushEvent</A
   6.113 ->&nbsp;--&nbsp;Pushes an event onto the event queue</DT
   6.114 -><DT
   6.115 -><A
   6.116 -HREF="sdlseteventfilter.html"
   6.117 ->SDL_SetEventFilter</A
   6.118 ->&nbsp;--&nbsp;Sets up a filter to process all events before they are posted 
   6.119 -to the event queue.</DT
   6.120 -><DT
   6.121 -><A
   6.122 -HREF="sdlgeteventfilter.html"
   6.123 ->SDL_GetEventFilter</A
   6.124 ->&nbsp;--&nbsp;Retrieves a pointer to he event filter</DT
   6.125 -><DT
   6.126 -><A
   6.127 -HREF="sdleventstate.html"
   6.128 ->SDL_EventState</A
   6.129 ->&nbsp;--&nbsp;This function allows you to set the state of processing certain events.</DT
   6.130 -><DT
   6.131 -><A
   6.132 -HREF="sdlgetkeystate.html"
   6.133 ->SDL_GetKeyState</A
   6.134 ->&nbsp;--&nbsp;Get a snapshot of the current keyboard state</DT
   6.135 -><DT
   6.136 -><A
   6.137 -HREF="sdlgetmodstate.html"
   6.138 ->SDL_GetModState</A
   6.139 ->&nbsp;--&nbsp;Get the state of modifier keys.</DT
   6.140 -><DT
   6.141 -><A
   6.142 -HREF="sdlsetmodstate.html"
   6.143 ->SDL_SetModState</A
   6.144 ->&nbsp;--&nbsp;Set the current key modifier state</DT
   6.145 -><DT
   6.146 -><A
   6.147 -HREF="sdlgetkeyname.html"
   6.148 ->SDL_GetKeyName</A
   6.149 ->&nbsp;--&nbsp;Get the name of an SDL virtual keysym</DT
   6.150 -><DT
   6.151 -><A
   6.152 -HREF="sdlenableunicode.html"
   6.153 ->SDL_EnableUNICODE</A
   6.154 ->&nbsp;--&nbsp;Enable UNICODE translation</DT
   6.155 -><DT
   6.156 -><A
   6.157 -HREF="sdlenablekeyrepeat.html"
   6.158 ->SDL_EnableKeyRepeat</A
   6.159 ->&nbsp;--&nbsp;Set keyboard repeat rate.</DT
   6.160 -><DT
   6.161 -><A
   6.162 -HREF="sdlgetmousestate.html"
   6.163 ->SDL_GetMouseState</A
   6.164 ->&nbsp;--&nbsp;Retrieve the current state of the mouse</DT
   6.165 -><DT
   6.166 -><A
   6.167 -HREF="sdlgetrelativemousestate.html"
   6.168 ->SDL_GetRelativeMouseState</A
   6.169 ->&nbsp;--&nbsp;Retrieve the current state of the mouse</DT
   6.170 -><DT
   6.171 -><A
   6.172 -HREF="sdlgetappstate.html"
   6.173 ->SDL_GetAppState</A
   6.174 ->&nbsp;--&nbsp;Get the state of the application</DT
   6.175 -><DT
   6.176 -><A
   6.177 -HREF="sdljoystickeventstate.html"
   6.178 ->SDL_JoystickEventState</A
   6.179 ->&nbsp;--&nbsp;Enable/disable joystick event polling</DT
   6.180 -></DL
   6.181 -></DIV
   6.182 -><DIV
   6.183 -CLASS="INFORMALTABLE"
   6.184 -><A
   6.185 -NAME="AEN5312"
   6.186 -></A
   6.187 -><P
   6.188 -></P
   6.189 -><TABLE
   6.190 -BORDER="0"
   6.191 -CLASS="CALSTABLE"
   6.192 -><TBODY
   6.193 -><TR
   6.194 -><TD
   6.195 -ALIGN="LEFT"
   6.196 -VALIGN="TOP"
   6.197 -><A
   6.198 -HREF="sdlpumpevents.html"
   6.199 ->SDL_PumpEvents</A
   6.200 -></TD
   6.201 -><TD
   6.202 -ALIGN="LEFT"
   6.203 -VALIGN="TOP"
   6.204 ->Pumps the event loop, gathering events from the input devices</TD
   6.205 -></TR
   6.206 -><TR
   6.207 -><TD
   6.208 -ALIGN="LEFT"
   6.209 -VALIGN="TOP"
   6.210 -><A
   6.211 -HREF="sdlpeepevents.html"
   6.212 ->SDL_PeepEvents</A
   6.213 -></TD
   6.214 -><TD
   6.215 -ALIGN="LEFT"
   6.216 -VALIGN="TOP"
   6.217 ->Checks the event queue for messages and optionally returns them</TD
   6.218 -></TR
   6.219 -><TR
   6.220 -><TD
   6.221 -ALIGN="LEFT"
   6.222 -VALIGN="TOP"
   6.223 -><A
   6.224 -HREF="sdlpollevent.html"
   6.225 ->SDL_PollEvent</A
   6.226 -></TD
   6.227 -><TD
   6.228 -ALIGN="LEFT"
   6.229 -VALIGN="TOP"
   6.230 ->Polls for currently pending events</TD
   6.231 -></TR
   6.232 -><TR
   6.233 -><TD
   6.234 -ALIGN="LEFT"
   6.235 -VALIGN="TOP"
   6.236 -><A
   6.237 -HREF="sdlwaitevent.html"
   6.238 ->SDL_WaitEvent</A
   6.239 -></TD
   6.240 -><TD
   6.241 -ALIGN="LEFT"
   6.242 -VALIGN="TOP"
   6.243 ->Waits indefinitely for the next available event</TD
   6.244 -></TR
   6.245 -><TR
   6.246 -><TD
   6.247 -ALIGN="LEFT"
   6.248 -VALIGN="TOP"
   6.249 -><A
   6.250 -HREF="sdlpushevent.html"
   6.251 ->SDL_PushEvent</A
   6.252 -></TD
   6.253 -><TD
   6.254 -ALIGN="LEFT"
   6.255 -VALIGN="TOP"
   6.256 ->Pushes an event onto the event queue</TD
   6.257 -></TR
   6.258 -><TR
   6.259 -><TD
   6.260 -ALIGN="LEFT"
   6.261 -VALIGN="TOP"
   6.262 -><A
   6.263 -HREF="sdlseteventfilter.html"
   6.264 ->SDL_SetEventFilter</A
   6.265 -></TD
   6.266 -><TD
   6.267 -ALIGN="LEFT"
   6.268 -VALIGN="TOP"
   6.269 ->Sets up a filter to process all events</TD
   6.270 -></TR
   6.271 -><TR
   6.272 -><TD
   6.273 -ALIGN="LEFT"
   6.274 -VALIGN="TOP"
   6.275 -><A
   6.276 -HREF="sdleventstate.html"
   6.277 ->SDL_EventState</A
   6.278 -></TD
   6.279 -><TD
   6.280 -ALIGN="LEFT"
   6.281 -VALIGN="TOP"
   6.282 ->Allows you to set the state of processing certain events</TD
   6.283 -></TR
   6.284 -><TR
   6.285 -><TD
   6.286 -ALIGN="LEFT"
   6.287 -VALIGN="TOP"
   6.288 -><A
   6.289 -HREF="sdlgetkeystate.html"
   6.290 ->SDL_GetKeyState</A
   6.291 -></TD
   6.292 -><TD
   6.293 -ALIGN="LEFT"
   6.294 -VALIGN="TOP"
   6.295 ->Get a snapshot of the current keyboard state</TD
   6.296 -></TR
   6.297 -><TR
   6.298 -><TD
   6.299 -ALIGN="LEFT"
   6.300 -VALIGN="TOP"
   6.301 -><A
   6.302 -HREF="sdlgetmodstate.html"
   6.303 ->SDL_GetModState</A
   6.304 -></TD
   6.305 -><TD
   6.306 -ALIGN="LEFT"
   6.307 -VALIGN="TOP"
   6.308 ->Get the state of modifier keys</TD
   6.309 -></TR
   6.310 -><TR
   6.311 -><TD
   6.312 -ALIGN="LEFT"
   6.313 -VALIGN="TOP"
   6.314 -><A
   6.315 -HREF="sdlsetmodstate.html"
   6.316 ->SDL_SetModState</A
   6.317 -></TD
   6.318 -><TD
   6.319 -ALIGN="LEFT"
   6.320 -VALIGN="TOP"
   6.321 ->Set the state of modifier keys</TD
   6.322 -></TR
   6.323 -><TR
   6.324 -><TD
   6.325 -ALIGN="LEFT"
   6.326 -VALIGN="TOP"
   6.327 -><A
   6.328 -HREF="sdlgetkeyname.html"
   6.329 ->SDL_GetKeyName</A
   6.330 -></TD
   6.331 -><TD
   6.332 -ALIGN="LEFT"
   6.333 -VALIGN="TOP"
   6.334 ->Get the name of an SDL virtual keysym</TD
   6.335 -></TR
   6.336 -><TR
   6.337 -><TD
   6.338 -ALIGN="LEFT"
   6.339 -VALIGN="TOP"
   6.340 -><A
   6.341 -HREF="sdlenableunicode.html"
   6.342 ->SDL_EnableUNICODE</A
   6.343 -></TD
   6.344 -><TD
   6.345 -ALIGN="LEFT"
   6.346 -VALIGN="TOP"
   6.347 ->Enable UNICODE translation</TD
   6.348 -></TR
   6.349 -><TR
   6.350 -><TD
   6.351 -ALIGN="LEFT"
   6.352 -VALIGN="TOP"
   6.353 -><A
   6.354 -HREF="sdlenablekeyrepeat.html"
   6.355 ->SDL_EnableKeyRepeat</A
   6.356 -></TD
   6.357 -><TD
   6.358 -ALIGN="LEFT"
   6.359 -VALIGN="TOP"
   6.360 ->Set keyboard repeat rate</TD
   6.361 -></TR
   6.362 -><TR
   6.363 -><TD
   6.364 -ALIGN="LEFT"
   6.365 -VALIGN="TOP"
   6.366 -><A
   6.367 -HREF="sdlgetmousestate.html"
   6.368 ->SDL_GetMouseState</A
   6.369 -></TD
   6.370 -><TD
   6.371 -ALIGN="LEFT"
   6.372 -VALIGN="TOP"
   6.373 ->Retrieve the current state of the mouse</TD
   6.374 -></TR
   6.375 -><TR
   6.376 -><TD
   6.377 -ALIGN="LEFT"
   6.378 -VALIGN="TOP"
   6.379 -><A
   6.380 -HREF="sdlgetrelativemousestate.html"
   6.381 ->SDL_GetRelativeMouseState</A
   6.382 -></TD
   6.383 -><TD
   6.384 -ALIGN="LEFT"
   6.385 -VALIGN="TOP"
   6.386 ->Retrieve the current state of the mouse</TD
   6.387 -></TR
   6.388 -><TR
   6.389 -><TD
   6.390 -ALIGN="LEFT"
   6.391 -VALIGN="TOP"
   6.392 -><A
   6.393 -HREF="sdlgetappstate.html"
   6.394 ->SDL_GetAppState</A
   6.395 -></TD
   6.396 -><TD
   6.397 -ALIGN="LEFT"
   6.398 -VALIGN="TOP"
   6.399 ->Get the state of the application</TD
   6.400 -></TR
   6.401 -><TR
   6.402 -><TD
   6.403 -ALIGN="LEFT"
   6.404 -VALIGN="TOP"
   6.405 -><A
   6.406 -HREF="sdljoystickeventstate.html"
   6.407 ->SDL_JoystickEventState</A
   6.408 -></TD
   6.409 -><TD
   6.410 -ALIGN="LEFT"
   6.411 -VALIGN="TOP"
   6.412 ->Enable/disable joystick event polling</TD
   6.413 -></TR
   6.414 -></TBODY
   6.415 -></TABLE
   6.416 -><P
   6.417 -></P
   6.418 -></DIV
   6.419 -></DIV
   6.420 -><DIV
   6.421 -CLASS="NAVFOOTER"
   6.422 -><HR
   6.423 -ALIGN="LEFT"
   6.424 -WIDTH="100%"><TABLE
   6.425 -SUMMARY="Footer navigation table"
   6.426 -WIDTH="100%"
   6.427 -BORDER="0"
   6.428 -CELLPADDING="0"
   6.429 -CELLSPACING="0"
   6.430 -><TR
   6.431 -><TD
   6.432 -WIDTH="33%"
   6.433 -ALIGN="left"
   6.434 -VALIGN="top"
   6.435 -><A
   6.436 -HREF="sdlkey.html"
   6.437 -ACCESSKEY="P"
   6.438 ->Prev</A
   6.439 -></TD
   6.440 -><TD
   6.441 -WIDTH="34%"
   6.442 -ALIGN="center"
   6.443 -VALIGN="top"
   6.444 -><A
   6.445 -HREF="index.html"
   6.446 -ACCESSKEY="H"
   6.447 ->Home</A
   6.448 -></TD
   6.449 -><TD
   6.450 -WIDTH="33%"
   6.451 -ALIGN="right"
   6.452 -VALIGN="top"
   6.453 -><A
   6.454 -HREF="sdlpumpevents.html"
   6.455 -ACCESSKEY="N"
   6.456 ->Next</A
   6.457 -></TD
   6.458 -></TR
   6.459 -><TR
   6.460 -><TD
   6.461 -WIDTH="33%"
   6.462 -ALIGN="left"
   6.463 -VALIGN="top"
   6.464 ->SDLKey</TD
   6.465 -><TD
   6.466 -WIDTH="34%"
   6.467 -ALIGN="center"
   6.468 -VALIGN="top"
   6.469 -><A
   6.470 -HREF="event.html"
   6.471 -ACCESSKEY="U"
   6.472 ->Up</A
   6.473 -></TD
   6.474 -><TD
   6.475 -WIDTH="33%"
   6.476 -ALIGN="right"
   6.477 -VALIGN="top"
   6.478 ->SDL_PumpEvents</TD
   6.479 -></TR
   6.480 -></TABLE
   6.481 -></DIV
   6.482 -></BODY
   6.483 -></HTML
   6.484 ->
   6.485 \ No newline at end of file
     7.1 --- a/docs/html/eventstructures.html	Wed Oct 07 06:11:53 2009 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,233 +0,0 @@
     7.4 -<HTML
     7.5 -><HEAD
     7.6 -><TITLE
     7.7 ->SDL Event Structures.</TITLE
     7.8 -><META
     7.9 -NAME="GENERATOR"
    7.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    7.11 -"><LINK
    7.12 -REL="HOME"
    7.13 -TITLE="SDL Library Documentation"
    7.14 -HREF="index.html"><LINK
    7.15 -REL="UP"
    7.16 -TITLE="Events"
    7.17 -HREF="event.html"><LINK
    7.18 -REL="PREVIOUS"
    7.19 -TITLE="Events"
    7.20 -HREF="event.html"><LINK
    7.21 -REL="NEXT"
    7.22 -TITLE="SDL_Event"
    7.23 -HREF="sdlevent.html"></HEAD
    7.24 -><BODY
    7.25 -CLASS="SECT1"
    7.26 -BGCOLOR="#FFF8DC"
    7.27 -TEXT="#000000"
    7.28 -LINK="#0000ee"
    7.29 -VLINK="#551a8b"
    7.30 -ALINK="#ff0000"
    7.31 -><DIV
    7.32 -CLASS="NAVHEADER"
    7.33 -><TABLE
    7.34 -SUMMARY="Header navigation table"
    7.35 -WIDTH="100%"
    7.36 -BORDER="0"
    7.37 -CELLPADDING="0"
    7.38 -CELLSPACING="0"
    7.39 -><TR
    7.40 -><TH
    7.41 -COLSPAN="3"
    7.42 -ALIGN="center"
    7.43 ->SDL Library Documentation</TH
    7.44 -></TR
    7.45 -><TR
    7.46 -><TD
    7.47 -WIDTH="10%"
    7.48 -ALIGN="left"
    7.49 -VALIGN="bottom"
    7.50 -><A
    7.51 -HREF="event.html"
    7.52 -ACCESSKEY="P"
    7.53 ->Prev</A
    7.54 -></TD
    7.55 -><TD
    7.56 -WIDTH="80%"
    7.57 -ALIGN="center"
    7.58 -VALIGN="bottom"
    7.59 ->Chapter 8. Events</TD
    7.60 -><TD
    7.61 -WIDTH="10%"
    7.62 -ALIGN="right"
    7.63 -VALIGN="bottom"
    7.64 -><A
    7.65 -HREF="sdlevent.html"
    7.66 -ACCESSKEY="N"
    7.67 ->Next</A
    7.68 -></TD
    7.69 -></TR
    7.70 -></TABLE
    7.71 -><HR
    7.72 -ALIGN="LEFT"
    7.73 -WIDTH="100%"></DIV
    7.74 -><DIV
    7.75 -CLASS="SECT1"
    7.76 -><H1
    7.77 -CLASS="SECT1"
    7.78 -><A
    7.79 -NAME="EVENTSTRUCTURES"
    7.80 -></A
    7.81 ->SDL Event Structures.</H1
    7.82 -><DIV
    7.83 -CLASS="TOC"
    7.84 -><DL
    7.85 -><DT
    7.86 -><B
    7.87 ->Table of Contents</B
    7.88 -></DT
    7.89 -><DT
    7.90 -><A
    7.91 -HREF="sdlevent.html"
    7.92 ->SDL_Event</A
    7.93 ->&nbsp;--&nbsp;General event structure</DT
    7.94 -><DT
    7.95 -><A
    7.96 -HREF="sdlactiveevent.html"
    7.97 ->SDL_ActiveEvent</A
    7.98 ->&nbsp;--&nbsp;Application visibility event structure</DT
    7.99 -><DT
   7.100 -><A
   7.101 -HREF="sdlkeyboardevent.html"
   7.102 ->SDL_KeyboardEvent</A
   7.103 ->&nbsp;--&nbsp;Keyboard event structure</DT
   7.104 -><DT
   7.105 -><A
   7.106 -HREF="sdlmousemotionevent.html"
   7.107 ->SDL_MouseMotionEvent</A
   7.108 ->&nbsp;--&nbsp;Mouse motion event structure</DT
   7.109 -><DT
   7.110 -><A
   7.111 -HREF="sdlmousebuttonevent.html"
   7.112 ->SDL_MouseButtonEvent</A
   7.113 ->&nbsp;--&nbsp;Mouse button event structure</DT
   7.114 -><DT
   7.115 -><A
   7.116 -HREF="sdljoyaxisevent.html"
   7.117 ->SDL_JoyAxisEvent</A
   7.118 ->&nbsp;--&nbsp;Joystick axis motion event structure</DT
   7.119 -><DT
   7.120 -><A
   7.121 -HREF="sdljoybuttonevent.html"
   7.122 ->SDL_JoyButtonEvent</A
   7.123 ->&nbsp;--&nbsp;Joystick button event structure</DT
   7.124 -><DT
   7.125 -><A
   7.126 -HREF="sdljoyhatevent.html"
   7.127 ->SDL_JoyHatEvent</A
   7.128 ->&nbsp;--&nbsp;Joystick hat position change event structure</DT
   7.129 -><DT
   7.130 -><A
   7.131 -HREF="sdljoyballevent.html"
   7.132 ->SDL_JoyBallEvent</A
   7.133 ->&nbsp;--&nbsp;Joystick trackball motion event structure</DT
   7.134 -><DT
   7.135 -><A
   7.136 -HREF="sdlresizeevent.html"
   7.137 ->SDL_ResizeEvent</A
   7.138 ->&nbsp;--&nbsp;Window resize event structure</DT
   7.139 -><DT
   7.140 -><A
   7.141 -HREF="sdlexposeevent.html"
   7.142 ->SDL_ExposeEvent</A
   7.143 ->&nbsp;--&nbsp;Quit requested event</DT
   7.144 -><DT
   7.145 -><A
   7.146 -HREF="sdlsyswmevent.html"
   7.147 ->SDL_SysWMEvent</A
   7.148 ->&nbsp;--&nbsp;Platform-dependent window manager event.</DT
   7.149 -><DT
   7.150 -><A
   7.151 -HREF="sdluserevent.html"
   7.152 ->SDL_UserEvent</A
   7.153 ->&nbsp;--&nbsp;A user-defined event type</DT
   7.154 -><DT
   7.155 -><A
   7.156 -HREF="sdlquitevent.html"
   7.157 ->SDL_QuitEvent</A
   7.158 ->&nbsp;--&nbsp;Quit requested event</DT
   7.159 -><DT
   7.160 -><A
   7.161 -HREF="sdlkeysym.html"
   7.162 ->SDL_keysym</A
   7.163 ->&nbsp;--&nbsp;Keysym structure</DT
   7.164 -><DT
   7.165 -><A
   7.166 -HREF="sdlkey.html"
   7.167 ->SDLKey</A
   7.168 ->&nbsp;--&nbsp;Keysym definitions.</DT
   7.169 -></DL
   7.170 -></DIV
   7.171 -></DIV
   7.172 -><DIV
   7.173 -CLASS="NAVFOOTER"
   7.174 -><HR
   7.175 -ALIGN="LEFT"
   7.176 -WIDTH="100%"><TABLE
   7.177 -SUMMARY="Footer navigation table"
   7.178 -WIDTH="100%"
   7.179 -BORDER="0"
   7.180 -CELLPADDING="0"
   7.181 -CELLSPACING="0"
   7.182 -><TR
   7.183 -><TD
   7.184 -WIDTH="33%"
   7.185 -ALIGN="left"
   7.186 -VALIGN="top"
   7.187 -><A
   7.188 -HREF="event.html"
   7.189 -ACCESSKEY="P"
   7.190 ->Prev</A
   7.191 -></TD
   7.192 -><TD
   7.193 -WIDTH="34%"
   7.194 -ALIGN="center"
   7.195 -VALIGN="top"
   7.196 -><A
   7.197 -HREF="index.html"
   7.198 -ACCESSKEY="H"
   7.199 ->Home</A
   7.200 -></TD
   7.201 -><TD
   7.202 -WIDTH="33%"
   7.203 -ALIGN="right"
   7.204 -VALIGN="top"
   7.205 -><A
   7.206 -HREF="sdlevent.html"
   7.207 -ACCESSKEY="N"
   7.208 ->Next</A
   7.209 -></TD
   7.210 -></TR
   7.211 -><TR
   7.212 -><TD
   7.213 -WIDTH="33%"
   7.214 -ALIGN="left"
   7.215 -VALIGN="top"
   7.216 ->Events</TD
   7.217 -><TD
   7.218 -WIDTH="34%"
   7.219 -ALIGN="center"
   7.220 -VALIGN="top"
   7.221 -><A
   7.222 -HREF="event.html"
   7.223 -ACCESSKEY="U"
   7.224 ->Up</A
   7.225 -></TD
   7.226 -><TD
   7.227 -WIDTH="33%"
   7.228 -ALIGN="right"
   7.229 -VALIGN="top"
   7.230 ->SDL_Event</TD
   7.231 -></TR
   7.232 -></TABLE
   7.233 -></DIV
   7.234 -></BODY
   7.235 -></HTML
   7.236 ->
   7.237 \ No newline at end of file
     8.1 --- a/docs/html/general.html	Wed Oct 07 06:11:53 2009 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,225 +0,0 @@
     8.4 -<HTML
     8.5 -><HEAD
     8.6 -><TITLE
     8.7 ->General</TITLE
     8.8 -><META
     8.9 -NAME="GENERATOR"
    8.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    8.11 -"><LINK
    8.12 -REL="HOME"
    8.13 -TITLE="SDL Library Documentation"
    8.14 -HREF="index.html"><LINK
    8.15 -REL="UP"
    8.16 -TITLE="SDL Reference"
    8.17 -HREF="reference.html"><LINK
    8.18 -REL="PREVIOUS"
    8.19 -TITLE="SDL Reference"
    8.20 -HREF="reference.html"><LINK
    8.21 -REL="NEXT"
    8.22 -TITLE="SDL_Init"
    8.23 -HREF="sdlinit.html"><META
    8.24 -NAME="KEYWORD"
    8.25 -CONTENT="general"><META
    8.26 -NAME="KEYWORD"
    8.27 -CONTENT="function"></HEAD
    8.28 -><BODY
    8.29 -CLASS="CHAPTER"
    8.30 -BGCOLOR="#FFF8DC"
    8.31 -TEXT="#000000"
    8.32 -LINK="#0000ee"
    8.33 -VLINK="#551a8b"
    8.34 -ALINK="#ff0000"
    8.35 -><DIV
    8.36 -CLASS="NAVHEADER"
    8.37 -><TABLE
    8.38 -SUMMARY="Header navigation table"
    8.39 -WIDTH="100%"
    8.40 -BORDER="0"
    8.41 -CELLPADDING="0"
    8.42 -CELLSPACING="0"
    8.43 -><TR
    8.44 -><TH
    8.45 -COLSPAN="3"
    8.46 -ALIGN="center"
    8.47 ->SDL Library Documentation</TH
    8.48 -></TR
    8.49 -><TR
    8.50 -><TD
    8.51 -WIDTH="10%"
    8.52 -ALIGN="left"
    8.53 -VALIGN="bottom"
    8.54 -><A
    8.55 -HREF="reference.html"
    8.56 -ACCESSKEY="P"
    8.57 ->Prev</A
    8.58 -></TD
    8.59 -><TD
    8.60 -WIDTH="80%"
    8.61 -ALIGN="center"
    8.62 -VALIGN="bottom"
    8.63 -></TD
    8.64 -><TD
    8.65 -WIDTH="10%"
    8.66 -ALIGN="right"
    8.67 -VALIGN="bottom"
    8.68 -><A
    8.69 -HREF="sdlinit.html"
    8.70 -ACCESSKEY="N"
    8.71 ->Next</A
    8.72 -></TD
    8.73 -></TR
    8.74 -></TABLE
    8.75 -><HR
    8.76 -ALIGN="LEFT"
    8.77 -WIDTH="100%"></DIV
    8.78 -><DIV
    8.79 -CLASS="CHAPTER"
    8.80 -><H1
    8.81 -><A
    8.82 -NAME="GENERAL"
    8.83 -></A
    8.84 ->Chapter 5. General</H1
    8.85 -><DIV
    8.86 -CLASS="TOC"
    8.87 -><DL
    8.88 -><DT
    8.89 -><B
    8.90 ->Table of Contents</B
    8.91 -></DT
    8.92 -><DT
    8.93 -><A
    8.94 -HREF="sdlinit.html"
    8.95 ->SDL_Init</A
    8.96 ->&nbsp;--&nbsp;Initializes SDL</DT
    8.97 -><DT
    8.98 -><A
    8.99 -HREF="sdlinitsubsystem.html"
   8.100 ->SDL_InitSubSystem</A
   8.101 ->&nbsp;--&nbsp;Initialize subsystems</DT
   8.102 -><DT
   8.103 -><A
   8.104 -HREF="sdlquitsubsystem.html"
   8.105 ->SDL_QuitSubSystem</A
   8.106 ->&nbsp;--&nbsp;Shut down a subsystem</DT
   8.107 -><DT
   8.108 -><A
   8.109 -HREF="sdlquit.html"
   8.110 ->SDL_Quit</A
   8.111 ->&nbsp;--&nbsp;Shut down SDL</DT
   8.112 -><DT
   8.113 -><A
   8.114 -HREF="sdlwasinit.html"
   8.115 ->SDL_WasInit</A
   8.116 ->&nbsp;--&nbsp;Check which subsystems are initialized</DT
   8.117 -><DT
   8.118 -><A
   8.119 -HREF="sdlgeterror.html"
   8.120 ->SDL_GetError</A
   8.121 ->&nbsp;--&nbsp;Get SDL error string</DT
   8.122 -><DT
   8.123 -><A
   8.124 -HREF="sdlenvvars.html"
   8.125 ->SDL_envvars</A
   8.126 ->&nbsp;--&nbsp;SDL environment variables</DT
   8.127 -></DL
   8.128 -></DIV
   8.129 -><P
   8.130 ->Before SDL can be used in a program it must be initialized with <A
   8.131 -HREF="sdlinit.html"
   8.132 -><TT
   8.133 -CLASS="FUNCTION"
   8.134 ->SDL_Init</TT
   8.135 -></A
   8.136 ->. <TT
   8.137 -CLASS="FUNCTION"
   8.138 ->SDL_Init</TT
   8.139 -> initializes all the subsystems that the user requests (video, audio, joystick, timers and/or cdrom). Once SDL is initialized with <TT
   8.140 -CLASS="FUNCTION"
   8.141 ->SDL_Init</TT
   8.142 -> subsystems can be shut down and initialized as needed using <A
   8.143 -HREF="sdlinitsubsystem.html"
   8.144 -><TT
   8.145 -CLASS="FUNCTION"
   8.146 ->SDL_InitSubSystem</TT
   8.147 -></A
   8.148 -> and <A
   8.149 -HREF="sdlquitsubsystem.html"
   8.150 -><TT
   8.151 -CLASS="FUNCTION"
   8.152 ->SDL_QuitSubSystem</TT
   8.153 -></A
   8.154 ->.</P
   8.155 -><P
   8.156 ->SDL must also be shut down before the program exits to make sure it cleans up correctly. Calling <A
   8.157 -HREF="sdlquit.html"
   8.158 -><TT
   8.159 -CLASS="FUNCTION"
   8.160 ->SDL_Quit</TT
   8.161 -></A
   8.162 -> shuts down all subsystems and frees any resources allocated to SDL.</P
   8.163 -></DIV
   8.164 -><DIV
   8.165 -CLASS="NAVFOOTER"
   8.166 -><HR
   8.167 -ALIGN="LEFT"
   8.168 -WIDTH="100%"><TABLE
   8.169 -SUMMARY="Footer navigation table"
   8.170 -WIDTH="100%"
   8.171 -BORDER="0"
   8.172 -CELLPADDING="0"
   8.173 -CELLSPACING="0"
   8.174 -><TR
   8.175 -><TD
   8.176 -WIDTH="33%"
   8.177 -ALIGN="left"
   8.178 -VALIGN="top"
   8.179 -><A
   8.180 -HREF="reference.html"
   8.181 -ACCESSKEY="P"
   8.182 ->Prev</A
   8.183 -></TD
   8.184 -><TD
   8.185 -WIDTH="34%"
   8.186 -ALIGN="center"
   8.187 -VALIGN="top"
   8.188 -><A
   8.189 -HREF="index.html"
   8.190 -ACCESSKEY="H"
   8.191 ->Home</A
   8.192 -></TD
   8.193 -><TD
   8.194 -WIDTH="33%"
   8.195 -ALIGN="right"
   8.196 -VALIGN="top"
   8.197 -><A
   8.198 -HREF="sdlinit.html"
   8.199 -ACCESSKEY="N"
   8.200 ->Next</A
   8.201 -></TD
   8.202 -></TR
   8.203 -><TR
   8.204 -><TD
   8.205 -WIDTH="33%"
   8.206 -ALIGN="left"
   8.207 -VALIGN="top"
   8.208 ->SDL Reference</TD
   8.209 -><TD
   8.210 -WIDTH="34%"
   8.211 -ALIGN="center"
   8.212 -VALIGN="top"
   8.213 -><A
   8.214 -HREF="reference.html"
   8.215 -ACCESSKEY="U"
   8.216 ->Up</A
   8.217 -></TD
   8.218 -><TD
   8.219 -WIDTH="33%"
   8.220 -ALIGN="right"
   8.221 -VALIGN="top"
   8.222 ->SDL_Init</TD
   8.223 -></TR
   8.224 -></TABLE
   8.225 -></DIV
   8.226 -></BODY
   8.227 -></HTML
   8.228 ->
   8.229 \ No newline at end of file
     9.1 --- a/docs/html/guide.html	Wed Oct 07 06:11:53 2009 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,174 +0,0 @@
     9.4 -<HTML
     9.5 -><HEAD
     9.6 -><TITLE
     9.7 ->SDL Guide</TITLE
     9.8 -><META
     9.9 -NAME="GENERATOR"
    9.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
    9.11 -"><LINK
    9.12 -REL="HOME"
    9.13 -TITLE="SDL Library Documentation"
    9.14 -HREF="index.html"><LINK
    9.15 -REL="PREVIOUS"
    9.16 -TITLE="SDL Library Documentation"
    9.17 -HREF="index.html"><LINK
    9.18 -REL="NEXT"
    9.19 -TITLE="Preface"
    9.20 -HREF="guidepreface.html"></HEAD
    9.21 -><BODY
    9.22 -CLASS="PART"
    9.23 -BGCOLOR="#FFF8DC"
    9.24 -TEXT="#000000"
    9.25 -LINK="#0000ee"
    9.26 -VLINK="#551a8b"
    9.27 -ALINK="#ff0000"
    9.28 -><DIV
    9.29 -CLASS="NAVHEADER"
    9.30 -><TABLE
    9.31 -SUMMARY="Header navigation table"
    9.32 -WIDTH="100%"
    9.33 -BORDER="0"
    9.34 -CELLPADDING="0"
    9.35 -CELLSPACING="0"
    9.36 -><TR
    9.37 -><TH
    9.38 -COLSPAN="3"
    9.39 -ALIGN="center"
    9.40 ->SDL Library Documentation</TH
    9.41 -></TR
    9.42 -><TR
    9.43 -><TD
    9.44 -WIDTH="10%"
    9.45 -ALIGN="left"
    9.46 -VALIGN="bottom"
    9.47 -><A
    9.48 -HREF="index.html"
    9.49 -ACCESSKEY="P"
    9.50 ->Prev</A
    9.51 -></TD
    9.52 -><TD
    9.53 -WIDTH="80%"
    9.54 -ALIGN="center"
    9.55 -VALIGN="bottom"
    9.56 -></TD
    9.57 -><TD
    9.58 -WIDTH="10%"
    9.59 -ALIGN="right"
    9.60 -VALIGN="bottom"
    9.61 -><A
    9.62 -HREF="guidepreface.html"
    9.63 -ACCESSKEY="N"
    9.64 ->Next</A
    9.65 -></TD
    9.66 -></TR
    9.67 -></TABLE
    9.68 -><HR
    9.69 -ALIGN="LEFT"
    9.70 -WIDTH="100%"></DIV
    9.71 -><DIV
    9.72 -CLASS="PART"
    9.73 -><A
    9.74 -NAME="GUIDE"
    9.75 -></A
    9.76 -><DIV
    9.77 -CLASS="TITLEPAGE"
    9.78 -><H1
    9.79 -CLASS="TITLE"
    9.80 ->I. SDL Guide</H1
    9.81 -><DIV
    9.82 -CLASS="TOC"
    9.83 -><DL
    9.84 -><DT
    9.85 -><B
    9.86 ->Table of Contents</B
    9.87 -></DT
    9.88 -><DT
    9.89 -><A
    9.90 -HREF="guidepreface.html"
    9.91 ->Preface</A
    9.92 -></DT
    9.93 -><DT
    9.94 ->1. <A
    9.95 -HREF="guidethebasics.html"
    9.96 ->The Basics</A
    9.97 -></DT
    9.98 -><DT
    9.99 ->2. <A
   9.100 -HREF="guidevideo.html"
   9.101 ->Graphics and Video</A
   9.102 -></DT
   9.103 -><DT
   9.104 ->3. <A
   9.105 -HREF="guideinput.html"
   9.106 ->Input handling</A
   9.107 -></DT
   9.108 -><DT
   9.109 ->4. <A
   9.110 -HREF="guideexamples.html"
   9.111 ->Examples</A
   9.112 -></DT
   9.113 -></DL
   9.114 -></DIV
   9.115 -></DIV
   9.116 -></DIV
   9.117 -><DIV
   9.118 -CLASS="NAVFOOTER"
   9.119 -><HR
   9.120 -ALIGN="LEFT"
   9.121 -WIDTH="100%"><TABLE
   9.122 -SUMMARY="Footer navigation table"
   9.123 -WIDTH="100%"
   9.124 -BORDER="0"
   9.125 -CELLPADDING="0"
   9.126 -CELLSPACING="0"
   9.127 -><TR
   9.128 -><TD
   9.129 -WIDTH="33%"
   9.130 -ALIGN="left"
   9.131 -VALIGN="top"
   9.132 -><A
   9.133 -HREF="index.html"
   9.134 -ACCESSKEY="P"
   9.135 ->Prev</A
   9.136 -></TD
   9.137 -><TD
   9.138 -WIDTH="34%"
   9.139 -ALIGN="center"
   9.140 -VALIGN="top"
   9.141 -><A
   9.142 -HREF="index.html"
   9.143 -ACCESSKEY="H"
   9.144 ->Home</A
   9.145 -></TD
   9.146 -><TD
   9.147 -WIDTH="33%"
   9.148 -ALIGN="right"
   9.149 -VALIGN="top"
   9.150 -><A
   9.151 -HREF="guidepreface.html"
   9.152 -ACCESSKEY="N"
   9.153 ->Next</A
   9.154 -></TD
   9.155 -></TR
   9.156 -><TR
   9.157 -><TD
   9.158 -WIDTH="33%"
   9.159 -ALIGN="left"
   9.160 -VALIGN="top"
   9.161 ->SDL Library Documentation</TD
   9.162 -><TD
   9.163 -WIDTH="34%"
   9.164 -ALIGN="center"
   9.165 -VALIGN="top"
   9.166 ->&nbsp;</TD
   9.167 -><TD
   9.168 -WIDTH="33%"
   9.169 -ALIGN="right"
   9.170 -VALIGN="top"
   9.171 ->Preface</TD
   9.172 -></TR
   9.173 -></TABLE
   9.174 -></DIV
   9.175 -></BODY
   9.176 -></HTML
   9.177 ->
   9.178 \ No newline at end of file
    10.1 --- a/docs/html/guideaboutsdldoc.html	Wed Oct 07 06:11:53 2009 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,148 +0,0 @@
    10.4 -<HTML
    10.5 -><HEAD
    10.6 -><TITLE
    10.7 ->About SDLdoc</TITLE
    10.8 -><META
    10.9 -NAME="GENERATOR"
   10.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   10.11 -"><LINK
   10.12 -REL="HOME"
   10.13 -TITLE="SDL Library Documentation"
   10.14 -HREF="index.html"><LINK
   10.15 -REL="UP"
   10.16 -TITLE="Preface"
   10.17 -HREF="guidepreface.html"><LINK
   10.18 -REL="PREVIOUS"
   10.19 -TITLE="Preface"
   10.20 -HREF="guidepreface.html"><LINK
   10.21 -REL="NEXT"
   10.22 -TITLE="Credits"
   10.23 -HREF="guidecredits.html"></HEAD
   10.24 -><BODY
   10.25 -CLASS="SECT1"
   10.26 -BGCOLOR="#FFF8DC"
   10.27 -TEXT="#000000"
   10.28 -LINK="#0000ee"
   10.29 -VLINK="#551a8b"
   10.30 -ALINK="#ff0000"
   10.31 -><DIV
   10.32 -CLASS="NAVHEADER"
   10.33 -><TABLE
   10.34 -SUMMARY="Header navigation table"
   10.35 -WIDTH="100%"
   10.36 -BORDER="0"
   10.37 -CELLPADDING="0"
   10.38 -CELLSPACING="0"
   10.39 -><TR
   10.40 -><TH
   10.41 -COLSPAN="3"
   10.42 -ALIGN="center"
   10.43 ->SDL Library Documentation</TH
   10.44 -></TR
   10.45 -><TR
   10.46 -><TD
   10.47 -WIDTH="10%"
   10.48 -ALIGN="left"
   10.49 -VALIGN="bottom"
   10.50 -><A
   10.51 -HREF="guidepreface.html"
   10.52 -ACCESSKEY="P"
   10.53 ->Prev</A
   10.54 -></TD
   10.55 -><TD
   10.56 -WIDTH="80%"
   10.57 -ALIGN="center"
   10.58 -VALIGN="bottom"
   10.59 ->Preface</TD
   10.60 -><TD
   10.61 -WIDTH="10%"
   10.62 -ALIGN="right"
   10.63 -VALIGN="bottom"
   10.64 -><A
   10.65 -HREF="guidecredits.html"
   10.66 -ACCESSKEY="N"
   10.67 ->Next</A
   10.68 -></TD
   10.69 -></TR
   10.70 -></TABLE
   10.71 -><HR
   10.72 -ALIGN="LEFT"
   10.73 -WIDTH="100%"></DIV
   10.74 -><DIV
   10.75 -CLASS="SECT1"
   10.76 -><H1
   10.77 -CLASS="SECT1"
   10.78 -><A
   10.79 -NAME="GUIDEABOUTSDLDOC"
   10.80 -></A
   10.81 ->About SDLdoc</H1
   10.82 -><P
   10.83 ->SDLdoc (The SDL Documentation Project) was formed to completely rewrite the SDL documentation and to keep it continually up to date. The team consists completely of volunteers ranging from people working with SDL in their spare time to people who use SDL in their everyday working lives.</P
   10.84 -><P
   10.85 ->The latest version of this documentation can always be found here: http://sdldoc.csn.ul.ie  Downloadable PS, man pages and html tarballs are available at http://sdldoc.csn.ul.ie/pub/</P
   10.86 -></DIV
   10.87 -><DIV
   10.88 -CLASS="NAVFOOTER"
   10.89 -><HR
   10.90 -ALIGN="LEFT"
   10.91 -WIDTH="100%"><TABLE
   10.92 -SUMMARY="Footer navigation table"
   10.93 -WIDTH="100%"
   10.94 -BORDER="0"
   10.95 -CELLPADDING="0"
   10.96 -CELLSPACING="0"
   10.97 -><TR
   10.98 -><TD
   10.99 -WIDTH="33%"
  10.100 -ALIGN="left"
  10.101 -VALIGN="top"
  10.102 -><A
  10.103 -HREF="guidepreface.html"
  10.104 -ACCESSKEY="P"
  10.105 ->Prev</A
  10.106 -></TD
  10.107 -><TD
  10.108 -WIDTH="34%"
  10.109 -ALIGN="center"
  10.110 -VALIGN="top"
  10.111 -><A
  10.112 -HREF="index.html"
  10.113 -ACCESSKEY="H"
  10.114 ->Home</A
  10.115 -></TD
  10.116 -><TD
  10.117 -WIDTH="33%"
  10.118 -ALIGN="right"
  10.119 -VALIGN="top"
  10.120 -><A
  10.121 -HREF="guidecredits.html"
  10.122 -ACCESSKEY="N"
  10.123 ->Next</A
  10.124 -></TD
  10.125 -></TR
  10.126 -><TR
  10.127 -><TD
  10.128 -WIDTH="33%"
  10.129 -ALIGN="left"
  10.130 -VALIGN="top"
  10.131 ->Preface</TD
  10.132 -><TD
  10.133 -WIDTH="34%"
  10.134 -ALIGN="center"
  10.135 -VALIGN="top"
  10.136 -><A
  10.137 -HREF="guidepreface.html"
  10.138 -ACCESSKEY="U"
  10.139 ->Up</A
  10.140 -></TD
  10.141 -><TD
  10.142 -WIDTH="33%"
  10.143 -ALIGN="right"
  10.144 -VALIGN="top"
  10.145 ->Credits</TD
  10.146 -></TR
  10.147 -></TABLE
  10.148 -></DIV
  10.149 -></BODY
  10.150 -></HTML
  10.151 ->
  10.152 \ No newline at end of file
    11.1 --- a/docs/html/guideaudioexamples.html	Wed Oct 07 06:11:53 2009 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,228 +0,0 @@
    11.4 -<HTML
    11.5 -><HEAD
    11.6 -><TITLE
    11.7 ->Audio Examples</TITLE
    11.8 -><META
    11.9 -NAME="GENERATOR"
   11.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   11.11 -"><LINK
   11.12 -REL="HOME"
   11.13 -TITLE="SDL Library Documentation"
   11.14 -HREF="index.html"><LINK
   11.15 -REL="UP"
   11.16 -TITLE="Examples"
   11.17 -HREF="guideexamples.html"><LINK
   11.18 -REL="PREVIOUS"
   11.19 -TITLE="Event Examples"
   11.20 -HREF="guideeventexamples.html"><LINK
   11.21 -REL="NEXT"
   11.22 -TITLE="CDROM Examples"
   11.23 -HREF="guidecdromexamples.html"></HEAD
   11.24 -><BODY
   11.25 -CLASS="SECT1"
   11.26 -BGCOLOR="#FFF8DC"
   11.27 -TEXT="#000000"
   11.28 -LINK="#0000ee"
   11.29 -VLINK="#551a8b"
   11.30 -ALINK="#ff0000"
   11.31 -><DIV
   11.32 -CLASS="NAVHEADER"
   11.33 -><TABLE
   11.34 -SUMMARY="Header navigation table"
   11.35 -WIDTH="100%"
   11.36 -BORDER="0"
   11.37 -CELLPADDING="0"
   11.38 -CELLSPACING="0"
   11.39 -><TR
   11.40 -><TH
   11.41 -COLSPAN="3"
   11.42 -ALIGN="center"
   11.43 ->SDL Library Documentation</TH
   11.44 -></TR
   11.45 -><TR
   11.46 -><TD
   11.47 -WIDTH="10%"
   11.48 -ALIGN="left"
   11.49 -VALIGN="bottom"
   11.50 -><A
   11.51 -HREF="guideeventexamples.html"
   11.52 -ACCESSKEY="P"
   11.53 ->Prev</A
   11.54 -></TD
   11.55 -><TD
   11.56 -WIDTH="80%"
   11.57 -ALIGN="center"
   11.58 -VALIGN="bottom"
   11.59 ->Chapter 4. Examples</TD
   11.60 -><TD
   11.61 -WIDTH="10%"
   11.62 -ALIGN="right"
   11.63 -VALIGN="bottom"
   11.64 -><A
   11.65 -HREF="guidecdromexamples.html"
   11.66 -ACCESSKEY="N"
   11.67 ->Next</A
   11.68 -></TD
   11.69 -></TR
   11.70 -></TABLE
   11.71 -><HR
   11.72 -ALIGN="LEFT"
   11.73 -WIDTH="100%"></DIV
   11.74 -><DIV
   11.75 -CLASS="SECT1"
   11.76 -><H1
   11.77 -CLASS="SECT1"
   11.78 -><A
   11.79 -NAME="GUIDEAUDIOEXAMPLES"
   11.80 -></A
   11.81 ->Audio Examples</H1
   11.82 -><P
   11.83 -></P
   11.84 -><DIV
   11.85 -CLASS="SECT2"
   11.86 -><H2
   11.87 -CLASS="SECT2"
   11.88 -><A
   11.89 -NAME="AEN382"
   11.90 -></A
   11.91 ->Opening the audio device</H2
   11.92 -><P
   11.93 -><PRE
   11.94 -CLASS="PROGRAMLISTING"
   11.95 ->    SDL_AudioSpec wanted;
   11.96 -    extern void fill_audio(void *udata, Uint8 *stream, int len);
   11.97 -
   11.98 -    /* Set the audio format */
   11.99 -    wanted.freq = 22050;
  11.100 -    wanted.format = AUDIO_S16;
  11.101 -    wanted.channels = 2;    /* 1 = mono, 2 = stereo */
  11.102 -    wanted.samples = 1024;  /* Good low-latency value for callback */
  11.103 -    wanted.callback = fill_audio;
  11.104 -    wanted.userdata = NULL;
  11.105 -
  11.106 -    /* Open the audio device, forcing the desired format */
  11.107 -    if ( SDL_OpenAudio(&#38;wanted, NULL) &#60; 0 ) {
  11.108 -        fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
  11.109 -        return(-1);
  11.110 -    }
  11.111 -    return(0);</PRE
  11.112 -></P
  11.113 -></DIV
  11.114 -><DIV
  11.115 -CLASS="SECT2"
  11.116 -><H2
  11.117 -CLASS="SECT2"
  11.118 -><A
  11.119 -NAME="AEN386"
  11.120 -></A
  11.121 ->Playing audio</H2
  11.122 -><P
  11.123 -><PRE
  11.124 -CLASS="PROGRAMLISTING"
  11.125 ->    static Uint8 *audio_chunk;
  11.126 -    static Uint32 audio_len;
  11.127 -    static Uint8 *audio_pos;
  11.128 -
  11.129 -    /* The audio function callback takes the following parameters:
  11.130 -       stream:  A pointer to the audio buffer to be filled
  11.131 -       len:     The length (in bytes) of the audio buffer
  11.132 -    */
  11.133 -    void fill_audio(void *udata, Uint8 *stream, int len)
  11.134 -    {
  11.135 -        /* Only play if we have data left */
  11.136 -        if ( audio_len == 0 )
  11.137 -            return;
  11.138 -
  11.139 -        /* Mix as much data as possible */
  11.140 -        len = ( len &#62; audio_len ? audio_len : len );
  11.141 -        SDL_MixAudio(stream, audio_pos, len, SDL_MIX_MAXVOLUME);
  11.142 -        audio_pos += len;
  11.143 -        audio_len -= len;
  11.144 -    }
  11.145 -
  11.146 -    /* Load the audio data ... */
  11.147 -
  11.148 -    ;;;;;
  11.149 -
  11.150 -    audio_pos = audio_chunk;
  11.151 -
  11.152 -    /* Let the callback function play the audio chunk */
  11.153 -    SDL_PauseAudio(0);
  11.154 -
  11.155 -    /* Do some processing */
  11.156 -
  11.157 -    ;;;;;
  11.158 -
  11.159 -    /* Wait for sound to complete */
  11.160 -    while ( audio_len &#62; 0 ) {
  11.161 -        SDL_Delay(100);         /* Sleep 1/10 second */
  11.162 -    }
  11.163 -    SDL_CloseAudio();</PRE
  11.164 -></P
  11.165 -></DIV
  11.166 -></DIV
  11.167 -><DIV
  11.168 -CLASS="NAVFOOTER"
  11.169 -><HR
  11.170 -ALIGN="LEFT"
  11.171 -WIDTH="100%"><TABLE
  11.172 -SUMMARY="Footer navigation table"
  11.173 -WIDTH="100%"
  11.174 -BORDER="0"
  11.175 -CELLPADDING="0"
  11.176 -CELLSPACING="0"
  11.177 -><TR
  11.178 -><TD
  11.179 -WIDTH="33%"
  11.180 -ALIGN="left"
  11.181 -VALIGN="top"
  11.182 -><A
  11.183 -HREF="guideeventexamples.html"
  11.184 -ACCESSKEY="P"
  11.185 ->Prev</A
  11.186 -></TD
  11.187 -><TD
  11.188 -WIDTH="34%"
  11.189 -ALIGN="center"
  11.190 -VALIGN="top"
  11.191 -><A
  11.192 -HREF="index.html"
  11.193 -ACCESSKEY="H"
  11.194 ->Home</A
  11.195 -></TD
  11.196 -><TD
  11.197 -WIDTH="33%"
  11.198 -ALIGN="right"
  11.199 -VALIGN="top"
  11.200 -><A
  11.201 -HREF="guidecdromexamples.html"
  11.202 -ACCESSKEY="N"
  11.203 ->Next</A
  11.204 -></TD
  11.205 -></TR
  11.206 -><TR
  11.207 -><TD
  11.208 -WIDTH="33%"
  11.209 -ALIGN="left"
  11.210 -VALIGN="top"
  11.211 ->Event Examples</TD
  11.212 -><TD
  11.213 -WIDTH="34%"
  11.214 -ALIGN="center"
  11.215 -VALIGN="top"
  11.216 -><A
  11.217 -HREF="guideexamples.html"
  11.218 -ACCESSKEY="U"
  11.219 ->Up</A
  11.220 -></TD
  11.221 -><TD
  11.222 -WIDTH="33%"
  11.223 -ALIGN="right"
  11.224 -VALIGN="top"
  11.225 ->CDROM Examples</TD
  11.226 -></TR
  11.227 -></TABLE
  11.228 -></DIV
  11.229 -></BODY
  11.230 -></HTML
  11.231 ->
  11.232 \ No newline at end of file
    12.1 --- a/docs/html/guidebasicsinit.html	Wed Oct 07 06:11:53 2009 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,240 +0,0 @@
    12.4 -<HTML
    12.5 -><HEAD
    12.6 -><TITLE
    12.7 ->Initializing SDL</TITLE
    12.8 -><META
    12.9 -NAME="GENERATOR"
   12.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   12.11 -"><LINK
   12.12 -REL="HOME"
   12.13 -TITLE="SDL Library Documentation"
   12.14 -HREF="index.html"><LINK
   12.15 -REL="UP"
   12.16 -TITLE="The Basics"
   12.17 -HREF="guidethebasics.html"><LINK
   12.18 -REL="PREVIOUS"
   12.19 -TITLE="The Basics"
   12.20 -HREF="guidethebasics.html"><LINK
   12.21 -REL="NEXT"
   12.22 -TITLE="Graphics and Video"
   12.23 -HREF="guidevideo.html"></HEAD
   12.24 -><BODY
   12.25 -CLASS="SECT1"
   12.26 -BGCOLOR="#FFF8DC"
   12.27 -TEXT="#000000"
   12.28 -LINK="#0000ee"
   12.29 -VLINK="#551a8b"
   12.30 -ALINK="#ff0000"
   12.31 -><DIV
   12.32 -CLASS="NAVHEADER"
   12.33 -><TABLE
   12.34 -SUMMARY="Header navigation table"
   12.35 -WIDTH="100%"
   12.36 -BORDER="0"
   12.37 -CELLPADDING="0"
   12.38 -CELLSPACING="0"
   12.39 -><TR
   12.40 -><TH
   12.41 -COLSPAN="3"
   12.42 -ALIGN="center"
   12.43 ->SDL Library Documentation</TH
   12.44 -></TR
   12.45 -><TR
   12.46 -><TD
   12.47 -WIDTH="10%"
   12.48 -ALIGN="left"
   12.49 -VALIGN="bottom"
   12.50 -><A
   12.51 -HREF="guidethebasics.html"
   12.52 -ACCESSKEY="P"
   12.53 ->Prev</A
   12.54 -></TD
   12.55 -><TD
   12.56 -WIDTH="80%"
   12.57 -ALIGN="center"
   12.58 -VALIGN="bottom"
   12.59 ->Chapter 1. The Basics</TD
   12.60 -><TD
   12.61 -WIDTH="10%"
   12.62 -ALIGN="right"
   12.63 -VALIGN="bottom"
   12.64 -><A
   12.65 -HREF="guidevideo.html"
   12.66 -ACCESSKEY="N"
   12.67 ->Next</A
   12.68 -></TD
   12.69 -></TR
   12.70 -></TABLE
   12.71 -><HR
   12.72 -ALIGN="LEFT"
   12.73 -WIDTH="100%"></DIV
   12.74 -><DIV
   12.75 -CLASS="SECT1"
   12.76 -><H1
   12.77 -CLASS="SECT1"
   12.78 -><A
   12.79 -NAME="GUIDEBASICSINIT"
   12.80 -></A
   12.81 ->Initializing SDL</H1
   12.82 -><P
   12.83 ->SDL is composed of eight subsystems - Audio, CDROM, Event Handling, File I/O, Joystick Handling, Threading, Timers and Video. Before you can use any of these subsystems they must be initialized by calling <A
   12.84 -HREF="sdlinit.html"
   12.85 -><TT
   12.86 -CLASS="FUNCTION"
   12.87 ->SDL_Init</TT
   12.88 -></A
   12.89 -> (or <A
   12.90 -HREF="sdlinitsubsystem.html"
   12.91 -><TT
   12.92 -CLASS="FUNCTION"
   12.93 ->SDL_InitSubSystem</TT
   12.94 -></A
   12.95 ->). <TT
   12.96 -CLASS="FUNCTION"
   12.97 ->SDL_Init</TT
   12.98 -> 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:
   12.99 -<PRE
  12.100 -CLASS="PROGRAMLISTING"
  12.101 ->    SDL_Init ( SDL_INIT_VIDEO );</PRE
  12.102 ->
  12.103 -To initialize the default subsystems, the Video subsystem and the Timers subsystem you would call:
  12.104 -<PRE
  12.105 -CLASS="PROGRAMLISTING"
  12.106 ->    SDL_Init ( SDL_INIT_VIDEO | SDL_INIT_TIMER );</PRE
  12.107 -></P
  12.108 -><P
  12.109 -><TT
  12.110 -CLASS="FUNCTION"
  12.111 ->SDL_Init</TT
  12.112 -> is complemented by <A
  12.113 -HREF="sdlquit.html"
  12.114 -><TT
  12.115 -CLASS="FUNCTION"
  12.116 ->SDL_Quit</TT
  12.117 -></A
  12.118 -> (and <A
  12.119 -HREF="sdlquitsubsystem.html"
  12.120 -><TT
  12.121 -CLASS="FUNCTION"
  12.122 ->SDL_QuitSubSystem</TT
  12.123 -></A
  12.124 ->). <TT
  12.125 -CLASS="FUNCTION"
  12.126 ->SDL_Quit</TT
  12.127 -> shuts down all subsystems, including the default ones. It should always be called before a SDL application exits.</P
  12.128 -><P
  12.129 ->With <TT
  12.130 -CLASS="FUNCTION"
  12.131 ->SDL_Init</TT
  12.132 -> and <TT
  12.133 -CLASS="FUNCTION"
  12.134 ->SDL_Quit</TT
  12.135 -> firmly embedded in your programmers toolkit you can write your first and most basic SDL application. However, we must be prepare to handle errors. Many SDL functions return a value and indicates whether the function has succeeded or failed, <TT
  12.136 -CLASS="FUNCTION"
  12.137 ->SDL_Init</TT
  12.138 ->, for instance, returns -1 if it could not initialize a subsystem. SDL provides a useful facility that allows you to determine exactly what the problem was, every time an error occurs within SDL an error message is stored which can be retrieved using <TT
  12.139 -CLASS="FUNCTION"
  12.140 ->SDL_GetError</TT
  12.141 ->. Use this often, you can never know too much about an error.</P
  12.142 -><DIV
  12.143 -CLASS="EXAMPLE"
  12.144 -><A
  12.145 -NAME="AEN60"
  12.146 -></A
  12.147 -><P
  12.148 -><B
  12.149 ->Example 1-1. Initializing SDL</B
  12.150 -></P
  12.151 -><PRE
  12.152 -CLASS="PROGRAMLISTING"
  12.153 ->#include "SDL.h"   /* All SDL App's need this */
  12.154 -#include &#60;stdio.h&#62;
  12.155 -
  12.156 -int main(int argc, char *argv[]) {
  12.157 -    
  12.158 -    printf("Initializing SDL.\n");
  12.159 -    
  12.160 -    /* Initialize defaults, Video and Audio */
  12.161 -    if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) { 
  12.162 -        printf("Could not initialize SDL: %s.\n", SDL_GetError());
  12.163 -        exit(-1);
  12.164 -    }
  12.165 -
  12.166 -    printf("SDL initialized.\n");
  12.167 -
  12.168 -    printf("Quiting SDL.\n");
  12.169 -    
  12.170 -    /* Shutdown all subsystems */
  12.171 -    SDL_Quit();
  12.172 -    
  12.173 -    printf("Quiting....\n");
  12.174 -
  12.175 -    exit(0);
  12.176 -}&#13;</PRE
  12.177 -></DIV
  12.178 -></DIV
  12.179 -><DIV
  12.180 -CLASS="NAVFOOTER"
  12.181 -><HR
  12.182 -ALIGN="LEFT"
  12.183 -WIDTH="100%"><TABLE
  12.184 -SUMMARY="Footer navigation table"
  12.185 -WIDTH="100%"
  12.186 -BORDER="0"
  12.187 -CELLPADDING="0"
  12.188 -CELLSPACING="0"
  12.189 -><TR
  12.190 -><TD
  12.191 -WIDTH="33%"
  12.192 -ALIGN="left"
  12.193 -VALIGN="top"
  12.194 -><A
  12.195 -HREF="guidethebasics.html"
  12.196 -ACCESSKEY="P"
  12.197 ->Prev</A
  12.198 -></TD
  12.199 -><TD
  12.200 -WIDTH="34%"
  12.201 -ALIGN="center"
  12.202 -VALIGN="top"
  12.203 -><A
  12.204 -HREF="index.html"
  12.205 -ACCESSKEY="H"
  12.206 ->Home</A
  12.207 -></TD
  12.208 -><TD
  12.209 -WIDTH="33%"
  12.210 -ALIGN="right"
  12.211 -VALIGN="top"
  12.212 -><A
  12.213 -HREF="guidevideo.html"
  12.214 -ACCESSKEY="N"
  12.215 ->Next</A
  12.216 -></TD
  12.217 -></TR
  12.218 -><TR
  12.219 -><TD
  12.220 -WIDTH="33%"
  12.221 -ALIGN="left"
  12.222 -VALIGN="top"
  12.223 ->The Basics</TD
  12.224 -><TD
  12.225 -WIDTH="34%"
  12.226 -ALIGN="center"
  12.227 -VALIGN="top"
  12.228 -><A
  12.229 -HREF="guidethebasics.html"
  12.230 -ACCESSKEY="U"
  12.231 ->Up</A
  12.232 -></TD
  12.233 -><TD
  12.234 -WIDTH="33%"
  12.235 -ALIGN="right"
  12.236 -VALIGN="top"
  12.237 ->Graphics and Video</TD
  12.238 -></TR
  12.239 -></TABLE
  12.240 -></DIV
  12.241 -></BODY
  12.242 -></HTML
  12.243 ->
  12.244 \ No newline at end of file
    13.1 --- a/docs/html/guidecdromexamples.html	Wed Oct 07 06:11:53 2009 +0000
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,275 +0,0 @@
    13.4 -<HTML
    13.5 -><HEAD
    13.6 -><TITLE
    13.7 ->CDROM Examples</TITLE
    13.8 -><META
    13.9 -NAME="GENERATOR"
   13.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   13.11 -"><LINK
   13.12 -REL="HOME"
   13.13 -TITLE="SDL Library Documentation"
   13.14 -HREF="index.html"><LINK
   13.15 -REL="UP"
   13.16 -TITLE="Examples"
   13.17 -HREF="guideexamples.html"><LINK
   13.18 -REL="PREVIOUS"
   13.19 -TITLE="Audio Examples"
   13.20 -HREF="guideaudioexamples.html"><LINK
   13.21 -REL="NEXT"
   13.22 -TITLE="Time Examples"
   13.23 -HREF="guidetimeexamples.html"></HEAD
   13.24 -><BODY
   13.25 -CLASS="SECT1"
   13.26 -BGCOLOR="#FFF8DC"
   13.27 -TEXT="#000000"
   13.28 -LINK="#0000ee"
   13.29 -VLINK="#551a8b"
   13.30 -ALINK="#ff0000"
   13.31 -><DIV
   13.32 -CLASS="NAVHEADER"
   13.33 -><TABLE
   13.34 -SUMMARY="Header navigation table"
   13.35 -WIDTH="100%"
   13.36 -BORDER="0"
   13.37 -CELLPADDING="0"
   13.38 -CELLSPACING="0"
   13.39 -><TR
   13.40 -><TH
   13.41 -COLSPAN="3"
   13.42 -ALIGN="center"
   13.43 ->SDL Library Documentation</TH
   13.44 -></TR
   13.45 -><TR
   13.46 -><TD
   13.47 -WIDTH="10%"
   13.48 -ALIGN="left"
   13.49 -VALIGN="bottom"
   13.50 -><A
   13.51 -HREF="guideaudioexamples.html"
   13.52 -ACCESSKEY="P"
   13.53 ->Prev</A
   13.54 -></TD
   13.55 -><TD
   13.56 -WIDTH="80%"
   13.57 -ALIGN="center"
   13.58 -VALIGN="bottom"
   13.59 ->Chapter 4. Examples</TD
   13.60 -><TD
   13.61 -WIDTH="10%"
   13.62 -ALIGN="right"
   13.63 -VALIGN="bottom"
   13.64 -><A
   13.65 -HREF="guidetimeexamples.html"
   13.66 -ACCESSKEY="N"
   13.67 ->Next</A
   13.68 -></TD
   13.69 -></TR
   13.70 -></TABLE
   13.71 -><HR
   13.72 -ALIGN="LEFT"
   13.73 -WIDTH="100%"></DIV
   13.74 -><DIV
   13.75 -CLASS="SECT1"
   13.76 -><H1
   13.77 -CLASS="SECT1"
   13.78 -><A
   13.79 -NAME="GUIDECDROMEXAMPLES"
   13.80 -></A
   13.81 ->CDROM Examples</H1
   13.82 -><P
   13.83 -></P
   13.84 -><DIV
   13.85 -CLASS="SECT2"
   13.86 -><H2
   13.87 -CLASS="SECT2"
   13.88 -><A
   13.89 -NAME="AEN393"
   13.90 -></A
   13.91 ->Listing CD-ROM drives</H2
   13.92 -><P
   13.93 -><PRE
   13.94 -CLASS="PROGRAMLISTING"
   13.95 ->    #include "SDL.h"
   13.96 -
   13.97 -    /* Initialize SDL first */
   13.98 -    if ( SDL_Init(SDL_INIT_CDROM) &#60; 0 ) {
   13.99 -        fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError());
  13.100 -        exit(1);
  13.101 -    }
  13.102 -    atexit(SDL_Quit);
  13.103 -
  13.104 -    /* Find out how many CD-ROM drives are connected to the system */
  13.105 -    printf("Drives available: %d\n", SDL_CDNumDrives());
  13.106 -    for ( i=0; i&#60;SDL_CDNumDrives(); ++i ) {
  13.107 -        printf("Drive %d:  \"%s\"\n", i, SDL_CDName(i));
  13.108 -    }</PRE
  13.109 -></P
  13.110 -></DIV
  13.111 -><DIV
  13.112 -CLASS="SECT2"
  13.113 -><H2
  13.114 -CLASS="SECT2"
  13.115 -><A
  13.116 -NAME="AEN397"
  13.117 -></A
  13.118 ->Opening the default drive</H2
  13.119 -><P
  13.120 -><PRE
  13.121 -CLASS="PROGRAMLISTING"
  13.122 ->    SDL_CD *cdrom;
  13.123 -    CDstatus status;
  13.124 -    char *status_str;
  13.125 -
  13.126 -    cdrom = SDL_CDOpen(0);
  13.127 -    if ( cdrom == NULL ) {
  13.128 -        fprintf(stderr, "Couldn't open default CD-ROM drive: %s\n",
  13.129 -                        SDL_GetError());
  13.130 -        exit(2);
  13.131 -    }
  13.132 -
  13.133 -    status = SDL_CDStatus(cdrom);
  13.134 -    switch (status) {
  13.135 -        case CD_TRAYEMPTY:
  13.136 -            status_str = "tray empty";
  13.137 -            break;
  13.138 -        case CD_STOPPED:
  13.139 -            status_str = "stopped";
  13.140 -            break;
  13.141 -        case CD_PLAYING:
  13.142 -            status_str = "playing";
  13.143 -            break;
  13.144 -        case CD_PAUSED:
  13.145 -            status_str = "paused";
  13.146 -            break;
  13.147 -        case CD_ERROR:
  13.148 -            status_str = "error state";
  13.149 -            break;
  13.150 -    }
  13.151 -    printf("Drive status: %s\n", status_str);
  13.152 -    if ( status &#62;= CD_PLAYING ) {
  13.153 -        int m, s, f;
  13.154 -        FRAMES_TO_MSF(cdrom-&#62;cur_frame, &#38;m, &#38;s, &#38;f);
  13.155 -        printf("Currently playing track %d, %d:%2.2d\n",
  13.156 -        cdrom-&#62;track[cdrom-&#62;cur_track].id, m, s);
  13.157 -    }</PRE
  13.158 -></P
  13.159 -></DIV
  13.160 -><DIV
  13.161 -CLASS="SECT2"
  13.162 -><H2
  13.163 -CLASS="SECT2"
  13.164 -><A
  13.165 -NAME="AEN401"
  13.166 -></A
  13.167 ->Listing the tracks on a CD</H2
  13.168 -><P
  13.169 -><PRE
  13.170 -CLASS="PROGRAMLISTING"
  13.171 ->    SDL_CD *cdrom;          /* Assuming this has already been set.. */
  13.172 -    int i;
  13.173 -    int m, s, f;
  13.174 -
  13.175 -    SDL_CDStatus(cdrom);
  13.176 -    printf("Drive tracks: %d\n", cdrom-&#62;numtracks);
  13.177 -    for ( i=0; i&#60;cdrom-&#62;numtracks; ++i ) {
  13.178 -        FRAMES_TO_MSF(cdrom-&#62;track[i].length, &#38;m, &#38;s, &#38;f);
  13.179 -        if ( f &#62; 0 )
  13.180 -            ++s;
  13.181 -        printf("\tTrack (index %d) %d: %d:%2.2d\n", i,
  13.182 -        cdrom-&#62;track[i].id, m, s);
  13.183 -    }</PRE
  13.184 -></P
  13.185 -></DIV
  13.186 -><DIV
  13.187 -CLASS="SECT2"
  13.188 -><H2
  13.189 -CLASS="SECT2"
  13.190 -><A
  13.191 -NAME="AEN405"
  13.192 -></A
  13.193 ->Play an entire CD</H2
  13.194 -><P
  13.195 -><PRE
  13.196 -CLASS="PROGRAMLISTING"
  13.197 ->    SDL_CD *cdrom;          /* Assuming this has already been set.. */
  13.198 -
  13.199 -    // Play entire CD:
  13.200 -    if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
  13.201 -        SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
  13.202 -
  13.203 -        // Play last track:
  13.204 -        if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
  13.205 -            SDL_CDPlayTracks(cdrom, cdrom-&#62;numtracks-1, 0, 0, 0);
  13.206 -        }
  13.207 -
  13.208 -        // Play first and second track and 10 seconds of third track:
  13.209 -        if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
  13.210 -            SDL_CDPlayTracks(cdrom, 0, 0, 2, CD_FPS * 10);</PRE
  13.211 -></P
  13.212 -></DIV
  13.213 -></DIV
  13.214 -><DIV
  13.215 -CLASS="NAVFOOTER"
  13.216 -><HR
  13.217 -ALIGN="LEFT"
  13.218 -WIDTH="100%"><TABLE
  13.219 -SUMMARY="Footer navigation table"
  13.220 -WIDTH="100%"
  13.221 -BORDER="0"
  13.222 -CELLPADDING="0"
  13.223 -CELLSPACING="0"
  13.224 -><TR
  13.225 -><TD
  13.226 -WIDTH="33%"
  13.227 -ALIGN="left"
  13.228 -VALIGN="top"
  13.229 -><A
  13.230 -HREF="guideaudioexamples.html"
  13.231 -ACCESSKEY="P"
  13.232 ->Prev</A
  13.233 -></TD
  13.234 -><TD
  13.235 -WIDTH="34%"
  13.236 -ALIGN="center"
  13.237 -VALIGN="top"
  13.238 -><A
  13.239 -HREF="index.html"
  13.240 -ACCESSKEY="H"
  13.241 ->Home</A
  13.242 -></TD
  13.243 -><TD
  13.244 -WIDTH="33%"
  13.245 -ALIGN="right"
  13.246 -VALIGN="top"
  13.247 -><A
  13.248 -HREF="guidetimeexamples.html"
  13.249 -ACCESSKEY="N"
  13.250 ->Next</A
  13.251 -></TD
  13.252 -></TR
  13.253 -><TR
  13.254 -><TD
  13.255 -WIDTH="33%"
  13.256 -ALIGN="left"
  13.257 -VALIGN="top"
  13.258 ->Audio Examples</TD
  13.259 -><TD
  13.260 -WIDTH="34%"
  13.261 -ALIGN="center"
  13.262 -VALIGN="top"
  13.263 -><A
  13.264 -HREF="guideexamples.html"
  13.265 -ACCESSKEY="U"
  13.266 ->Up</A
  13.267 -></TD
  13.268 -><TD
  13.269 -WIDTH="33%"
  13.270 -ALIGN="right"
  13.271 -VALIGN="top"
  13.272 ->Time Examples</TD
  13.273 -></TR
  13.274 -></TABLE
  13.275 -></DIV
  13.276 -></BODY
  13.277 -></HTML
  13.278 ->
  13.279 \ No newline at end of file
    14.1 --- a/docs/html/guidecredits.html	Wed Oct 07 06:11:53 2009 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,195 +0,0 @@
    14.4 -<HTML
    14.5 -><HEAD
    14.6 -><TITLE
    14.7 ->Credits</TITLE
    14.8 -><META
    14.9 -NAME="GENERATOR"
   14.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   14.11 -"><LINK
   14.12 -REL="HOME"
   14.13 -TITLE="SDL Library Documentation"
   14.14 -HREF="index.html"><LINK
   14.15 -REL="UP"
   14.16 -TITLE="Preface"
   14.17 -HREF="guidepreface.html"><LINK
   14.18 -REL="PREVIOUS"
   14.19 -TITLE="About SDLdoc"
   14.20 -HREF="guideaboutsdldoc.html"><LINK
   14.21 -REL="NEXT"
   14.22 -TITLE="The Basics"
   14.23 -HREF="guidethebasics.html"></HEAD
   14.24 -><BODY
   14.25 -CLASS="SECT1"
   14.26 -BGCOLOR="#FFF8DC"
   14.27 -TEXT="#000000"
   14.28 -LINK="#0000ee"
   14.29 -VLINK="#551a8b"
   14.30 -ALINK="#ff0000"
   14.31 -><DIV
   14.32 -CLASS="NAVHEADER"
   14.33 -><TABLE
   14.34 -SUMMARY="Header navigation table"
   14.35 -WIDTH="100%"
   14.36 -BORDER="0"
   14.37 -CELLPADDING="0"
   14.38 -CELLSPACING="0"
   14.39 -><TR
   14.40 -><TH
   14.41 -COLSPAN="3"
   14.42 -ALIGN="center"
   14.43 ->SDL Library Documentation</TH
   14.44 -></TR
   14.45 -><TR
   14.46 -><TD
   14.47 -WIDTH="10%"
   14.48 -ALIGN="left"
   14.49 -VALIGN="bottom"
   14.50 -><A
   14.51 -HREF="guideaboutsdldoc.html"
   14.52 -ACCESSKEY="P"
   14.53 ->Prev</A
   14.54 -></TD
   14.55 -><TD
   14.56 -WIDTH="80%"
   14.57 -ALIGN="center"
   14.58 -VALIGN="bottom"
   14.59 ->Preface</TD
   14.60 -><TD
   14.61 -WIDTH="10%"
   14.62 -ALIGN="right"
   14.63 -VALIGN="bottom"
   14.64 -><A
   14.65 -HREF="guidethebasics.html"
   14.66 -ACCESSKEY="N"
   14.67 ->Next</A
   14.68 -></TD
   14.69 -></TR
   14.70 -></TABLE
   14.71 -><HR
   14.72 -ALIGN="LEFT"
   14.73 -WIDTH="100%"></DIV
   14.74 -><DIV
   14.75 -CLASS="SECT1"
   14.76 -><H1
   14.77 -CLASS="SECT1"
   14.78 -><A
   14.79 -NAME="GUIDECREDITS"
   14.80 -></A
   14.81 ->Credits</H1
   14.82 -><P
   14.83 -><P
   14.84 -></P
   14.85 -><TABLE
   14.86 -BORDER="0"
   14.87 -><TBODY
   14.88 -><TR
   14.89 -><TD
   14.90 ->Sam Lantinga, slouken@libsdl.org</TD
   14.91 -></TR
   14.92 -><TR
   14.93 -><TD
   14.94 ->Martin Donlon, akawaka@skynet.ie</TD
   14.95 -></TR
   14.96 -><TR
   14.97 -><TD
   14.98 ->Mattias Engdegård</TD
   14.99 -></TR
  14.100 -><TR
  14.101 -><TD
  14.102 ->Julian Peterson</TD
  14.103 -></TR
  14.104 -><TR
  14.105 -><TD
  14.106 ->Ken Jordan</TD
  14.107 -></TR
  14.108 -><TR
  14.109 -><TD
  14.110 ->Maxim Sobolev</TD
  14.111 -></TR
  14.112 -><TR
  14.113 -><TD
  14.114 ->Wesley Poole</TD
  14.115 -></TR
  14.116 -><TR
  14.117 -><TD
  14.118 ->Michael Vance</TD
  14.119 -></TR
  14.120 -><TR
  14.121 -><TD
  14.122 ->Andreas Umbach</TD
  14.123 -></TR
  14.124 -><TR
  14.125 -><TD
  14.126 ->Andreas Hofmeister</TD
  14.127 -></TR
  14.128 -></TBODY
  14.129 -></TABLE
  14.130 -><P
  14.131 -></P
  14.132 -></P
  14.133 -></DIV
  14.134 -><DIV
  14.135 -CLASS="NAVFOOTER"
  14.136 -><HR
  14.137 -ALIGN="LEFT"
  14.138 -WIDTH="100%"><TABLE
  14.139 -SUMMARY="Footer navigation table"
  14.140 -WIDTH="100%"
  14.141 -BORDER="0"
  14.142 -CELLPADDING="0"
  14.143 -CELLSPACING="0"
  14.144 -><TR
  14.145 -><TD
  14.146 -WIDTH="33%"
  14.147 -ALIGN="left"
  14.148 -VALIGN="top"
  14.149 -><A
  14.150 -HREF="guideaboutsdldoc.html"
  14.151 -ACCESSKEY="P"
  14.152 ->Prev</A
  14.153 -></TD
  14.154 -><TD
  14.155 -WIDTH="34%"
  14.156 -ALIGN="center"
  14.157 -VALIGN="top"
  14.158 -><A
  14.159 -HREF="index.html"
  14.160 -ACCESSKEY="H"
  14.161 ->Home</A
  14.162 -></TD
  14.163 -><TD
  14.164 -WIDTH="33%"
  14.165 -ALIGN="right"
  14.166 -VALIGN="top"
  14.167 -><A
  14.168 -HREF="guidethebasics.html"
  14.169 -ACCESSKEY="N"
  14.170 ->Next</A
  14.171 -></TD
  14.172 -></TR
  14.173 -><TR
  14.174 -><TD
  14.175 -WIDTH="33%"
  14.176 -ALIGN="left"
  14.177 -VALIGN="top"
  14.178 ->About SDLdoc</TD
  14.179 -><TD
  14.180 -WIDTH="34%"
  14.181 -ALIGN="center"
  14.182 -VALIGN="top"
  14.183 -><A
  14.184 -HREF="guidepreface.html"
  14.185 -ACCESSKEY="U"
  14.186 ->Up</A
  14.187 -></TD
  14.188 -><TD
  14.189 -WIDTH="33%"
  14.190 -ALIGN="right"
  14.191 -VALIGN="top"
  14.192 ->The Basics</TD
  14.193 -></TR
  14.194 -></TABLE
  14.195 -></DIV
  14.196 -></BODY
  14.197 -></HTML
  14.198 ->
  14.199 \ No newline at end of file
    15.1 --- a/docs/html/guideeventexamples.html	Wed Oct 07 06:11:53 2009 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,247 +0,0 @@
    15.4 -<HTML
    15.5 -><HEAD
    15.6 -><TITLE
    15.7 ->Event Examples</TITLE
    15.8 -><META
    15.9 -NAME="GENERATOR"
   15.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   15.11 -"><LINK
   15.12 -REL="HOME"
   15.13 -TITLE="SDL Library Documentation"
   15.14 -HREF="index.html"><LINK
   15.15 -REL="UP"
   15.16 -TITLE="Examples"
   15.17 -HREF="guideexamples.html"><LINK
   15.18 -REL="PREVIOUS"
   15.19 -TITLE="Examples"
   15.20 -HREF="guideexamples.html"><LINK
   15.21 -REL="NEXT"
   15.22 -TITLE="Audio Examples"
   15.23 -HREF="guideaudioexamples.html"></HEAD
   15.24 -><BODY
   15.25 -CLASS="SECT1"
   15.26 -BGCOLOR="#FFF8DC"
   15.27 -TEXT="#000000"
   15.28 -LINK="#0000ee"
   15.29 -VLINK="#551a8b"
   15.30 -ALINK="#ff0000"
   15.31 -><DIV
   15.32 -CLASS="NAVHEADER"
   15.33 -><TABLE
   15.34 -SUMMARY="Header navigation table"
   15.35 -WIDTH="100%"
   15.36 -BORDER="0"
   15.37 -CELLPADDING="0"
   15.38 -CELLSPACING="0"
   15.39 -><TR
   15.40 -><TH
   15.41 -COLSPAN="3"
   15.42 -ALIGN="center"
   15.43 ->SDL Library Documentation</TH
   15.44 -></TR
   15.45 -><TR
   15.46 -><TD
   15.47 -WIDTH="10%"
   15.48 -ALIGN="left"
   15.49 -VALIGN="bottom"
   15.50 -><A
   15.51 -HREF="guideexamples.html"
   15.52 -ACCESSKEY="P"
   15.53 ->Prev</A
   15.54 -></TD
   15.55 -><TD
   15.56 -WIDTH="80%"
   15.57 -ALIGN="center"
   15.58 -VALIGN="bottom"
   15.59 ->Chapter 4. Examples</TD
   15.60 -><TD
   15.61 -WIDTH="10%"
   15.62 -ALIGN="right"
   15.63 -VALIGN="bottom"
   15.64 -><A
   15.65 -HREF="guideaudioexamples.html"
   15.66 -ACCESSKEY="N"
   15.67 ->Next</A
   15.68 -></TD
   15.69 -></TR
   15.70 -></TABLE
   15.71 -><HR
   15.72 -ALIGN="LEFT"
   15.73 -WIDTH="100%"></DIV
   15.74 -><DIV
   15.75 -CLASS="SECT1"
   15.76 -><H1
   15.77 -CLASS="SECT1"
   15.78 -><A
   15.79 -NAME="GUIDEEVENTEXAMPLES"
   15.80 -></A
   15.81 ->Event Examples</H1
   15.82 -><P
   15.83 -></P
   15.84 -><DIV
   15.85 -CLASS="SECT2"
   15.86 -><H2
   15.87 -CLASS="SECT2"
   15.88 -><A
   15.89 -NAME="AEN375"
   15.90 -></A
   15.91 ->Filtering and Handling Events</H2
   15.92 -><P
   15.93 -><PRE
   15.94 -CLASS="PROGRAMLISTING"
   15.95 ->#include &#60;stdio.h&#62;
   15.96 -#include &#60;stdlib.h&#62;
   15.97 -
   15.98 -#include "SDL.h"
   15.99 -
  15.100 -/* This function may run in a separate event thread */
  15.101 -int FilterEvents(const SDL_Event *event) {
  15.102 -    static int boycott = 1;
  15.103 -
  15.104 -    /* This quit event signals the closing of the window */
  15.105 -    if ( (event-&#62;type == SDL_QUIT) &#38;&#38; boycott ) {
  15.106 -        printf("Quit event filtered out -- try again.\n");
  15.107 -        boycott = 0;
  15.108 -        return(0);
  15.109 -    }
  15.110 -    if ( event-&#62;type == SDL_MOUSEMOTION ) {
  15.111 -        printf("Mouse moved to (%d,%d)\n",
  15.112 -                event-&#62;motion.x, event-&#62;motion.y);
  15.113 -        return(0);    /* Drop it, we've handled it */
  15.114 -    }
  15.115 -    return(1);
  15.116 -}
  15.117 -
  15.118 -int main(int argc, char *argv[])
  15.119 -{
  15.120 -    SDL_Event event;
  15.121 -
  15.122 -    /* Initialize the SDL library (starts the event loop) */
  15.123 -    if ( SDL_Init(SDL_INIT_VIDEO) &#60; 0 ) {
  15.124 -        fprintf(stderr,
  15.125 -                "Couldn't initialize SDL: %s\n", SDL_GetError());
  15.126 -        exit(1);
  15.127 -    }
  15.128 -
  15.129 -    /* Clean up on exit, exit on window close and interrupt */
  15.130 -    atexit(SDL_Quit);
  15.131 -
  15.132 -    /* Ignore key events */
  15.133 -    SDL_EventState(SDL_KEYDOWN, SDL_IGNORE);
  15.134 -    SDL_EventState(SDL_KEYUP, SDL_IGNORE);
  15.135 -
  15.136 -    /* Filter quit and mouse motion events */
  15.137 -    SDL_SetEventFilter(FilterEvents);
  15.138 -
  15.139 -    /* The mouse isn't much use unless we have a display for reference */
  15.140 -    if ( SDL_SetVideoMode(640, 480, 8, 0) == NULL ) {
  15.141 -        fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
  15.142 -                        SDL_GetError());
  15.143 -        exit(1);
  15.144 -    }
  15.145 -
  15.146 -    /* Loop waiting for ESC+Mouse_Button */
  15.147 -    while ( SDL_WaitEvent(&#38;event) &#62;= 0 ) {
  15.148 -        switch (event.type) {
  15.149 -            case SDL_ACTIVEEVENT: {
  15.150 -                if ( event.active.state &#38; SDL_APPACTIVE ) {
  15.151 -                    if ( event.active.gain ) {
  15.152 -                        printf("App activated\n");
  15.153 -                    } else {
  15.154 -                        printf("App iconified\n");
  15.155 -                    }
  15.156 -                }
  15.157 -            }
  15.158 -            break;
  15.159 -                    
  15.160 -            case SDL_MOUSEBUTTONDOWN: {
  15.161 -                Uint8 *keys;
  15.162 -
  15.163 -                keys = SDL_GetKeyState(NULL);
  15.164 -                if ( keys[SDLK_ESCAPE] == SDL_PRESSED ) {
  15.165 -                    printf("Bye bye...\n");
  15.166 -                    exit(0);
  15.167 -                }
  15.168 -                printf("Mouse button pressed\n");
  15.169 -            }
  15.170 -            break;
  15.171 -
  15.172 -            case SDL_QUIT: {
  15.173 -                printf("Quit requested, quitting.\n");
  15.174 -                exit(0);
  15.175 -            }
  15.176 -            break;
  15.177 -        }
  15.178 -    }
  15.179 -    /* This should never happen */
  15.180 -    printf("SDL_WaitEvent error: %s\n", SDL_GetError());
  15.181 -    exit(1);
  15.182 -}</PRE
  15.183 -></P
  15.184 -></DIV
  15.185 -></DIV
  15.186 -><DIV
  15.187 -CLASS="NAVFOOTER"
  15.188 -><HR
  15.189 -ALIGN="LEFT"
  15.190 -WIDTH="100%"><TABLE
  15.191 -SUMMARY="Footer navigation table"
  15.192 -WIDTH="100%"
  15.193 -BORDER="0"
  15.194 -CELLPADDING="0"
  15.195 -CELLSPACING="0"
  15.196 -><TR
  15.197 -><TD
  15.198 -WIDTH="33%"
  15.199 -ALIGN="left"
  15.200 -VALIGN="top"
  15.201 -><A
  15.202 -HREF="guideexamples.html"
  15.203 -ACCESSKEY="P"
  15.204 ->Prev</A
  15.205 -></TD
  15.206 -><TD
  15.207 -WIDTH="34%"
  15.208 -ALIGN="center"
  15.209 -VALIGN="top"
  15.210 -><A
  15.211 -HREF="index.html"
  15.212 -ACCESSKEY="H"
  15.213 ->Home</A
  15.214 -></TD
  15.215 -><TD
  15.216 -WIDTH="33%"
  15.217 -ALIGN="right"
  15.218 -VALIGN="top"
  15.219 -><A
  15.220 -HREF="guideaudioexamples.html"
  15.221 -ACCESSKEY="N"
  15.222 ->Next</A
  15.223 -></TD
  15.224 -></TR
  15.225 -><TR
  15.226 -><TD
  15.227 -WIDTH="33%"
  15.228 -ALIGN="left"
  15.229 -VALIGN="top"
  15.230 ->Examples</TD
  15.231 -><TD
  15.232 -WIDTH="34%"
  15.233 -ALIGN="center"
  15.234 -VALIGN="top"
  15.235 -><A
  15.236 -HREF="guideexamples.html"
  15.237 -ACCESSKEY="U"
  15.238 ->Up</A
  15.239 -></TD
  15.240 -><TD
  15.241 -WIDTH="33%"
  15.242 -ALIGN="right"
  15.243 -VALIGN="top"
  15.244 ->Audio Examples</TD
  15.245 -></TR
  15.246 -></TABLE
  15.247 -></DIV
  15.248 -></BODY
  15.249 -></HTML
  15.250 ->
  15.251 \ No newline at end of file
    16.1 --- a/docs/html/guideexamples.html	Wed Oct 07 06:11:53 2009 +0000
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,188 +0,0 @@
    16.4 -<HTML
    16.5 -><HEAD
    16.6 -><TITLE
    16.7 ->Examples</TITLE
    16.8 -><META
    16.9 -NAME="GENERATOR"
   16.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   16.11 -"><LINK
   16.12 -REL="HOME"
   16.13 -TITLE="SDL Library Documentation"
   16.14 -HREF="index.html"><LINK
   16.15 -REL="UP"
   16.16 -TITLE="SDL Guide"
   16.17 -HREF="guide.html"><LINK
   16.18 -REL="PREVIOUS"
   16.19 -TITLE="Handling the Keyboard"
   16.20 -HREF="guideinputkeyboard.html"><LINK
   16.21 -REL="NEXT"
   16.22 -TITLE="Event Examples"
   16.23 -HREF="guideeventexamples.html"></HEAD
   16.24 -><BODY
   16.25 -CLASS="CHAPTER"
   16.26 -BGCOLOR="#FFF8DC"
   16.27 -TEXT="#000000"
   16.28 -LINK="#0000ee"
   16.29 -VLINK="#551a8b"
   16.30 -ALINK="#ff0000"
   16.31 -><DIV
   16.32 -CLASS="NAVHEADER"
   16.33 -><TABLE
   16.34 -SUMMARY="Header navigation table"
   16.35 -WIDTH="100%"
   16.36 -BORDER="0"
   16.37 -CELLPADDING="0"
   16.38 -CELLSPACING="0"
   16.39 -><TR
   16.40 -><TH
   16.41 -COLSPAN="3"
   16.42 -ALIGN="center"
   16.43 ->SDL Library Documentation</TH
   16.44 -></TR
   16.45 -><TR
   16.46 -><TD
   16.47 -WIDTH="10%"
   16.48 -ALIGN="left"
   16.49 -VALIGN="bottom"
   16.50 -><A
   16.51 -HREF="guideinputkeyboard.html"
   16.52 -ACCESSKEY="P"
   16.53 ->Prev</A
   16.54 -></TD
   16.55 -><TD
   16.56 -WIDTH="80%"
   16.57 -ALIGN="center"
   16.58 -VALIGN="bottom"
   16.59 -></TD
   16.60 -><TD
   16.61 -WIDTH="10%"
   16.62 -ALIGN="right"
   16.63 -VALIGN="bottom"
   16.64 -><A
   16.65 -HREF="guideeventexamples.html"
   16.66 -ACCESSKEY="N"
   16.67 ->Next</A
   16.68 -></TD
   16.69 -></TR
   16.70 -></TABLE
   16.71 -><HR
   16.72 -ALIGN="LEFT"
   16.73 -WIDTH="100%"></DIV
   16.74 -><DIV
   16.75 -CLASS="CHAPTER"
   16.76 -><H1
   16.77 -><A
   16.78 -NAME="GUIDEEXAMPLES"
   16.79 -></A
   16.80 ->Chapter 4. Examples</H1
   16.81 -><DIV
   16.82 -CLASS="TOC"
   16.83 -><DL
   16.84 -><DT
   16.85 -><B
   16.86 ->Table of Contents</B
   16.87 -></DT
   16.88 -><DT
   16.89 -><A
   16.90 -HREF="guideexamples.html#AEN369"
   16.91 ->Introduction</A
   16.92 -></DT
   16.93 -><DT
   16.94 -><A
   16.95 -HREF="guideeventexamples.html"
   16.96 ->Event Examples</A
   16.97 -></DT
   16.98 -><DT
   16.99 -><A
  16.100 -HREF="guideaudioexamples.html"
  16.101 ->Audio Examples</A
  16.102 -></DT
  16.103 -><DT
  16.104 -><A
  16.105 -HREF="guidecdromexamples.html"
  16.106 ->CDROM Examples</A
  16.107 -></DT
  16.108 -><DT
  16.109 -><A
  16.110 -HREF="guidetimeexamples.html"
  16.111 ->Time Examples</A
  16.112 -></DT
  16.113 -></DL
  16.114 -></DIV
  16.115 -><DIV
  16.116 -CLASS="SECT1"
  16.117 -><H1
  16.118 -CLASS="SECT1"
  16.119 -><A
  16.120 -NAME="AEN369"
  16.121 -></A
  16.122 ->Introduction</H1
  16.123 -><P
  16.124 ->For the moment these examples are taken directly from the old SDL documentation. By the 1.2 release these examples should hopefully deal with most common SDL programming problems.</P
  16.125 -></DIV
  16.126 -></DIV
  16.127 -><DIV
  16.128 -CLASS="NAVFOOTER"
  16.129 -><HR
  16.130 -ALIGN="LEFT"
  16.131 -WIDTH="100%"><TABLE
  16.132 -SUMMARY="Footer navigation table"
  16.133 -WIDTH="100%"
  16.134 -BORDER="0"
  16.135 -CELLPADDING="0"
  16.136 -CELLSPACING="0"
  16.137 -><TR
  16.138 -><TD
  16.139 -WIDTH="33%"
  16.140 -ALIGN="left"
  16.141 -VALIGN="top"
  16.142 -><A
  16.143 -HREF="guideinputkeyboard.html"
  16.144 -ACCESSKEY="P"
  16.145 ->Prev</A
  16.146 -></TD
  16.147 -><TD
  16.148 -WIDTH="34%"
  16.149 -ALIGN="center"
  16.150 -VALIGN="top"
  16.151 -><A
  16.152 -HREF="index.html"
  16.153 -ACCESSKEY="H"
  16.154 ->Home</A
  16.155 -></TD
  16.156 -><TD
  16.157 -WIDTH="33%"
  16.158 -ALIGN="right"
  16.159 -VALIGN="top"
  16.160 -><A
  16.161 -HREF="guideeventexamples.html"
  16.162 -ACCESSKEY="N"
  16.163 ->Next</A
  16.164 -></TD
  16.165 -></TR
  16.166 -><TR
  16.167 -><TD
  16.168 -WIDTH="33%"
  16.169 -ALIGN="left"
  16.170 -VALIGN="top"
  16.171 ->Handling the Keyboard</TD
  16.172 -><TD
  16.173 -WIDTH="34%"
  16.174 -ALIGN="center"
  16.175 -VALIGN="top"
  16.176 -><A
  16.177 -HREF="guide.html"
  16.178 -ACCESSKEY="U"
  16.179 ->Up</A
  16.180 -></TD
  16.181 -><TD
  16.182 -WIDTH="33%"
  16.183 -ALIGN="right"
  16.184 -VALIGN="top"
  16.185 ->Event Examples</TD
  16.186 -></TR
  16.187 -></TABLE
  16.188 -></DIV
  16.189 -></BODY
  16.190 -></HTML
  16.191 ->
  16.192 \ No newline at end of file
    17.1 --- a/docs/html/guideinput.html	Wed Oct 07 06:11:53 2009 +0000
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,739 +0,0 @@
    17.4 -<HTML
    17.5 -><HEAD
    17.6 -><TITLE
    17.7 ->Input handling</TITLE
    17.8 -><META
    17.9 -NAME="GENERATOR"
   17.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   17.11 -"><LINK
   17.12 -REL="HOME"
   17.13 -TITLE="SDL Library Documentation"
   17.14 -HREF="index.html"><LINK
   17.15 -REL="UP"
   17.16 -TITLE="SDL Guide"
   17.17 -HREF="guide.html"><LINK
   17.18 -REL="PREVIOUS"
   17.19 -TITLE="Using OpenGL With SDL"
   17.20 -HREF="guidevideoopengl.html"><LINK
   17.21 -REL="NEXT"
   17.22 -TITLE="Handling the Keyboard"
   17.23 -HREF="guideinputkeyboard.html"></HEAD
   17.24 -><BODY
   17.25 -CLASS="CHAPTER"
   17.26 -BGCOLOR="#FFF8DC"
   17.27 -TEXT="#000000"
   17.28 -LINK="#0000ee"
   17.29 -VLINK="#551a8b"
   17.30 -ALINK="#ff0000"
   17.31 -><DIV
   17.32 -CLASS="NAVHEADER"
   17.33 -><TABLE
   17.34 -SUMMARY="Header navigation table"
   17.35 -WIDTH="100%"
   17.36 -BORDER="0"
   17.37 -CELLPADDING="0"
   17.38 -CELLSPACING="0"
   17.39 -><TR
   17.40 -><TH
   17.41 -COLSPAN="3"
   17.42 -ALIGN="center"
   17.43 ->SDL Library Documentation</TH
   17.44 -></TR
   17.45 -><TR
   17.46 -><TD
   17.47 -WIDTH="10%"
   17.48 -ALIGN="left"
   17.49 -VALIGN="bottom"
   17.50 -><A
   17.51 -HREF="guidevideoopengl.html"
   17.52 -ACCESSKEY="P"
   17.53 ->Prev</A
   17.54 -></TD
   17.55 -><TD
   17.56 -WIDTH="80%"
   17.57 -ALIGN="center"
   17.58 -VALIGN="bottom"
   17.59 -></TD
   17.60 -><TD
   17.61 -WIDTH="10%"
   17.62 -ALIGN="right"
   17.63 -VALIGN="bottom"
   17.64 -><A
   17.65 -HREF="guideinputkeyboard.html"
   17.66 -ACCESSKEY="N"
   17.67 ->Next</A
   17.68 -></TD
   17.69 -></TR
   17.70 -></TABLE
   17.71 -><HR
   17.72 -ALIGN="LEFT"
   17.73 -WIDTH="100%"></DIV
   17.74 -><DIV
   17.75 -CLASS="CHAPTER"
   17.76 -><H1
   17.77 -><A
   17.78 -NAME="GUIDEINPUT"
   17.79 -></A
   17.80 ->Chapter 3. Input handling</H1
   17.81 -><DIV
   17.82 -CLASS="TOC"
   17.83 -><DL
   17.84 -><DT
   17.85 -><B
   17.86 ->Table of Contents</B
   17.87 -></DT
   17.88 -><DT
   17.89 -><A
   17.90 -HREF="guideinput.html#GUIDEINPUTJOYSTICK"
   17.91 ->Handling Joysticks</A
   17.92 -></DT
   17.93 -><DT
   17.94 -><A
   17.95 -HREF="guideinputkeyboard.html"
   17.96 ->Handling the Keyboard</A
   17.97 -></DT
   17.98 -></DL
   17.99 -></DIV
  17.100 -><DIV
  17.101 -CLASS="SECT1"
  17.102 -><H1
  17.103 -CLASS="SECT1"
  17.104 -><A
  17.105 -NAME="GUIDEINPUTJOYSTICK"
  17.106 -></A
  17.107 ->Handling Joysticks</H1
  17.108 -><DIV
  17.109 -CLASS="SECT2"
  17.110 -><H2
  17.111 -CLASS="SECT2"
  17.112 -><A
  17.113 -NAME="AEN135"
  17.114 -></A
  17.115 ->Initialization</H2
  17.116 -><P
  17.117 ->The first step in using a joystick in a SDL program is to initialize the Joystick subsystems of SDL. This done by passing the <TT
  17.118 -CLASS="LITERAL"
  17.119 ->SDL_INIT_JOYSTICK</TT
  17.120 -> flag to <A
  17.121 -HREF="sdlinit.html"
  17.122 -><TT
  17.123 -CLASS="FUNCTION"
  17.124 ->SDL_Init</TT
  17.125 -></A
  17.126 ->.  The joystick flag will usually be used in conjunction with other flags (like the video flag) because the joystick is usually used to control something.</P
  17.127 -><DIV
  17.128 -CLASS="EXAMPLE"
  17.129 -><A
  17.130 -NAME="AEN141"
  17.131 -></A
  17.132 -><P
  17.133 -><B
  17.134 ->Example 3-1. Initializing SDL with Joystick Support</B
  17.135 -></P
  17.136 -><PRE
  17.137 -CLASS="PROGRAMLISTING"
  17.138 ->    if (SDL_Init( SDL_INIT_VIDEO | SDL_INIT_JOYSTICK ) &#60; 0)
  17.139 -    {
  17.140 -        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
  17.141 -        exit(1);
  17.142 -    }</PRE
  17.143 -></DIV
  17.144 -><P
  17.145 ->This will attempt to start SDL with both the video and the joystick subsystems activated.</P
  17.146 -></DIV
  17.147 -><DIV
  17.148 -CLASS="SECT2"
  17.149 -><H2
  17.150 -CLASS="SECT2"
  17.151 -><A
  17.152 -NAME="AEN145"
  17.153 -></A
  17.154 ->Querying</H2
  17.155 -><P
  17.156 ->If we have reached this point then we can safely assume that the SDL library has been initialized and that the Joystick subsystem is active. We can now call some video and/or sound functions to get things going before we need the joystick. Eventually we have to make sure that there is actually a joystick to work with. It's wise to always check even if you know a joystick will be present on the system because it can also help detect when the joystick is unplugged. The function used to check for joysticks is <A
  17.157 -HREF="sdlnumjoysticks.html"
  17.158 -><TT
  17.159 -CLASS="FUNCTION"
  17.160 ->SDL_NumJoysticks</TT
  17.161 -></A
  17.162 ->.</P
  17.163 -><P
  17.164 ->This function simply returns the number of joysticks available on the system. If it is at least one then we are in good shape. The next step is to determine which joystick the user wants to use. If the number of joysticks available is only one then it is safe to assume that one joystick is the one the user wants to use. SDL has a function to get the name of the joysticks as assigned by the operations system and that function is <A
  17.165 -HREF="sdljoystickname.html"
  17.166 -><TT
  17.167 -CLASS="FUNCTION"
  17.168 ->SDL_JoystickName</TT
  17.169 -></A
  17.170 ->.  The joystick is specified by an index where 0 is the first joystick and the last joystick is the number returned by <TT
  17.171 -CLASS="FUNCTION"
  17.172 ->SDL_NumJoysticks</TT
  17.173 -> - 1.  In the demonstration a list of all available joysticks is printed to stdout.</P
  17.174 -><DIV
  17.175 -CLASS="EXAMPLE"
  17.176 -><A
  17.177 -NAME="AEN154"
  17.178 -></A
  17.179 -><P
  17.180 -><B
  17.181 ->Example 3-2. Querying the Number of Available Joysticks</B
  17.182 -></P
  17.183 -><PRE
  17.184 -CLASS="PROGRAMLISTING"
  17.185 ->    printf("%i joysticks were found.\n\n", SDL_NumJoysticks() );
  17.186 -    printf("The names of the joysticks are:\n");
  17.187 -		
  17.188 -    for( i=0; i &#60; SDL_NumJoysticks(); i++ ) 
  17.189 -    {
  17.190 -        printf("    %s\n", SDL_JoystickName(i));
  17.191 -    }</PRE
  17.192 -></DIV
  17.193 -></DIV
  17.194 -><DIV
  17.195 -CLASS="SECT2"
  17.196 -><H2
  17.197 -CLASS="SECT2"
  17.198 -><A
  17.199 -NAME="AEN157"
  17.200 -></A
  17.201 ->Opening a Joystick and Receiving Joystick Events</H2
  17.202 -><P
  17.203 ->SDL's event driven architecture makes working with joysticks a snap.  Joysticks can trigger 4 different types of events:
  17.204 -<P
  17.205 -></P
  17.206 -><TABLE
  17.207 -BORDER="0"
  17.208 -><TBODY
  17.209 -><TR
  17.210 -><TD
  17.211 -><A
  17.212 -HREF="sdljoyaxisevent.html"
  17.213 -><SPAN
  17.214 -CLASS="STRUCTNAME"
  17.215 ->SDL_JoyAxisEvent</SPAN
  17.216 -></A
  17.217 -></TD
  17.218 -><TD
  17.219 ->Occurs when an axis changes</TD
  17.220 -></TR
  17.221 -><TR
  17.222 -><TD
  17.223 -><A
  17.224 -HREF="sdljoyballevent.html"
  17.225 -><SPAN
  17.226 -CLASS="STRUCTNAME"
  17.227 ->SDL_JoyBallEvent</SPAN
  17.228 -></A
  17.229 -></TD
  17.230 -><TD
  17.231 ->Occurs when a joystick trackball's position changes</TD
  17.232 -></TR
  17.233 -><TR
  17.234 -><TD
  17.235 -><A
  17.236 -HREF="sdljoyhatevent.html"
  17.237 -><SPAN
  17.238 -CLASS="STRUCTNAME"
  17.239 ->SDL_JoyHatEvent</SPAN
  17.240 -></A
  17.241 -></TD
  17.242 -><TD
  17.243 ->Occurs when a hat's position changes</TD
  17.244 -></TR
  17.245 -><TR
  17.246 -><TD
  17.247 -><A
  17.248 -HREF="sdljoybuttonevent.html"
  17.249 -><SPAN
  17.250 -CLASS="STRUCTNAME"
  17.251 ->SDL_JoyButtonEvent</SPAN
  17.252 -></A
  17.253 -></TD
  17.254 -><TD
  17.255 ->Occurs when a button is pressed or released</TD
  17.256 -></TR
  17.257 -></TBODY
  17.258 -></TABLE
  17.259 -><P
  17.260 -></P
  17.261 -></P
  17.262 -><P
  17.263 ->Events are received from all joysticks opened. The first thing that needs to be done in order to receive joystick events is to call <A
  17.264 -HREF="sdljoystickeventstate.html"
  17.265 -><TT
  17.266 -CLASS="FUNCTION"
  17.267 ->SDL_JoystickEventState</TT
  17.268 -></A
  17.269 -> with the <TT
  17.270 -CLASS="LITERAL"
  17.271 ->SDL_ENABLE</TT
  17.272 -> flag. Next you must open the joysticks that you want to receive envents from. This is done with the <A
  17.273 -HREF="sdljoystickopen.html"
  17.274 -><TT
  17.275 -CLASS="FUNCTION"
  17.276 ->SDL_JoystickOpen</TT
  17.277 -></A
  17.278 -> function. For the example we are only interested in events from the first joystick on the system, regardless of what it may be. To receive events from it we would do this:</P
  17.279 -><DIV
  17.280 -CLASS="EXAMPLE"
  17.281 -><A
  17.282 -NAME="AEN183"
  17.283 -></A
  17.284 -><P
  17.285 -><B
  17.286 ->Example 3-3. Opening a Joystick</B
  17.287 -></P
  17.288 -><PRE
  17.289 -CLASS="PROGRAMLISTING"
  17.290 ->    SDL_Joystick *joystick;
  17.291 -
  17.292 -    SDL_JoystickEventState(SDL_ENABLE);
  17.293 -    joystick = SDL_JoystickOpen(0);</PRE
  17.294 -></DIV
  17.295 -><P
  17.296 ->If we wanted to receive events for other joysticks we would open them with calls to <TT
  17.297 -CLASS="FUNCTION"
  17.298 ->SDL_JoystickOpen</TT
  17.299 -> just like we opened joystick 0, except we would store the <SPAN
  17.300 -CLASS="STRUCTNAME"
  17.301 ->SDL_Joystick</SPAN
  17.302 -> structure they return in a different pointer.  We only need the joystick pointer when we are querying the joysticks or when we are closing the joystick.</P
  17.303 -><P
  17.304 ->Up to this point all the code we have is used just to initialize the joysticks in order to read values at run time. All we need now is an event loop, which is something that all SDL programs should have anyway to receive the systems quit events. We must now add code to check the event loop for at least some of the above mentioned events. Let's assume our event loop looks like this:
  17.305 -<PRE
  17.306 -CLASS="PROGRAMLISTING"
  17.307 ->    SDL_Event event;
  17.308 -    /* Other initializtion code goes here */   
  17.309 -
  17.310 -    /* Start main game loop here */
  17.311 -
  17.312 -    while(SDL_PollEvent(&#38;event))
  17.313 -    {  
  17.314 -        switch(event.type)
  17.315 -        {  
  17.316 -            case SDL_KEYDOWN:
  17.317 -            /* handle keyboard stuff here */				
  17.318 -            break;
  17.319 -
  17.320 -            case SDL_QUIT:
  17.321 -            /* Set whatever flags are necessary to */
  17.322 -            /* end the main game loop here */
  17.323 -            break;
  17.324 -        }
  17.325 -    }
  17.326 -
  17.327 -    /* End loop here */</PRE
  17.328 ->
  17.329 -To handle Joystick events we merely add cases for them, first we'll add axis handling code. Axis checks can get kinda of tricky because alot of the joystick events received are junk. Joystick axis have a tendency to vary just a little between polling due to the way they are designed. To compensate for this you have to set a threshold for changes and ignore the events that have'nt exceeded the threshold. 10% is usually a good threshold value.  This sounds a lot more complicated than it is. Here is the Axis event handler:</P
  17.330 -><DIV
  17.331 -CLASS="EXAMPLE"
  17.332 -><A
  17.333 -NAME="AEN191"
  17.334 -></A
  17.335 -><P
  17.336 -><B
  17.337 ->Example 3-4. Joystick Axis Events</B
  17.338 -></P
  17.339 -><PRE
  17.340 -CLASS="PROGRAMLISTING"
  17.341 ->    case SDL_JOYAXISMOTION:  /* Handle Joystick Motion */
  17.342 -    if ( ( event.jaxis.value &#60; -3200 ) || (event.jaxis.value &#62; 3200 ) ) 
  17.343 -    {
  17.344 -      /* code goes here */
  17.345 -    }
  17.346 -    break;</PRE
  17.347 -></DIV
  17.348 -><P
  17.349 ->Another trick with axis events is that up-down and left-right movement are two different sets of axes. The most important axis is axis 0 (left-right) and axis 1 (up-down).  To handle them seperatly in the code we do the following:</P
  17.350 -><DIV
  17.351 -CLASS="EXAMPLE"
  17.352 -><A
  17.353 -NAME="AEN195"
  17.354 -></A
  17.355 -><P
  17.356 -><B
  17.357 ->Example 3-5. More Joystick Axis Events</B
  17.358 -></P
  17.359 -><PRE
  17.360 -CLASS="PROGRAMLISTING"
  17.361 ->    case SDL_JOYAXISMOTION:  /* Handle Joystick Motion */
  17.362 -    if ( ( event.jaxis.value &#60; -3200 ) || (event.jaxis.value &#62; 3200 ) ) 
  17.363 -    {
  17.364 -        if( event.jaxis.axis == 0) 
  17.365 -        {
  17.366 -            /* Left-right movement code goes here */
  17.367 -        }
  17.368 -
  17.369 -        if( event.jaxis.axis == 1) 
  17.370 -        {
  17.371 -            /* Up-Down movement code goes here */
  17.372 -        }
  17.373 -    }
  17.374 -    break;</PRE
  17.375 -></DIV
  17.376 -><P
  17.377 ->Ideally the code here should use <TT
  17.378 -CLASS="STRUCTFIELD"
  17.379 -><I
  17.380 ->event.jaxis.value</I
  17.381 -></TT
  17.382 -> to scale something. For example lets assume you are using the joystick to control the movement of a spaceship. If the user is using an analog joystick and they push the stick a little bit they expect to move less than if they pushed it a lot. Designing your code for this situation is preferred because it makes the experience for users of analog controls better and remains the same for users of digital controls.</P
  17.383 -><P
  17.384 ->If your joystick has any additional axis then they may be used for other sticks or throttle controls and those axis return values too just with different <TT
  17.385 -CLASS="STRUCTFIELD"
  17.386 -><I
  17.387 ->event.jaxis.axis</I
  17.388 -></TT
  17.389 -> values.</P
  17.390 -><P
  17.391 ->Button handling is simple compared to the axis checking.</P
  17.392 -><DIV
  17.393 -CLASS="EXAMPLE"
  17.394 -><A
  17.395 -NAME="AEN203"
  17.396 -></A
  17.397 -><P
  17.398 -><B
  17.399 ->Example 3-6. Joystick Button Events</B
  17.400 -></P
  17.401 -><PRE
  17.402 -CLASS="PROGRAMLISTING"
  17.403 ->    case SDL_JOYBUTTONDOWN:  /* Handle Joystick Button Presses */
  17.404 -    if ( event.jbutton.button == 0 ) 
  17.405 -    {
  17.406 -        /* code goes here */
  17.407 -    }
  17.408 -    break;</PRE
  17.409 -></DIV
  17.410 -><P
  17.411 ->Button checks are simpler than axis checks because a button can only be pressed or not pressed.  The <TT
  17.412 -CLASS="LITERAL"
  17.413 ->SDL_JOYBUTTONDOWN</TT
  17.414 -> event is triggered when a button is pressed and the <TT
  17.415 -CLASS="LITERAL"
  17.416 ->SDL_JOYBUTTONUP</TT
  17.417 -> event is fired when a button is released. We do have to know what button was pressed though, that is done by reading the <TT
  17.418 -CLASS="STRUCTFIELD"
  17.419 -><I
  17.420 ->event.jbutton.button</I
  17.421 -></TT
  17.422 -> field.</P
  17.423 -><P
  17.424 ->Lastly when we are through using our joysticks we should close them with a call to <A
  17.425 -HREF="sdljoystickclose.html"
  17.426 -><TT
  17.427 -CLASS="FUNCTION"
  17.428 ->SDL_JoystickClose</TT
  17.429 -></A
  17.430 ->. To close our opened joystick 0 we would do this at the end of our program:
  17.431 -<PRE
  17.432 -CLASS="PROGRAMLISTING"
  17.433 ->    SDL_JoystickClose(joystick);</PRE
  17.434 -></P
  17.435 -></DIV
  17.436 -><DIV
  17.437 -CLASS="SECT2"
  17.438 -><H2
  17.439 -CLASS="SECT2"
  17.440 -><A
  17.441 -NAME="AEN214"
  17.442 -></A
  17.443 ->Advanced Joystick Functions</H2
  17.444 -><P
  17.445 ->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
  17.446 -><DIV
  17.447 -CLASS="EXAMPLE"
  17.448 -><A
  17.449 -NAME="AEN217"
  17.450 -></A
  17.451 -><P
  17.452 -><B
  17.453 ->Example 3-7. Joystick Ball Events</B
  17.454 -></P
  17.455 -><PRE
  17.456 -CLASS="PROGRAMLISTING"
  17.457 ->    case SDL_JOYBALLMOTION:  /* Handle Joyball Motion */
  17.458 -    if( event.jball.ball == 0 )
  17.459 -    {
  17.460 -      /* ball handling */
  17.461 -    }
  17.462 -    break;</PRE
  17.463 -></DIV
  17.464 -><P
  17.465 ->The above checks the first joyball on the joystick. The change in position will be stored in <TT
  17.466 -CLASS="STRUCTFIELD"
  17.467 -><I
  17.468 ->event.jball.xrel</I
  17.469 -></TT
  17.470 -> and <TT
  17.471 -CLASS="STRUCTFIELD"
  17.472 -><I
  17.473 ->event.jball.yrel</I
  17.474 -></TT
  17.475 ->.</P
  17.476 -><P
  17.477 ->Finally we have the hat event. Hats report only the direction they are pushed in. We check hat's position with the bitmasks:
  17.478 -
  17.479 -<P
  17.480 -></P
  17.481 -><TABLE
  17.482 -BORDER="0"
  17.483 -><TBODY
  17.484 -><TR
  17.485 -><TD
  17.486 -><TT
  17.487 -CLASS="LITERAL"
  17.488 ->SDL_HAT_CENTERED</TT
  17.489 -></TD
  17.490 -></TR
  17.491 -><TR
  17.492 -><TD
  17.493 -><TT
  17.494 -CLASS="LITERAL"
  17.495 ->SDL_HAT_UP</TT
  17.496 -></TD
  17.497 -></TR
  17.498 -><TR
  17.499 -><TD
  17.500 -><TT
  17.501 -CLASS="LITERAL"
  17.502 ->SDL_HAT_RIGHT</TT
  17.503 -></TD
  17.504 -></TR
  17.505 -><TR
  17.506 -><TD
  17.507 -><TT
  17.508 -CLASS="LITERAL"
  17.509 ->SDL_HAT_DOWN</TT
  17.510 -></TD
  17.511 -></TR
  17.512 -><TR
  17.513 -><TD
  17.514 -><TT
  17.515 -CLASS="LITERAL"
  17.516 ->SDL_HAT_LEFT</TT
  17.517 -></TD
  17.518 -></TR
  17.519 -></TBODY
  17.520 -></TABLE
  17.521 -><P
  17.522 -></P
  17.523 ->
  17.524 -
  17.525 -Also there are some predefined combinations of the above:
  17.526 -<P
  17.527 -></P
  17.528 -><TABLE
  17.529 -BORDER="0"
  17.530 -><TBODY
  17.531 -><TR
  17.532 -><TD
  17.533 -><TT
  17.534 -CLASS="LITERAL"
  17.535 ->SDL_HAT_RIGHTUP</TT
  17.536 -></TD
  17.537 -></TR
  17.538 -><TR
  17.539 -><TD
  17.540 -><TT
  17.541 -CLASS="LITERAL"
  17.542 ->SDL_HAT_RIGHTDOWN</TT
  17.543 -></TD
  17.544 -></TR
  17.545 -><TR
  17.546 -><TD
  17.547 -><TT
  17.548 -CLASS="LITERAL"
  17.549 ->SDL_HAT_LEFTUP</TT
  17.550 -></TD
  17.551 -></TR
  17.552 -><TR
  17.553 -><TD
  17.554 -><TT
  17.555 -CLASS="LITERAL"
  17.556 ->SDL_HAT_LEFTDOWN</TT
  17.557 -></TD
  17.558 -></TR
  17.559 -></TBODY
  17.560 -></TABLE
  17.561 -><P
  17.562 -></P
  17.563 ->
  17.564 -
  17.565 -Our case for the hat may resemble the following:</P
  17.566 -><DIV
  17.567 -CLASS="EXAMPLE"
  17.568 -><A
  17.569 -NAME="AEN244"
  17.570 -></A
  17.571 -><P
  17.572 -><B
  17.573 ->Example 3-8. Joystick Hat Events</B
  17.574 -></P
  17.575 -><PRE
  17.576 -CLASS="PROGRAMLISTING"
  17.577 ->    case SDL_JOYHATMOTION:  /* Handle Hat Motion */
  17.578 -    if ( event.jhat.value &#38; SDL_HAT_UP )
  17.579 -    {
  17.580 -        /* Do up stuff here */
  17.581 -    }
  17.582 -
  17.583 -    if ( event.jhat.value &#38; SDL_HAT_LEFT )
  17.584 -    {
  17.585 -        /* Do left stuff here */
  17.586 -    }
  17.587 -
  17.588 -    if ( event.jhat.value &#38; SDL_HAT_RIGHTDOWN )
  17.589 -    {
  17.590 -        /* Do right and down together stuff here */
  17.591 -    }
  17.592 -    break;</PRE
  17.593 -></DIV
  17.594 -><P
  17.595 ->In addition to the queries for number of joysticks on the system and their names there are additional functions to query the capabilities of attached joysticks:
  17.596 -<P
  17.597 -></P
  17.598 -><TABLE
  17.599 -BORDER="0"
  17.600 -><TBODY
  17.601 -><TR
  17.602 -><TD
  17.603 -><A
  17.604 -HREF="sdljoysticknumaxes.html"
  17.605 -><TT
  17.606 -CLASS="FUNCTION"
  17.607 ->SDL_JoystickNumAxes</TT
  17.608 -></A
  17.609 -></TD
  17.610 -><TD
  17.611 ->Returns the number of joysitck axes</TD
  17.612 -></TR
  17.613 -><TR
  17.614 -><TD
  17.615 -><A
  17.616 -HREF="sdljoysticknumbuttons.html"
  17.617 -><TT
  17.618 -CLASS="FUNCTION"
  17.619 ->SDL_JoystickNumButtons</TT
  17.620 -></A
  17.621 -></TD
  17.622 -><TD
  17.623 ->Returns the number of joysitck buttons</TD
  17.624 -></TR
  17.625 -><TR
  17.626 -><TD
  17.627 -><A
  17.628 -HREF="sdljoysticknumballs.html"
  17.629 -><TT
  17.630 -CLASS="FUNCTION"
  17.631 ->SDL_JoystickNumBalls</TT
  17.632 -></A
  17.633 -></TD
  17.634 -><TD
  17.635 ->Returns the number of joysitck balls</TD
  17.636 -></TR
  17.637 -><TR
  17.638 -><TD
  17.639 -><A
  17.640 -HREF="sdljoysticknumhats.html"
  17.641 -><TT
  17.642 -CLASS="FUNCTION"
  17.643 ->SDL_JoystickNumHats</TT
  17.644 -></A
  17.645 -></TD
  17.646 -><TD
  17.647 ->Returns the number of joysitck hats</TD
  17.648 -></TR
  17.649 -></TBODY
  17.650 -></TABLE
  17.651 -><P
  17.652 -></P
  17.653 ->
  17.654 -
  17.655 -To use these functions we just have to pass in the joystick structure we got when we opened the joystick. For Example:</P
  17.656 -><DIV
  17.657 -CLASS="EXAMPLE"
  17.658 -><A
  17.659 -NAME="AEN265"
  17.660 -></A
  17.661 -><P
  17.662 -><B
  17.663 ->Example 3-9. Querying Joystick Characteristics</B
  17.664 -></P
  17.665 -><PRE
  17.666 -CLASS="PROGRAMLISTING"
  17.667 ->    int number_of_buttons;
  17.668 -    SDL_Joystick *joystick;
  17.669 -
  17.670 -    joystick = SDL_JoystickOpen(0);
  17.671 -    number_of_buttons = SDL_JoystickNumButtons(joystick);</PRE
  17.672 -></DIV
  17.673 -><P
  17.674 ->This block of code would get the number of buttons on the first joystick in the system.	</P
  17.675 -></DIV
  17.676 -></DIV
  17.677 -></DIV
  17.678 -><DIV
  17.679 -CLASS="NAVFOOTER"
  17.680 -><HR
  17.681 -ALIGN="LEFT"
  17.682 -WIDTH="100%"><TABLE
  17.683 -SUMMARY="Footer navigation table"
  17.684 -WIDTH="100%"
  17.685 -BORDER="0"
  17.686 -CELLPADDING="0"
  17.687 -CELLSPACING="0"
  17.688 -><TR
  17.689 -><TD
  17.690 -WIDTH="33%"
  17.691 -ALIGN="left"
  17.692 -VALIGN="top"
  17.693 -><A
  17.694 -HREF="guidevideoopengl.html"
  17.695 -ACCESSKEY="P"
  17.696 ->Prev</A
  17.697 -></TD
  17.698 -><TD
  17.699 -WIDTH="34%"
  17.700 -ALIGN="center"
  17.701 -VALIGN="top"
  17.702 -><A
  17.703 -HREF="index.html"
  17.704 -ACCESSKEY="H"
  17.705 ->Home</A
  17.706 -></TD
  17.707 -><TD
  17.708 -WIDTH="33%"
  17.709 -ALIGN="right"
  17.710 -VALIGN="top"
  17.711 -><A
  17.712 -HREF="guideinputkeyboard.html"
  17.713 -ACCESSKEY="N"
  17.714 ->Next</A
  17.715 -></TD
  17.716 -></TR
  17.717 -><TR
  17.718 -><TD
  17.719 -WIDTH="33%"
  17.720 -ALIGN="left"
  17.721 -VALIGN="top"
  17.722 ->Using OpenGL With SDL</TD
  17.723 -><TD
  17.724 -WIDTH="34%"
  17.725 -ALIGN="center"
  17.726 -VALIGN="top"
  17.727 -><A
  17.728 -HREF="guide.html"
  17.729 -ACCESSKEY="U"
  17.730 ->Up</A
  17.731 -></TD
  17.732 -><TD
  17.733 -WIDTH="33%"
  17.734 -ALIGN="right"
  17.735 -VALIGN="top"
  17.736 ->Handling the Keyboard</TD
  17.737 -></TR
  17.738 -></TABLE
  17.739 -></DIV
  17.740 -></BODY
  17.741 -></HTML
  17.742 ->
  17.743 \ No newline at end of file
    18.1 --- a/docs/html/guideinputkeyboard.html	Wed Oct 07 06:11:53 2009 +0000
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,746 +0,0 @@
    18.4 -<HTML
    18.5 -><HEAD
    18.6 -><TITLE
    18.7 ->Handling the Keyboard</TITLE
    18.8 -><META
    18.9 -NAME="GENERATOR"
   18.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   18.11 -"><LINK
   18.12 -REL="HOME"
   18.13 -TITLE="SDL Library Documentation"
   18.14 -HREF="index.html"><LINK
   18.15 -REL="UP"
   18.16 -TITLE="Input handling"
   18.17 -HREF="guideinput.html"><LINK
   18.18 -REL="PREVIOUS"
   18.19 -TITLE="Input handling"
   18.20 -HREF="guideinput.html"><LINK
   18.21 -REL="NEXT"
   18.22 -TITLE="Examples"
   18.23 -HREF="guideexamples.html"></HEAD
   18.24 -><BODY
   18.25 -CLASS="SECT1"
   18.26 -BGCOLOR="#FFF8DC"
   18.27 -TEXT="#000000"
   18.28 -LINK="#0000ee"
   18.29 -VLINK="#551a8b"
   18.30 -ALINK="#ff0000"
   18.31 -><DIV
   18.32 -CLASS="NAVHEADER"
   18.33 -><TABLE
   18.34 -SUMMARY="Header navigation table"
   18.35 -WIDTH="100%"
   18.36 -BORDER="0"
   18.37 -CELLPADDING="0"
   18.38 -CELLSPACING="0"
   18.39 -><TR
   18.40 -><TH
   18.41 -COLSPAN="3"
   18.42 -ALIGN="center"
   18.43 ->SDL Library Documentation</TH
   18.44 -></TR
   18.45 -><TR
   18.46 -><TD
   18.47 -WIDTH="10%"
   18.48 -ALIGN="left"
   18.49 -VALIGN="bottom"
   18.50 -><A
   18.51 -HREF="guideinput.html"
   18.52 -ACCESSKEY="P"
   18.53 ->Prev</A
   18.54 -></TD
   18.55 -><TD
   18.56 -WIDTH="80%"
   18.57 -ALIGN="center"
   18.58 -VALIGN="bottom"
   18.59 ->Chapter 3. Input handling</TD
   18.60 -><TD
   18.61 -WIDTH="10%"
   18.62 -ALIGN="right"
   18.63 -VALIGN="bottom"
   18.64 -><A
   18.65 -HREF="guideexamples.html"
   18.66 -ACCESSKEY="N"
   18.67 ->Next</A
   18.68 -></TD
   18.69 -></TR
   18.70 -></TABLE
   18.71 -><HR
   18.72 -ALIGN="LEFT"
   18.73 -WIDTH="100%"></DIV
   18.74 -><DIV
   18.75 -CLASS="SECT1"
   18.76 -><H1
   18.77 -CLASS="SECT1"
   18.78 -><A
   18.79 -NAME="GUIDEINPUTKEYBOARD"
   18.80 -></A
   18.81 ->Handling the Keyboard</H1
   18.82 -><DIV
   18.83 -CLASS="SECT2"
   18.84 -><H2
   18.85 -CLASS="SECT2"
   18.86 -><A
   18.87 -NAME="AEN271"
   18.88 -></A
   18.89 ->Keyboard Related Structures</H2
   18.90 -><P
   18.91 ->It should make it a lot easier to understand this tutorial is you are familiar with the data types involved in keyboard access, so I'll explain them first.</P
   18.92 -><DIV
   18.93 -CLASS="SECT3"
   18.94 -><H3
   18.95 -CLASS="SECT3"
   18.96 -><A
   18.97 -NAME="AEN274"
   18.98 -></A
   18.99 ->SDLKey</H3
  18.100 -><P
  18.101 -><SPAN
  18.102 -CLASS="STRUCTNAME"
  18.103 ->SDLKey</SPAN
  18.104 -> is an enumerated type defined in SDL/include/SDL_keysym.h and detailed <A
  18.105 -HREF="sdlkey.html"
  18.106 ->here</A
  18.107 ->. Each <SPAN
  18.108 -CLASS="STRUCTNAME"
  18.109 ->SDLKey</SPAN
  18.110 -> symbol represents a key, <TT
  18.111 -CLASS="LITERAL"
  18.112 ->SDLK_a</TT
  18.113 -> corresponds to the 'a' key on a keyboard, <TT
  18.114 -CLASS="LITERAL"
  18.115 ->SDLK_SPACE</TT
  18.116 -> corresponds to the space bar, and so on.</P
  18.117 -></DIV
  18.118 -><DIV
  18.119 -CLASS="SECT3"
  18.120 -><H3
  18.121 -CLASS="SECT3"
  18.122 -><A
  18.123 -NAME="AEN282"
  18.124 -></A
  18.125 ->SDLMod</H3
  18.126 -><P
  18.127 ->SDLMod is an enumerated type, similar to <SPAN
  18.128 -CLASS="STRUCTNAME"
  18.129 ->SDLKey</SPAN
  18.130 ->, however it enumerates keyboard modifiers (Control, Alt, Shift). The full list of modifier symbols is <A
  18.131 -HREF="sdlkey.html#SDLMOD"
  18.132 ->here</A
  18.133 ->. <SPAN
  18.134 -CLASS="STRUCTNAME"
  18.135 ->SDLMod</SPAN
  18.136 -> values can be AND'd together to represent several modifiers.</P
  18.137 -></DIV
  18.138 -><DIV
  18.139 -CLASS="SECT3"
  18.140 -><H3
  18.141 -CLASS="SECT3"
  18.142 -><A
  18.143 -NAME="AEN288"
  18.144 -></A
  18.145 ->SDL_keysym</H3
  18.146 -><PRE
  18.147 -CLASS="PROGRAMLISTING"
  18.148 ->typedef struct{
  18.149 -  Uint8 scancode;
  18.150 -  SDLKey sym;
  18.151 -  SDLMod mod;
  18.152 -  Uint16 unicode;
  18.153 -} SDL_keysym;</PRE
  18.154 -><P
  18.155 ->The <SPAN
  18.156 -CLASS="STRUCTNAME"
  18.157 ->SDL_keysym</SPAN
  18.158 -> structure describes a key press or a key release. The <TT
  18.159 -CLASS="STRUCTFIELD"
  18.160 -><I
  18.161 ->scancode</I
  18.162 -></TT
  18.163 -> field is hardware specific and should be ignored unless you know what your doing. The <TT
  18.164 -CLASS="STRUCTFIELD"
  18.165 -><I
  18.166 ->sym</I
  18.167 -></TT
  18.168 -> field is the <SPAN
  18.169 -CLASS="STRUCTNAME"
  18.170 ->SDLKey</SPAN
  18.171 -> value of the key being pressed or released. The <TT
  18.172 -CLASS="STRUCTFIELD"
  18.173 -><I
  18.174 ->mod</I
  18.175 -></TT
  18.176 -> field describes the state of the keyboard modifiers at the time the key press or release occurred. So a value of <TT
  18.177 -CLASS="LITERAL"
  18.178 ->KMOD_NUM | KMOD_CAPS | KMOD_LSHIFT</TT
  18.179 -> would mean that Numlock, Capslock and the left shift key were all press (or enabled in the case of the lock keys). Finally, the <TT
  18.180 -CLASS="STRUCTFIELD"
  18.181 -><I
  18.182 ->unicode</I
  18.183 -></TT
  18.184 -> field stores the 16-bit unicode value of the key.</P
  18.185 -><DIV
  18.186 -CLASS="NOTE"
  18.187 -><BLOCKQUOTE
  18.188 -CLASS="NOTE"
  18.189 -><P
  18.190 -><B
  18.191 ->Note: </B
  18.192 ->It should be noted and understood that this field is only valid when the <SPAN
  18.193 -CLASS="STRUCTNAME"
  18.194 ->SDL_keysym</SPAN
  18.195 -> is describing a key press, not a key release. Unicode values only make sense on a key press because the unicode value describes an international character and only key presses produce characters. More information on Unicode can be found at <A
  18.196 -HREF="http://www.unicode.org"
  18.197 -TARGET="_top"
  18.198 ->www.unicode.org</A
  18.199 -></P
  18.200 -></BLOCKQUOTE
  18.201 -></DIV
  18.202 -><DIV
  18.203 -CLASS="NOTE"
  18.204 -><BLOCKQUOTE
  18.205 -CLASS="NOTE"
  18.206 -><P
  18.207 -><B
  18.208 ->Note: </B
  18.209 ->Unicode translation must be enabled using the <A
  18.210 -HREF="sdlenableunicode.html"
  18.211 -><TT
  18.212 -CLASS="FUNCTION"
  18.213 ->SDL_EnableUNICODE</TT
  18.214 -></A
  18.215 -> function.</P
  18.216 -></BLOCKQUOTE
  18.217 -></DIV
  18.218 -></DIV
  18.219 -><DIV
  18.220 -CLASS="SECT3"
  18.221 -><H3
  18.222 -CLASS="SECT3"
  18.223 -><A
  18.224 -NAME="AEN307"
  18.225 -></A
  18.226 ->SDL_KeyboardEvent</H3
  18.227 -><PRE
  18.228 -CLASS="PROGRAMLISTING"
  18.229 ->typedef struct{
  18.230 -  Uint8 type;
  18.231 -  Uint8 state;
  18.232 -  SDL_keysym keysym;
  18.233 -} SDL_KeyboardEvent;</PRE
  18.234 -><P
  18.235 ->The <SPAN
  18.236 -CLASS="STRUCTNAME"
  18.237 ->SDL_KeyboardEvent</SPAN
  18.238 -> describes a keyboard event (obviously). The <TT
  18.239 -CLASS="STRUCTFIELD"
  18.240 -><I
  18.241 ->key</I
  18.242 -></TT
  18.243 -> member of the <A
  18.244 -HREF="sdlevent.html"
  18.245 -><SPAN
  18.246 -CLASS="STRUCTNAME"
  18.247 ->SDL_Event</SPAN
  18.248 -></A
  18.249 -> union is a <SPAN
  18.250 -CLASS="STRUCTNAME"
  18.251 ->SDL_KeyboardEvent</SPAN
  18.252 -> structure. The <TT
  18.253 -CLASS="STRUCTFIELD"
  18.254 -><I
  18.255 ->type</I
  18.256 -></TT
  18.257 -> field specifies whether the event is a key release (<TT
  18.258 -CLASS="LITERAL"
  18.259 ->SDL_KEYUP</TT
  18.260 ->) or a key press (<TT
  18.261 -CLASS="LITERAL"
  18.262 ->SDL_KEYDOWN</TT
  18.263 ->) event. The <TT
  18.264 -CLASS="STRUCTFIELD"
  18.265 -><I
  18.266 ->state</I
  18.267 -></TT
  18.268 -> is largely redundant, it reports the same information as the <TT
  18.269 -CLASS="STRUCTFIELD"
  18.270 -><I
  18.271 ->type</I
  18.272 -></TT
  18.273 -> field but uses different values (<TT
  18.274 -CLASS="LITERAL"
  18.275 ->SDL_RELEASED</TT
  18.276 -> and <TT
  18.277 -CLASS="LITERAL"
  18.278 ->SDL_PRESSED</TT
  18.279 ->). The <TT
  18.280 -CLASS="STRUCTFIELD"
  18.281 -><I
  18.282 ->keysym</I
  18.283 -></TT
  18.284 -> contains information of the key press or release that this event represents (see above).</P
  18.285 -></DIV
  18.286 -></DIV
  18.287 -><DIV
  18.288 -CLASS="SECT2"
  18.289 -><H2
  18.290 -CLASS="SECT2"
  18.291 -><A
  18.292 -NAME="AEN324"
  18.293 -></A
  18.294 ->Reading Keyboard Events</H2
  18.295 -><P
  18.296 ->Reading keybaord events from the event queue is quite simple (the event queue and using it is described <A
  18.297 -HREF="sdlevent.html"
  18.298 ->here</A
  18.299 ->). We read events using <A
  18.300 -HREF="sdlpollevent.html"
  18.301 -><TT
  18.302 -CLASS="FUNCTION"
  18.303 ->SDL_PollEvent</TT
  18.304 -></A
  18.305 -> in a <TT
  18.306 -CLASS="LITERAL"
  18.307 ->while()</TT
  18.308 -> loop and check for <TT
  18.309 -CLASS="LITERAL"
  18.310 ->SDL_KEYUP</TT
  18.311 -> and <TT
  18.312 -CLASS="LITERAL"
  18.313 ->SDL_KEYDOWN</TT
  18.314 -> events using a <TT
  18.315 -CLASS="LITERAL"
  18.316 ->switch</TT
  18.317 -> statement, like so:</P
  18.318 -><DIV
  18.319 -CLASS="EXAMPLE"
  18.320 -><A
  18.321 -NAME="AEN334"
  18.322 -></A
  18.323 -><P
  18.324 -><B
  18.325 ->Example 3-10. Reading Keyboard Events</B
  18.326 -></P
  18.327 -><PRE
  18.328 -CLASS="PROGRAMLISTING"
  18.329 ->  SDL_Event event;
  18.330 -  .
  18.331 -  .
  18.332 -  /* Poll for events. SDL_PollEvent() returns 0 when there are no  */
  18.333 -  /* more events on the event queue, our while loop will exit when */
  18.334 -  /* that occurs.                                                  */
  18.335 -  while( SDL_PollEvent( &#38;event ) ){
  18.336 -    /* We are only worried about SDL_KEYDOWN and SDL_KEYUP events */
  18.337 -    switch( event.type ){
  18.338 -      case SDL_KEYDOWN:
  18.339 -        printf( "Key press detected\n" );
  18.340 -        break;
  18.341 -
  18.342 -      case SDL_KEYUP:
  18.343 -        printf( "Key release detected\n" );
  18.344 -        break;
  18.345 -
  18.346 -      default:
  18.347 -        break;
  18.348 -    }
  18.349 -  }
  18.350 -  .
  18.351 -  .</PRE
  18.352 -></DIV
  18.353 -><P
  18.354 ->This is a very basic example. No information about the key press or release is interpreted. We will explore the other extreme out our first full example below - reporting all available information about a keyboard event.</P
  18.355 -></DIV
  18.356 -><DIV
  18.357 -CLASS="SECT2"
  18.358 -><H2
  18.359 -CLASS="SECT2"
  18.360 -><A
  18.361 -NAME="AEN338"
  18.362 -></A
  18.363 ->A More Detailed Look</H2
  18.364 -><P
  18.365 ->Before we can read events SDL must be initialised with <A
  18.366 -HREF="sdlinit.html"
  18.367 -><TT
  18.368 -CLASS="FUNCTION"
  18.369 ->SDL_Init</TT
  18.370 -></A
  18.371 -> and a video mode must be set using <A
  18.372 -HREF="sdlsetvideomode.html"
  18.373 -><TT
  18.374 -CLASS="FUNCTION"
  18.375 ->SDL_SetVideoMode</TT
  18.376 -></A
  18.377 ->. There are, however, two other functions we must use to obtain all the information required. We must enable unicode translation by calling <TT
  18.378 -CLASS="FUNCTION"
  18.379 ->SDL_EnableUNICODE(1)</TT
  18.380 -> and we must convert <SPAN
  18.381 -CLASS="STRUCTNAME"
  18.382 ->SDLKey</SPAN
  18.383 -> values into something printable, using <A
  18.384 -HREF="sdlgetkeyname.html"
  18.385 -><TT
  18.386 -CLASS="FUNCTION"
  18.387 ->SDL_GetKeyName</TT
  18.388 -></A
  18.389 -></P
  18.390 -><DIV
  18.391 -CLASS="NOTE"
  18.392 -><BLOCKQUOTE
  18.393 -CLASS="NOTE"
  18.394 -><P
  18.395 -><B
  18.396 ->Note: </B
  18.397 ->It is useful to note that unicode values &#60; 0x80 translate directly a characters ASCII value. THis is used in the example below</P
  18.398 -></BLOCKQUOTE
  18.399 -></DIV
  18.400 -><DIV
  18.401 -CLASS="EXAMPLE"
  18.402 -><A
  18.403 -NAME="AEN351"
  18.404 -></A
  18.405 -><P
  18.406 -><B
  18.407 ->Example 3-11. Interpreting Key Event Information</B
  18.408 -></P
  18.409 -><PRE
  18.410 -CLASS="PROGRAMLISTING"
  18.411 ->&#13;    #include "SDL.h"
  18.412 -
  18.413 -    /* Function Prototypes */
  18.414 -    void PrintKeyInfo( SDL_KeyboardEvent *key );
  18.415 -    void PrintModifiers( SDLMod mod );
  18.416 -
  18.417 -    /* main */
  18.418 -    int main( int argc, char *argv[] ){
  18.419 -        
  18.420 -        SDL_Event event;
  18.421 -        int quit = 0;
  18.422 -        
  18.423 -        /* Initialise SDL */
  18.424 -        if( SDL_Init( SDL_INIT_VIDEO ) &#60; 0){
  18.425 -            fprintf( stderr, "Could not initialise SDL: %s\n", SDL_GetError() );
  18.426 -            exit( -1 );
  18.427 -        }
  18.428 -
  18.429 -        /* Set a video mode */
  18.430 -        if( !SDL_SetVideoMode( 320, 200, 0, 0 ) ){
  18.431 -            fprintf( stderr, "Could not set video mode: %s\n", SDL_GetError() );
  18.432 -            SDL_Quit();
  18.433 -            exit( -1 );
  18.434 -        }
  18.435 -
  18.436 -        /* Enable Unicode translation */
  18.437 -        SDL_EnableUNICODE( 1 );
  18.438 -
  18.439 -        /* Loop until an SDL_QUIT event is found */
  18.440 -        while( !quit ){
  18.441 -
  18.442 -            /* Poll for events */
  18.443 -            while( SDL_PollEvent( &#38;event ) ){
  18.444 -                
  18.445 -                switch( event.type ){
  18.446 -                    /* Keyboard event */
  18.447 -                    /* Pass the event data onto PrintKeyInfo() */
  18.448 -                    case SDL_KEYDOWN:
  18.449 -                    case SDL_KEYUP:
  18.450 -                        PrintKeyInfo( &#38;event.key );
  18.451 -                        break;
  18.452 -
  18.453 -                    /* SDL_QUIT event (window close) */
  18.454 -                    case SDL_QUIT:
  18.455 -                        quit = 1;
  18.456 -                        break;
  18.457 -
  18.458 -                    default:
  18.459 -                        break;
  18.460 -                }
  18.461 -
  18.462 -            }
  18.463 -
  18.464 -        }
  18.465 -
  18.466 -        /* Clean up */
  18.467 -        SDL_Quit();
  18.468 -        exit( 0 );
  18.469 -    }
  18.470 -
  18.471 -    /* Print all information about a key event */
  18.472 -    void PrintKeyInfo( SDL_KeyboardEvent *key ){
  18.473 -        /* Is it a release or a press? */
  18.474 -        if( key-&#62;type == SDL_KEYUP )
  18.475 -            printf( "Release:- " );
  18.476 -        else
  18.477 -            printf( "Press:- " );
  18.478 -
  18.479 -        /* Print the hardware scancode first */
  18.480 -        printf( "Scancode: 0x%02X", key-&#62;keysym.scancode );
  18.481 -        /* Print the name of the key */
  18.482 -        printf( ", Name: %s", SDL_GetKeyName( key-&#62;keysym.sym ) );
  18.483 -        /* We want to print the unicode info, but we need to make */
  18.484 -        /* sure its a press event first (remember, release events */
  18.485 -        /* don't have unicode info                                */
  18.486 -        if( key-&#62;type == SDL_KEYDOWN ){
  18.487 -            /* If the Unicode value is less than 0x80 then the    */
  18.488 -            /* unicode value can be used to get a printable       */
  18.489 -            /* representation of the key, using (char)unicode.    */
  18.490 -            printf(", Unicode: " );
  18.491 -            if( key-&#62;keysym.unicode &#60; 0x80 &#38;&#38; key-&#62;keysym.unicode &#62; 0 ){
  18.492 -                printf( "%c (0x%04X)", (char)key-&#62;keysym.unicode,
  18.493 -                        key-&#62;keysym.unicode );
  18.494 -            }
  18.495 -            else{
  18.496 -                printf( "? (0x%04X)", key-&#62;keysym.unicode );
  18.497 -            }
  18.498 -        }
  18.499 -        printf( "\n" );
  18.500 -        /* Print modifier info */
  18.501 -        PrintModifiers( key-&#62;keysym.mod );
  18.502 -    }
  18.503 -
  18.504 -    /* Print modifier info */
  18.505 -    void PrintModifiers( SDLMod mod ){
  18.506 -        printf( "Modifers: " );
  18.507 -
  18.508 -        /* If there are none then say so and return */
  18.509 -        if( mod == KMOD_NONE ){
  18.510 -            printf( "None\n" );
  18.511 -            return;
  18.512 -        }
  18.513 -
  18.514 -        /* Check for the presence of each SDLMod value */
  18.515 -        /* This looks messy, but there really isn't    */
  18.516 -        /* a clearer way.                              */
  18.517 -        if( mod &#38; KMOD_NUM ) printf( "NUMLOCK " );
  18.518 -        if( mod &#38; KMOD_CAPS ) printf( "CAPSLOCK " );
  18.519 -        if( mod &#38; KMOD_LCTRL ) printf( "LCTRL " );
  18.520 -        if( mod &#38; KMOD_RCTRL ) printf( "RCTRL " );
  18.521 -        if( mod &#38; KMOD_RSHIFT ) printf( "RSHIFT " );
  18.522 -        if( mod &#38; KMOD_LSHIFT ) printf( "LSHIFT " );
  18.523 -        if( mod &#38; KMOD_RALT ) printf( "RALT " );
  18.524 -        if( mod &#38; KMOD_LALT ) printf( "LALT " );
  18.525 -        if( mod &#38; KMOD_CTRL ) printf( "CTRL " );
  18.526 -        if( mod &#38; KMOD_SHIFT ) printf( "SHIFT " );
  18.527 -        if( mod &#38; KMOD_ALT ) printf( "ALT " );
  18.528 -        printf( "\n" );
  18.529 -    }</PRE
  18.530 -></DIV
  18.531 -></DIV
  18.532 -><DIV
  18.533 -CLASS="SECT2"
  18.534 -><H2
  18.535 -CLASS="SECT2"
  18.536 -><A
  18.537 -NAME="AEN354"
  18.538 -></A
  18.539 ->Game-type Input</H2
  18.540 -><P
  18.541 ->I have found that people using keyboard events for games and other interactive applications don't always understand one fundemental point.</P
  18.542 -><A
  18.543 -NAME="AEN357"
  18.544 -></A
  18.545 -><BLOCKQUOTE
  18.546 -CLASS="BLOCKQUOTE"
  18.547 -><P
  18.548 ->Keyboard events <SPAN
  18.549 -CLASS="emphasis"
  18.550 -><I
  18.551 -CLASS="EMPHASIS"
  18.552 ->only</I
  18.553 -></SPAN
  18.554 -> take place when a keys state changes from being unpressed to pressed, and vice versa.</P
  18.555 -></BLOCKQUOTE
  18.556 -><P
  18.557 ->Imagine you have an image of an alien that you wish to move around using the cursor keys: when you pressed the left arrow key you want him to slide over to the left, and when you press the down key you want him to slide down the screen. Examine the following code; it highlights an error that many people have made.
  18.558 -<PRE
  18.559 -CLASS="PROGRAMLISTING"
  18.560 ->    /* Alien screen coordinates */
  18.561 -    int alien_x=0, alien_y=0;
  18.562 -    .
  18.563 -    .
  18.564 -    /* Initialise SDL and video modes and all that */
  18.565 -    .
  18.566 -    /* Main game loop */
  18.567 -    /* Check for events */
  18.568 -    while( SDL_PollEvent( &#38;event ) ){
  18.569 -        switch( event.type ){
  18.570 -            /* Look for a keypress */
  18.571 -            case SDL_KEYDOWN:
  18.572 -                /* Check the SDLKey values and move change the coords */
  18.573 -                switch( event.key.keysym.sym ){
  18.574 -                    case SDLK_LEFT:
  18.575 -                        alien_x -= 1;
  18.576 -                        break;
  18.577 -                    case SDLK_RIGHT:
  18.578 -                        alien_x += 1;
  18.579 -                        break;
  18.580 -                    case SDLK_UP:
  18.581 -                        alien_y -= 1;
  18.582 -                        break;
  18.583 -                    case SDLK_DOWN:
  18.584 -                        alien_y += 1;
  18.585 -                        break;
  18.586 -                    default:
  18.587 -                        break;
  18.588 -                }
  18.589 -            }
  18.590 -        }
  18.591 -    }
  18.592 -    .
  18.593 -    .</PRE
  18.594 ->
  18.595 -At first glance you may think this is a perfectly reasonable piece of code for the task, but it isn't. Like I said keyboard events only occur when a key changes state, so the user would have to press and release the left cursor key 100 times to move the alien 100 pixels to the left.</P
  18.596 -><P
  18.597 ->To get around this problem we must not use the events to change the position of the alien, we use the events to set flags which are then used in a seperate section of code to move the alien. Something like this:</P
  18.598 -><DIV
  18.599 -CLASS="EXAMPLE"
  18.600 -><A
  18.601 -NAME="AEN363"
  18.602 -></A
  18.603 -><P
  18.604 -><B
  18.605 ->Example 3-12. Proper Game Movement</B
  18.606 -></P
  18.607 -><PRE
  18.608 -CLASS="PROGRAMLISTING"
  18.609 ->    /* Alien screen coordinates */
  18.610 -    int alien_x=0, alien_y=0;
  18.611 -    int alien_xvel=0, alien_yvel=0;
  18.612 -    .
  18.613 -    .
  18.614 -    /* Initialise SDL and video modes and all that */
  18.615 -    .
  18.616 -    /* Main game loop */
  18.617 -    /* Check for events */
  18.618 -    while( SDL_PollEvent( &#38;event ) ){
  18.619 -        switch( event.type ){
  18.620 -            /* Look for a keypress */
  18.621 -            case SDL_KEYDOWN:
  18.622 -                /* Check the SDLKey values and move change the coords */
  18.623 -                switch( event.key.keysym.sym ){
  18.624 -                    case SDLK_LEFT:
  18.625 -                        alien_xvel = -1;
  18.626 -                        break;
  18.627 -                    case SDLK_RIGHT:
  18.628 -                        alien_xvel =  1;
  18.629 -                        break;
  18.630 -                    case SDLK_UP:
  18.631 -                        alien_yvel = -1;
  18.632 -                        break;
  18.633 -                    case SDLK_DOWN:
  18.634 -                        alien_yvel =  1;
  18.635 -                        break;
  18.636 -                    default:
  18.637 -                        break;
  18.638 -                }
  18.639 -                break;
  18.640 -            /* We must also use the SDL_KEYUP events to zero the x */
  18.641 -            /* and y velocity variables. But we must also be       */
  18.642 -            /* careful not to zero the velocities when we shouldn't*/
  18.643 -            case SDL_KEYUP:
  18.644 -                switch( event.key.keysym.sym ){
  18.645 -                    case SDLK_LEFT:
  18.646 -                        /* We check to make sure the alien is moving */
  18.647 -                        /* to the left. If it is then we zero the    */
  18.648 -                        /* velocity. If the alien is moving to the   */
  18.649 -                        /* right then the right key is still press   */
  18.650 -                        /* so we don't tocuh the velocity            */
  18.651 -                        if( alien_xvel &#60; 0 )
  18.652 -                            alien_xvel = 0;
  18.653 -                        break;
  18.654 -                    case SDLK_RIGHT:
  18.655 -                        if( alien_xvel &#62; 0 )
  18.656 -                            alien_xvel = 0;
  18.657 -                        break;
  18.658 -                    case SDLK_UP:
  18.659 -                        if( alien_yvel &#60; 0 )
  18.660 -                            alien_yvel = 0;
  18.661 -                        break;
  18.662 -                    case SDLK_DOWN:
  18.663 -                        if( alien_yvel &#62; 0 )
  18.664 -                            alien_yvel = 0;
  18.665 -                        break;
  18.666 -                    default:
  18.667 -                        break;
  18.668 -                }
  18.669 -                break;
  18.670 -            
  18.671 -            default:
  18.672 -                break;
  18.673 -        }
  18.674 -    }
  18.675 -    .
  18.676 -    .
  18.677 -    /* Update the alien position */
  18.678 -    alien_x += alien_xvel;
  18.679 -    alien_y += alien_yvel;</PRE
  18.680 -></DIV
  18.681 -><P
  18.682 ->As can be seen, we use two extra variables, alien_xvel and alien_yvel, which represent the motion of the ship, it is these variables that we update when we detect keypresses and releases.</P
  18.683 -></DIV
  18.684 -></DIV
  18.685 -><DIV
  18.686 -CLASS="NAVFOOTER"
  18.687 -><HR
  18.688 -ALIGN="LEFT"
  18.689 -WIDTH="100%"><TABLE
  18.690 -SUMMARY="Footer navigation table"
  18.691 -WIDTH="100%"
  18.692 -BORDER="0"
  18.693 -CELLPADDING="0"
  18.694 -CELLSPACING="0"
  18.695 -><TR
  18.696 -><TD
  18.697 -WIDTH="33%"
  18.698 -ALIGN="left"
  18.699 -VALIGN="top"
  18.700 -><A
  18.701 -HREF="guideinput.html"
  18.702 -ACCESSKEY="P"
  18.703 ->Prev</A
  18.704 -></TD
  18.705 -><TD
  18.706 -WIDTH="34%"
  18.707 -ALIGN="center"
  18.708 -VALIGN="top"
  18.709 -><A
  18.710 -HREF="index.html"
  18.711 -ACCESSKEY="H"
  18.712 ->Home</A
  18.713 -></TD
  18.714 -><TD
  18.715 -WIDTH="33%"
  18.716 -ALIGN="right"
  18.717 -VALIGN="top"
  18.718 -><A
  18.719 -HREF="guideexamples.html"
  18.720 -ACCESSKEY="N"
  18.721 ->Next</A
  18.722 -></TD
  18.723 -></TR
  18.724 -><TR
  18.725 -><TD
  18.726 -WIDTH="33%"
  18.727 -ALIGN="left"
  18.728 -VALIGN="top"
  18.729 ->Input handling</TD
  18.730 -><TD
  18.731 -WIDTH="34%"
  18.732 -ALIGN="center"
  18.733 -VALIGN="top"
  18.734 -><A
  18.735 -HREF="guideinput.html"
  18.736 -ACCESSKEY="U"
  18.737 ->Up</A
  18.738 -></TD
  18.739 -><TD
  18.740 -WIDTH="33%"
  18.741 -ALIGN="right"
  18.742 -VALIGN="top"
  18.743 ->Examples</TD
  18.744 -></TR
  18.745 -></TABLE
  18.746 -></DIV
  18.747 -></BODY
  18.748 -></HTML
  18.749 ->
  18.750 \ No newline at end of file
    19.1 --- a/docs/html/guidepreface.html	Wed Oct 07 06:11:53 2009 +0000
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,178 +0,0 @@
    19.4 -<HTML
    19.5 -><HEAD
    19.6 -><TITLE
    19.7 ->Preface</TITLE
    19.8 -><META
    19.9 -NAME="GENERATOR"
   19.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   19.11 -"><LINK
   19.12 -REL="HOME"
   19.13 -TITLE="SDL Library Documentation"
   19.14 -HREF="index.html"><LINK
   19.15 -REL="UP"
   19.16 -TITLE="SDL Guide"
   19.17 -HREF="guide.html"><LINK
   19.18 -REL="PREVIOUS"
   19.19 -TITLE="SDL Guide"
   19.20 -HREF="guide.html"><LINK
   19.21 -REL="NEXT"
   19.22 -TITLE="About SDLdoc"
   19.23 -HREF="guideaboutsdldoc.html"></HEAD
   19.24 -><BODY
   19.25 -CLASS="PREFACE"
   19.26 -BGCOLOR="#FFF8DC"
   19.27 -TEXT="#000000"
   19.28 -LINK="#0000ee"
   19.29 -VLINK="#551a8b"
   19.30 -ALINK="#ff0000"
   19.31 -><DIV
   19.32 -CLASS="NAVHEADER"
   19.33 -><TABLE
   19.34 -SUMMARY="Header navigation table"
   19.35 -WIDTH="100%"
   19.36 -BORDER="0"
   19.37 -CELLPADDING="0"
   19.38 -CELLSPACING="0"
   19.39 -><TR
   19.40 -><TH
   19.41 -COLSPAN="3"
   19.42 -ALIGN="center"
   19.43 ->SDL Library Documentation</TH
   19.44 -></TR
   19.45 -><TR
   19.46 -><TD
   19.47 -WIDTH="10%"
   19.48 -ALIGN="left"
   19.49 -VALIGN="bottom"
   19.50 -><A
   19.51 -HREF="guide.html"
   19.52 -ACCESSKEY="P"
   19.53 ->Prev</A
   19.54 -></TD
   19.55 -><TD
   19.56 -WIDTH="80%"
   19.57 -ALIGN="center"
   19.58 -VALIGN="bottom"
   19.59 -></TD
   19.60 -><TD
   19.61 -WIDTH="10%"
   19.62 -ALIGN="right"
   19.63 -VALIGN="bottom"
   19.64 -><A
   19.65 -HREF="guideaboutsdldoc.html"
   19.66 -ACCESSKEY="N"
   19.67 ->Next</A
   19.68 -></TD
   19.69 -></TR
   19.70 -></TABLE
   19.71 -><HR
   19.72 -ALIGN="LEFT"
   19.73 -WIDTH="100%"></DIV
   19.74 -><DIV
   19.75 -CLASS="PREFACE"
   19.76 -><H1
   19.77 -><A
   19.78 -NAME="GUIDEPREFACE"
   19.79 -></A
   19.80 ->Preface</H1
   19.81 -><DIV
   19.82 -CLASS="TOC"
   19.83 -><DL
   19.84 -><DT
   19.85 -><B
   19.86 ->Table of Contents</B
   19.87 -></DT
   19.88 -><DT
   19.89 -><A
   19.90 -HREF="guidepreface.html#GUIDEABOUTSDL"
   19.91 ->About SDL</A
   19.92 -></DT
   19.93 -><DT
   19.94 -><A
   19.95 -HREF="guideaboutsdldoc.html"
   19.96 ->About SDLdoc</A
   19.97 -></DT
   19.98 -><DT
   19.99 -><A
  19.100 -HREF="guidecredits.html"
  19.101 ->Credits</A
  19.102 -></DT
  19.103 -></DL
  19.104 -></DIV
  19.105 -><DIV
  19.106 -CLASS="SECT1"
  19.107 -><H1
  19.108 -CLASS="SECT1"
  19.109 -><A
  19.110 -NAME="GUIDEABOUTSDL"
  19.111 -></A
  19.112 ->About SDL</H1
  19.113 -><P
  19.114 ->The SDL library is designed to make it easy to write games that run on Linux, *BSD, MacOS, Win32 and BeOS using the various native high-performance media interfaces, (for video, audio, etc) and presenting a single source-code level API to your application. SDL is a fairly low level API, but using it, completely portable applications can be written with a great deal of flexibility.</P
  19.115 -></DIV
  19.116 -></DIV
  19.117 -><DIV
  19.118 -CLASS="NAVFOOTER"
  19.119 -><HR
  19.120 -ALIGN="LEFT"
  19.121 -WIDTH="100%"><TABLE
  19.122 -SUMMARY="Footer navigation table"
  19.123 -WIDTH="100%"
  19.124 -BORDER="0"
  19.125 -CELLPADDING="0"
  19.126 -CELLSPACING="0"
  19.127 -><TR
  19.128 -><TD
  19.129 -WIDTH="33%"
  19.130 -ALIGN="left"
  19.131 -VALIGN="top"
  19.132 -><A
  19.133 -HREF="guide.html"
  19.134 -ACCESSKEY="P"
  19.135 ->Prev</A
  19.136 -></TD
  19.137 -><TD
  19.138 -WIDTH="34%"
  19.139 -ALIGN="center"
  19.140 -VALIGN="top"
  19.141 -><A
  19.142 -HREF="index.html"
  19.143 -ACCESSKEY="H"
  19.144 ->Home</A
  19.145 -></TD
  19.146 -><TD
  19.147 -WIDTH="33%"
  19.148 -ALIGN="right"
  19.149 -VALIGN="top"
  19.150 -><A
  19.151 -HREF="guideaboutsdldoc.html"
  19.152 -ACCESSKEY="N"
  19.153 ->Next</A
  19.154 -></TD
  19.155 -></TR
  19.156 -><TR
  19.157 -><TD
  19.158 -WIDTH="33%"
  19.159 -ALIGN="left"
  19.160 -VALIGN="top"
  19.161 ->SDL Guide</TD
  19.162 -><TD
  19.163 -WIDTH="34%"
  19.164 -ALIGN="center"
  19.165 -VALIGN="top"
  19.166 -><A
  19.167 -HREF="guide.html"
  19.168 -ACCESSKEY="U"
  19.169 ->Up</A
  19.170 -></TD
  19.171 -><TD
  19.172 -WIDTH="33%"
  19.173 -ALIGN="right"
  19.174 -VALIGN="top"
  19.175 ->About SDLdoc</TD
  19.176 -></TR
  19.177 -></TABLE
  19.178 -></DIV
  19.179 -></BODY
  19.180 -></HTML
  19.181 ->
  19.182 \ No newline at end of file
    20.1 --- a/docs/html/guidethebasics.html	Wed Oct 07 06:11:53 2009 +0000
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,173 +0,0 @@
    20.4 -<HTML
    20.5 -><HEAD
    20.6 -><TITLE
    20.7 ->The Basics</TITLE
    20.8 -><META
    20.9 -NAME="GENERATOR"
   20.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   20.11 -"><LINK
   20.12 -REL="HOME"
   20.13 -TITLE="SDL Library Documentation"
   20.14 -HREF="index.html"><LINK
   20.15 -REL="UP"
   20.16 -TITLE="SDL Guide"
   20.17 -HREF="guide.html"><LINK
   20.18 -REL="PREVIOUS"
   20.19 -TITLE="Credits"
   20.20 -HREF="guidecredits.html"><LINK
   20.21 -REL="NEXT"
   20.22 -TITLE="Initializing SDL"
   20.23 -HREF="guidebasicsinit.html"></HEAD
   20.24 -><BODY
   20.25 -CLASS="CHAPTER"
   20.26 -BGCOLOR="#FFF8DC"
   20.27 -TEXT="#000000"
   20.28 -LINK="#0000ee"
   20.29 -VLINK="#551a8b"
   20.30 -ALINK="#ff0000"
   20.31 -><DIV
   20.32 -CLASS="NAVHEADER"
   20.33 -><TABLE
   20.34 -SUMMARY="Header navigation table"
   20.35 -WIDTH="100%"
   20.36 -BORDER="0"
   20.37 -CELLPADDING="0"
   20.38 -CELLSPACING="0"
   20.39 -><TR
   20.40 -><TH
   20.41 -COLSPAN="3"
   20.42 -ALIGN="center"
   20.43 ->SDL Library Documentation</TH
   20.44 -></TR
   20.45 -><TR
   20.46 -><TD
   20.47 -WIDTH="10%"
   20.48 -ALIGN="left"
   20.49 -VALIGN="bottom"
   20.50 -><A
   20.51 -HREF="guidecredits.html"
   20.52 -ACCESSKEY="P"
   20.53 ->Prev</A
   20.54 -></TD
   20.55 -><TD
   20.56 -WIDTH="80%"
   20.57 -ALIGN="center"
   20.58 -VALIGN="bottom"
   20.59 -></TD
   20.60 -><TD
   20.61 -WIDTH="10%"
   20.62 -ALIGN="right"
   20.63 -VALIGN="bottom"
   20.64 -><A
   20.65 -HREF="guidebasicsinit.html"
   20.66 -ACCESSKEY="N"
   20.67 ->Next</A
   20.68 -></TD
   20.69 -></TR
   20.70 -></TABLE
   20.71 -><HR
   20.72 -ALIGN="LEFT"
   20.73 -WIDTH="100%"></DIV
   20.74 -><DIV
   20.75 -CLASS="CHAPTER"
   20.76 -><H1
   20.77 -><A
   20.78 -NAME="GUIDETHEBASICS"
   20.79 -></A
   20.80 ->Chapter 1. The Basics</H1
   20.81 -><DIV
   20.82 -CLASS="TOC"
   20.83 -><DL
   20.84 -><DT
   20.85 -><B
   20.86 ->Table of Contents</B
   20.87 -></DT
   20.88 -><DT
   20.89 -><A
   20.90 -HREF="guidethebasics.html#GUIDEINTRODUCTION"
   20.91 ->Introduction</A
   20.92 -></DT
   20.93 -><DT
   20.94 -><A
   20.95 -HREF="guidebasicsinit.html"
   20.96 ->Initializing SDL</A
   20.97 -></DT
   20.98 -></DL
   20.99 -></DIV
  20.100 -><DIV
  20.101 -CLASS="SECT1"
  20.102 -><H1
  20.103 -CLASS="SECT1"
  20.104 -><A
  20.105 -NAME="GUIDEINTRODUCTION"
  20.106 -></A
  20.107 ->Introduction</H1
  20.108 -><P
  20.109 ->The SDL Guide section is pretty incomplete. If you feel you have anything to add mail akawaka@skynet.ie or visit http://akawaka.csn.ul.ie/tne/.</P
  20.110 -></DIV
  20.111 -></DIV
  20.112 -><DIV
  20.113 -CLASS="NAVFOOTER"
  20.114 -><HR
  20.115 -ALIGN="LEFT"
  20.116 -WIDTH="100%"><TABLE
  20.117 -SUMMARY="Footer navigation table"
  20.118 -WIDTH="100%"
  20.119 -BORDER="0"
  20.120 -CELLPADDING="0"
  20.121 -CELLSPACING="0"
  20.122 -><TR
  20.123 -><TD
  20.124 -WIDTH="33%"
  20.125 -ALIGN="left"
  20.126 -VALIGN="top"
  20.127 -><A
  20.128 -HREF="guidecredits.html"
  20.129 -ACCESSKEY="P"
  20.130 ->Prev</A
  20.131 -></TD
  20.132 -><TD
  20.133 -WIDTH="34%"
  20.134 -ALIGN="center"
  20.135 -VALIGN="top"
  20.136 -><A
  20.137 -HREF="index.html"
  20.138 -ACCESSKEY="H"
  20.139 ->Home</A
  20.140 -></TD
  20.141 -><TD
  20.142 -WIDTH="33%"
  20.143 -ALIGN="right"
  20.144 -VALIGN="top"
  20.145 -><A
  20.146 -HREF="guidebasicsinit.html"
  20.147 -ACCESSKEY="N"
  20.148 ->Next</A
  20.149 -></TD
  20.150 -></TR
  20.151 -><TR
  20.152 -><TD
  20.153 -WIDTH="33%"
  20.154 -ALIGN="left"
  20.155 -VALIGN="top"
  20.156 ->Credits</TD
  20.157 -><TD
  20.158 -WIDTH="34%"
  20.159 -ALIGN="center"
  20.160 -VALIGN="top"
  20.161 -><A
  20.162 -HREF="guide.html"
  20.163 -ACCESSKEY="U"
  20.164 ->Up</A
  20.165 -></TD
  20.166 -><TD
  20.167 -WIDTH="33%"
  20.168 -ALIGN="right"
  20.169 -VALIGN="top"
  20.170 ->Initializing SDL</TD
  20.171 -></TR
  20.172 -></TABLE
  20.173 -></DIV
  20.174 -></BODY
  20.175 -></HTML
  20.176 ->
  20.177 \ No newline at end of file
    21.1 --- a/docs/html/guidetimeexamples.html	Wed Oct 07 06:11:53 2009 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,183 +0,0 @@
    21.4 -<HTML
    21.5 -><HEAD
    21.6 -><TITLE
    21.7 ->Time Examples</TITLE
    21.8 -><META
    21.9 -NAME="GENERATOR"
   21.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   21.11 -"><LINK
   21.12 -REL="HOME"
   21.13 -TITLE="SDL Library Documentation"
   21.14 -HREF="index.html"><LINK
   21.15 -REL="UP"
   21.16 -TITLE="Examples"
   21.17 -HREF="guideexamples.html"><LINK
   21.18 -REL="PREVIOUS"
   21.19 -TITLE="CDROM Examples"
   21.20 -HREF="guidecdromexamples.html"><LINK
   21.21 -REL="NEXT"
   21.22 -TITLE="SDL Reference"
   21.23 -HREF="reference.html"></HEAD
   21.24 -><BODY
   21.25 -CLASS="SECT1"
   21.26 -BGCOLOR="#FFF8DC"
   21.27 -TEXT="#000000"
   21.28 -LINK="#0000ee"
   21.29 -VLINK="#551a8b"
   21.30 -ALINK="#ff0000"
   21.31 -><DIV
   21.32 -CLASS="NAVHEADER"
   21.33 -><TABLE
   21.34 -SUMMARY="Header navigation table"
   21.35 -WIDTH="100%"
   21.36 -BORDER="0"
   21.37 -CELLPADDING="0"
   21.38 -CELLSPACING="0"
   21.39 -><TR
   21.40 -><TH
   21.41 -COLSPAN="3"
   21.42 -ALIGN="center"
   21.43 ->SDL Library Documentation</TH
   21.44 -></TR
   21.45 -><TR
   21.46 -><TD
   21.47 -WIDTH="10%"
   21.48 -ALIGN="left"
   21.49 -VALIGN="bottom"
   21.50 -><A
   21.51 -HREF="guidecdromexamples.html"
   21.52 -ACCESSKEY="P"
   21.53 ->Prev</A
   21.54 -></TD
   21.55 -><TD
   21.56 -WIDTH="80%"
   21.57 -ALIGN="center"
   21.58 -VALIGN="bottom"
   21.59 ->Chapter 4. Examples</TD
   21.60 -><TD
   21.61 -WIDTH="10%"
   21.62 -ALIGN="right"
   21.63 -VALIGN="bottom"
   21.64 -><A
   21.65 -HREF="reference.html"
   21.66 -ACCESSKEY="N"
   21.67 ->Next</A
   21.68 -></TD
   21.69 -></TR
   21.70 -></TABLE
   21.71 -><HR
   21.72 -ALIGN="LEFT"
   21.73 -WIDTH="100%"></DIV
   21.74 -><DIV
   21.75 -CLASS="SECT1"
   21.76 -><H1
   21.77 -CLASS="SECT1"
   21.78 -><A
   21.79 -NAME="GUIDETIMEEXAMPLES"
   21.80 -></A
   21.81 ->Time Examples</H1
   21.82 -><P
   21.83 -></P
   21.84 -><DIV
   21.85 -CLASS="SECT2"
   21.86 -><H2
   21.87 -CLASS="SECT2"
   21.88 -><A
   21.89 -NAME="AEN412"
   21.90 -></A
   21.91 ->Time based game loop</H2
   21.92 -><P
   21.93 -><PRE
   21.94 -CLASS="PROGRAMLISTING"
   21.95 ->#define TICK_INTERVAL    30
   21.96 -
   21.97 -static Uint32 next_time;
   21.98 -
   21.99 -Uint32 time_left(void)
  21.100 -{
  21.101 -    Uint32 now;
  21.102 -
  21.103 -    now = SDL_GetTicks();
  21.104 -    if(next_time &#60;= now)
  21.105 -        return 0;
  21.106 -    else
  21.107 -        return next_time - now;
  21.108 -}
  21.109 -
  21.110 -
  21.111 -/* main game loop */
  21.112 -
  21.113 -    next_time = SDL_GetTicks() + TICK_INTERVAL;
  21.114 -    while ( game_running ) {
  21.115 -        update_game_state();
  21.116 -        SDL_Delay(time_left());
  21.117 -        next_time += TICK_INTERVAL;
  21.118 -    }&#13;</PRE
  21.119 -></P
  21.120 -></DIV
  21.121 -></DIV
  21.122 -><DIV
  21.123 -CLASS="NAVFOOTER"
  21.124 -><HR
  21.125 -ALIGN="LEFT"
  21.126 -WIDTH="100%"><TABLE
  21.127 -SUMMARY="Footer navigation table"
  21.128 -WIDTH="100%"
  21.129 -BORDER="0"
  21.130 -CELLPADDING="0"
  21.131 -CELLSPACING="0"
  21.132 -><TR
  21.133 -><TD
  21.134 -WIDTH="33%"
  21.135 -ALIGN="left"
  21.136 -VALIGN="top"
  21.137 -><A
  21.138 -HREF="guidecdromexamples.html"
  21.139 -ACCESSKEY="P"
  21.140 ->Prev</A
  21.141 -></TD
  21.142 -><TD
  21.143 -WIDTH="34%"
  21.144 -ALIGN="center"
  21.145 -VALIGN="top"
  21.146 -><A
  21.147 -HREF="index.html"
  21.148 -ACCESSKEY="H"
  21.149 ->Home</A
  21.150 -></TD
  21.151 -><TD
  21.152 -WIDTH="33%"
  21.153 -ALIGN="right"
  21.154 -VALIGN="top"
  21.155 -><A
  21.156 -HREF="reference.html"
  21.157 -ACCESSKEY="N"
  21.158 ->Next</A
  21.159 -></TD
  21.160 -></TR
  21.161 -><TR
  21.162 -><TD
  21.163 -WIDTH="33%"
  21.164 -ALIGN="left"
  21.165 -VALIGN="top"
  21.166 ->CDROM Examples</TD
  21.167 -><TD
  21.168 -WIDTH="34%"
  21.169 -ALIGN="center"
  21.170 -VALIGN="top"
  21.171 -><A
  21.172 -HREF="guideexamples.html"
  21.173 -ACCESSKEY="U"
  21.174 ->Up</A
  21.175 -></TD
  21.176 -><TD
  21.177 -WIDTH="33%"
  21.178 -ALIGN="right"
  21.179 -VALIGN="top"
  21.180 ->SDL Reference</TD
  21.181 -></TR
  21.182 -></TABLE
  21.183 -></DIV
  21.184 -></BODY
  21.185 -></HTML
  21.186 ->
  21.187 \ No newline at end of file
    22.1 --- a/docs/html/guidevideo.html	Wed Oct 07 06:11:53 2009 +0000
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,463 +0,0 @@
    22.4 -<HTML
    22.5 -><HEAD
    22.6 -><TITLE
    22.7 ->Graphics and Video</TITLE
    22.8 -><META
    22.9 -NAME="GENERATOR"
   22.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   22.11 -"><LINK
   22.12 -REL="HOME"
   22.13 -TITLE="SDL Library Documentation"
   22.14 -HREF="index.html"><LINK
   22.15 -REL="UP"
   22.16 -TITLE="SDL Guide"
   22.17 -HREF="guide.html"><LINK
   22.18 -REL="PREVIOUS"
   22.19 -TITLE="Initializing SDL"
   22.20 -HREF="guidebasicsinit.html"><LINK
   22.21 -REL="NEXT"
   22.22 -TITLE="Using OpenGL With SDL"
   22.23 -HREF="guidevideoopengl.html"></HEAD
   22.24 -><BODY
   22.25 -CLASS="CHAPTER"
   22.26 -BGCOLOR="#FFF8DC"
   22.27 -TEXT="#000000"
   22.28 -LINK="#0000ee"
   22.29 -VLINK="#551a8b"
   22.30 -ALINK="#ff0000"
   22.31 -><DIV
   22.32 -CLASS="NAVHEADER"
   22.33 -><TABLE
   22.34 -SUMMARY="Header navigation table"
   22.35 -WIDTH="100%"
   22.36 -BORDER="0"
   22.37 -CELLPADDING="0"
   22.38 -CELLSPACING="0"
   22.39 -><TR
   22.40 -><TH
   22.41 -COLSPAN="3"
   22.42 -ALIGN="center"
   22.43 ->SDL Library Documentation</TH
   22.44 -></TR
   22.45 -><TR
   22.46 -><TD
   22.47 -WIDTH="10%"
   22.48 -ALIGN="left"
   22.49 -VALIGN="bottom"
   22.50 -><A
   22.51 -HREF="guidebasicsinit.html"
   22.52 -ACCESSKEY="P"
   22.53 ->Prev</A
   22.54 -></TD
   22.55 -><TD
   22.56 -WIDTH="80%"
   22.57 -ALIGN="center"
   22.58 -VALIGN="bottom"
   22.59 -></TD
   22.60 -><TD
   22.61 -WIDTH="10%"
   22.62 -ALIGN="right"
   22.63 -VALIGN="bottom"
   22.64 -><A
   22.65 -HREF="guidevideoopengl.html"
   22.66 -ACCESSKEY="N"
   22.67 ->Next</A
   22.68 -></TD
   22.69 -></TR
   22.70 -></TABLE
   22.71 -><HR
   22.72 -ALIGN="LEFT"
   22.73 -WIDTH="100%"></DIV
   22.74 -><DIV
   22.75 -CLASS="CHAPTER"
   22.76 -><H1
   22.77 -><A
   22.78 -NAME="GUIDEVIDEO"
   22.79 -></A
   22.80 ->Chapter 2. Graphics and Video</H1
   22.81 -><DIV
   22.82 -CLASS="TOC"
   22.83 -><DL
   22.84 -><DT
   22.85 -><B
   22.86 ->Table of Contents</B
   22.87 -></DT
   22.88 -><DT
   22.89 -><A
   22.90 -HREF="guidevideo.html#GUIDEVIDEOINTRO"
   22.91 ->Introduction to SDL Video</A
   22.92 -></DT
   22.93 -><DT
   22.94 -><A
   22.95 -HREF="guidevideoopengl.html"
   22.96 ->Using OpenGL With SDL</A
   22.97 -></DT
   22.98 -></DL
   22.99 -></DIV
  22.100 -><DIV
  22.101 -CLASS="SECT1"
  22.102 -><H1
  22.103 -CLASS="SECT1"
  22.104 -><A
  22.105 -NAME="GUIDEVIDEOINTRO"
  22.106 -></A
  22.107 ->Introduction to SDL Video</H1
  22.108 -><P
  22.109 ->Video is probably the most common thing that SDL is used for, and
  22.110 -so it has the most complete subsystem. Here are a few
  22.111 -examples to demonstrate the basics.</P
  22.112 -><DIV
  22.113 -CLASS="SECT2"
  22.114 -><H2
  22.115 -CLASS="SECT2"
  22.116 -><A
  22.117 -NAME="AEN68"
  22.118 -></A
  22.119 ->Initializing the Video Display</H2
  22.120 -><P
  22.121 ->This is what almost all SDL programs have to do in one way or
  22.122 -another.</P
  22.123 -><DIV
  22.124 -CLASS="EXAMPLE"
  22.125 -><A
  22.126 -NAME="AEN71"
  22.127 -></A
  22.128 -><P
  22.129 -><B
  22.130 ->Example 2-1. Initializing the Video Display</B
  22.131 -></P
  22.132 -><PRE
  22.133 -CLASS="PROGRAMLISTING"
  22.134 ->    SDL_Surface *screen;
  22.135 -
  22.136 -    /* Initialize the SDL library */
  22.137 -    if( SDL_Init(SDL_INIT_VIDEO) &#60; 0 ) {
  22.138 -        fprintf(stderr,
  22.139 -                "Couldn't initialize SDL: %s\n", SDL_GetError());
  22.140 -        exit(1);
  22.141 -    }
  22.142 -
  22.143 -    /* Clean up on exit */
  22.144 -    atexit(SDL_Quit);
  22.145 -    
  22.146 -    /*
  22.147 -     * Initialize the display in a 640x480 8-bit palettized mode,
  22.148 -     * requesting a software surface
  22.149 -     */
  22.150 -    screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE);
  22.151 -    if ( screen == NULL ) {
  22.152 -        fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
  22.153 -                        SDL_GetError());
  22.154 -        exit(1);
  22.155 -    }</PRE
  22.156 -></DIV
  22.157 -></DIV
  22.158 -><DIV
  22.159 -CLASS="SECT2"
  22.160 -><H2
  22.161 -CLASS="SECT2"
  22.162 -><A
  22.163 -NAME="AEN74"
  22.164 -></A
  22.165 ->Initializing the Best Video Mode</H2
  22.166 -><P
  22.167 ->If you have a preference for a certain pixel depth but will accept any
  22.168 -other, use SDL_SetVideoMode with SDL_ANYFORMAT as below. You can also
  22.169 -use SDL_VideoModeOK() to find the native video mode that is closest to
  22.170 -the mode you request.</P
  22.171 -><DIV
  22.172 -CLASS="EXAMPLE"
  22.173 -><A
  22.174 -NAME="AEN77"
  22.175 -></A
  22.176 -><P
  22.177 -><B
  22.178 ->Example 2-2. Initializing the Best Video Mode</B
  22.179 -></P
  22.180 -><PRE
  22.181 -CLASS="PROGRAMLISTING"
  22.182 ->    /* Have a preference for 8-bit, but accept any depth */
  22.183 -    screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE|SDL_ANYFORMAT);
  22.184 -    if ( screen == NULL ) {
  22.185 -        fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
  22.186 -                        SDL_GetError());
  22.187 -        exit(1);
  22.188 -    }
  22.189 -    printf("Set 640x480 at %d bits-per-pixel mode\n",
  22.190 -           screen-&#62;format-&#62;BitsPerPixel);</PRE
  22.191 -></DIV
  22.192 -></DIV
  22.193 -><DIV
  22.194 -CLASS="SECT2"
  22.195 -><H2
  22.196 -CLASS="SECT2"
  22.197 -><A
  22.198 -NAME="AEN80"
  22.199 -></A
  22.200 ->Loading and Displaying a BMP File</H2
  22.201 -><P
  22.202 ->The following function loads and displays a BMP file given as
  22.203 -argument, once SDL is initialised and a video mode has been set.</P
  22.204 -><DIV
  22.205 -CLASS="EXAMPLE"
  22.206 -><A
  22.207 -NAME="AEN83"
  22.208 -></A
  22.209 -><P
  22.210 -><B
  22.211 ->Example 2-3. Loading and Displaying a BMP File</B
  22.212 -></P
  22.213 -><PRE
  22.214 -CLASS="PROGRAMLISTING"
  22.215 ->void display_bmp(char *file_name)
  22.216 -{
  22.217 -    SDL_Surface *image;
  22.218 -
  22.219 -    /* Load the BMP file into a surface */
  22.220 -    image = SDL_LoadBMP(file_name);
  22.221 -    if (image == NULL) {
  22.222 -        fprintf(stderr, "Couldn't load %s: %s\n", file_name, SDL_GetError());
  22.223 -        return;
  22.224 -    }
  22.225 -
  22.226 -    /*
  22.227 -     * Palettized screen modes will have a default palette (a standard
  22.228 -     * 8*8*4 colour cube), but if the image is palettized as well we can
  22.229 -     * use that palette for a nicer colour matching
  22.230 -     */
  22.231 -    if (image-&#62;format-&#62;palette &#38;&#38; screen-&#62;format-&#62;palette) {
  22.232 -    SDL_SetColors(screen, image-&#62;format-&#62;palette-&#62;colors, 0,
  22.233 -                  image-&#62;format-&#62;palette-&#62;ncolors);
  22.234 -    }
  22.235 -
  22.236 -    /* Blit onto the screen surface */
  22.237 -    if(SDL_BlitSurface(image, NULL, screen, NULL) &#60; 0)
  22.238 -        fprintf(stderr, "BlitSurface error: %s\n", SDL_GetError());
  22.239 -
  22.240 -    SDL_UpdateRect(screen, 0, 0, image-&#62;w, image-&#62;h);
  22.241 -
  22.242 -    /* Free the allocated BMP surface */
  22.243 -    SDL_FreeSurface(image);
  22.244 -}</PRE
  22.245 -></DIV
  22.246 -></DIV
  22.247 -><DIV
  22.248 -CLASS="SECT2"
  22.249 -><H2
  22.250 -CLASS="SECT2"
  22.251 -><A
  22.252 -NAME="AEN86"
  22.253 -></A
  22.254 ->Drawing Directly to the Display</H2
  22.255 -><P
  22.256 ->The following two functions can be used to get and set single
  22.257 -pixels of a surface. They are carefully written to work with any depth
  22.258 -currently supported by SDL. Remember to lock the surface before
  22.259 -calling them, and to unlock it before calling any other SDL
  22.260 -functions.</P
  22.261 -><P
  22.262 ->To convert between pixel values and their red, green, blue
  22.263 -components, use SDL_GetRGB() and SDL_MapRGB().</P
  22.264 -><DIV
  22.265 -CLASS="EXAMPLE"
  22.266 -><A
  22.267 -NAME="AEN90"
  22.268 -></A
  22.269 -><P
  22.270 -><B
  22.271 ->Example 2-4. getpixel()</B
  22.272 -></P
  22.273 -><PRE
  22.274 -CLASS="PROGRAMLISTING"
  22.275 ->/*
  22.276 - * Return the pixel value at (x, y)
  22.277 - * NOTE: The surface must be locked before calling this!
  22.278 - */
  22.279 -Uint32 getpixel(SDL_Surface *surface, int x, int y)
  22.280 -{
  22.281 -    int bpp = surface-&#62;format-&#62;BytesPerPixel;
  22.282 -    /* Here p is the address to the pixel we want to retrieve */
  22.283 -    Uint8 *p = (Uint8 *)surface-&#62;pixels + y * surface-&#62;pitch + x * bpp;
  22.284 -
  22.285 -    switch(bpp) {
  22.286 -    case 1:
  22.287 -        return *p;
  22.288 -
  22.289 -    case 2:
  22.290 -        return *(Uint16 *)p;
  22.291 -
  22.292 -    case 3:
  22.293 -        if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
  22.294 -            return p[0] &#60;&#60; 16 | p[1] &#60;&#60; 8 | p[2];
  22.295 -        else
  22.296 -            return p[0] | p[1] &#60;&#60; 8 | p[2] &#60;&#60; 16;
  22.297 -
  22.298 -    case 4:
  22.299 -        return *(Uint32 *)p;
  22.300 -
  22.301 -    default:
  22.302 -        return 0;       /* shouldn't happen, but avoids warnings */
  22.303 -    }
  22.304 -}</PRE
  22.305 -></DIV
  22.306 -><DIV
  22.307 -CLASS="EXAMPLE"
  22.308 -><A
  22.309 -NAME="AEN93"
  22.310 -></A
  22.311 -><P
  22.312 -><B
  22.313 ->Example 2-5. putpixel()</B
  22.314 -></P
  22.315 -><PRE
  22.316 -CLASS="PROGRAMLISTING"
  22.317 ->/*
  22.318 - * Set the pixel at (x, y) to the given value
  22.319 - * NOTE: The surface must be locked before calling this!
  22.320 - */
  22.321 -void putpixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
  22.322 -{
  22.323 -    int bpp = surface-&#62;format-&#62;BytesPerPixel;
  22.324 -    /* Here p is the address to the pixel we want to set */
  22.325 -    Uint8 *p = (Uint8 *)surface-&#62;pixels + y * surface-&#62;pitch + x * bpp;
  22.326 -
  22.327 -    switch(bpp) {
  22.328 -    case 1:
  22.329 -        *p = pixel;
  22.330 -        break;
  22.331 -
  22.332 -    case 2:
  22.333 -        *(Uint16 *)p = pixel;
  22.334 -        break;
  22.335 -
  22.336 -    case 3:
  22.337 -        if(SDL_BYTEORDER == SDL_BIG_ENDIAN) {
  22.338 -            p[0] = (pixel &#62;&#62; 16) &#38; 0xff;
  22.339 -            p[1] = (pixel &#62;&#62; 8) &#38; 0xff;
  22.340 -            p[2] = pixel &#38; 0xff;
  22.341 -        } else {
  22.342 -            p[0] = pixel &#38; 0xff;
  22.343 -            p[1] = (pixel &#62;&#62; 8) &#38; 0xff;
  22.344 -            p[2] = (pixel &#62;&#62; 16) &#38; 0xff;
  22.345 -        }
  22.346 -        break;
  22.347 -
  22.348 -    case 4:
  22.349 -        *(Uint32 *)p = pixel;
  22.350 -        break;
  22.351 -    }
  22.352 -}</PRE
  22.353 -></DIV
  22.354 -><P
  22.355 ->The following code uses the putpixel() function above to set a
  22.356 -yellow pixel in the middle of the screen.</P
  22.357 -><DIV
  22.358 -CLASS="EXAMPLE"
  22.359 -><A
  22.360 -NAME="AEN97"
  22.361 -></A
  22.362 -><P
  22.363 -><B
  22.364 ->Example 2-6. Using putpixel()</B
  22.365 -></P
  22.366 -><PRE
  22.367 -CLASS="PROGRAMLISTING"
  22.368 ->&#13;    /* Code to set a yellow pixel at the center of the screen */
  22.369 -
  22.370 -    int x, y;
  22.371 -    Uint32 yellow;
  22.372 -
  22.373 -    /* Map the color yellow to this display (R=0xff, G=0xFF, B=0x00)
  22.374 -       Note:  If the display is palettized, you must set the palette first.
  22.375 -    */
  22.376 -    yellow = SDL_MapRGB(screen-&#62;format, 0xff, 0xff, 0x00);
  22.377 -
  22.378 -    x = screen-&#62;w / 2;
  22.379 -    y = screen-&#62;h / 2;
  22.380 -
  22.381 -    /* Lock the screen for direct access to the pixels */
  22.382 -    if ( SDL_MUSTLOCK(screen) ) {
  22.383 -        if ( SDL_LockSurface(screen) &#60; 0 ) {
  22.384 -            fprintf(stderr, "Can't lock screen: %s\n", SDL_GetError());
  22.385 -            return;
  22.386 -        }
  22.387 -    }
  22.388 -
  22.389 -    putpixel(screen, x, y, yellow);
  22.390 -
  22.391 -    if ( SDL_MUSTLOCK(screen) ) {
  22.392 -        SDL_UnlockSurface(screen);
  22.393 -    }
  22.394 -    /* Update just the part of the display that we've changed */
  22.395 -    SDL_UpdateRect(screen, x, y, 1, 1);
  22.396 -
  22.397 -    return;&#13;</PRE
  22.398 -></DIV
  22.399 -></DIV
  22.400 -></DIV
  22.401 -></DIV
  22.402 -><DIV
  22.403 -CLASS="NAVFOOTER"
  22.404 -><HR
  22.405 -ALIGN="LEFT"
  22.406 -WIDTH="100%"><TABLE
  22.407 -SUMMARY="Footer navigation table"
  22.408 -WIDTH="100%"
  22.409 -BORDER="0"
  22.410 -CELLPADDING="0"
  22.411 -CELLSPACING="0"
  22.412 -><TR
  22.413 -><TD
  22.414 -WIDTH="33%"
  22.415 -ALIGN="left"
  22.416 -VALIGN="top"
  22.417 -><A
  22.418 -HREF="guidebasicsinit.html"
  22.419 -ACCESSKEY="P"
  22.420 ->Prev</A
  22.421 -></TD
  22.422 -><TD
  22.423 -WIDTH="34%"
  22.424 -ALIGN="center"
  22.425 -VALIGN="top"
  22.426 -><A
  22.427 -HREF="index.html"
  22.428 -ACCESSKEY="H"
  22.429 ->Home</A
  22.430 -></TD
  22.431 -><TD
  22.432 -WIDTH="33%"
  22.433 -ALIGN="right"
  22.434 -VALIGN="top"
  22.435 -><A
  22.436 -HREF="guidevideoopengl.html"
  22.437 -ACCESSKEY="N"
  22.438 ->Next</A
  22.439 -></TD
  22.440 -></TR
  22.441 -><TR
  22.442 -><TD
  22.443 -WIDTH="33%"
  22.444 -ALIGN="left"
  22.445 -VALIGN="top"
  22.446 ->Initializing SDL</TD
  22.447 -><TD
  22.448 -WIDTH="34%"
  22.449 -ALIGN="center"
  22.450 -VALIGN="top"
  22.451 -><A
  22.452 -HREF="guide.html"
  22.453 -ACCESSKEY="U"
  22.454 ->Up</A
  22.455 -></TD
  22.456 -><TD
  22.457 -WIDTH="33%"
  22.458 -ALIGN="right"
  22.459 -VALIGN="top"
  22.460 ->Using OpenGL With SDL</TD
  22.461 -></TR
  22.462 -></TABLE
  22.463 -></DIV
  22.464 -></BODY
  22.465 -></HTML
  22.466 ->
  22.467 \ No newline at end of file
    23.1 --- a/docs/html/guidevideoopengl.html	Wed Oct 07 06:11:53 2009 +0000
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,730 +0,0 @@
    23.4 -<HTML
    23.5 -><HEAD
    23.6 -><TITLE
    23.7 ->Using OpenGL With SDL</TITLE
    23.8 -><META
    23.9 -NAME="GENERATOR"
   23.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   23.11 -"><LINK
   23.12 -REL="HOME"
   23.13 -TITLE="SDL Library Documentation"
   23.14 -HREF="index.html"><LINK
   23.15 -REL="UP"
   23.16 -TITLE="Graphics and Video"
   23.17 -HREF="guidevideo.html"><LINK
   23.18 -REL="PREVIOUS"
   23.19 -TITLE="Graphics and Video"
   23.20 -HREF="guidevideo.html"><LINK
   23.21 -REL="NEXT"
   23.22 -TITLE="Input handling"
   23.23 -HREF="guideinput.html"></HEAD
   23.24 -><BODY
   23.25 -CLASS="SECT1"
   23.26 -BGCOLOR="#FFF8DC"
   23.27 -TEXT="#000000"
   23.28 -LINK="#0000ee"
   23.29 -VLINK="#551a8b"
   23.30 -ALINK="#ff0000"
   23.31 -><DIV
   23.32 -CLASS="NAVHEADER"
   23.33 -><TABLE
   23.34 -SUMMARY="Header navigation table"
   23.35 -WIDTH="100%"
   23.36 -BORDER="0"
   23.37 -CELLPADDING="0"
   23.38 -CELLSPACING="0"
   23.39 -><TR
   23.40 -><TH
   23.41 -COLSPAN="3"
   23.42 -ALIGN="center"
   23.43 ->SDL Library Documentation</TH
   23.44 -></TR
   23.45 -><TR
   23.46 -><TD
   23.47 -WIDTH="10%"
   23.48 -ALIGN="left"
   23.49 -VALIGN="bottom"
   23.50 -><A
   23.51 -HREF="guidevideo.html"
   23.52 -ACCESSKEY="P"
   23.53 ->Prev</A
   23.54 -></TD
   23.55 -><TD
   23.56 -WIDTH="80%"
   23.57 -ALIGN="center"
   23.58 -VALIGN="bottom"
   23.59 ->Chapter 2. Graphics and Video</TD
   23.60 -><TD
   23.61 -WIDTH="10%"
   23.62 -ALIGN="right"
   23.63 -VALIGN="bottom"
   23.64 -><A
   23.65 -HREF="guideinput.html"
   23.66 -ACCESSKEY="N"
   23.67 ->Next</A
   23.68 -></TD
   23.69 -></TR
   23.70 -></TABLE
   23.71 -><HR
   23.72 -ALIGN="LEFT"
   23.73 -WIDTH="100%"></DIV
   23.74 -><DIV
   23.75 -CLASS="SECT1"
   23.76 -><H1
   23.77 -CLASS="SECT1"
   23.78 -><A
   23.79 -NAME="GUIDEVIDEOOPENGL"
   23.80 -></A
   23.81 ->Using OpenGL With SDL</H1
   23.82 -><P
   23.83 ->SDL has the ability to create and use OpenGL contexts on several platforms(Linux/X11, Win32, BeOS, MacOS Classic/Toolbox, Mac OS X, FreeBSD/X11 and Solaris/X11). This allows you to use SDL's audio, event handling, threads and times in your OpenGL applications (a function often performed by GLUT).</P
   23.84 -><DIV
   23.85 -CLASS="SECT2"
   23.86 -><H2
   23.87 -CLASS="SECT2"
   23.88 -><A
   23.89 -NAME="AEN103"
   23.90 -></A
   23.91 ->Initialisation</H2
   23.92 -><P
   23.93 ->Initialising SDL to use OpenGL is not very different to initialising SDL normally. There are three differences; you must pass <TT
   23.94 -CLASS="LITERAL"
   23.95 ->SDL_OPENGL</TT
   23.96 -> to <A
   23.97 -HREF="sdlsetvideomode.html"
   23.98 -><TT
   23.99 -CLASS="FUNCTION"
  23.100 ->SDL_SetVideoMode</TT
  23.101 -></A
  23.102 ->, you must specify several GL attributes (depth buffer size, framebuffer sizes) using <A
  23.103 -HREF="sdlglsetattribute.html"
  23.104 -><TT
  23.105 -CLASS="FUNCTION"
  23.106 ->SDL_GL_SetAttribute</TT
  23.107 -></A
  23.108 -> and finally, if you wish to use double buffering you must specify it as a GL attribute, <SPAN
  23.109 -CLASS="emphasis"
  23.110 -><I
  23.111 -CLASS="EMPHASIS"
  23.112 ->not</I
  23.113 -></SPAN
  23.114 -> by passing the <TT
  23.115 -CLASS="LITERAL"
  23.116 ->SDL_DOUBLEBUF</TT
  23.117 -> flag to <TT
  23.118 -CLASS="FUNCTION"
  23.119 ->SDL_SetVideoMode</TT
  23.120 ->.</P
  23.121 -><DIV
  23.122 -CLASS="EXAMPLE"
  23.123 -><A
  23.124 -NAME="AEN114"
  23.125 -></A
  23.126 -><P
  23.127 -><B
  23.128 ->Example 2-7. Initializing SDL with OpenGL</B
  23.129 -></P
  23.130 -><PRE
  23.131 -CLASS="PROGRAMLISTING"
  23.132 ->    /* Information about the current video settings. */
  23.133 -    const SDL_VideoInfo* info = NULL;
  23.134 -    /* Dimensions of our window. */
  23.135 -    int width = 0;
  23.136 -    int height = 0;
  23.137 -    /* Color depth in bits of our window. */
  23.138 -    int bpp = 0;
  23.139 -    /* Flags we will pass into SDL_SetVideoMode. */
  23.140 -    int flags = 0;
  23.141 -
  23.142 -    /* First, initialize SDL's video subsystem. */
  23.143 -    if( SDL_Init( SDL_INIT_VIDEO ) &#60; 0 ) {
  23.144 -        /* Failed, exit. */
  23.145 -        fprintf( stderr, "Video initialization failed: %s\n",
  23.146 -             SDL_GetError( ) );
  23.147 -        quit_tutorial( 1 );
  23.148 -    }
  23.149 -
  23.150 -    /* Let's get some video information. */
  23.151 -    info = SDL_GetVideoInfo( );
  23.152 -
  23.153 -    if( !info ) {
  23.154 -        /* This should probably never happen. */
  23.155 -        fprintf( stderr, "Video query failed: %s\n",
  23.156 -             SDL_GetError( ) );
  23.157 -        quit_tutorial( 1 );
  23.158 -    }
  23.159 -
  23.160 -    /*
  23.161 -     * Set our width/height to 640/480 (you would
  23.162 -     * of course let the user decide this in a normal
  23.163 -     * app). We get the bpp we will request from
  23.164 -     * the display. On X11, VidMode can't change
  23.165 -     * resolution, so this is probably being overly
  23.166 -     * safe. Under Win32, ChangeDisplaySettings
  23.167 -     * can change the bpp.
  23.168 -     */
  23.169 -    width = 640;
  23.170 -    height = 480;
  23.171 -    bpp = info-&#62;vfmt-&#62;BitsPerPixel;
  23.172 -
  23.173 -    /*
  23.174 -     * Now, we want to setup our requested
  23.175 -     * window attributes for our OpenGL window.
  23.176 -     * We want *at least* 5 bits of red, green
  23.177 -     * and blue. We also want at least a 16-bit
  23.178 -     * depth buffer.
  23.179 -     *
  23.180 -     * The last thing we do is request a double
  23.181 -     * buffered window. '1' turns on double
  23.182 -     * buffering, '0' turns it off.
  23.183 -     *
  23.184 -     * Note that we do not use SDL_DOUBLEBUF in
  23.185 -     * the flags to SDL_SetVideoMode. That does
  23.186 -     * not affect the GL attribute state, only
  23.187 -     * the standard 2D blitting setup.
  23.188 -     */
  23.189 -    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
  23.190 -    SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
  23.191 -    SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
  23.192 -    SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
  23.193 -    SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
  23.194 -
  23.195 -    /*
  23.196 -     * We want to request that SDL provide us
  23.197 -     * with an OpenGL window, in a fullscreen
  23.198 -     * video mode.
  23.199 -     *
  23.200 -     * EXERCISE:
  23.201 -     * Make starting windowed an option, and
  23.202 -     * handle the resize events properly with
  23.203 -     * glViewport.
  23.204 -     */
  23.205 -    flags = SDL_OPENGL | SDL_FULLSCREEN;
  23.206 -
  23.207 -    /*
  23.208 -     * Set the video mode
  23.209 -     */
  23.210 -    if( SDL_SetVideoMode( width, height, bpp, flags ) == 0 ) {
  23.211 -        /* 
  23.212 -         * This could happen for a variety of reasons,
  23.213 -         * including DISPLAY not being set, the specified
  23.214 -         * resolution not being available, etc.
  23.215 -         */
  23.216 -        fprintf( stderr, "Video mode set failed: %s\n",
  23.217 -             SDL_GetError( ) );
  23.218 -        quit_tutorial( 1 );
  23.219 -    }</PRE
  23.220 -></DIV
  23.221 -></DIV
  23.222 -><DIV
  23.223 -CLASS="SECT2"
  23.224 -><H2
  23.225 -CLASS="SECT2"
  23.226 -><A
  23.227 -NAME="AEN117"
  23.228 -></A
  23.229 ->Drawing</H2
  23.230 -><P
  23.231 ->Apart from initialisation, using OpenGL within SDL is the same as using OpenGL
  23.232 -with any other API, e.g. GLUT. You still use all the same function calls and
  23.233 -data types. However if you are using a double-buffered display, then you must
  23.234 -use
  23.235 -<A
  23.236 -HREF="sdlglswapbuffers.html"
  23.237 -><TT
  23.238 -CLASS="FUNCTION"
  23.239 ->SDL_GL_SwapBuffers()</TT
  23.240 -></A
  23.241 ->
  23.242 -to swap the buffers and update the display. To request double-buffering
  23.243 -with OpenGL, use
  23.244 -<A
  23.245 -HREF="sdlglsetattribute.html"
  23.246 -><TT
  23.247 -CLASS="FUNCTION"
  23.248 ->SDL_GL_SetAttribute</TT
  23.249 -></A
  23.250 ->
  23.251 -with <TT
  23.252 -CLASS="LITERAL"
  23.253 ->SDL_GL_DOUBLEBUFFER</TT
  23.254 ->, and use
  23.255 -<A
  23.256 -HREF="sdlglgetattribute.html"
  23.257 -><TT
  23.258 -CLASS="FUNCTION"
  23.259 ->SDL_GL_GetAttribute</TT
  23.260 -></A
  23.261 ->
  23.262 -to see if you actually got it.</P
  23.263 -><P
  23.264 ->A full example code listing is now presented below.</P
  23.265 -><DIV
  23.266 -CLASS="EXAMPLE"
  23.267 -><A
  23.268 -NAME="AEN128"
  23.269 -></A
  23.270 -><P
  23.271 -><B
  23.272 ->Example 2-8. SDL and OpenGL</B
  23.273 -></P
  23.274 -><PRE
  23.275 -CLASS="PROGRAMLISTING"
  23.276 ->/*
  23.277 - * SDL OpenGL Tutorial.
  23.278 - * (c) Michael Vance, 2000
  23.279 - * briareos@lokigames.com
  23.280 - *
  23.281 - * Distributed under terms of the LGPL. 
  23.282 - */
  23.283 -
  23.284 -#include &#60;SDL/SDL.h&#62;
  23.285 -#include &#60;GL/gl.h&#62;
  23.286 -#include &#60;GL/glu.h&#62;
  23.287 -
  23.288 -#include &#60;stdio.h&#62;
  23.289 -#include &#60;stdlib.h&#62;
  23.290 -
  23.291 -static GLboolean should_rotate = GL_TRUE;
  23.292 -
  23.293 -static void quit_tutorial( int code )
  23.294 -{
  23.295 -    /*
  23.296 -     * Quit SDL so we can release the fullscreen
  23.297 -     * mode and restore the previous video settings,
  23.298 -     * etc.
  23.299 -     */
  23.300 -    SDL_Quit( );
  23.301 -
  23.302 -    /* Exit program. */
  23.303 -    exit( code );
  23.304 -}
  23.305 -
  23.306 -static void handle_key_down( SDL_keysym* keysym )
  23.307 -{
  23.308 -
  23.309 -    /* 
  23.310 -     * We're only interested if 'Esc' has
  23.311 -     * been presssed.
  23.312 -     *
  23.313 -     * EXERCISE: 
  23.314 -     * Handle the arrow keys and have that change the
  23.315 -     * viewing position/angle.
  23.316 -     */
  23.317 -    switch( keysym-&#62;sym ) {
  23.318 -    case SDLK_ESCAPE:
  23.319 -        quit_tutorial( 0 );
  23.320 -        break;
  23.321 -    case SDLK_SPACE:
  23.322 -        should_rotate = !should_rotate;
  23.323 -        break;
  23.324 -    default:
  23.325 -        break;
  23.326 -    }
  23.327 -
  23.328 -}
  23.329 -
  23.330 -static void process_events( void )
  23.331 -{
  23.332 -    /* Our SDL event placeholder. */
  23.333 -    SDL_Event event;
  23.334 -
  23.335 -    /* Grab all the events off the queue. */
  23.336 -    while( SDL_PollEvent( &#38;event ) ) {
  23.337 -
  23.338 -        switch( event.type ) {
  23.339 -        case SDL_KEYDOWN:
  23.340 -            /* Handle key presses. */
  23.341 -            handle_key_down( &#38;event.key.keysym );
  23.342 -            break;
  23.343 -        case SDL_QUIT:
  23.344 -            /* Handle quit requests (like Ctrl-c). */
  23.345 -            quit_tutorial( 0 );
  23.346 -            break;
  23.347 -        }
  23.348 -
  23.349 -    }
  23.350 -
  23.351 -}
  23.352 -
  23.353 -static void draw_screen( void )
  23.354 -{
  23.355 -    /* Our angle of rotation. */
  23.356 -    static float angle = 0.0f;
  23.357 -
  23.358 -    /*
  23.359 -     * EXERCISE:
  23.360 -     * Replace this awful mess with vertex
  23.361 -     * arrays and a call to glDrawElements.
  23.362 -     *
  23.363 -     * EXERCISE:
  23.364 -     * After completing the above, change
  23.365 -     * it to use compiled vertex arrays.
  23.366 -     *
  23.367 -     * EXERCISE:
  23.368 -     * Verify my windings are correct here ;).
  23.369 -     */
  23.370 -    static GLfloat v0[] = { -1.0f, -1.0f,  1.0f };
  23.371 -    static GLfloat v1[] = {  1.0f, -1.0f,  1.0f };
  23.372 -    static GLfloat v2[] = {  1.0f,  1.0f,  1.0f };
  23.373 -    static GLfloat v3[] = { -1.0f,  1.0f,  1.0f };
  23.374 -    static GLfloat v4[] = { -1.0f, -1.0f, -1.0f };
  23.375 -    static GLfloat v5[] = {  1.0f, -1.0f, -1.0f };
  23.376 -    static GLfloat v6[] = {  1.0f,  1.0f, -1.0f };
  23.377 -    static GLfloat v7[] = { -1.0f,  1.0f, -1.0f };
  23.378 -    static GLubyte red[]    = { 255,   0,   0, 255 };
  23.379 -    static GLubyte green[]  = {   0, 255,   0, 255 };
  23.380 -    static GLubyte blue[]   = {   0,   0, 255, 255 };
  23.381 -    static GLubyte white[]  = { 255, 255, 255, 255 };
  23.382 -    static GLubyte yellow[] = {   0, 255, 255, 255 };
  23.383 -    static GLubyte black[]  = {   0,   0,   0, 255 };
  23.384 -    static GLubyte orange[] = { 255, 255,   0, 255 };
  23.385 -    static GLubyte purple[] = { 255,   0, 255,   0 };
  23.386 -
  23.387 -    /* Clear the color and depth buffers. */
  23.388 -    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
  23.389 -
  23.390 -    /* We don't want to modify the projection matrix. */
  23.391 -    glMatrixMode( GL_MODELVIEW );
  23.392 -    glLoadIdentity( );
  23.393 -
  23.394 -    /* Move down the z-axis. */
  23.395 -    glTranslatef( 0.0, 0.0, -5.0 );
  23.396 -
  23.397 -    /* Rotate. */
  23.398 -    glRotatef( angle, 0.0, 1.0, 0.0 );
  23.399 -
  23.400 -    if( should_rotate ) {
  23.401 -
  23.402 -        if( ++angle &#62; 360.0f ) {
  23.403 -            angle = 0.0f;
  23.404 -        }
  23.405 -
  23.406 -    }
  23.407 -
  23.408 -    /* Send our triangle data to the pipeline. */
  23.409 -    glBegin( GL_TRIANGLES );
  23.410 -
  23.411 -    glColor4ubv( red );
  23.412 -    glVertex3fv( v0 );
  23.413 -    glColor4ubv( green );
  23.414 -    glVertex3fv( v1 );
  23.415 -    glColor4ubv( blue );
  23.416 -    glVertex3fv( v2 );
  23.417 -
  23.418 -    glColor4ubv( red );
  23.419 -    glVertex3fv( v0 );
  23.420 -    glColor4ubv( blue );
  23.421 -    glVertex3fv( v2 );
  23.422 -    glColor4ubv( white );
  23.423 -    glVertex3fv( v3 );
  23.424 -
  23.425 -    glColor4ubv( green );
  23.426 -    glVertex3fv( v1 );
  23.427 -    glColor4ubv( black );
  23.428 -    glVertex3fv( v5 );
  23.429 -    glColor4ubv( orange );
  23.430 -    glVertex3fv( v6 );
  23.431 -
  23.432 -    glColor4ubv( green );
  23.433 -    glVertex3fv( v1 );
  23.434 -    glColor4ubv( orange );
  23.435 -    glVertex3fv( v6 );
  23.436 -    glColor4ubv( blue );
  23.437 -    glVertex3fv( v2 );
  23.438 -
  23.439 -    glColor4ubv( black );
  23.440 -    glVertex3fv( v5 );
  23.441 -    glColor4ubv( yellow );
  23.442 -    glVertex3fv( v4 );
  23.443 -    glColor4ubv( purple );
  23.444 -    glVertex3fv( v7 );
  23.445 -
  23.446 -    glColor4ubv( black );
  23.447 -    glVertex3fv( v5 );
  23.448 -    glColor4ubv( purple );
  23.449 -    glVertex3fv( v7 );
  23.450 -    glColor4ubv( orange );
  23.451 -    glVertex3fv( v6 );
  23.452 -
  23.453 -    glColor4ubv( yellow );
  23.454 -    glVertex3fv( v4 );
  23.455 -    glColor4ubv( red );
  23.456 -    glVertex3fv( v0 );
  23.457 -    glColor4ubv( white );
  23.458 -    glVertex3fv( v3 );
  23.459 -
  23.460 -    glColor4ubv( yellow );
  23.461 -    glVertex3fv( v4 );
  23.462 -    glColor4ubv( white );
  23.463 -    glVertex3fv( v3 );
  23.464 -    glColor4ubv( purple );
  23.465 -    glVertex3fv( v7 );
  23.466 -
  23.467 -    glColor4ubv( white );
  23.468 -    glVertex3fv( v3 );
  23.469 -    glColor4ubv( blue );
  23.470 -    glVertex3fv( v2 );
  23.471 -    glColor4ubv( orange );
  23.472 -    glVertex3fv( v6 );
  23.473 -
  23.474 -    glColor4ubv( white );
  23.475 -    glVertex3fv( v3 );
  23.476 -    glColor4ubv( orange );
  23.477 -    glVertex3fv( v6 );
  23.478 -    glColor4ubv( purple );
  23.479 -    glVertex3fv( v7 );
  23.480 -
  23.481 -    glColor4ubv( green );
  23.482 -    glVertex3fv( v1 );
  23.483 -    glColor4ubv( red );
  23.484 -    glVertex3fv( v0 );
  23.485 -    glColor4ubv( yellow );
  23.486 -    glVertex3fv( v4 );
  23.487 -
  23.488 -    glColor4ubv( green );
  23.489 -    glVertex3fv( v1 );
  23.490 -    glColor4ubv( yellow );
  23.491 -    glVertex3fv( v4 );
  23.492 -    glColor4ubv( black );
  23.493 -    glVertex3fv( v5 );
  23.494 -
  23.495 -    glEnd( );
  23.496 -
  23.497 -    /*
  23.498 -     * EXERCISE:
  23.499 -     * Draw text telling the user that 'Spc'
  23.500 -     * pauses the rotation and 'Esc' quits.
  23.501 -     * Do it using vetors and textured quads.
  23.502 -     */
  23.503 -
  23.504 -    /*
  23.505 -     * Swap the buffers. This this tells the driver to
  23.506 -     * render the next frame from the contents of the
  23.507 -     * back-buffer, and to set all rendering operations
  23.508 -     * to occur on what was the front-buffer.
  23.509 -     *
  23.510 -     * Double buffering prevents nasty visual tearing
  23.511 -     * from the application drawing on areas of the
  23.512 -     * screen that are being updated at the same time.
  23.513 -     */
  23.514 -    SDL_GL_SwapBuffers( );
  23.515 -}
  23.516 -
  23.517 -static void setup_opengl( int width, int height )
  23.518 -{
  23.519 -    float ratio = (float) width / (float) height;
  23.520 -
  23.521 -    /* Our shading model--Gouraud (smooth). */
  23.522 -    glShadeModel( GL_SMOOTH );
  23.523 -
  23.524 -    /* Culling. */
  23.525 -    glCullFace( GL_BACK );
  23.526 -    glFrontFace( GL_CCW );
  23.527 -    glEnable( GL_CULL_FACE );
  23.528 -
  23.529 -    /* Set the clear color. */
  23.530 -    glClearColor( 0, 0, 0, 0 );
  23.531 -
  23.532 -    /* Setup our viewport. */
  23.533 -    glViewport( 0, 0, width, height );
  23.534 -
  23.535 -    /*
  23.536 -     * Change to the projection matrix and set
  23.537 -     * our viewing volume.
  23.538 -     */
  23.539 -    glMatrixMode( GL_PROJECTION );
  23.540 -    glLoadIdentity( );
  23.541 -    /*
  23.542 -     * EXERCISE:
  23.543 -     * Replace this with a call to glFrustum.
  23.544 -     */
  23.545 -    gluPerspective( 60.0, ratio, 1.0, 1024.0 );
  23.546 -}
  23.547 -
  23.548 -int main( int argc, char* argv[] )
  23.549 -{
  23.550 -    /* Information about the current video settings. */
  23.551 -    const SDL_VideoInfo* info = NULL;
  23.552 -    /* Dimensions of our window. */
  23.553 -    int width = 0;
  23.554 -    int height = 0;
  23.555 -    /* Color depth in bits of our window. */
  23.556 -    int bpp = 0;
  23.557 -    /* Flags we will pass into SDL_SetVideoMode. */
  23.558 -    int flags = 0;
  23.559 -
  23.560 -    /* First, initialize SDL's video subsystem. */
  23.561 -    if( SDL_Init( SDL_INIT_VIDEO ) &#60; 0 ) {
  23.562 -        /* Failed, exit. */
  23.563 -        fprintf( stderr, "Video initialization failed: %s\n",
  23.564 -             SDL_GetError( ) );
  23.565 -        quit_tutorial( 1 );
  23.566 -    }
  23.567 -
  23.568 -    /* Let's get some video information. */
  23.569 -    info = SDL_GetVideoInfo( );
  23.570 -
  23.571 -    if( !info ) {
  23.572 -        /* This should probably never happen. */
  23.573 -        fprintf( stderr, "Video query failed: %s\n",
  23.574 -             SDL_GetError( ) );
  23.575 -        quit_tutorial( 1 );
  23.576 -    }
  23.577 -
  23.578 -    /*
  23.579 -     * Set our width/height to 640/480 (you would
  23.580 -     * of course let the user decide this in a normal
  23.581 -     * app). We get the bpp we will request from
  23.582 -     * the display. On X11, VidMode can't change
  23.583 -     * resolution, so this is probably being overly
  23.584 -     * safe. Under Win32, ChangeDisplaySettings
  23.585 -     * can change the bpp.
  23.586 -     */
  23.587 -    width = 640;
  23.588 -    height = 480;
  23.589 -    bpp = info-&#62;vfmt-&#62;BitsPerPixel;
  23.590 -
  23.591 -    /*
  23.592 -     * Now, we want to setup our requested
  23.593 -     * window attributes for our OpenGL window.
  23.594 -     * We want *at least* 5 bits of red, green
  23.595 -     * and blue. We also want at least a 16-bit
  23.596 -     * depth buffer.
  23.597 -     *
  23.598 -     * The last thing we do is request a double
  23.599 -     * buffered window. '1' turns on double
  23.600 -     * buffering, '0' turns it off.
  23.601 -     *
  23.602 -     * Note that we do not use SDL_DOUBLEBUF in
  23.603 -     * the flags to SDL_SetVideoMode. That does
  23.604 -     * not affect the GL attribute state, only
  23.605 -     * the standard 2D blitting setup.
  23.606 -     */
  23.607 -    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
  23.608 -    SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
  23.609 -    SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
  23.610 -    SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
  23.611 -    SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
  23.612 -
  23.613 -    /*
  23.614 -     * We want to request that SDL provide us
  23.615 -     * with an OpenGL window, in a fullscreen
  23.616 -     * video mode.
  23.617 -     *
  23.618 -     * EXERCISE:
  23.619 -     * Make starting windowed an option, and
  23.620 -     * handle the resize events properly with
  23.621 -     * glViewport.
  23.622 -     */
  23.623 -    flags = SDL_OPENGL | SDL_FULLSCREEN;
  23.624 -
  23.625 -    /*
  23.626 -     * Set the video mode
  23.627 -     */
  23.628 -    if( SDL_SetVideoMode( width, height, bpp, flags ) == 0 ) {
  23.629 -        /* 
  23.630 -         * This could happen for a variety of reasons,
  23.631 -         * including DISPLAY not being set, the specified
  23.632 -         * resolution not being available, etc.
  23.633 -         */
  23.634 -        fprintf( stderr, "Video mode set failed: %s\n",
  23.635 -             SDL_GetError( ) );
  23.636 -        quit_tutorial( 1 );
  23.637 -    }
  23.638 -
  23.639 -    /*
  23.640 -     * At this point, we should have a properly setup
  23.641 -     * double-buffered window for use with OpenGL.
  23.642 -     */
  23.643 -    setup_opengl( width, height );
  23.644 -
  23.645 -    /*
  23.646 -     * Now we want to begin our normal app process--
  23.647 -     * an event loop with a lot of redrawing.
  23.648 -     */
  23.649 -    while( 1 ) {
  23.650 -        /* Process incoming events. */
  23.651 -        process_events( );
  23.652 -        /* Draw the screen. */
  23.653 -        draw_screen( );
  23.654 -    }
  23.655 -
  23.656 -    /*
  23.657 -     * EXERCISE:
  23.658 -     * Record timings using SDL_GetTicks() and
  23.659 -     * and print out frames per second at program
  23.660 -     * end.
  23.661 -     */
  23.662 -
  23.663 -    /* Never reached. */
  23.664 -    return 0;
  23.665 -}</PRE
  23.666 -></DIV
  23.667 -></DIV
  23.668 -></DIV
  23.669 -><DIV
  23.670 -CLASS="NAVFOOTER"
  23.671 -><HR
  23.672 -ALIGN="LEFT"
  23.673 -WIDTH="100%"><TABLE
  23.674 -SUMMARY="Footer navigation table"
  23.675 -WIDTH="100%"
  23.676 -BORDER="0"
  23.677 -CELLPADDING="0"
  23.678 -CELLSPACING="0"
  23.679 -><TR
  23.680 -><TD
  23.681 -WIDTH="33%"
  23.682 -ALIGN="left"
  23.683 -VALIGN="top"
  23.684 -><A
  23.685 -HREF="guidevideo.html"
  23.686 -ACCESSKEY="P"
  23.687 ->Prev</A
  23.688 -></TD
  23.689 -><TD
  23.690 -WIDTH="34%"
  23.691 -ALIGN="center"
  23.692 -VALIGN="top"
  23.693 -><A
  23.694 -HREF="index.html"
  23.695 -ACCESSKEY="H"
  23.696 ->Home</A
  23.697 -></TD
  23.698 -><TD
  23.699 -WIDTH="33%"
  23.700 -ALIGN="right"
  23.701 -VALIGN="top"
  23.702 -><A
  23.703 -HREF="guideinput.html"
  23.704 -ACCESSKEY="N"
  23.705 ->Next</A
  23.706 -></TD
  23.707 -></TR
  23.708 -><TR
  23.709 -><TD
  23.710 -WIDTH="33%"
  23.711 -ALIGN="left"
  23.712 -VALIGN="top"
  23.713 ->Graphics and Video</TD
  23.714 -><TD
  23.715 -WIDTH="34%"
  23.716 -ALIGN="center"
  23.717 -VALIGN="top"
  23.718 -><A
  23.719 -HREF="guidevideo.html"
  23.720 -ACCESSKEY="U"
  23.721 ->Up</A
  23.722 -></TD
  23.723 -><TD
  23.724 -WIDTH="33%"
  23.725 -ALIGN="right"
  23.726 -VALIGN="top"
  23.727 ->Input handling</TD
  23.728 -></TR
  23.729 -></TABLE
  23.730 -></DIV
  23.731 -></BODY
  23.732 -></HTML
  23.733 ->
  23.734 \ No newline at end of file
    24.1 --- a/docs/html/index.html	Wed Oct 07 06:11:53 2009 +0000
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,1156 +0,0 @@
    24.4 -<HTML
    24.5 -><HEAD
    24.6 -><TITLE
    24.7 -></TITLE
    24.8 -><META
    24.9 -NAME="GENERATOR"
   24.10 -CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
   24.11 -"><LINK
   24.12 -REL="NEXT"
   24.13 -TITLE="SDL Guide"
   24.14 -HREF="guide.html"></HEAD
   24.15 -><BODY
   24.16 -CLASS="BOOK"
   24.17 -BGCOLOR="#FFF8DC"
   24.18 -TEXT="#000000"
   24.19 -LINK="#0000ee"
   24.20 -VLINK="#551a8b"
   24.21 -ALINK="#ff0000"
   24.22 -><DIV
   24.23 -CLASS="BOOK"
   24.24 -><A
   24.25 -NAME="AEN1"
   24.26 -></A
   24.27 -><DIV
   24.28 -CLASS="TOC"
   24.29 -><DL
   24.30 -><DT
   24.31 -><B
   24.32 ->Table of Contents</B
   24.33 -></DT
   24.34 -><DT
   24.35 ->I. <A
   24.36 -HREF="guide.html"
   24.37 ->SDL Guide</A
   24.38 -></DT
   24.39 -><DD
   24.40 -><DL
   24.41 -><DT
   24.42 -><A
   24.43 -HREF="guidepreface.html"
   24.44 ->Preface</A
   24.45 -></DT
   24.46 -><DD
   24.47 -><DL
   24.48 -><DT
   24.49 -><A
   24.50 -HREF="guidepreface.html#GUIDEABOUTSDL"
   24.51 ->About SDL</A
   24.52 -></DT
   24.53 -><DT
   24.54 -><A
   24.55 -HREF="guideaboutsdldoc.html"
   24.56 ->About SDLdoc</A
   24.57 -></DT
   24.58 -><DT
   24.59 -><A
   24.60 -HREF="guidecredits.html"
   24.61 ->Credits</A
   24.62 -></DT
   24.63 -></DL
   24.64 -></DD
   24.65 -><DT
   24.66 ->1. <A
   24.67 -HREF="guidethebasics.html"
   24.68 ->The Basics</A
   24.69 -></DT
   24.70 -><DD
   24.71 -><DL
   24.72 -><DT
   24.73 -><A
   24.74 -HREF="guidethebasics.html#GUIDEINTRODUCTION"
   24.75 ->Introduction</A
   24.76 -></DT
   24.77 -><DT
   24.78 -><A
   24.79 -HREF="guidebasicsinit.html"
   24.80 ->Initializing SDL</A
   24.81 -></DT
   24.82 -></DL
   24.83 -></DD
   24.84 -><DT
   24.85 ->2. <A
   24.86 -HREF="guidevideo.html"
   24.87 ->Graphics and Video</A
   24.88 -></DT
   24.89 -><DD
   24.90 -><DL
   24.91 -><DT
   24.92 -><A
   24.93 -HREF="guidevideo.html#GUIDEVIDEOINTRO"
   24.94 ->Introduction to SDL Video</A
   24.95 -></DT
   24.96 -><DT
   24.97 -><A
   24.98 -HREF="guidevideoopengl.html"
   24.99 ->Using OpenGL With SDL</A
  24.100 -></DT
  24.101 -></DL
  24.102 -></DD
  24.103 -><DT
  24.104 ->3. <A
  24.105 -HREF="guideinput.html"
  24.106 ->Input handling</A
  24.107 -></DT
  24.108 -><DD
  24.109 -><DL
  24.110 -><DT
  24.111 -><A
  24.112 -HREF="guideinput.html#GUIDEINPUTJOYSTICK"
  24.113 ->Handling Joysticks</A
  24.114 -></DT
  24.115 -><DT
  24.116 -><A
  24.117 -HREF="guideinputkeyboard.html"
  24.118 ->Handling the Keyboard</A
  24.119 -></DT
  24.120 -></DL
  24.121 -></DD
  24.122 -><DT
  24.123 ->4. <A
  24.124 -HREF="guideexamples.html"
  24.125 ->Examples</A
  24.126 -></DT
  24.127 -><DD
  24.128 -><DL
  24.129 -><DT
  24.130 -><A
  24.131 -HREF="guideexamples.html#AEN369"
  24.132 ->Introduction</A
  24.133 -></DT
  24.134 -><DT
  24.135 -><A
  24.136 -HREF="guideeventexamples.html"
  24.137 ->Event Examples</A
  24.138 -></DT
  24.139 -><DT
  24.140 -><A
  24.141 -HREF="guideaudioexamples.html"
  24.142 ->Audio Examples</A
  24.143 -></DT
  24.144 -><DT
  24.145 -><A
  24.146 -HREF="guidecdromexamples.html"
  24.147 ->CDROM Examples</A
  24.148 -></DT
  24.149 -><DT
  24.150 -><A
  24.151 -HREF="guidetimeexamples.html"
  24.152 ->Time Examples</A
  24.153 -></DT
  24.154 -></DL
  24.155 -></DD
  24.156 -></DL
  24.157 -></DD
  24.158 -><DT
  24.159 ->II. <A
  24.160 -HREF="reference.html"
  24.161 ->SDL Reference</A
  24.162 -></DT
  24.163 -><DD
  24.164 -><DL
  24.165 -><DT
  24.166 ->5. <A
  24.167 -HREF="general.html"
  24.168 ->General</A
  24.169 -></DT
  24.170 -><DD
  24.171 -><DL
  24.172 -><DT
  24.173 -><A
  24.174 -HREF="sdlinit.html"
  24.175 ->SDL_Init</A
  24.176 ->&nbsp;--&nbsp;Initializes SDL</DT
  24.177 -><DT
  24.178 -><A
  24.179 -HREF="sdlinitsubsystem.html"
  24.180 ->SDL_InitSubSystem</A
  24.181 ->&nbsp;--&nbsp;Initialize subsystems</DT
  24.182 -><DT
  24.183 -><A
  24.184 -HREF="sdlquitsubsystem.html"
  24.185 ->SDL_QuitSubSystem</A
  24.186 ->&nbsp;--&nbsp;Shut down a subsystem</DT
  24.187 -><DT
  24.188 -><A
  24.189 -HREF="sdlquit.html"
  24.190 ->SDL_Quit</A
  24.191 ->&nbsp;--&nbsp;Shut down SDL</DT
  24.192 -><DT
  24.193 -><A
  24.194 -HREF="sdlwasinit.html"
  24.195 ->SDL_WasInit</A
  24.196 ->&nbsp;--&nbsp;Check which subsystems are initialized</DT
  24.197 -><DT
  24.198 -><A
  24.199 -HREF="sdlgeterror.html"
  24.200 ->SDL_GetError</A
  24.201 ->&nbsp;--&nbsp;Get SDL error string</DT
  24.202 -><DT
  24.203 -><A
  24.204 -HREF="sdlenvvars.html"
  24.205 ->SDL_envvars</A
  24.206 ->&nbsp;--&nbsp;SDL environment variables</DT
  24.207 -></DL
  24.208 -></DD
  24.209 -><DT
  24.210 ->6. <A
  24.211 -HREF="video.html"
  24.212 ->Video</A
  24.213 -></DT
  24.214 -><DD
  24.215 -><DL
  24.216 -><DT
  24.217 -><A
  24.218 -HREF="sdlgetvideosurface.html"
  24.219 ->SDL_GetVideoSurface</A
  24.220 ->&nbsp;--&nbsp;returns a pointer to the current display surface</DT
  24.221 -><DT
  24.222 -><A
  24.223 -HREF="sdlgetvideoinfo.html"
  24.224 ->SDL_GetVideoInfo</A
  24.225 ->&nbsp;--&nbsp;returns a pointer to information about the video hardware</DT
  24.226 -><DT
  24.227 -><A
  24.228 -HREF="sdlvideodrivername.html"
  24.229 ->SDL_VideoDriverName</A
  24.230 ->&nbsp;--&nbsp;Obtain the name of the video driver</DT
  24.231 -><DT
  24.232 -><A
  24.233 -HREF="sdllistmodes.html"
  24.234 ->SDL_ListModes</A
  24.235 ->&nbsp;--&nbsp;Returns a pointer to an array of available screen dimensions for 
  24.236 -the given format and video flags</DT
  24.237 -><DT
  24.238 -><A
  24.239 -HREF="sdlvideomodeok.html"
  24.240 ->SDL_VideoModeOK</A
  24.241 ->&nbsp;--&nbsp;Check to see if a particular video mode is supported.</DT
  24.242 -><DT
  24.243 -><A
  24.244 -HREF="sdlsetvideomode.html"
  24.245 ->SDL_SetVideoMode</A
  24.246 ->&nbsp;--&nbsp;Set up a video mode with the specified width, height and bits-per-pixel.</DT
  24.247 -><DT
  24.248 -><A
  24.249 -HREF="sdlupdaterect.html"
  24.250 ->SDL_UpdateRect</A
  24.251 ->&nbsp;--&nbsp;Makes sure the given area is updated on the given screen.</DT
  24.252 -><DT
  24.253 -><A
  24.254 -HREF="sdlupdaterects.html"
  24.255 ->SDL_UpdateRects</A
  24.256 ->&nbsp;--&nbsp;Makes sure the given list of rectangles is updated on the given screen.</DT
  24.257 -><DT
  24.258 -><A
  24.259 -HREF="sdlflip.html"
  24.260 ->SDL_Flip</A
  24.261 ->&nbsp;--&nbsp;Swaps screen buffers</DT
  24.262 -><DT
  24.263 -><A
  24.264 -HREF="sdlsetcolors.html"
  24.265 ->SDL_SetColors</A
  24.266 ->&nbsp;--&nbsp;Sets a portion of the colormap for the given 8-bit surface.</DT
  24.267 -><DT
  24.268 -><A
  24.269 -HREF="sdlsetpalette.html"
  24.270 ->SDL_SetPalette</A
  24.271 ->&nbsp;--&nbsp;Sets the colors in the palette of an 8-bit surface.</DT
  24.272 -><DT
  24.273 -><A
  24.274 -HREF="sdlsetgamma.html"
  24.275 ->SDL_SetGamma</A
  24.276 ->&nbsp;--&nbsp;Sets the color gamma function for the display</DT
  24.277 -><DT
  24.278 -><A
  24.279 -HREF="sdlgetgammaramp.html"
  24.280 ->SDL_GetGammaRamp</A
  24.281 ->&nbsp;--&nbsp;Gets the color gamma lookup tables for the display</DT
  24.282 -><DT
  24.283 -><A
  24.284 -HREF="sdlsetgammaramp.html"
  24.285 ->SDL_SetGammaRamp</A
  24.286 ->&nbsp;--&nbsp;Sets the color gamma lookup tables for the display</DT
  24.287 -><DT
  24.288 -><A
  24.289 -HREF="sdlmaprgb.html"
  24.290 ->SDL_MapRGB</A
  24.291 ->&nbsp;--&nbsp;Map a RGB color value to a pixel format.</DT
  24.292 -><DT
  24.293 -><A
  24.294 -HREF="sdlmaprgba.html"
  24.295 ->SDL_MapRGBA</A
  24.296 ->&nbsp;--&nbsp;Map a RGBA color value to a pixel format.</DT
  24.297 -><DT
  24.298 -><A
  24.299 -HREF="sdlgetrgb.html"
  24.300 ->SDL_GetRGB</A
  24.301 ->&nbsp;--&nbsp;Get RGB values from a pixel in the specified pixel format.</DT
  24.302 -><DT
  24.303 -><A
  24.304 -HREF="sdlgetrgba.html"
  24.305 ->SDL_GetRGBA</A
  24.306 ->&nbsp;--&nbsp;Get RGBA values from a pixel in the specified pixel format.</DT
  24.307 -><DT
  24.308 -><A
  24.309 -HREF="sdlcreatergbsurface.html"
  24.310 ->SDL_CreateRGBSurface</A
  24.311 ->&nbsp;--&nbsp;Create an empty SDL_Surface</DT
  24.312 -><DT
  24.313 -><A
  24.314 -HREF="sdlcreatergbsurfacefrom.html"
  24.315 ->SDL_CreateRGBSurfaceFrom</A
  24.316 ->&nbsp;--&nbsp;Create an SDL_Surface from pixel data</DT
  24.317 -><DT
  24.318 -><A
  24.319 -HREF="sdlfreesurface.html"
  24.320 ->SDL_FreeSurface</A
  24.321 ->&nbsp;--&nbsp;Frees (deletes) a SDL_Surface</DT
  24.322 -><DT
  24.323 -><A
  24.324 -HREF="sdllocksurface.html"
  24.325 ->SDL_LockSurface</A
  24.326 ->&nbsp;--&nbsp;Lock a surface for directly access.</DT
  24.327 -><DT
  24.328 -><A
  24.329 -HREF="sdlunlocksurface.html"
  24.330 ->SDL_UnlockSurface</A
  24.331 ->&nbsp;--&nbsp;Unlocks a previously locked surface.</DT
  24.332 -><DT
  24.333 -><A
  24.334 -HREF="sdlloadbmp.html"
  24.335 ->SDL_LoadBMP</A
  24.336 ->&nbsp;--&nbsp;Load a Windows BMP file into an SDL_Surface.</DT
  24.337 -><DT
  24.338 -><A
  24.339 -HREF="sdlsavebmp.html"
  24.340 ->SDL_SaveBMP</A
  24.341 ->&nbsp;--&nbsp;Save an SDL_Surface as a Windows BMP file.</DT
  24.342 -><DT
  24.343 -><A
  24.344 -HREF="sdlsetcolorkey.html"
  24.345 ->SDL_SetColorKey</A
  24.346 ->&nbsp;--&nbsp;Sets the color key (transparent pixel) in a blittable surface and
  24.347 -RLE acceleration.</DT
  24.348 -><DT
  24.349 -><A
  24.350 -HREF="sdlsetalpha.html"
  24.351 ->SDL_SetAlpha</A
  24.352 ->&nbsp;--&nbsp;Adjust the alpha properties of a surface</DT
  24.353 -><DT
  24.354 -><A
  24.355 -HREF="sdlsetcliprect.html"
  24.356 ->SDL_SetClipRect</A
  24.357 ->&nbsp;--&nbsp;Sets the clipping rectangle for a surface.</DT
  24.358 -><DT
  24.359 -><A
  24.360 -HREF="sdlgetcliprect.html"
  24.361 ->SDL_GetClipRect</A
  24.362 ->&nbsp;--&nbsp;Gets the clipping rectangle for a surface.</DT
  24.363 -><DT
  24.364 -><A
  24.365 -HREF="sdlconvertsurface.html"
  24.366 ->SDL_ConvertSurface</A
  24.367 ->&nbsp;--&nbsp;Converts a surface to the same format as another surface.</DT
  24.368 -><DT
  24.369 -><A
  24.370 -HREF="sdlblitsurface.html"
  24.371 ->SDL_BlitSurface</A
  24.372 ->&nbsp;--&nbsp;This performs a fast blit from the source surface to the destination surface.</DT
  24.373 -><DT
  24.374 -><A
  24.375 -HREF="sdlfillrect.html"
  24.376 ->SDL_FillRect</A
  24.377 ->&nbsp;--&nbsp;This function performs a fast fill of the given rectangle with some color</DT
  24.378 -><DT
  24.379 -><A
  24.380 -HREF="sdldisplayformat.html"
  24.381 ->SDL_DisplayFormat</A
  24.382 ->&nbsp;--&nbsp;Convert a surface to the display format</DT
  24.383 -><DT
  24.384 -><A
  24.385 -HREF="sdldisplayformatalpha.html"
  24.386 ->SDL_DisplayFormatAlpha</A
  24.387 ->&nbsp;--&nbsp;Convert a surface to the display format</DT
  24.388 -><DT
  24.389 -><A
  24.390 -HREF="sdlwarpmouse.html"
  24.391 ->SDL_WarpMouse</A
  24.392 ->&nbsp;--&nbsp;Set the position of the mouse cursor.</DT
  24.393 -><DT
  24.394 -><A
  24.395 -HREF="sdlcreatecursor.html"
  24.396 ->SDL_CreateCursor</A
  24.397 ->&nbsp;--&nbsp;Creates a new mouse cursor.</DT
  24.398 -><DT
  24.399 -><A
  24.400 -HREF="sdlfreecursor.html"
  24.401 ->SDL_FreeCursor</A
  24.402 ->&nbsp;--&nbsp;Frees a cursor created with SDL_CreateCursor.</DT
  24.403 -><DT
  24.404 -><A
  24.405 -HREF="sdlsetcursor.html"
  24.406 ->SDL_SetCursor</A
  24.407 ->&nbsp;--&nbsp;Set the currently active mouse cursor.</DT
  24.408 -><DT
  24.409 -><A
  24.410 -HREF="sdlgetcursor.html"
  24.411 ->SDL_GetCursor</A
  24.412 ->&nbsp;--&nbsp;Get the currently active mouse cursor.</DT
  24.413 -><DT
  24.414 -><A
  24.415 -HREF="sdlshowcursor.html"
  24.416 ->SDL_ShowCursor</A
  24.417 ->&nbsp;--&nbsp;Toggle whether or not the cursor is shown on the screen.</DT
  24.418 -><DT
  24.419 -><A
  24.420 -HREF="sdlglloadlibrary.html"
  24.421 ->SDL_GL_LoadLibrary</A
  24.422 ->&nbsp;--&nbsp;Specify an OpenGL library</DT
  24.423 -><DT
  24.424 -><A
  24.425 -HREF="sdlglgetprocaddress.html"
  24.426 ->SDL_GL_GetProcAddress</A
  24.427 ->&nbsp;--&nbsp;Get the address of a GL function</DT
  24.428 -><DT
  24.429 -><A
  24.430 -HREF="sdlglgetattribute.html"
  24.431 ->SDL_GL_GetAttribute</A
  24.432 ->&nbsp;--&nbsp;Get the value of a special SDL/OpenGL attribute</DT
  24.433 -><DT
  24.434 -><A
  24.435 -HREF="sdlglsetattribute.html"
  24.436 ->SDL_GL_SetAttribute</A
  24.437 ->&nbsp;--&nbsp;Set a special SDL/OpenGL attribute</DT
  24.438 -><DT
  24.439 -><A
  24.440 -HREF="sdlglswapbuffers.html"
  24.441 ->SDL_GL_SwapBuffers</A
  24.442 ->&nbsp;--&nbsp;Swap OpenGL framebuffers/Update Display</DT
  24.443 -><DT
  24.444 -><A
  24.445 -HREF="sdlcreateyuvoverlay.html"
  24.446 ->SDL_CreateYUVOverlay</A
  24.447 ->&nbsp;--&nbsp;Create a YUV video overlay</DT
  24.448 -><DT
  24.449 -><A
  24.450 -HREF="sdllockyuvoverlay.html"
  24.451 ->SDL_LockYUVOverlay</A
  24.452 ->&nbsp;--&nbsp;Lock an overlay</DT
  24.453 -><DT
  24.454 -><A
  24.455 -HREF="sdlunlockyuvoverlay.html"
  24.456 ->SDL_UnlockYUVOverlay</A
  24.457 ->&nbsp;--&nbsp;Unlock an overlay</DT
  24.458 -><DT
  24.459 -><A
  24.460 -HREF="sdldisplayyuvoverlay.html"
  24.461 ->SDL_DisplayYUVOverlay</A
  24.462 ->&nbsp;--&nbsp;Blit the overlay to the display</DT
  24.463 -><DT
  24.464 -><A
  24.465 -HREF="sdlfreeyuvoverlay.html"
  24.466 ->SDL_FreeYUVOverlay</A
  24.467 ->&nbsp;--&nbsp;Free a YUV video overlay</DT
  24.468 -><DT
  24.469 -><A
  24.470 -HREF="sdlglattr.html"
  24.471 ->SDL_GLattr</A
  24.472 ->&nbsp;--&nbsp;SDL GL Attributes</DT
  24.473 -><DT
  24.474 -><A
  24.475 -HREF="sdlrect.html"
  24.476 ->SDL_Rect</A
  24.477 ->&nbsp;--&nbsp;Defines a rectangular area</DT
  24.478 -><DT
  24.479 -><A
  24.480 -HREF="sdlcolor.html"
  24.481 ->SDL_Color</A
  24.482 ->&nbsp;--&nbsp;Format independent color description</DT
  24.483 -><DT
  24.484 -><A
  24.485 -HREF="sdlpalette.html"
  24.486 ->SDL_Palette</A
  24.487 ->&nbsp;--&nbsp;Color palette for 8-bit pixel formats</DT
  24.488 -><DT
  24.489 -><A
  24.490 -HREF="sdlpixelformat.html"
  24.491 ->SDL_PixelFormat</A
  24.492 ->&nbsp;--&nbsp;Stores surface format information</DT
  24.493 -><DT
  24.494 -><A
  24.495 -HREF="sdlsurface.html"
  24.496 ->SDL_Surface</A
  24.497 ->&nbsp;--&nbsp;Graphical Surface Structure</DT
  24.498 -><DT
  24.499 -><A
  24.500 -HREF="sdlvideoinfo.html"
  24.501 ->SDL_VideoInfo</A
  24.502 ->&nbsp;--&nbsp;Video Target information</DT
  24.503 -><DT
  24.504 -><A
  24.505 -HREF="sdloverlay.html"
  24.506 ->SDL_Overlay</A
  24.507 ->&nbsp;--&nbsp;YUV video overlay</DT
  24.508 -></DL
  24.509 -></DD
  24.510 -><DT
  24.511 ->7. <A
  24.512 -HREF="wm.html"
  24.513 ->Window Management</A
  24.514 -></DT
  24.515 -><DD
  24.516 -><DL
  24.517 -><DT
  24.518 -><A
  24.519 -HREF="sdlwmsetcaption.html"
  24.520 ->SDL_WM_SetCaption</A
  24.521 ->&nbsp;--&nbsp;Sets the window tile and icon name.</DT
  24.522 -><DT
  24.523 -><A
  24.524 -HREF="sdlwmgetcaption.html"
  24.525 ->SDL_WM_GetCaption</A
  24.526 ->&nbsp;--&nbsp;Gets the window title and icon name.</DT
  24.527 -><DT
  24.528 -><A
  24.529 -HREF="sdlwmseticon.html"
  24.530 ->SDL_WM_SetIcon</A
  24.531 ->&nbsp;--&nbsp;Sets the icon for the display window.</DT
  24.532 -><DT
  24.533 -><A
  24.534 -HREF="sdlwmiconifywindow.html"
  24.535 ->SDL_WM_IconifyWindow</A
  24.536 ->&nbsp;--&nbsp;Iconify/Minimise the window</DT
  24.537 -><DT
  24.538 -><A
  24.539 -HREF="sdlwmtogglefullscreen.html"
  24.540 ->SDL_WM_ToggleFullScreen</A
  24.541 ->&nbsp;--&nbsp;Toggles fullscreen mode</DT
  24.542 -><DT
  24.543 -><A
  24.544 -HREF="sdlwmgrabinput.html"
  24.545 ->SDL_WM_GrabInput</A
  24.546 ->&nbsp;--&nbsp;Grabs mouse and keyboard input.</DT
  24.547 -></DL
  24.548 -></DD
  24.549 -><DT
  24.550 ->8. <A
  24.551 -HREF="event.html"
  24.552 ->Events</A
  24.553 -></DT
  24.554 -><DD
  24.555 -><DL
  24.556 -><DT
  24.557 -><A
  24.558 -HREF="event.html#AEN3691"
  24.559 ->Introduction</A
  24.560 -></DT
  24.561 -><DT
  24.562 -><A
  24.563 -HREF="eventstructures.html"
  24.564 ->SDL Event Structures.</A
  24.565 -></DT
  24.566 -><DT
  24.567 -><A
  24.568 -HREF="eventfunctions.html"
  24.569 ->Event Functions.</A
  24.570 -></DT
  24.571 -></DL
  24.572 -></DD
  24.573 -><DT
  24.574 ->9. <A
  24.575 -HREF="joystick.html"
  24.576 ->Joystick</A
  24.577 -></DT
  24.578 -><DD
  24.579 -><DL
  24.580 -><DT
  24.581 -><A
  24.582 -HREF="sdlnumjoysticks.html"
  24.583 ->SDL_NumJoysticks</A
  24.584 ->&nbsp;--&nbsp;Count available joysticks.</DT
  24.585 -><DT
  24.586 -><A
  24.587 -HREF="sdljoystickname.html"
  24.588 ->SDL_JoystickName</A
  24.589 ->&nbsp;--&nbsp;Get joystick name.</DT
  24.590 -><DT
  24.591 -><A
  24.592 -HREF="sdljoystickopen.html"
  24.593 ->SDL_JoystickOpen</A
  24.594 ->&nbsp;--&nbsp;Opens a joystick for use.</DT
  24.595 -><DT
  24.596 -><A
  24.597 -HREF="sdljoystickopened.html"