From 359adb4186fc9ad6b2351f6880d8a5ebcf3cb5ea Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 26 Apr 2001 16:45:43 +0000 Subject: [PATCH] Initial revision --- .cvsignore | 10 + BUGS | 199 ++ COPYING | 437 +++ CREDITS | 51 + CWprojects.sea.bin | Bin 0 -> 240194 bytes INSTALL | 22 + MPWmake.sea.bin | Bin 0 -> 29568 bytes Makefile.am | 85 + README | 44 + README-SDL.txt | 13 + README.CVS | 13 + README.MacOS | 60 + README.MacOSX | 44 + README.Win32 | 53 + README.WinCE | 37 + SDL.spec.in | 90 + TODO | 23 + VisualC.html | 235 ++ VisualC.zip | Bin 0 -> 17800 bytes WhatsNew | 664 ++++ acinclude.m4 | 619 ++++ autogen.sh | 18 + config.guess | 1368 ++++++++ config.sub | 1357 ++++++++ configure.in | 1891 +++++++++++ docs.html | 498 +++ docs/.cvsignore | 2 + docs/Makefile.am | 4 + docs/html/.cvsignore | 2 + docs/html/Makefile.am | 199 ++ docs/html/audio.html | 234 ++ docs/html/cdrom.html | 252 ++ docs/html/event.html | 208 ++ docs/html/eventfunctions.html | 236 ++ docs/html/eventstructures.html | 220 ++ docs/html/general.html | 207 ++ docs/html/guide.html | 167 + docs/html/guideaboutsdldoc.html | 140 + docs/html/guideaudioexamples.html | 220 ++ docs/html/guidebasicsinit.html | 224 ++ docs/html/guidecdromexamples.html | 267 ++ docs/html/guidecredits.html | 179 + docs/html/guideeventexamples.html | 239 ++ docs/html/guideexamples.html | 185 ++ docs/html/guideinput.html | 647 ++++ docs/html/guideinputkeyboard.html | 715 ++++ docs/html/guidepreface.html | 170 + docs/html/guidethebasics.html | 165 + docs/html/guidetimeexamples.html | 173 + docs/html/guidevideo.html | 705 ++++ docs/html/guidevideoexamples.html | 473 +++ docs/html/index.html | 1049 ++++++ docs/html/joystick.html | 285 ++ docs/html/reference.html | 187 ++ docs/html/sdlactiveevent.html | 327 ++ docs/html/sdladdtimer.html | 275 ++ docs/html/sdlaudiocvt.html | 548 +++ docs/html/sdlaudiospec.html | 581 ++++ docs/html/sdlblitsurface.html | 322 ++ docs/html/sdlbuildaudiocvt.html | 283 ++ docs/html/sdlcd.html | 351 ++ docs/html/sdlcdclose.html | 209 ++ docs/html/sdlcdeject.html | 218 ++ docs/html/sdlcdname.html | 231 ++ docs/html/sdlcdnumdrives.html | 197 ++ docs/html/sdlcdopen.html | 267 ++ docs/html/sdlcdpause.html | 225 ++ docs/html/sdlcdplay.html | 235 ++ docs/html/sdlcdplaytracks.html | 317 ++ docs/html/sdlcdresume.html | 225 ++ docs/html/sdlcdstatus.html | 265 ++ docs/html/sdlcdstop.html | 218 ++ docs/html/sdlcdtrack.html | 305 ++ docs/html/sdlcloseaudio.html | 197 ++ docs/html/sdlcolor.html | 292 ++ docs/html/sdlcondbroadcast.html | 216 ++ docs/html/sdlcondsignal.html | 216 ++ docs/html/sdlcondwait.html | 223 ++ docs/html/sdlcondwaittimeout.html | 222 ++ docs/html/sdlconvertaudio.html | 399 +++ docs/html/sdlconvertsurface.html | 261 ++ docs/html/sdlcreatecond.html | 232 ++ docs/html/sdlcreatecursor.html | 390 +++ docs/html/sdlcreatemutex.html | 241 ++ docs/html/sdlcreatergbsurface.html | 332 ++ docs/html/sdlcreatergbsurfacefrom.html | 235 ++ docs/html/sdlcreatesemaphore.html | 295 ++ docs/html/sdlcreatethread.html | 215 ++ docs/html/sdlcreateyuvoverlay.html | 248 ++ docs/html/sdldelay.html | 203 ++ docs/html/sdldestroycond.html | 198 ++ docs/html/sdldestroymutex.html | 201 ++ docs/html/sdldestroysemaphore.html | 270 ++ docs/html/sdldisplayformat.html | 254 ++ docs/html/sdldisplayformatalpha.html | 234 ++ docs/html/sdldisplayyuvoverlay.html | 228 ++ docs/html/sdlenablekeyrepeat.html | 230 ++ docs/html/sdlenableunicode.html | 228 ++ docs/html/sdlevent.html | 942 ++++++ docs/html/sdleventstate.html | 268 ++ docs/html/sdlfillrect.html | 270 ++ docs/html/sdlflip.html | 251 ++ docs/html/sdlfreecursor.html | 201 ++ docs/html/sdlfreesurface.html | 211 ++ docs/html/sdlfreewav.html | 214 ++ docs/html/sdlfreeyuvoverlay.html | 225 ++ docs/html/sdlgetappstate.html | 255 ++ docs/html/sdlgetaudiostatus.html | 213 ++ docs/html/sdlgetcliprect.html | 221 ++ docs/html/sdlgetcursor.html | 211 ++ docs/html/sdlgeteventfilter.html | 227 ++ docs/html/sdlgetgammaramp.html | 211 ++ docs/html/sdlgetkeyname.html | 208 ++ docs/html/sdlgetkeystate.html | 245 ++ docs/html/sdlgetmodstate.html | 249 ++ docs/html/sdlgetmousestate.html | 245 ++ docs/html/sdlgetrelativemousestate.html | 227 ++ docs/html/sdlgetrgb.html | 223 ++ docs/html/sdlgetrgba.html | 214 ++ docs/html/sdlgetthreadid.html | 201 ++ docs/html/sdlgetticks.html | 198 ++ docs/html/sdlgetvideoinfo.html | 218 ++ docs/html/sdlgetvideosurface.html | 200 ++ docs/html/sdlglattr.html | 368 +++ docs/html/sdlglgetattribute.html | 239 ++ docs/html/sdlglgetprocaddress.html | 251 ++ docs/html/sdlglloadlibrary.html | 223 ++ docs/html/sdlglsetattribute.html | 278 ++ docs/html/sdlglswapbuffers.html | 204 ++ docs/html/sdlinit.html | 360 ++ docs/html/sdlinitsubsystem.html | 275 ++ docs/html/sdljoyaxisevent.html | 322 ++ docs/html/sdljoyballevent.html | 332 ++ docs/html/sdljoybuttonevent.html | 343 ++ docs/html/sdljoyhatevent.html | 405 +++ docs/html/sdljoystickclose.html | 215 ++ docs/html/sdljoystickeventstate.html | 282 ++ docs/html/sdljoystickgetaxis.html | 263 ++ docs/html/sdljoystickgetball.html | 254 ++ docs/html/sdljoystickgetbutton.html | 223 ++ docs/html/sdljoystickgethat.html | 289 ++ docs/html/sdljoystickindex.html | 210 ++ docs/html/sdljoystickname.html | 230 ++ docs/html/sdljoysticknumaxes.html | 217 ++ docs/html/sdljoysticknumballs.html | 217 ++ docs/html/sdljoysticknumbuttons.html | 217 ++ docs/html/sdljoysticknumhats.html | 217 ++ docs/html/sdljoystickopen.html | 251 ++ docs/html/sdljoystickopened.html | 225 ++ docs/html/sdljoystickupdate.html | 203 ++ docs/html/sdlkey.html | 2622 +++++++++++++++ docs/html/sdlkeyboardevent.html | 367 +++ docs/html/sdlkeysym.html | 347 ++ docs/html/sdlkillthread.html | 215 ++ docs/html/sdllistmodes.html | 302 ++ docs/html/sdlloadbmp.html | 211 ++ docs/html/sdlloadwav.html | 288 ++ docs/html/sdllockaudio.html | 200 ++ docs/html/sdllocksurface.html | 299 ++ docs/html/sdllockyuvoverlay.html | 244 ++ docs/html/sdlmaprgb.html | 246 ++ docs/html/sdlmaprgba.html | 234 ++ docs/html/sdlmixaudio.html | 210 ++ docs/html/sdlmousebuttonevent.html | 338 ++ docs/html/sdlmousemotionevent.html | 357 ++ docs/html/sdlmutexp.html | 233 ++ docs/html/sdlmutexv.html | 227 ++ docs/html/sdlnumjoysticks.html | 214 ++ docs/html/sdlopenaudio.html | 567 ++++ docs/html/sdloverlay.html | 354 ++ docs/html/sdlpalette.html | 293 ++ docs/html/sdlpauseaudio.html | 213 ++ docs/html/sdlpeepevents.html | 296 ++ docs/html/sdlpixelformat.html | 514 +++ docs/html/sdlpollevent.html | 261 ++ docs/html/sdlpumpevents.html | 236 ++ docs/html/sdlpushevent.html | 258 ++ docs/html/sdlquit.html | 236 ++ docs/html/sdlquitevent.html | 255 ++ docs/html/sdlquitsubsystem.html | 240 ++ docs/html/sdlrect.html | 250 ++ docs/html/sdlremovetimer.html | 228 ++ docs/html/sdlresizeevent.html | 299 ++ docs/html/sdlsavebmp.html | 228 ++ docs/html/sdlsempost.html | 291 ++ docs/html/sdlsemtrywait.html | 311 ++ docs/html/sdlsemvalue.html | 265 ++ docs/html/sdlsemwait.html | 290 ++ docs/html/sdlsemwaittimeout.html | 314 ++ docs/html/sdlsetalpha.html | 440 +++ docs/html/sdlsetcliprect.html | 233 ++ docs/html/sdlsetcolorkey.html | 313 ++ docs/html/sdlsetcolors.html | 350 ++ docs/html/sdlsetcursor.html | 214 ++ docs/html/sdlseteventfilter.html | 273 ++ docs/html/sdlsetgamma.html | 223 ++ docs/html/sdlsetgammaramp.html | 222 ++ docs/html/sdlsetmodstate.html | 229 ++ docs/html/sdlsetpalette.html | 344 ++ docs/html/sdlsettimer.html | 261 ++ docs/html/sdlsetvideomode.html | 486 +++ docs/html/sdlshowcursor.html | 231 ++ docs/html/sdlsurface.html | 614 ++++ docs/html/sdlsyswmevent.html | 224 ++ docs/html/sdlthreadid.html | 182 + docs/html/sdlunlockaudio.html | 203 ++ docs/html/sdlunlocksurface.html | 211 ++ docs/html/sdlunlockyuvoverlay.html | 217 ++ docs/html/sdlupdaterect.html | 257 ++ docs/html/sdlupdaterects.html | 229 ++ docs/html/sdluserevent.html | 329 ++ docs/html/sdlvideodrivername.html | 235 ++ docs/html/sdlvideoinfo.html | 400 +++ docs/html/sdlvideomodeok.html | 262 ++ docs/html/sdlwaitevent.html | 223 ++ docs/html/sdlwaitthread.html | 223 ++ docs/html/sdlwarpmouse.html | 197 ++ docs/html/sdlwasinit.html | 276 ++ docs/html/sdlwmgetcaption.html | 214 ++ docs/html/sdlwmgrabinput.html | 216 ++ docs/html/sdlwmiconifywindow.html | 203 ++ docs/html/sdlwmsetcaption.html | 204 ++ docs/html/sdlwmseticon.html | 244 ++ docs/html/sdlwmtogglefullscreen.html | 197 ++ docs/html/thread.html | 305 ++ docs/html/time.html | 198 ++ docs/html/video.html | 499 +++ docs/html/wm.html | 180 + docs/images/rainbow.gif | Bin 0 -> 1715 bytes docs/index.html | 121 + docs/man3/.cvsignore | 2 + docs/man3/Makefile.am | 174 + docs/man3/SDLKey.3 | 161 + docs/man3/SDL_ActiveEvent.3 | 38 + docs/man3/SDL_AddTimer.3 | 38 + docs/man3/SDL_AudioCVT.3 | 68 + docs/man3/SDL_AudioSpec.3 | 70 + docs/man3/SDL_BlitSurface.3 | 45 + docs/man3/SDL_BuildAudioCVT.3 | 23 + docs/man3/SDL_CD.3 | 57 + docs/man3/SDL_CDClose.3 | 15 + docs/man3/SDL_CDEject.3 | 18 + docs/man3/SDL_CDName.3 | 23 + docs/man3/SDL_CDNumDrives.3 | 15 + docs/man3/SDL_CDOpen.3 | 58 + docs/man3/SDL_CDPause.3 | 18 + docs/man3/SDL_CDPlay.3 | 18 + docs/man3/SDL_CDPlayTracks.3 | 47 + docs/man3/SDL_CDResume.3 | 18 + docs/man3/SDL_CDStatus.3 | 59 + docs/man3/SDL_CDStop.3 | 18 + docs/man3/SDL_CDtrack.3 | 40 + docs/man3/SDL_CloseAudio.3 | 15 + docs/man3/SDL_Color.3 | 34 + docs/man3/SDL_CondBroadcast.3 | 16 + docs/man3/SDL_CondSignal.3 | 16 + docs/man3/SDL_CondWait.3 | 16 + docs/man3/SDL_CondWaitTimeout.3 | 16 + docs/man3/SDL_ConvertAudio.3 | 95 + docs/man3/SDL_ConvertSurface.3 | 22 + docs/man3/SDL_CreateCond.3 | 31 + docs/man3/SDL_CreateCursor.3 | 120 + docs/man3/SDL_CreateMutex.3 | 43 + docs/man3/SDL_CreateRGBSurface.3 | 29 + docs/man3/SDL_CreateRGBSurfaceFrom.3 | 19 + docs/man3/SDL_CreateSemaphore.3 | 32 + docs/man3/SDL_CreateThread.3 | 16 + docs/man3/SDL_CreateYUVOverlay.3 | 17 + docs/man3/SDL_Delay.3 | 15 + docs/man3/SDL_DestroyCond.3 | 16 + docs/man3/SDL_DestroyMutex.3 | 16 + docs/man3/SDL_DestroySemaphore.3 | 26 + docs/man3/SDL_DisplayFormat.3 | 22 + docs/man3/SDL_DisplayFormatAlpha.3 | 20 + docs/man3/SDL_DisplayYUVOverlay.3 | 15 + docs/man3/SDL_EnableKeyRepeat.3 | 17 + docs/man3/SDL_EnableUNICODE.3 | 20 + docs/man3/SDL_Event.3 | 175 + docs/man3/SDL_EventState.3 | 23 + docs/man3/SDL_FillRect.3 | 22 + docs/man3/SDL_Flip.3 | 20 + docs/man3/SDL_FreeCursor.3 | 15 + docs/man3/SDL_FreeSurface.3 | 15 + docs/man3/SDL_FreeWAV.3 | 15 + docs/man3/SDL_FreeYUVOverlay.3 | 15 + docs/man3/SDL_GL_GetAttribute.3 | 18 + docs/man3/SDL_GL_GetProcAddress.3 | 48 + docs/man3/SDL_GL_LoadLibrary.3 | 15 + docs/man3/SDL_GL_SetAttribute.3 | 40 + docs/man3/SDL_GL_SwapBuffers.3 | 15 + docs/man3/SDL_GLattr.3 | 47 + docs/man3/SDL_GetAppState.3 | 24 + docs/man3/SDL_GetAudioStatus.3 | 24 + docs/man3/SDL_GetClipRect.3 | 17 + docs/man3/SDL_GetCursor.3 | 15 + docs/man3/SDL_GetEventFilter.3 | 23 + docs/man3/SDL_GetGamma.3 | 21 + docs/man3/SDL_GetGammaRamp.3 | 20 + docs/man3/SDL_GetKeyName.3 | 15 + docs/man3/SDL_GetKeyState.3 | 30 + docs/man3/SDL_GetModState.3 | 54 + docs/man3/SDL_GetMouseState.3 | 24 + docs/man3/SDL_GetRGB.3 | 17 + docs/man3/SDL_GetRGBA.3 | 19 + docs/man3/SDL_GetRelativeMouseState.3 | 15 + docs/man3/SDL_GetThreadID.3 | 16 + docs/man3/SDL_GetTicks.3 | 15 + docs/man3/SDL_GetVideoInfo.3 | 15 + docs/man3/SDL_GetVideoSurface.3 | 15 + docs/man3/SDL_Init.3 | 41 + docs/man3/SDL_InitSubSystem.3 | 41 + docs/man3/SDL_JoyAxisEvent.3 | 36 + docs/man3/SDL_JoyBallEvent.3 | 36 + docs/man3/SDL_JoyButtonEvent.3 | 36 + docs/man3/SDL_JoyHatEvent.3 | 56 + docs/man3/SDL_JoystickClose.3 | 15 + docs/man3/SDL_JoystickEventState.3 | 24 + docs/man3/SDL_JoystickGetAxis.3 | 32 + docs/man3/SDL_JoystickGetBall.3 | 37 + docs/man3/SDL_JoystickGetButton.3 | 18 + docs/man3/SDL_JoystickGetHat.3 | 36 + docs/man3/SDL_JoystickIndex.3 | 18 + docs/man3/SDL_JoystickName.3 | 32 + docs/man3/SDL_JoystickNumAxes.3 | 18 + docs/man3/SDL_JoystickNumBalls.3 | 18 + docs/man3/SDL_JoystickNumButtons.3 | 18 + docs/man3/SDL_JoystickNumHats.3 | 18 + docs/man3/SDL_JoystickOpen.3 | 51 + docs/man3/SDL_JoystickOpened.3 | 18 + docs/man3/SDL_JoystickUpdate.3 | 15 + docs/man3/SDL_KeyboardEvent.3 | 38 + docs/man3/SDL_KillThread.3 | 16 + docs/man3/SDL_ListModes.3 | 53 + docs/man3/SDL_LoadBMP.3 | 18 + docs/man3/SDL_LoadWAV.3 | 42 + docs/man3/SDL_LockAudio.3 | 15 + docs/man3/SDL_LockSurface.3 | 49 + docs/man3/SDL_LockYUVOverlay.3 | 18 + docs/man3/SDL_MapRGB.3 | 22 + docs/man3/SDL_MapRGBA.3 | 22 + docs/man3/SDL_MixAudio.3 | 15 + docs/man3/SDL_MouseButtonEvent.3 | 36 + docs/man3/SDL_MouseMotionEvent.3 | 38 + docs/man3/SDL_NumJoysticks.3 | 18 + docs/man3/SDL_OpenAudio.3 | 94 + docs/man3/SDL_Overlay.3 | 52 + docs/man3/SDL_Palette.3 | 26 + docs/man3/SDL_PauseAudio.3 | 15 + docs/man3/SDL_PeepEvents.3 | 26 + docs/man3/SDL_PixelFormat.3 | 140 + docs/man3/SDL_PollEvent.3 | 44 + docs/man3/SDL_PumpEvents.3 | 23 + docs/man3/SDL_PushEvent.3 | 27 + docs/man3/SDL_Quit.3 | 29 + docs/man3/SDL_QuitEvent.3 | 30 + docs/man3/SDL_QuitSubSystem.3 | 15 + docs/man3/SDL_RWFromFile.3 | 18 + docs/man3/SDL_Rect.3 | 26 + docs/man3/SDL_RemoveTimer.3 | 25 + docs/man3/SDL_ResizeEvent.3 | 28 + docs/man3/SDL_SaveBMP.3 | 18 + docs/man3/SDL_SemPost.3 | 28 + docs/man3/SDL_SemTryWait.3 | 41 + docs/man3/SDL_SemValue.3 | 26 + docs/man3/SDL_SemWait.3 | 34 + docs/man3/SDL_SemWaitTimeout.3 | 41 + docs/man3/SDL_SetAlpha.3 | 55 + docs/man3/SDL_SetClipRect.3 | 19 + docs/man3/SDL_SetColorKey.3 | 26 + docs/man3/SDL_SetColors.3 | 57 + docs/man3/SDL_SetCursor.3 | 15 + docs/man3/SDL_SetEventFilter.3 | 35 + docs/man3/SDL_SetGamma.3 | 22 + docs/man3/SDL_SetGammaRamp.3 | 22 + docs/man3/SDL_SetModState.3 | 35 + docs/man3/SDL_SetPalette.3 | 59 + docs/man3/SDL_SetTimer.3 | 39 + docs/man3/SDL_SetVideoMode.3 | 61 + docs/man3/SDL_ShowCursor.3 | 20 + docs/man3/SDL_Surface.3 | 109 + docs/man3/SDL_SysWMEvent.3 | 21 + docs/man3/SDL_ThreadID.3 | 13 + docs/man3/SDL_UnlockAudio.3 | 15 + docs/man3/SDL_UnlockSurface.3 | 17 + docs/man3/SDL_UnlockYUVOverlay.3 | 15 + docs/man3/SDL_UpdateRect.3 | 19 + docs/man3/SDL_UpdateRects.3 | 17 + docs/man3/SDL_UserEvent.3 | 47 + docs/man3/SDL_VideoDriverName.3 | 18 + docs/man3/SDL_VideoInfo.3 | 62 + docs/man3/SDL_VideoModeOK.3 | 44 + docs/man3/SDL_WM_GetCaption.3 | 15 + docs/man3/SDL_WM_GrabInput.3 | 28 + docs/man3/SDL_WM_IconifyWindow.3 | 15 + docs/man3/SDL_WM_SetCaption.3 | 15 + docs/man3/SDL_WM_SetIcon.3 | 27 + docs/man3/SDL_WM_ToggleFullScreen.3 | 15 + docs/man3/SDL_WaitEvent.3 | 17 + docs/man3/SDL_WaitThread.3 | 19 + docs/man3/SDL_WarpMouse.3 | 15 + docs/man3/SDL_WasInit.3 | 63 + docs/man3/SDL_keysym.3 | 69 + docs/man3/SDL_mutexP.3 | 18 + docs/man3/SDL_mutexV.3 | 18 + include/.cvsignore | 2 + include/Makefile.am | 33 + include/SDL.h | 97 + include/SDL_active.h | 60 + include/SDL_audio.h | 260 ++ include/SDL_byteorder.h | 51 + include/SDL_cdrom.h | 175 + include/SDL_copying.h | 27 + include/SDL_endian.h | 149 + include/SDL_error.h | 62 + include/SDL_events.h | 334 ++ include/SDL_getenv.h | 30 + include/SDL_joystick.h | 171 + include/SDL_keyboard.h | 124 + include/SDL_keysym.h | 315 ++ include/SDL_main.h | 97 + include/SDL_mouse.h | 136 + include/SDL_mutex.h | 163 + include/SDL_quit.h | 52 + include/SDL_rwops.h | 113 + include/SDL_syswm.h | 150 + include/SDL_thread.h | 79 + include/SDL_timer.h | 118 + include/SDL_types.h | 87 + include/SDL_version.h | 90 + include/SDL_video.h | 887 +++++ include/begin_code.h | 86 + include/close_code.h | 36 + install-sh | 251 ++ ltconfig | 3123 ++++++++++++++++++ ltmain.sh | 4024 +++++++++++++++++++++++ missing | 190 ++ mkinstalldirs | 40 + sdl-config.in | 65 + sdl.m4 | 168 + src/.cvsignore | 6 + src/Makefile.am | 41 + src/SDL.c | 233 ++ src/SDL_error.c | 340 ++ src/SDL_error_c.h | 62 + src/SDL_fatal.c | 160 + src/SDL_fatal.h | 32 + src/SDL_getenv.c | 171 + src/audio/.cvsignore | 6 + src/audio/Makefile.am | 29 + src/audio/SDL_audio.c | 516 +++ src/audio/SDL_audio_c.h | 38 + src/audio/SDL_audiocvt.c | 642 ++++ src/audio/SDL_audiodev.c | 182 + src/audio/SDL_audiodev_c.h | 30 + src/audio/SDL_audiomem.c | 73 + src/audio/SDL_audiomem.h | 34 + src/audio/SDL_mixer.c | 217 ++ src/audio/SDL_sysaudio.h | 142 + src/audio/SDL_wave.c | 591 ++++ src/audio/SDL_wave.h | 65 + src/audio/alsa/.cvsignore | 6 + src/audio/alsa/Makefile.am | 9 + src/audio/alsa/SDL_alsa_audio.c | 521 +++ src/audio/alsa/SDL_alsa_audio.h | 61 + src/audio/amigaos/Makefile.am | 8 + src/audio/amigaos/SDL_ahiaudio.c | 299 ++ src/audio/amigaos/SDL_audio.c | 532 +++ src/audio/amigaos/SDL_lowaudio.h | 58 + src/audio/amigaos/SDL_sysaudio.h | 142 + src/audio/arts/.cvsignore | 6 + src/audio/arts/Makefile.am | 9 + src/audio/arts/SDL_artsaudio.c | 247 ++ src/audio/arts/SDL_artsaudio.h | 63 + src/audio/baudio/.cvsignore | 6 + src/audio/baudio/Makefile.am | 9 + src/audio/baudio/SDL_beaudio.cc | 211 ++ src/audio/baudio/SDL_beaudio.h | 43 + src/audio/dma/.cvsignore | 6 + src/audio/dma/Makefile.am | 9 + src/audio/dma/SDL_dmaaudio.c | 466 +++ src/audio/dma/SDL_dmaaudio.h | 63 + src/audio/dmedia/.cvsignore | 6 + src/audio/dmedia/Makefile.am | 9 + src/audio/dmedia/SDL_irixaudio.c | 201 ++ src/audio/dmedia/SDL_irixaudio.h | 49 + src/audio/dsp/.cvsignore | 6 + src/audio/dsp/Makefile.am | 9 + src/audio/dsp/SDL_dspaudio.c | 450 +++ src/audio/dsp/SDL_dspaudio.h | 61 + src/audio/esd/.cvsignore | 6 + src/audio/esd/Makefile.am | 9 + src/audio/esd/SDL_esdaudio.c | 260 ++ src/audio/esd/SDL_esdaudio.h | 61 + src/audio/macrom/.cvsignore | 6 + src/audio/macrom/Makefile.am | 9 + src/audio/macrom/SDL_romaudio.c | 439 +++ src/audio/macrom/SDL_romaudio.h | 49 + src/audio/nas/.cvsignore | 6 + src/audio/nas/Makefile.am | 9 + src/audio/nas/SDL_nasaudio.c | 308 ++ src/audio/nas/SDL_nasaudio.h | 61 + src/audio/nto/.cvsignore | 6 + src/audio/nto/Makefile.am | 9 + src/audio/nto/SDL_nto_audio.c | 554 ++++ src/audio/nto/SDL_nto_audio.h | 55 + src/audio/paudio/.cvsignore | 6 + src/audio/paudio/Makefile.am | 9 + src/audio/paudio/SDL_paudio.c | 519 +++ src/audio/paudio/SDL_paudio.h | 61 + src/audio/sun/.cvsignore | 6 + src/audio/sun/Makefile.am | 9 + src/audio/sun/SDL_sunaudio.c | 439 +++ src/audio/sun/SDL_sunaudio.h | 59 + src/audio/ums/.cvsignore | 6 + src/audio/ums/Makefile.am | 9 + src/audio/ums/SDL_umsaudio.c | 555 ++++ src/audio/ums/SDL_umsaudio.h | 54 + src/audio/windib/.cvsignore | 6 + src/audio/windib/Makefile.am | 9 + src/audio/windib/SDL_dibaudio.c | 298 ++ src/audio/windib/SDL_dibaudio.h | 53 + src/audio/windx5/.cvsignore | 6 + src/audio/windx5/Makefile.am | 9 + src/audio/windx5/SDL_dx5audio.c | 677 ++++ src/audio/windx5/SDL_dx5audio.h | 59 + src/cdrom/.cvsignore | 7 + src/cdrom/Makefile.am | 27 + src/cdrom/SDL_cdrom.c | 350 ++ src/cdrom/SDL_syscdrom.h | 80 + src/cdrom/aix/SDL_syscdrom.c | 663 ++++ src/cdrom/beos/SDL_syscdrom.c | 398 +++ src/cdrom/dummy/SDL_syscdrom.c | 42 + src/cdrom/freebsd/SDL_syscdrom.c | 411 +++ src/cdrom/linux/SDL_syscdrom.c | 528 +++ src/cdrom/macos/SDL_syscdrom.c | 526 +++ src/cdrom/macos/SDL_syscdrom_c.h | 139 + src/cdrom/openbsd/SDL_syscdrom.c | 410 +++ src/cdrom/qnx/SDL_syscdrom.c | 404 +++ src/cdrom/win32/SDL_syscdrom.c | 377 +++ src/endian/.cvsignore | 6 + src/endian/Makefile.am | 11 + src/endian/SDL_endian.c | 104 + src/events/.cvsignore | 6 + src/events/Makefile.am | 19 + src/events/SDL_active.c | 95 + src/events/SDL_events.c | 475 +++ src/events/SDL_events_c.h | 78 + src/events/SDL_expose.c | 55 + src/events/SDL_keyboard.c | 572 ++++ src/events/SDL_mouse.c | 247 ++ src/events/SDL_quit.c | 84 + src/events/SDL_resize.c | 76 + src/events/SDL_sysevents.h | 42 + src/file/.cvsignore | 6 + src/file/Makefile.am | 11 + src/file/SDL_rwops.c | 274 ++ src/hermes/.cvsignore | 6 + src/hermes/COPYING.LIB | 438 +++ src/hermes/HeadMMX.h | 101 + src/hermes/HeadX86.h | 195 ++ src/hermes/Makefile.am | 33 + src/hermes/README | 13 + src/hermes/mmx_main.asm | 74 + src/hermes/mmxp2_32.asm | 386 +++ src/hermes/x86_main.asm | 125 + src/hermes/x86p_16.asm | 496 +++ src/hermes/x86p_32.asm | 1043 ++++++ src/joystick/.cvsignore | 6 + src/joystick/Makefile.am | 20 + src/joystick/SDL_joystick.c | 582 ++++ src/joystick/SDL_joystick_c.h | 42 + src/joystick/SDL_sysjoystick.h | 86 + src/joystick/beos/.cvsignore | 6 + src/joystick/beos/Makefile.am | 8 + src/joystick/beos/SDL_bejoystick.cc | 242 ++ src/joystick/dummy/.cvsignore | 6 + src/joystick/dummy/Makefile.am | 8 + src/joystick/dummy/SDL_sysjoystick.c | 87 + src/joystick/linux/.cvsignore | 6 + src/joystick/linux/Makefile.am | 8 + src/joystick/linux/SDL_sysjoystick.c | 742 +++++ src/joystick/macos/.cvsignore | 6 + src/joystick/macos/Makefile.am | 8 + src/joystick/macos/SDL_sysjoystick.c | 322 ++ src/joystick/win32/.cvsignore | 6 + src/joystick/win32/Makefile.am | 8 + src/joystick/win32/SDL_mmjoystick.c | 328 ++ src/main/.cvsignore | 7 + src/main/Makefile.am | 41 + src/main/beos/SDL_BeApp.cc | 121 + src/main/beos/SDL_BeApp.h | 37 + src/main/beos/exports/Makefile | 33 + src/main/beos/exports/SDL.exp | 176 + src/main/beos/exports/genexp.pl | 20 + src/main/dummy.c | 4 + src/main/linux/SDL_main.c | 13 + src/main/macos/SDL.r | 58 + src/main/macos/SDL_main.c | 562 ++++ src/main/macos/SIZE.r | 24 + src/main/macos/exports/Makefile | 35 + src/main/macos/exports/SDL.x | 177 + src/main/macos/exports/gendef.pl | 22 + src/main/win32/SDL_main.c | 242 ++ src/main/win32/exports/Makefile | 35 + src/main/win32/exports/SDL.def | 177 + src/main/win32/exports/gendef.pl | 22 + src/thread/.cvsignore | 9 + src/thread/Makefile.am | 43 + src/thread/SDL_systhread.h | 48 + src/thread/SDL_thread.c | 300 ++ src/thread/SDL_thread_c.h | 49 + src/thread/amigaos/SDL_syssem.c | 166 + src/thread/amigaos/SDL_systhread.c | 107 + src/thread/amigaos/SDL_systhread_c.h | 48 + src/thread/amigaos/SDL_thread.c | 275 ++ src/thread/beos/SDL_syssem.c | 141 + src/thread/beos/SDL_systhread.c | 101 + src/thread/beos/SDL_systhread_c.h | 35 + src/thread/generic/SDL_syscond.c | 223 ++ src/thread/generic/SDL_syscond_c.h | 27 + src/thread/generic/SDL_sysmutex.c | 137 + src/thread/generic/SDL_sysmutex_c.h | 27 + src/thread/generic/SDL_syssem.c | 214 ++ src/thread/generic/SDL_syssem_c.h | 27 + src/thread/generic/SDL_systhread.c | 59 + src/thread/generic/SDL_systhread_c.h | 26 + src/thread/irix/SDL_systhread.c | 91 + src/thread/irix/SDL_systhread_c.h | 26 + src/thread/linux/SDL_syscond.c | 189 ++ src/thread/linux/SDL_sysmutex.c | 181 + src/thread/linux/SDL_sysmutex_c.h | 43 + src/thread/linux/SDL_syssem.c | 445 +++ src/thread/linux/SDL_systhread.c | 255 ++ src/thread/linux/SDL_systhread_c.h | 35 + src/thread/linux/clone.S | 186 ++ src/thread/win32/SDL_sysmutex.c | 101 + src/thread/win32/SDL_syssem.c | 195 ++ src/thread/win32/SDL_systhread.c | 80 + src/thread/win32/SDL_systhread_c.h | 26 + src/timer/.cvsignore | 7 + src/timer/Makefile.am | 27 + src/timer/SDL_systimer.h | 46 + src/timer/SDL_timer_c.h | 52 + src/timer/amigaos/SDL_systimer.c | 145 + src/timer/beos/SDL_systimer.c | 96 + src/timer/linux/SDL_systimer.c | 222 ++ src/timer/macos/FastTimes.c | 347 ++ src/timer/macos/FastTimes.h | 26 + src/timer/macos/SDL_MPWtimer.c | 152 + src/timer/macos/SDL_systimer.c | 178 + src/timer/win32/SDL_systimer.c | 181 + src/video/.cvsignore | 6 + src/video/Makefile.am | 49 + src/video/SDL_RLEaccel.c | 1547 +++++++++ src/video/SDL_RLEaccel_c.h | 35 + src/video/SDL_blit.c | 294 ++ src/video/SDL_blit.h | 437 +++ src/video/SDL_blit_0.c | 475 +++ src/video/SDL_blit_1.c | 530 +++ src/video/SDL_blit_A.c | 633 ++++ src/video/SDL_blit_A.h | 30 + src/video/SDL_blit_N.c | 1607 +++++++++ src/video/SDL_bmp.c | 527 +++ src/video/SDL_cursor.c | 743 +++++ src/video/SDL_cursor_c.h | 77 + src/video/SDL_gamma.c | 242 ++ src/video/SDL_glfuncs.h | 341 ++ src/video/SDL_leaks.h | 35 + src/video/SDL_memops.h | 127 + src/video/SDL_pixels.c | 619 ++++ src/video/SDL_pixels_c.h | 50 + src/video/SDL_stretch.c | 312 ++ src/video/SDL_stretch_c.h | 33 + src/video/SDL_surface.c | 820 +++++ src/video/SDL_sysvideo.h | 382 +++ src/video/SDL_video.c | 1783 ++++++++++ src/video/SDL_yuv.c | 93 + src/video/SDL_yuv_mmx.c | 421 +++ src/video/SDL_yuv_sw.c | 1313 ++++++++ src/video/SDL_yuv_sw_c.h | 41 + src/video/SDL_yuvfuncs.h | 41 + src/video/aalib/.cvsignore | 6 + src/video/aalib/Makefile.am | 15 + src/video/aalib/SDL_aaevents.c | 202 ++ src/video/aalib/SDL_aaevents_c.h | 39 + src/video/aalib/SDL_aamouse.c | 40 + src/video/aalib/SDL_aamouse_c.h | 30 + src/video/aalib/SDL_aavideo.c | 396 +++ src/video/aalib/SDL_aavideo.h | 70 + src/video/blank_cursor.h | 38 + src/video/bwindow/.cvsignore | 6 + src/video/bwindow/Makefile.am | 19 + src/video/bwindow/SDL_BView.h | 107 + src/video/bwindow/SDL_BWin.h | 212 ++ src/video/bwindow/SDL_lowvideo.h | 70 + src/video/bwindow/SDL_sysevents.cc | 433 +++ src/video/bwindow/SDL_sysevents_c.h | 35 + src/video/bwindow/SDL_sysmouse.cc | 146 + src/video/bwindow/SDL_sysmouse_c.h | 36 + src/video/bwindow/SDL_sysvideo.cc | 673 ++++ src/video/bwindow/SDL_syswm.cc | 39 + src/video/bwindow/SDL_syswm_c.h | 32 + src/video/cybergfx/.cvsignore | 6 + src/video/cybergfx/Makefile.am | 23 + src/video/cybergfx/SDL_amigaevents.c | 518 +++ src/video/cybergfx/SDL_amigaevents_c.h | 33 + src/video/cybergfx/SDL_amigamouse.c | 118 + src/video/cybergfx/SDL_amigamouse_c.h | 36 + src/video/cybergfx/SDL_cgxaccel.c | 237 ++ src/video/cybergfx/SDL_cgxgl.c | 389 +++ src/video/cybergfx/SDL_cgxgl_c.h | 98 + src/video/cybergfx/SDL_cgximage.c | 885 +++++ src/video/cybergfx/SDL_cgximage_c.h | 40 + src/video/cybergfx/SDL_cgxmodes.c | 331 ++ src/video/cybergfx/SDL_cgxmodes_c.h | 44 + src/video/cybergfx/SDL_cgxvideo.c | 1221 +++++++ src/video/cybergfx/SDL_cgxvideo.h | 179 + src/video/cybergfx/SDL_cgxwm.c | 331 ++ src/video/cybergfx/SDL_cgxwm_c.h | 37 + src/video/default_cursor.h | 121 + src/video/dga/.cvsignore | 6 + src/video/dga/Makefile.am | 14 + src/video/dga/SDL_dgaevents.c | 109 + src/video/dga/SDL_dgaevents_c.h | 32 + src/video/dga/SDL_dgamouse.c | 40 + src/video/dga/SDL_dgamouse_c.h | 30 + src/video/dga/SDL_dgavideo.c | 973 ++++++ src/video/dga/SDL_dgavideo.h | 106 + src/video/fbcon/.cvsignore | 6 + src/video/fbcon/3dfx_mmio.h | 60 + src/video/fbcon/3dfx_regs.h | 87 + src/video/fbcon/Makefile.am | 25 + src/video/fbcon/SDL_fb3dfx.c | 204 ++ src/video/fbcon/SDL_fb3dfx.h | 33 + src/video/fbcon/SDL_fbelo.c | 423 +++ src/video/fbcon/SDL_fbelo.h | 55 + src/video/fbcon/SDL_fbevents.c | 1069 ++++++ src/video/fbcon/SDL_fbevents_c.h | 42 + src/video/fbcon/SDL_fbkeys.h | 139 + src/video/fbcon/SDL_fbmatrox.c | 278 ++ src/video/fbcon/SDL_fbmatrox.h | 33 + src/video/fbcon/SDL_fbmouse.c | 40 + src/video/fbcon/SDL_fbmouse_c.h | 30 + src/video/fbcon/SDL_fbvideo.c | 1417 ++++++++ src/video/fbcon/SDL_fbvideo.h | 135 + src/video/fbcon/matrox_mmio.h | 55 + src/video/fbcon/matrox_regs.h | 376 +++ src/video/ggi/.cvsignore | 6 + src/video/ggi/Makefile.am | 16 + src/video/ggi/SDL_ggievents.c | 271 ++ src/video/ggi/SDL_ggievents_c.h | 33 + src/video/ggi/SDL_ggikeys.h | 135 + src/video/ggi/SDL_ggimouse.c | 39 + src/video/ggi/SDL_ggimouse_c.h | 30 + src/video/ggi/SDL_ggivideo.c | 380 +++ src/video/ggi/SDL_ggivideo.h | 52 + src/video/maccommon/.cvsignore | 6 + src/video/maccommon/Makefile.am | 18 + src/video/maccommon/SDL_lowvideo.h | 108 + src/video/maccommon/SDL_macevents.c | 677 ++++ src/video/maccommon/SDL_macevents_c.h | 36 + src/video/maccommon/SDL_macgl.c | 149 + src/video/maccommon/SDL_macgl_c.h | 48 + src/video/maccommon/SDL_mackeys.h | 145 + src/video/maccommon/SDL_macmouse.c | 130 + src/video/maccommon/SDL_macmouse_c.h | 38 + src/video/maccommon/SDL_macwm.c | 48 + src/video/maccommon/SDL_macwm_c.h | 32 + src/video/macdsp/.cvsignore | 6 + src/video/macdsp/Makefile.am | 10 + src/video/macdsp/SDL_dspvideo.c | 1386 ++++++++ src/video/macdsp/SDL_dspvideo.h | 58 + src/video/macrom/.cvsignore | 6 + src/video/macrom/Makefile.am | 10 + src/video/macrom/SDL_romvideo.c | 730 ++++ src/video/macrom/SDL_romvideo.h | 33 + src/video/photon/.cvsignore | 6 + src/video/photon/Makefile.am | 21 + src/video/photon/SDL_ph_events.c | 563 ++++ src/video/photon/SDL_ph_events_c.h | 34 + src/video/photon/SDL_ph_image.c | 348 ++ src/video/photon/SDL_ph_image_c.h | 42 + src/video/photon/SDL_ph_modes.c | 488 +++ src/video/photon/SDL_ph_modes_c.h | 47 + src/video/photon/SDL_ph_mouse.c | 177 + src/video/photon/SDL_ph_mouse_c.h | 37 + src/video/photon/SDL_ph_video.c | 496 +++ src/video/photon/SDL_ph_video.h | 172 + src/video/photon/SDL_ph_wm.c | 363 ++ src/video/photon/SDL_ph_wm_c.h | 37 + src/video/photon/SDL_phyuv.c | 659 ++++ src/video/photon/SDL_phyuv_c.h | 41 + src/video/svga/.cvsignore | 6 + src/video/svga/Makefile.am | 15 + src/video/svga/SDL_svgaevents.c | 419 +++ src/video/svga/SDL_svgaevents_c.h | 39 + src/video/svga/SDL_svgamouse.c | 40 + src/video/svga/SDL_svgamouse_c.h | 30 + src/video/svga/SDL_svgavideo.c | 471 +++ src/video/svga/SDL_svgavideo.h | 49 + src/video/wincommon/.cvsignore | 6 + src/video/wincommon/Makefile.am | 17 + src/video/wincommon/SDL_lowvideo.h | 84 + src/video/wincommon/SDL_sysevents.c | 547 +++ src/video/wincommon/SDL_sysmouse.c | 263 ++ src/video/wincommon/SDL_sysmouse_c.h | 37 + src/video/wincommon/SDL_syswm.c | 276 ++ src/video/wincommon/SDL_syswm_c.h | 39 + src/video/wincommon/SDL_wingl.c | 287 ++ src/video/wincommon/SDL_wingl_c.h | 69 + src/video/wincommon/wmmsg.h | 1030 ++++++ src/video/windib/.cvsignore | 6 + src/video/windib/Makefile.am | 13 + src/video/windib/SDL_dibevents.c | 343 ++ src/video/windib/SDL_dibevents_c.h | 39 + src/video/windib/SDL_dibvideo.c | 925 ++++++ src/video/windib/SDL_dibvideo.h | 51 + src/video/windib/SDL_vkeys.h | 78 + src/video/windx5/.cvsignore | 6 + src/video/windx5/Makefile.am | 15 + src/video/windx5/SDL_dx5events.c | 780 +++++ src/video/windx5/SDL_dx5events_c.h | 41 + src/video/windx5/SDL_dx5video.c | 2323 +++++++++++++ src/video/windx5/SDL_dx5video.h | 65 + src/video/windx5/SDL_dx5yuv.c | 302 ++ src/video/windx5/SDL_dx5yuv_c.h | 42 + src/video/windx5/directx.h | 83 + src/video/x11/.cvsignore | 6 + src/video/x11/Makefile.am | 28 + src/video/x11/SDL_x11dga.c | 96 + src/video/x11/SDL_x11dga_c.h | 37 + src/video/x11/SDL_x11events.c | 880 +++++ src/video/x11/SDL_x11events_c.h | 34 + src/video/x11/SDL_x11gamma.c | 147 + src/video/x11/SDL_x11gamma_c.h | 36 + src/video/x11/SDL_x11gl.c | 413 +++ src/video/x11/SDL_x11gl_c.h | 98 + src/video/x11/SDL_x11image.c | 456 +++ src/video/x11/SDL_x11image_c.h | 42 + src/video/x11/SDL_x11modes.c | 534 +++ src/video/x11/SDL_x11modes_c.h | 47 + src/video/x11/SDL_x11mouse.c | 273 ++ src/video/x11/SDL_x11mouse_c.h | 37 + src/video/x11/SDL_x11video.c | 1269 +++++++ src/video/x11/SDL_x11video.h | 190 ++ src/video/x11/SDL_x11wm.c | 344 ++ src/video/x11/SDL_x11wm_c.h | 37 + src/video/x11/SDL_x11yuv.c | 280 ++ src/video/x11/SDL_x11yuv_c.h | 45 + strip_fPIC.sh | 15 + test/.cvsignore | 1 + test/.gdbinit | 3 + test/COPYING | 8 + test/Makefile.am | 16 + test/README | 25 + test/acinclude.m4 | 168 + test/autogen.sh | 9 + test/checkkeys.c | 124 + test/config.guess | 1289 ++++++++ test/config.sub | 1328 ++++++++ test/configure.in | 86 + test/graywin.c | 183 ++ test/icon.bmp | Bin 0 -> 578 bytes test/install-sh | 251 ++ test/loopwave.c | 102 + test/missing | 190 ++ test/mkinstalldirs | 40 + test/picture.xbm | 14 + test/sail.bmp | Bin 0 -> 15858 bytes test/sample.bmp | Bin 0 -> 69202 bytes test/sample.wav | Bin 0 -> 121946 bytes test/testalpha.c | 440 +++ test/testbitmap.c | 147 + test/testcdrom.c | 189 ++ test/testerror.c | 54 + test/testgamma.c | 190 ++ test/testgl.c | 519 +++ test/testhread.c | 75 + test/testjoystick.c | 178 + test/testkeys.c | 23 + test/testlock.c | 89 + test/testpalette.c | 332 ++ test/testsem.c | 76 + test/testsprite.c | 290 ++ test/testtimer.c | 87 + test/testtypes.c | 48 + test/testver.c | 39 + test/testvidinfo.c | 78 + test/testwin.c | 361 ++ test/testwm.c | 350 ++ test/threadwin.c | 307 ++ test/torturethread.c | 85 + 892 files changed, 170313 insertions(+) create mode 100644 .cvsignore create mode 100644 BUGS create mode 100644 COPYING create mode 100644 CREDITS create mode 100644 CWprojects.sea.bin create mode 100644 INSTALL create mode 100644 MPWmake.sea.bin create mode 100644 Makefile.am create mode 100644 README create mode 100644 README-SDL.txt create mode 100644 README.CVS create mode 100644 README.MacOS create mode 100644 README.MacOSX create mode 100644 README.Win32 create mode 100644 README.WinCE create mode 100644 SDL.spec.in create mode 100644 TODO create mode 100644 VisualC.html create mode 100644 VisualC.zip create mode 100644 WhatsNew create mode 100644 acinclude.m4 create mode 100755 autogen.sh create mode 100755 config.guess create mode 100755 config.sub create mode 100644 configure.in create mode 100644 docs.html create mode 100644 docs/.cvsignore create mode 100644 docs/Makefile.am create mode 100644 docs/html/.cvsignore create mode 100644 docs/html/Makefile.am create mode 100644 docs/html/audio.html create mode 100644 docs/html/cdrom.html create mode 100644 docs/html/event.html create mode 100644 docs/html/eventfunctions.html create mode 100644 docs/html/eventstructures.html create mode 100644 docs/html/general.html create mode 100644 docs/html/guide.html create mode 100644 docs/html/guideaboutsdldoc.html create mode 100644 docs/html/guideaudioexamples.html create mode 100644 docs/html/guidebasicsinit.html create mode 100644 docs/html/guidecdromexamples.html create mode 100644 docs/html/guidecredits.html create mode 100644 docs/html/guideeventexamples.html create mode 100644 docs/html/guideexamples.html create mode 100644 docs/html/guideinput.html create mode 100644 docs/html/guideinputkeyboard.html create mode 100644 docs/html/guidepreface.html create mode 100644 docs/html/guidethebasics.html create mode 100644 docs/html/guidetimeexamples.html create mode 100644 docs/html/guidevideo.html create mode 100644 docs/html/guidevideoexamples.html create mode 100644 docs/html/index.html create mode 100644 docs/html/joystick.html create mode 100644 docs/html/reference.html create mode 100644 docs/html/sdlactiveevent.html create mode 100644 docs/html/sdladdtimer.html create mode 100644 docs/html/sdlaudiocvt.html create mode 100644 docs/html/sdlaudiospec.html create mode 100644 docs/html/sdlblitsurface.html create mode 100644 docs/html/sdlbuildaudiocvt.html create mode 100644 docs/html/sdlcd.html create mode 100644 docs/html/sdlcdclose.html create mode 100644 docs/html/sdlcdeject.html create mode 100644 docs/html/sdlcdname.html create mode 100644 docs/html/sdlcdnumdrives.html create mode 100644 docs/html/sdlcdopen.html create mode 100644 docs/html/sdlcdpause.html create mode 100644 docs/html/sdlcdplay.html create mode 100644 docs/html/sdlcdplaytracks.html create mode 100644 docs/html/sdlcdresume.html create mode 100644 docs/html/sdlcdstatus.html create mode 100644 docs/html/sdlcdstop.html create mode 100644 docs/html/sdlcdtrack.html create mode 100644 docs/html/sdlcloseaudio.html create mode 100644 docs/html/sdlcolor.html create mode 100644 docs/html/sdlcondbroadcast.html create mode 100644 docs/html/sdlcondsignal.html create mode 100644 docs/html/sdlcondwait.html create mode 100644 docs/html/sdlcondwaittimeout.html create mode 100644 docs/html/sdlconvertaudio.html create mode 100644 docs/html/sdlconvertsurface.html create mode 100644 docs/html/sdlcreatecond.html create mode 100644 docs/html/sdlcreatecursor.html create mode 100644 docs/html/sdlcreatemutex.html create mode 100644 docs/html/sdlcreatergbsurface.html create mode 100644 docs/html/sdlcreatergbsurfacefrom.html create mode 100644 docs/html/sdlcreatesemaphore.html create mode 100644 docs/html/sdlcreatethread.html create mode 100644 docs/html/sdlcreateyuvoverlay.html create mode 100644 docs/html/sdldelay.html create mode 100644 docs/html/sdldestroycond.html create mode 100644 docs/html/sdldestroymutex.html create mode 100644 docs/html/sdldestroysemaphore.html create mode 100644 docs/html/sdldisplayformat.html create mode 100644 docs/html/sdldisplayformatalpha.html create mode 100644 docs/html/sdldisplayyuvoverlay.html create mode 100644 docs/html/sdlenablekeyrepeat.html create mode 100644 docs/html/sdlenableunicode.html create mode 100644 docs/html/sdlevent.html create mode 100644 docs/html/sdleventstate.html create mode 100644 docs/html/sdlfillrect.html create mode 100644 docs/html/sdlflip.html create mode 100644 docs/html/sdlfreecursor.html create mode 100644 docs/html/sdlfreesurface.html create mode 100644 docs/html/sdlfreewav.html create mode 100644 docs/html/sdlfreeyuvoverlay.html create mode 100644 docs/html/sdlgetappstate.html create mode 100644 docs/html/sdlgetaudiostatus.html create mode 100644 docs/html/sdlgetcliprect.html create mode 100644 docs/html/sdlgetcursor.html create mode 100644 docs/html/sdlgeteventfilter.html create mode 100644 docs/html/sdlgetgammaramp.html create mode 100644 docs/html/sdlgetkeyname.html create mode 100644 docs/html/sdlgetkeystate.html create mode 100644 docs/html/sdlgetmodstate.html create mode 100644 docs/html/sdlgetmousestate.html create mode 100644 docs/html/sdlgetrelativemousestate.html create mode 100644 docs/html/sdlgetrgb.html create mode 100644 docs/html/sdlgetrgba.html create mode 100644 docs/html/sdlgetthreadid.html create mode 100644 docs/html/sdlgetticks.html create mode 100644 docs/html/sdlgetvideoinfo.html create mode 100644 docs/html/sdlgetvideosurface.html create mode 100644 docs/html/sdlglattr.html create mode 100644 docs/html/sdlglgetattribute.html create mode 100644 docs/html/sdlglgetprocaddress.html create mode 100644 docs/html/sdlglloadlibrary.html create mode 100644 docs/html/sdlglsetattribute.html create mode 100644 docs/html/sdlglswapbuffers.html create mode 100644 docs/html/sdlinit.html create mode 100644 docs/html/sdlinitsubsystem.html create mode 100644 docs/html/sdljoyaxisevent.html create mode 100644 docs/html/sdljoyballevent.html create mode 100644 docs/html/sdljoybuttonevent.html create mode 100644 docs/html/sdljoyhatevent.html create mode 100644 docs/html/sdljoystickclose.html create mode 100644 docs/html/sdljoystickeventstate.html create mode 100644 docs/html/sdljoystickgetaxis.html create mode 100644 docs/html/sdljoystickgetball.html create mode 100644 docs/html/sdljoystickgetbutton.html create mode 100644 docs/html/sdljoystickgethat.html create mode 100644 docs/html/sdljoystickindex.html create mode 100644 docs/html/sdljoystickname.html create mode 100644 docs/html/sdljoysticknumaxes.html create mode 100644 docs/html/sdljoysticknumballs.html create mode 100644 docs/html/sdljoysticknumbuttons.html create mode 100644 docs/html/sdljoysticknumhats.html create mode 100644 docs/html/sdljoystickopen.html create mode 100644 docs/html/sdljoystickopened.html create mode 100644 docs/html/sdljoystickupdate.html create mode 100644 docs/html/sdlkey.html create mode 100644 docs/html/sdlkeyboardevent.html create mode 100644 docs/html/sdlkeysym.html create mode 100644 docs/html/sdlkillthread.html create mode 100644 docs/html/sdllistmodes.html create mode 100644 docs/html/sdlloadbmp.html create mode 100644 docs/html/sdlloadwav.html create mode 100644 docs/html/sdllockaudio.html create mode 100644 docs/html/sdllocksurface.html create mode 100644 docs/html/sdllockyuvoverlay.html create mode 100644 docs/html/sdlmaprgb.html create mode 100644 docs/html/sdlmaprgba.html create mode 100644 docs/html/sdlmixaudio.html create mode 100644 docs/html/sdlmousebuttonevent.html create mode 100644 docs/html/sdlmousemotionevent.html create mode 100644 docs/html/sdlmutexp.html create mode 100644 docs/html/sdlmutexv.html create mode 100644 docs/html/sdlnumjoysticks.html create mode 100644 docs/html/sdlopenaudio.html create mode 100644 docs/html/sdloverlay.html create mode 100644 docs/html/sdlpalette.html create mode 100644 docs/html/sdlpauseaudio.html create mode 100644 docs/html/sdlpeepevents.html create mode 100644 docs/html/sdlpixelformat.html create mode 100644 docs/html/sdlpollevent.html create mode 100644 docs/html/sdlpumpevents.html create mode 100644 docs/html/sdlpushevent.html create mode 100644 docs/html/sdlquit.html create mode 100644 docs/html/sdlquitevent.html create mode 100644 docs/html/sdlquitsubsystem.html create mode 100644 docs/html/sdlrect.html create mode 100644 docs/html/sdlremovetimer.html create mode 100644 docs/html/sdlresizeevent.html create mode 100644 docs/html/sdlsavebmp.html create mode 100644 docs/html/sdlsempost.html create mode 100644 docs/html/sdlsemtrywait.html create mode 100644 docs/html/sdlsemvalue.html create mode 100644 docs/html/sdlsemwait.html create mode 100644 docs/html/sdlsemwaittimeout.html create mode 100644 docs/html/sdlsetalpha.html create mode 100644 docs/html/sdlsetcliprect.html create mode 100644 docs/html/sdlsetcolorkey.html create mode 100644 docs/html/sdlsetcolors.html create mode 100644 docs/html/sdlsetcursor.html create mode 100644 docs/html/sdlseteventfilter.html create mode 100644 docs/html/sdlsetgamma.html create mode 100644 docs/html/sdlsetgammaramp.html create mode 100644 docs/html/sdlsetmodstate.html create mode 100644 docs/html/sdlsetpalette.html create mode 100644 docs/html/sdlsettimer.html create mode 100644 docs/html/sdlsetvideomode.html create mode 100644 docs/html/sdlshowcursor.html create mode 100644 docs/html/sdlsurface.html create mode 100644 docs/html/sdlsyswmevent.html create mode 100644 docs/html/sdlthreadid.html create mode 100644 docs/html/sdlunlockaudio.html create mode 100644 docs/html/sdlunlocksurface.html create mode 100644 docs/html/sdlunlockyuvoverlay.html create mode 100644 docs/html/sdlupdaterect.html create mode 100644 docs/html/sdlupdaterects.html create mode 100644 docs/html/sdluserevent.html create mode 100644 docs/html/sdlvideodrivername.html create mode 100644 docs/html/sdlvideoinfo.html create mode 100644 docs/html/sdlvideomodeok.html create mode 100644 docs/html/sdlwaitevent.html create mode 100644 docs/html/sdlwaitthread.html create mode 100644 docs/html/sdlwarpmouse.html create mode 100644 docs/html/sdlwasinit.html create mode 100644 docs/html/sdlwmgetcaption.html create mode 100644 docs/html/sdlwmgrabinput.html create mode 100644 docs/html/sdlwmiconifywindow.html create mode 100644 docs/html/sdlwmsetcaption.html create mode 100644 docs/html/sdlwmseticon.html create mode 100644 docs/html/sdlwmtogglefullscreen.html create mode 100644 docs/html/thread.html create mode 100644 docs/html/time.html create mode 100644 docs/html/video.html create mode 100644 docs/html/wm.html create mode 100644 docs/images/rainbow.gif create mode 100644 docs/index.html create mode 100644 docs/man3/.cvsignore create mode 100644 docs/man3/Makefile.am create mode 100644 docs/man3/SDLKey.3 create mode 100644 docs/man3/SDL_ActiveEvent.3 create mode 100644 docs/man3/SDL_AddTimer.3 create mode 100644 docs/man3/SDL_AudioCVT.3 create mode 100644 docs/man3/SDL_AudioSpec.3 create mode 100644 docs/man3/SDL_BlitSurface.3 create mode 100644 docs/man3/SDL_BuildAudioCVT.3 create mode 100644 docs/man3/SDL_CD.3 create mode 100644 docs/man3/SDL_CDClose.3 create mode 100644 docs/man3/SDL_CDEject.3 create mode 100644 docs/man3/SDL_CDName.3 create mode 100644 docs/man3/SDL_CDNumDrives.3 create mode 100644 docs/man3/SDL_CDOpen.3 create mode 100644 docs/man3/SDL_CDPause.3 create mode 100644 docs/man3/SDL_CDPlay.3 create mode 100644 docs/man3/SDL_CDPlayTracks.3 create mode 100644 docs/man3/SDL_CDResume.3 create mode 100644 docs/man3/SDL_CDStatus.3 create mode 100644 docs/man3/SDL_CDStop.3 create mode 100644 docs/man3/SDL_CDtrack.3 create mode 100644 docs/man3/SDL_CloseAudio.3 create mode 100644 docs/man3/SDL_Color.3 create mode 100644 docs/man3/SDL_CondBroadcast.3 create mode 100644 docs/man3/SDL_CondSignal.3 create mode 100644 docs/man3/SDL_CondWait.3 create mode 100644 docs/man3/SDL_CondWaitTimeout.3 create mode 100644 docs/man3/SDL_ConvertAudio.3 create mode 100644 docs/man3/SDL_ConvertSurface.3 create mode 100644 docs/man3/SDL_CreateCond.3 create mode 100644 docs/man3/SDL_CreateCursor.3 create mode 100644 docs/man3/SDL_CreateMutex.3 create mode 100644 docs/man3/SDL_CreateRGBSurface.3 create mode 100644 docs/man3/SDL_CreateRGBSurfaceFrom.3 create mode 100644 docs/man3/SDL_CreateSemaphore.3 create mode 100644 docs/man3/SDL_CreateThread.3 create mode 100644 docs/man3/SDL_CreateYUVOverlay.3 create mode 100644 docs/man3/SDL_Delay.3 create mode 100644 docs/man3/SDL_DestroyCond.3 create mode 100644 docs/man3/SDL_DestroyMutex.3 create mode 100644 docs/man3/SDL_DestroySemaphore.3 create mode 100644 docs/man3/SDL_DisplayFormat.3 create mode 100644 docs/man3/SDL_DisplayFormatAlpha.3 create mode 100644 docs/man3/SDL_DisplayYUVOverlay.3 create mode 100644 docs/man3/SDL_EnableKeyRepeat.3 create mode 100644 docs/man3/SDL_EnableUNICODE.3 create mode 100644 docs/man3/SDL_Event.3 create mode 100644 docs/man3/SDL_EventState.3 create mode 100644 docs/man3/SDL_FillRect.3 create mode 100644 docs/man3/SDL_Flip.3 create mode 100644 docs/man3/SDL_FreeCursor.3 create mode 100644 docs/man3/SDL_FreeSurface.3 create mode 100644 docs/man3/SDL_FreeWAV.3 create mode 100644 docs/man3/SDL_FreeYUVOverlay.3 create mode 100644 docs/man3/SDL_GL_GetAttribute.3 create mode 100644 docs/man3/SDL_GL_GetProcAddress.3 create mode 100644 docs/man3/SDL_GL_LoadLibrary.3 create mode 100644 docs/man3/SDL_GL_SetAttribute.3 create mode 100644 docs/man3/SDL_GL_SwapBuffers.3 create mode 100644 docs/man3/SDL_GLattr.3 create mode 100644 docs/man3/SDL_GetAppState.3 create mode 100644 docs/man3/SDL_GetAudioStatus.3 create mode 100644 docs/man3/SDL_GetClipRect.3 create mode 100644 docs/man3/SDL_GetCursor.3 create mode 100644 docs/man3/SDL_GetEventFilter.3 create mode 100644 docs/man3/SDL_GetGamma.3 create mode 100644 docs/man3/SDL_GetGammaRamp.3 create mode 100644 docs/man3/SDL_GetKeyName.3 create mode 100644 docs/man3/SDL_GetKeyState.3 create mode 100644 docs/man3/SDL_GetModState.3 create mode 100644 docs/man3/SDL_GetMouseState.3 create mode 100644 docs/man3/SDL_GetRGB.3 create mode 100644 docs/man3/SDL_GetRGBA.3 create mode 100644 docs/man3/SDL_GetRelativeMouseState.3 create mode 100644 docs/man3/SDL_GetThreadID.3 create mode 100644 docs/man3/SDL_GetTicks.3 create mode 100644 docs/man3/SDL_GetVideoInfo.3 create mode 100644 docs/man3/SDL_GetVideoSurface.3 create mode 100644 docs/man3/SDL_Init.3 create mode 100644 docs/man3/SDL_InitSubSystem.3 create mode 100644 docs/man3/SDL_JoyAxisEvent.3 create mode 100644 docs/man3/SDL_JoyBallEvent.3 create mode 100644 docs/man3/SDL_JoyButtonEvent.3 create mode 100644 docs/man3/SDL_JoyHatEvent.3 create mode 100644 docs/man3/SDL_JoystickClose.3 create mode 100644 docs/man3/SDL_JoystickEventState.3 create mode 100644 docs/man3/SDL_JoystickGetAxis.3 create mode 100644 docs/man3/SDL_JoystickGetBall.3 create mode 100644 docs/man3/SDL_JoystickGetButton.3 create mode 100644 docs/man3/SDL_JoystickGetHat.3 create mode 100644 docs/man3/SDL_JoystickIndex.3 create mode 100644 docs/man3/SDL_JoystickName.3 create mode 100644 docs/man3/SDL_JoystickNumAxes.3 create mode 100644 docs/man3/SDL_JoystickNumBalls.3 create mode 100644 docs/man3/SDL_JoystickNumButtons.3 create mode 100644 docs/man3/SDL_JoystickNumHats.3 create mode 100644 docs/man3/SDL_JoystickOpen.3 create mode 100644 docs/man3/SDL_JoystickOpened.3 create mode 100644 docs/man3/SDL_JoystickUpdate.3 create mode 100644 docs/man3/SDL_KeyboardEvent.3 create mode 100644 docs/man3/SDL_KillThread.3 create mode 100644 docs/man3/SDL_ListModes.3 create mode 100644 docs/man3/SDL_LoadBMP.3 create mode 100644 docs/man3/SDL_LoadWAV.3 create mode 100644 docs/man3/SDL_LockAudio.3 create mode 100644 docs/man3/SDL_LockSurface.3 create mode 100644 docs/man3/SDL_LockYUVOverlay.3 create mode 100644 docs/man3/SDL_MapRGB.3 create mode 100644 docs/man3/SDL_MapRGBA.3 create mode 100644 docs/man3/SDL_MixAudio.3 create mode 100644 docs/man3/SDL_MouseButtonEvent.3 create mode 100644 docs/man3/SDL_MouseMotionEvent.3 create mode 100644 docs/man3/SDL_NumJoysticks.3 create mode 100644 docs/man3/SDL_OpenAudio.3 create mode 100644 docs/man3/SDL_Overlay.3 create mode 100644 docs/man3/SDL_Palette.3 create mode 100644 docs/man3/SDL_PauseAudio.3 create mode 100644 docs/man3/SDL_PeepEvents.3 create mode 100644 docs/man3/SDL_PixelFormat.3 create mode 100644 docs/man3/SDL_PollEvent.3 create mode 100644 docs/man3/SDL_PumpEvents.3 create mode 100644 docs/man3/SDL_PushEvent.3 create mode 100644 docs/man3/SDL_Quit.3 create mode 100644 docs/man3/SDL_QuitEvent.3 create mode 100644 docs/man3/SDL_QuitSubSystem.3 create mode 100644 docs/man3/SDL_RWFromFile.3 create mode 100644 docs/man3/SDL_Rect.3 create mode 100644 docs/man3/SDL_RemoveTimer.3 create mode 100644 docs/man3/SDL_ResizeEvent.3 create mode 100644 docs/man3/SDL_SaveBMP.3 create mode 100644 docs/man3/SDL_SemPost.3 create mode 100644 docs/man3/SDL_SemTryWait.3 create mode 100644 docs/man3/SDL_SemValue.3 create mode 100644 docs/man3/SDL_SemWait.3 create mode 100644 docs/man3/SDL_SemWaitTimeout.3 create mode 100644 docs/man3/SDL_SetAlpha.3 create mode 100644 docs/man3/SDL_SetClipRect.3 create mode 100644 docs/man3/SDL_SetColorKey.3 create mode 100644 docs/man3/SDL_SetColors.3 create mode 100644 docs/man3/SDL_SetCursor.3 create mode 100644 docs/man3/SDL_SetEventFilter.3 create mode 100644 docs/man3/SDL_SetGamma.3 create mode 100644 docs/man3/SDL_SetGammaRamp.3 create mode 100644 docs/man3/SDL_SetModState.3 create mode 100644 docs/man3/SDL_SetPalette.3 create mode 100644 docs/man3/SDL_SetTimer.3 create mode 100644 docs/man3/SDL_SetVideoMode.3 create mode 100644 docs/man3/SDL_ShowCursor.3 create mode 100644 docs/man3/SDL_Surface.3 create mode 100644 docs/man3/SDL_SysWMEvent.3 create mode 100644 docs/man3/SDL_ThreadID.3 create mode 100644 docs/man3/SDL_UnlockAudio.3 create mode 100644 docs/man3/SDL_UnlockSurface.3 create mode 100644 docs/man3/SDL_UnlockYUVOverlay.3 create mode 100644 docs/man3/SDL_UpdateRect.3 create mode 100644 docs/man3/SDL_UpdateRects.3 create mode 100644 docs/man3/SDL_UserEvent.3 create mode 100644 docs/man3/SDL_VideoDriverName.3 create mode 100644 docs/man3/SDL_VideoInfo.3 create mode 100644 docs/man3/SDL_VideoModeOK.3 create mode 100644 docs/man3/SDL_WM_GetCaption.3 create mode 100644 docs/man3/SDL_WM_GrabInput.3 create mode 100644 docs/man3/SDL_WM_IconifyWindow.3 create mode 100644 docs/man3/SDL_WM_SetCaption.3 create mode 100644 docs/man3/SDL_WM_SetIcon.3 create mode 100644 docs/man3/SDL_WM_ToggleFullScreen.3 create mode 100644 docs/man3/SDL_WaitEvent.3 create mode 100644 docs/man3/SDL_WaitThread.3 create mode 100644 docs/man3/SDL_WarpMouse.3 create mode 100644 docs/man3/SDL_WasInit.3 create mode 100644 docs/man3/SDL_keysym.3 create mode 100644 docs/man3/SDL_mutexP.3 create mode 100644 docs/man3/SDL_mutexV.3 create mode 100644 include/.cvsignore create mode 100644 include/Makefile.am create mode 100644 include/SDL.h create mode 100644 include/SDL_active.h create mode 100644 include/SDL_audio.h create mode 100644 include/SDL_byteorder.h create mode 100644 include/SDL_cdrom.h create mode 100644 include/SDL_copying.h create mode 100644 include/SDL_endian.h create mode 100644 include/SDL_error.h create mode 100644 include/SDL_events.h create mode 100644 include/SDL_getenv.h create mode 100644 include/SDL_joystick.h create mode 100644 include/SDL_keyboard.h create mode 100644 include/SDL_keysym.h create mode 100644 include/SDL_main.h create mode 100644 include/SDL_mouse.h create mode 100644 include/SDL_mutex.h create mode 100644 include/SDL_quit.h create mode 100644 include/SDL_rwops.h create mode 100644 include/SDL_syswm.h create mode 100644 include/SDL_thread.h create mode 100644 include/SDL_timer.h create mode 100644 include/SDL_types.h create mode 100644 include/SDL_version.h create mode 100644 include/SDL_video.h create mode 100644 include/begin_code.h create mode 100644 include/close_code.h create mode 100755 install-sh create mode 100755 ltconfig create mode 100644 ltmain.sh create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 sdl-config.in create mode 100644 sdl.m4 create mode 100644 src/.cvsignore create mode 100644 src/Makefile.am create mode 100644 src/SDL.c create mode 100644 src/SDL_error.c create mode 100644 src/SDL_error_c.h create mode 100644 src/SDL_fatal.c create mode 100644 src/SDL_fatal.h create mode 100644 src/SDL_getenv.c create mode 100644 src/audio/.cvsignore create mode 100644 src/audio/Makefile.am create mode 100644 src/audio/SDL_audio.c create mode 100644 src/audio/SDL_audio_c.h create mode 100644 src/audio/SDL_audiocvt.c create mode 100644 src/audio/SDL_audiodev.c create mode 100644 src/audio/SDL_audiodev_c.h create mode 100644 src/audio/SDL_audiomem.c create mode 100644 src/audio/SDL_audiomem.h create mode 100644 src/audio/SDL_mixer.c create mode 100644 src/audio/SDL_sysaudio.h create mode 100644 src/audio/SDL_wave.c create mode 100644 src/audio/SDL_wave.h create mode 100644 src/audio/alsa/.cvsignore create mode 100644 src/audio/alsa/Makefile.am create mode 100644 src/audio/alsa/SDL_alsa_audio.c create mode 100644 src/audio/alsa/SDL_alsa_audio.h create mode 100644 src/audio/amigaos/Makefile.am create mode 100644 src/audio/amigaos/SDL_ahiaudio.c create mode 100644 src/audio/amigaos/SDL_audio.c create mode 100644 src/audio/amigaos/SDL_lowaudio.h create mode 100644 src/audio/amigaos/SDL_sysaudio.h create mode 100644 src/audio/arts/.cvsignore create mode 100644 src/audio/arts/Makefile.am create mode 100644 src/audio/arts/SDL_artsaudio.c create mode 100644 src/audio/arts/SDL_artsaudio.h create mode 100644 src/audio/baudio/.cvsignore create mode 100644 src/audio/baudio/Makefile.am create mode 100644 src/audio/baudio/SDL_beaudio.cc create mode 100644 src/audio/baudio/SDL_beaudio.h create mode 100644 src/audio/dma/.cvsignore create mode 100644 src/audio/dma/Makefile.am create mode 100644 src/audio/dma/SDL_dmaaudio.c create mode 100644 src/audio/dma/SDL_dmaaudio.h create mode 100644 src/audio/dmedia/.cvsignore create mode 100644 src/audio/dmedia/Makefile.am create mode 100644 src/audio/dmedia/SDL_irixaudio.c create mode 100644 src/audio/dmedia/SDL_irixaudio.h create mode 100644 src/audio/dsp/.cvsignore create mode 100644 src/audio/dsp/Makefile.am create mode 100644 src/audio/dsp/SDL_dspaudio.c create mode 100644 src/audio/dsp/SDL_dspaudio.h create mode 100644 src/audio/esd/.cvsignore create mode 100644 src/audio/esd/Makefile.am create mode 100644 src/audio/esd/SDL_esdaudio.c create mode 100644 src/audio/esd/SDL_esdaudio.h create mode 100644 src/audio/macrom/.cvsignore create mode 100644 src/audio/macrom/Makefile.am create mode 100644 src/audio/macrom/SDL_romaudio.c create mode 100644 src/audio/macrom/SDL_romaudio.h create mode 100644 src/audio/nas/.cvsignore create mode 100644 src/audio/nas/Makefile.am create mode 100644 src/audio/nas/SDL_nasaudio.c create mode 100644 src/audio/nas/SDL_nasaudio.h create mode 100644 src/audio/nto/.cvsignore create mode 100644 src/audio/nto/Makefile.am create mode 100644 src/audio/nto/SDL_nto_audio.c create mode 100644 src/audio/nto/SDL_nto_audio.h create mode 100644 src/audio/paudio/.cvsignore create mode 100644 src/audio/paudio/Makefile.am create mode 100644 src/audio/paudio/SDL_paudio.c create mode 100644 src/audio/paudio/SDL_paudio.h create mode 100644 src/audio/sun/.cvsignore create mode 100644 src/audio/sun/Makefile.am create mode 100644 src/audio/sun/SDL_sunaudio.c create mode 100644 src/audio/sun/SDL_sunaudio.h create mode 100644 src/audio/ums/.cvsignore create mode 100644 src/audio/ums/Makefile.am create mode 100644 src/audio/ums/SDL_umsaudio.c create mode 100644 src/audio/ums/SDL_umsaudio.h create mode 100644 src/audio/windib/.cvsignore create mode 100644 src/audio/windib/Makefile.am create mode 100644 src/audio/windib/SDL_dibaudio.c create mode 100644 src/audio/windib/SDL_dibaudio.h create mode 100644 src/audio/windx5/.cvsignore create mode 100644 src/audio/windx5/Makefile.am create mode 100644 src/audio/windx5/SDL_dx5audio.c create mode 100644 src/audio/windx5/SDL_dx5audio.h create mode 100644 src/cdrom/.cvsignore create mode 100644 src/cdrom/Makefile.am create mode 100644 src/cdrom/SDL_cdrom.c create mode 100644 src/cdrom/SDL_syscdrom.h create mode 100644 src/cdrom/aix/SDL_syscdrom.c create mode 100644 src/cdrom/beos/SDL_syscdrom.c create mode 100644 src/cdrom/dummy/SDL_syscdrom.c create mode 100644 src/cdrom/freebsd/SDL_syscdrom.c create mode 100644 src/cdrom/linux/SDL_syscdrom.c create mode 100644 src/cdrom/macos/SDL_syscdrom.c create mode 100644 src/cdrom/macos/SDL_syscdrom_c.h create mode 100644 src/cdrom/openbsd/SDL_syscdrom.c create mode 100644 src/cdrom/qnx/SDL_syscdrom.c create mode 100644 src/cdrom/win32/SDL_syscdrom.c create mode 100644 src/endian/.cvsignore create mode 100644 src/endian/Makefile.am create mode 100644 src/endian/SDL_endian.c create mode 100644 src/events/.cvsignore create mode 100644 src/events/Makefile.am create mode 100644 src/events/SDL_active.c create mode 100644 src/events/SDL_events.c create mode 100644 src/events/SDL_events_c.h create mode 100644 src/events/SDL_expose.c create mode 100644 src/events/SDL_keyboard.c create mode 100644 src/events/SDL_mouse.c create mode 100644 src/events/SDL_quit.c create mode 100644 src/events/SDL_resize.c create mode 100644 src/events/SDL_sysevents.h create mode 100644 src/file/.cvsignore create mode 100644 src/file/Makefile.am create mode 100644 src/file/SDL_rwops.c create mode 100644 src/hermes/.cvsignore create mode 100644 src/hermes/COPYING.LIB create mode 100644 src/hermes/HeadMMX.h create mode 100644 src/hermes/HeadX86.h create mode 100644 src/hermes/Makefile.am create mode 100644 src/hermes/README create mode 100644 src/hermes/mmx_main.asm create mode 100644 src/hermes/mmxp2_32.asm create mode 100644 src/hermes/x86_main.asm create mode 100644 src/hermes/x86p_16.asm create mode 100644 src/hermes/x86p_32.asm create mode 100644 src/joystick/.cvsignore create mode 100644 src/joystick/Makefile.am create mode 100644 src/joystick/SDL_joystick.c create mode 100644 src/joystick/SDL_joystick_c.h create mode 100644 src/joystick/SDL_sysjoystick.h create mode 100644 src/joystick/beos/.cvsignore create mode 100644 src/joystick/beos/Makefile.am create mode 100644 src/joystick/beos/SDL_bejoystick.cc create mode 100644 src/joystick/dummy/.cvsignore create mode 100644 src/joystick/dummy/Makefile.am create mode 100644 src/joystick/dummy/SDL_sysjoystick.c create mode 100644 src/joystick/linux/.cvsignore create mode 100644 src/joystick/linux/Makefile.am create mode 100644 src/joystick/linux/SDL_sysjoystick.c create mode 100644 src/joystick/macos/.cvsignore create mode 100644 src/joystick/macos/Makefile.am create mode 100644 src/joystick/macos/SDL_sysjoystick.c create mode 100644 src/joystick/win32/.cvsignore create mode 100644 src/joystick/win32/Makefile.am create mode 100644 src/joystick/win32/SDL_mmjoystick.c create mode 100644 src/main/.cvsignore create mode 100644 src/main/Makefile.am create mode 100644 src/main/beos/SDL_BeApp.cc create mode 100644 src/main/beos/SDL_BeApp.h create mode 100644 src/main/beos/exports/Makefile create mode 100644 src/main/beos/exports/SDL.exp create mode 100755 src/main/beos/exports/genexp.pl create mode 100644 src/main/dummy.c create mode 100644 src/main/linux/SDL_main.c create mode 100644 src/main/macos/SDL.r create mode 100644 src/main/macos/SDL_main.c create mode 100644 src/main/macos/SIZE.r create mode 100644 src/main/macos/exports/Makefile create mode 100644 src/main/macos/exports/SDL.x create mode 100644 src/main/macos/exports/gendef.pl create mode 100644 src/main/win32/SDL_main.c create mode 100644 src/main/win32/exports/Makefile create mode 100644 src/main/win32/exports/SDL.def create mode 100755 src/main/win32/exports/gendef.pl create mode 100644 src/thread/.cvsignore create mode 100644 src/thread/Makefile.am create mode 100644 src/thread/SDL_systhread.h create mode 100644 src/thread/SDL_thread.c create mode 100644 src/thread/SDL_thread_c.h create mode 100644 src/thread/amigaos/SDL_syssem.c create mode 100644 src/thread/amigaos/SDL_systhread.c create mode 100644 src/thread/amigaos/SDL_systhread_c.h create mode 100644 src/thread/amigaos/SDL_thread.c create mode 100644 src/thread/beos/SDL_syssem.c create mode 100644 src/thread/beos/SDL_systhread.c create mode 100644 src/thread/beos/SDL_systhread_c.h create mode 100644 src/thread/generic/SDL_syscond.c create mode 100644 src/thread/generic/SDL_syscond_c.h create mode 100644 src/thread/generic/SDL_sysmutex.c create mode 100644 src/thread/generic/SDL_sysmutex_c.h create mode 100644 src/thread/generic/SDL_syssem.c create mode 100644 src/thread/generic/SDL_syssem_c.h create mode 100644 src/thread/generic/SDL_systhread.c create mode 100644 src/thread/generic/SDL_systhread_c.h create mode 100644 src/thread/irix/SDL_systhread.c create mode 100644 src/thread/irix/SDL_systhread_c.h create mode 100644 src/thread/linux/SDL_syscond.c create mode 100644 src/thread/linux/SDL_sysmutex.c create mode 100644 src/thread/linux/SDL_sysmutex_c.h create mode 100644 src/thread/linux/SDL_syssem.c create mode 100644 src/thread/linux/SDL_systhread.c create mode 100644 src/thread/linux/SDL_systhread_c.h create mode 100644 src/thread/linux/clone.S create mode 100644 src/thread/win32/SDL_sysmutex.c create mode 100644 src/thread/win32/SDL_syssem.c create mode 100644 src/thread/win32/SDL_systhread.c create mode 100644 src/thread/win32/SDL_systhread_c.h create mode 100644 src/timer/.cvsignore create mode 100644 src/timer/Makefile.am create mode 100644 src/timer/SDL_systimer.h create mode 100644 src/timer/SDL_timer_c.h create mode 100644 src/timer/amigaos/SDL_systimer.c create mode 100644 src/timer/beos/SDL_systimer.c create mode 100644 src/timer/linux/SDL_systimer.c create mode 100644 src/timer/macos/FastTimes.c create mode 100644 src/timer/macos/FastTimes.h create mode 100644 src/timer/macos/SDL_MPWtimer.c create mode 100644 src/timer/macos/SDL_systimer.c create mode 100644 src/timer/win32/SDL_systimer.c create mode 100644 src/video/.cvsignore create mode 100644 src/video/Makefile.am create mode 100644 src/video/SDL_RLEaccel.c create mode 100644 src/video/SDL_RLEaccel_c.h create mode 100644 src/video/SDL_blit.c create mode 100644 src/video/SDL_blit.h create mode 100644 src/video/SDL_blit_0.c create mode 100644 src/video/SDL_blit_1.c create mode 100644 src/video/SDL_blit_A.c create mode 100644 src/video/SDL_blit_A.h create mode 100644 src/video/SDL_blit_N.c create mode 100644 src/video/SDL_bmp.c create mode 100644 src/video/SDL_cursor.c create mode 100644 src/video/SDL_cursor_c.h create mode 100644 src/video/SDL_gamma.c create mode 100644 src/video/SDL_glfuncs.h create mode 100644 src/video/SDL_leaks.h create mode 100644 src/video/SDL_memops.h create mode 100644 src/video/SDL_pixels.c create mode 100644 src/video/SDL_pixels_c.h create mode 100644 src/video/SDL_stretch.c create mode 100644 src/video/SDL_stretch_c.h create mode 100644 src/video/SDL_surface.c create mode 100644 src/video/SDL_sysvideo.h create mode 100644 src/video/SDL_video.c create mode 100644 src/video/SDL_yuv.c create mode 100644 src/video/SDL_yuv_mmx.c create mode 100644 src/video/SDL_yuv_sw.c create mode 100644 src/video/SDL_yuv_sw_c.h create mode 100644 src/video/SDL_yuvfuncs.h create mode 100644 src/video/aalib/.cvsignore create mode 100644 src/video/aalib/Makefile.am create mode 100644 src/video/aalib/SDL_aaevents.c create mode 100644 src/video/aalib/SDL_aaevents_c.h create mode 100644 src/video/aalib/SDL_aamouse.c create mode 100644 src/video/aalib/SDL_aamouse_c.h create mode 100644 src/video/aalib/SDL_aavideo.c create mode 100644 src/video/aalib/SDL_aavideo.h create mode 100644 src/video/blank_cursor.h create mode 100644 src/video/bwindow/.cvsignore create mode 100644 src/video/bwindow/Makefile.am create mode 100644 src/video/bwindow/SDL_BView.h create mode 100644 src/video/bwindow/SDL_BWin.h create mode 100644 src/video/bwindow/SDL_lowvideo.h create mode 100644 src/video/bwindow/SDL_sysevents.cc create mode 100644 src/video/bwindow/SDL_sysevents_c.h create mode 100644 src/video/bwindow/SDL_sysmouse.cc create mode 100644 src/video/bwindow/SDL_sysmouse_c.h create mode 100644 src/video/bwindow/SDL_sysvideo.cc create mode 100644 src/video/bwindow/SDL_syswm.cc create mode 100644 src/video/bwindow/SDL_syswm_c.h create mode 100644 src/video/cybergfx/.cvsignore create mode 100644 src/video/cybergfx/Makefile.am create mode 100644 src/video/cybergfx/SDL_amigaevents.c create mode 100644 src/video/cybergfx/SDL_amigaevents_c.h create mode 100644 src/video/cybergfx/SDL_amigamouse.c create mode 100644 src/video/cybergfx/SDL_amigamouse_c.h create mode 100644 src/video/cybergfx/SDL_cgxaccel.c create mode 100644 src/video/cybergfx/SDL_cgxgl.c create mode 100644 src/video/cybergfx/SDL_cgxgl_c.h create mode 100644 src/video/cybergfx/SDL_cgximage.c create mode 100644 src/video/cybergfx/SDL_cgximage_c.h create mode 100644 src/video/cybergfx/SDL_cgxmodes.c create mode 100644 src/video/cybergfx/SDL_cgxmodes_c.h create mode 100644 src/video/cybergfx/SDL_cgxvideo.c create mode 100644 src/video/cybergfx/SDL_cgxvideo.h create mode 100644 src/video/cybergfx/SDL_cgxwm.c create mode 100644 src/video/cybergfx/SDL_cgxwm_c.h create mode 100644 src/video/default_cursor.h create mode 100644 src/video/dga/.cvsignore create mode 100644 src/video/dga/Makefile.am create mode 100644 src/video/dga/SDL_dgaevents.c create mode 100644 src/video/dga/SDL_dgaevents_c.h create mode 100644 src/video/dga/SDL_dgamouse.c create mode 100644 src/video/dga/SDL_dgamouse_c.h create mode 100644 src/video/dga/SDL_dgavideo.c create mode 100644 src/video/dga/SDL_dgavideo.h create mode 100644 src/video/fbcon/.cvsignore create mode 100644 src/video/fbcon/3dfx_mmio.h create mode 100644 src/video/fbcon/3dfx_regs.h create mode 100644 src/video/fbcon/Makefile.am create mode 100644 src/video/fbcon/SDL_fb3dfx.c create mode 100644 src/video/fbcon/SDL_fb3dfx.h create mode 100644 src/video/fbcon/SDL_fbelo.c create mode 100644 src/video/fbcon/SDL_fbelo.h create mode 100644 src/video/fbcon/SDL_fbevents.c create mode 100644 src/video/fbcon/SDL_fbevents_c.h create mode 100644 src/video/fbcon/SDL_fbkeys.h create mode 100644 src/video/fbcon/SDL_fbmatrox.c create mode 100644 src/video/fbcon/SDL_fbmatrox.h create mode 100644 src/video/fbcon/SDL_fbmouse.c create mode 100644 src/video/fbcon/SDL_fbmouse_c.h create mode 100644 src/video/fbcon/SDL_fbvideo.c create mode 100644 src/video/fbcon/SDL_fbvideo.h create mode 100644 src/video/fbcon/matrox_mmio.h create mode 100644 src/video/fbcon/matrox_regs.h create mode 100644 src/video/ggi/.cvsignore create mode 100644 src/video/ggi/Makefile.am create mode 100644 src/video/ggi/SDL_ggievents.c create mode 100755 src/video/ggi/SDL_ggievents_c.h create mode 100644 src/video/ggi/SDL_ggikeys.h create mode 100644 src/video/ggi/SDL_ggimouse.c create mode 100755 src/video/ggi/SDL_ggimouse_c.h create mode 100644 src/video/ggi/SDL_ggivideo.c create mode 100644 src/video/ggi/SDL_ggivideo.h create mode 100644 src/video/maccommon/.cvsignore create mode 100644 src/video/maccommon/Makefile.am create mode 100644 src/video/maccommon/SDL_lowvideo.h create mode 100644 src/video/maccommon/SDL_macevents.c create mode 100644 src/video/maccommon/SDL_macevents_c.h create mode 100644 src/video/maccommon/SDL_macgl.c create mode 100644 src/video/maccommon/SDL_macgl_c.h create mode 100644 src/video/maccommon/SDL_mackeys.h create mode 100644 src/video/maccommon/SDL_macmouse.c create mode 100644 src/video/maccommon/SDL_macmouse_c.h create mode 100644 src/video/maccommon/SDL_macwm.c create mode 100644 src/video/maccommon/SDL_macwm_c.h create mode 100644 src/video/macdsp/.cvsignore create mode 100644 src/video/macdsp/Makefile.am create mode 100644 src/video/macdsp/SDL_dspvideo.c create mode 100644 src/video/macdsp/SDL_dspvideo.h create mode 100644 src/video/macrom/.cvsignore create mode 100644 src/video/macrom/Makefile.am create mode 100644 src/video/macrom/SDL_romvideo.c create mode 100644 src/video/macrom/SDL_romvideo.h create mode 100644 src/video/photon/.cvsignore create mode 100644 src/video/photon/Makefile.am create mode 100644 src/video/photon/SDL_ph_events.c create mode 100644 src/video/photon/SDL_ph_events_c.h create mode 100644 src/video/photon/SDL_ph_image.c create mode 100644 src/video/photon/SDL_ph_image_c.h create mode 100644 src/video/photon/SDL_ph_modes.c create mode 100644 src/video/photon/SDL_ph_modes_c.h create mode 100644 src/video/photon/SDL_ph_mouse.c create mode 100644 src/video/photon/SDL_ph_mouse_c.h create mode 100644 src/video/photon/SDL_ph_video.c create mode 100644 src/video/photon/SDL_ph_video.h create mode 100644 src/video/photon/SDL_ph_wm.c create mode 100644 src/video/photon/SDL_ph_wm_c.h create mode 100644 src/video/photon/SDL_phyuv.c create mode 100644 src/video/photon/SDL_phyuv_c.h create mode 100644 src/video/svga/.cvsignore create mode 100644 src/video/svga/Makefile.am create mode 100644 src/video/svga/SDL_svgaevents.c create mode 100644 src/video/svga/SDL_svgaevents_c.h create mode 100644 src/video/svga/SDL_svgamouse.c create mode 100644 src/video/svga/SDL_svgamouse_c.h create mode 100644 src/video/svga/SDL_svgavideo.c create mode 100644 src/video/svga/SDL_svgavideo.h create mode 100644 src/video/wincommon/.cvsignore create mode 100644 src/video/wincommon/Makefile.am create mode 100644 src/video/wincommon/SDL_lowvideo.h create mode 100644 src/video/wincommon/SDL_sysevents.c create mode 100644 src/video/wincommon/SDL_sysmouse.c create mode 100644 src/video/wincommon/SDL_sysmouse_c.h create mode 100644 src/video/wincommon/SDL_syswm.c create mode 100644 src/video/wincommon/SDL_syswm_c.h create mode 100644 src/video/wincommon/SDL_wingl.c create mode 100644 src/video/wincommon/SDL_wingl_c.h create mode 100644 src/video/wincommon/wmmsg.h create mode 100644 src/video/windib/.cvsignore create mode 100644 src/video/windib/Makefile.am create mode 100644 src/video/windib/SDL_dibevents.c create mode 100644 src/video/windib/SDL_dibevents_c.h create mode 100644 src/video/windib/SDL_dibvideo.c create mode 100644 src/video/windib/SDL_dibvideo.h create mode 100644 src/video/windib/SDL_vkeys.h create mode 100644 src/video/windx5/.cvsignore create mode 100644 src/video/windx5/Makefile.am create mode 100644 src/video/windx5/SDL_dx5events.c create mode 100644 src/video/windx5/SDL_dx5events_c.h create mode 100644 src/video/windx5/SDL_dx5video.c create mode 100644 src/video/windx5/SDL_dx5video.h create mode 100644 src/video/windx5/SDL_dx5yuv.c create mode 100644 src/video/windx5/SDL_dx5yuv_c.h create mode 100644 src/video/windx5/directx.h create mode 100644 src/video/x11/.cvsignore create mode 100644 src/video/x11/Makefile.am create mode 100644 src/video/x11/SDL_x11dga.c create mode 100644 src/video/x11/SDL_x11dga_c.h create mode 100644 src/video/x11/SDL_x11events.c create mode 100644 src/video/x11/SDL_x11events_c.h create mode 100644 src/video/x11/SDL_x11gamma.c create mode 100644 src/video/x11/SDL_x11gamma_c.h create mode 100644 src/video/x11/SDL_x11gl.c create mode 100644 src/video/x11/SDL_x11gl_c.h create mode 100644 src/video/x11/SDL_x11image.c create mode 100644 src/video/x11/SDL_x11image_c.h create mode 100644 src/video/x11/SDL_x11modes.c create mode 100644 src/video/x11/SDL_x11modes_c.h create mode 100644 src/video/x11/SDL_x11mouse.c create mode 100644 src/video/x11/SDL_x11mouse_c.h create mode 100644 src/video/x11/SDL_x11video.c create mode 100644 src/video/x11/SDL_x11video.h create mode 100644 src/video/x11/SDL_x11wm.c create mode 100644 src/video/x11/SDL_x11wm_c.h create mode 100644 src/video/x11/SDL_x11yuv.c create mode 100644 src/video/x11/SDL_x11yuv_c.h create mode 100755 strip_fPIC.sh create mode 100644 test/.cvsignore create mode 100644 test/.gdbinit create mode 100644 test/COPYING create mode 100644 test/Makefile.am create mode 100644 test/README create mode 100644 test/acinclude.m4 create mode 100755 test/autogen.sh create mode 100644 test/checkkeys.c create mode 100644 test/config.guess create mode 100644 test/config.sub create mode 100644 test/configure.in create mode 100644 test/graywin.c create mode 100644 test/icon.bmp create mode 100755 test/install-sh create mode 100644 test/loopwave.c create mode 100755 test/missing create mode 100755 test/mkinstalldirs create mode 100644 test/picture.xbm create mode 100644 test/sail.bmp create mode 100644 test/sample.bmp create mode 100644 test/sample.wav create mode 100644 test/testalpha.c create mode 100644 test/testbitmap.c create mode 100644 test/testcdrom.c create mode 100644 test/testerror.c create mode 100644 test/testgamma.c create mode 100644 test/testgl.c create mode 100644 test/testhread.c create mode 100644 test/testjoystick.c create mode 100644 test/testkeys.c create mode 100644 test/testlock.c create mode 100644 test/testpalette.c create mode 100644 test/testsem.c create mode 100644 test/testsprite.c create mode 100644 test/testtimer.c create mode 100644 test/testtypes.c create mode 100644 test/testver.c create mode 100644 test/testvidinfo.c create mode 100644 test/testwin.c create mode 100644 test/testwm.c create mode 100644 test/threadwin.c create mode 100644 test/torturethread.c diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 000000000..96b819fb4 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,10 @@ +Makefile.in +configure +aclocal.m4 +config.log +config.cache +libtool +config.status +Makefile +sdl-config +SDL.spec diff --git a/BUGS b/BUGS new file mode 100644 index 000000000..e285b9436 --- /dev/null +++ b/BUGS @@ -0,0 +1,199 @@ + +All: + Audio rate conversion is only implemented by multiplying or dividing + by a power of two. This is a side-effect of the requirement that the + raw audio buffer size be a power of two, and can hopefully be fixed. + This means 8 KHz audio converted to 22 KHz ends up being 16 KHz. :-/ + + When the implementation is writing directly to video memory the mouse + cursor doesn't work properly. Applications which do this should use + their own mouse cursor and call SDL_ShowCursor(0) to hide the system + cursor. + +Linux: + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + + The AAlib, GGI, and SVGAlib video drivers are not heavily tested. + +Win32: + The MCI driver can't tell if the CD-ROM drive is paused or stopped. + + The SDL_INIT_EVENTTHREAD flag is not supported on Win32 + (Idea: create a separate DirectInput polling thread) + The main purpose of this flag is for smooth cursor motion in + fullscreen environments. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + This requires the ToUnicode() API which is only implemented on + Windows NT/2000, not on Windows 95/98. + Latin-1 keyboard input works fine. + + Joysticks are only supported under the Win32 MultiMedia API, + DirectInput support is not yet implemented. + +BeOS: + BePPC is not supported, apparently not even by Be Inc. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + The CD driver doesn't detect SCSI CD-ROMs yet. + + Wide UNICODE character input (Kanji, etc.) has not been tested. + Latin-1 keyboard input works fine. + +MacOS: + Palette handling isn't implemented in windowed mode yet. + + Audio hasn't been extensively tested, in particular the locking + isn't implemented and mixer routines may not call malloc() or free() + because they are called at interrupt time. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + SDL_AddTimer() and SDL_RemoveTimer() haven't been implemented yet. + + Not all of the keys are properly recognized on the keyboard. + +MacOS X: + Fullscreen mode doesn't work - it requires the QuickTime framework + and that the new SDL window gets raised to the top of the Z order. + + Palette handling isn't implemented in windowed mode yet. + + Native sound and video routines are not finished, though Carbon + seems to work fairly well. + + Joysticks and CD-ROM functions are not implemented yet. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + Not all of the keys are properly recognized on the keyboard. + + MacOS X seems to have a broken pthread_cancel() implementation. + +FreeBSD: + pthread_cancel() isn't supported by FreeBSD 3.X, so threads don't + work on versions of FreeBSD earlier than 4.0. + + The CD-ROM handling doesn't work completely. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + +Solaris: + The joystick functions are not implemented yet. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + +IRIX: + The CD-ROM handling doesn't work completely. + + The joystick functions are not implemented yet. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + +OpenBSD: -= NOT YET SUPPORTED =- + This is reported to work, but I haven't verified this. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + +OSF/Tru64: -= NOT YET SUPPORTED =- + The audio functions are not implemented yet. + + Joysticks and CD-ROM functions are not implemented yet. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + +AIX: -= NOT YET SUPPORTED =- + This port has only been tested with AIX 4.3.3 + + The OpenGL support doesn't work yet. + + The joystick subsystem isn't implemented yet. + + Endian detection doesn't work yet - needs a unique CPP symbol. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + + The AIX port was done by Carsten.Griwodz@KOM.tu-darmstadt.de + More information on this port is available at: + http://www.kom.e-technik.tu-darmstadt.de/~griff/SDL/ + +QNX: -= NOT YET SUPPORTED =- + Configuration doesn't work right, Makefiles still need to be + tweaked (need to add libraries to any apps that use sdl_config + to figure out what libs they need). + + Only static libraries are being made, no shared ones. + + The only hardware surface is the primary view surface. + + Mouse events don't seem to be working right. + + Fullscreen doesn't display correctly. + + The software surfaces could use some speed up. + + Many of the test apps segment violate on exit, and I'm not sure + they're all working either + + It doesn't look like the OpenGL stuff is there. (did a grep for + PdCreateOpenGLContext, nothing found). + + The mouse cursor doesn't look right. + +AmigaOS: -= NOT YET SUPPORTED =- + The OpenGL support isn't implemented yet. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + Audio can work, but isn't completely integrated in the CVS + version of SDL. + + The joystick subsystem isn't implemented yet. + + There's some confusion about the multi-threaded synchronization + primitives on AmigaOS, so mutexes and semaphores aren't correctly + implemented yet. + + The AmigaOS port was done by Gabriele.Greco@galactica.it diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..191a97fe9 --- /dev/null +++ b/COPYING @@ -0,0 +1,437 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/CREDITS b/CREDITS new file mode 100644 index 000000000..d8bb07d80 --- /dev/null +++ b/CREDITS @@ -0,0 +1,51 @@ + +Simple DirectMedia Layer CREDITS +Thanks to everyone who made this possible, including: + +* Cliff Matthews, for giving me a reason to start this project. :) + -- Executor rocks! *grin* + +* Scott Call, for making a home for SDL on the 'Net, Thanks! :) + +* Michael Samuel and Loki Entertainment Software, for the SDL mailing list + +* Patrick Trainor and Jim Boucher, for the QNX Neutrino port + +* Gabriele Greco, for the Amiga port + +* Stan Shebs, for the initial MacOS X port + +* Carsten Griwodz for the AIX port + +* Mattias Engdegerd, for help with the Solaris port and lots of other code + +* Kent B Mein, for a place to do the IRIX port + +* Ash, for a place to do the OSF/1 Alpha port + +* David Sowsy, for help with the BeOS port + +* Max Watson, Matt Slot, and Kyle for help with the MacOS port + +* Jon Taylor for the GGI front-end + +* Paulus Esterhazy, for the Visual C++ testing and libraries + +* Brenda Tantzen, for Metrowerks CodeWarrior on MacOS + +* Chris Nentwich, for the Hermes assembly blitters + +* Michael Vance and Jim Kutter for the X11 OpenGL support + +* Peter Wiklund, for the 1998 winning SDL logo, + and Arto Hamara, Steven Wong, and Kent Mein for other logo entries. + +* Stephane Peter, for the AAlib front-end and multi-threaded timer idea. + + And a big hand to everyone else who gave me appreciation, advice, + and suggestions, especially the good folks on the SDL mailing list. + +THANKS! :) + + -- Sam Lantinga + diff --git a/CWprojects.sea.bin b/CWprojects.sea.bin new file mode 100644 index 0000000000000000000000000000000000000000..4a41e7dff2a66eda68bb399c29b24ba369d12637 GIT binary patch literal 240194 zcmb5Ub8v6Xvp)KXZQHhO+qUgw$F_HD+qUgw$F^#K`JQ|3t@{1*>#FJQSv}Kh zYHB_6%+wkHyoiRQvxBvniK`2}i%~*1_mPk1^`rC-OSCUTnQ;nsF=98IOzUSoP3S%sCoT=vU33tTaiS_T2a2s{(0{FPe|y$ zEL6cibwWr000i~l4hR5xQ56FfR|jV^0HD8DRZLUW)z!mQ@ZZ?~M*{xi3lA)-NnKb& z6=o(TGvimT-4n2bG+7*x{DxJps9LYhK86_s!I+p$(n8S*3`eocD|VZt_^$YseKVFT zG-8c+x{?!c4DFKn=kbb1*m%KR(I+*dhd`m9Wz!y0B#xecu>qG&LiW={&SqdYV~nlt`$!Uu-!Ob_jAx{E3gd1v9WE06=1z_NQm(U65?aFd zmfY@9_p2&!4RgK3Bto)#VK$#=$UHUZ| z;S@MNjJ5Ug-LQ`nqt4K4hpr~QkAb+&*xj}`!sM^m9aN1^v5+*YEZNcHUZjjuLAqR8 z_#UL_)W@g?5QKUyFO+U!3QDBJ$yDn#%*85lGWV(3j2F6wQ|I&BxY$&t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fqS5Ivgt@^GD2@TQFyMFw z9L|7~=yV)}Nnp1i5usxYxQN}tI0HJ)z{zIdBs1U_2#f{~oB+)?3>d|LzaTJX9rj|t z*XVQz;ul9?@IwTj#&t3vzz=}WAuy<-5IBl44q!P{crXJ-L2lxZgcIN)2W;jq4rNFJ zI1hY=MiqxD)c{-!VW7j}&|)Eg^TBx?6Gv?!0JsrifilEVX4U|%gjfN6RCwDT`Vd)| z0W)|&l`>$U2O!Zp4-7p(G_clcT@NT3c2g}SL=OP>B?BMm0q7T)2Kc#!$c|=M3yKv| zgCRa}7VG)}ID-rr=mcm+2!WYq82Eh%ysj$*0)9iI1FtB z=ly#v`)&jV_*e|Ikptk5A?FKpNJPdVaJ~SxWWWr$M4T9K0%P2R0VguxAO?)+AC<1n zfEjf76&NssjsSxPh(SkCjWN!kBLwUW{4nSUgQ$e?L#G4&eE>gYh>Q@#eiIpA=Z$$Y z0)j`B$XT2~U^IBa5Hmw>XcWW>U;$)&9iJW8J>$m)$nuo|t@FHy!0UT$)CYTwtn(mh z&%iIn6`DeW($zQ9$^9PUGl+ z@Q8pAKiJm!KO5(hf*73s z-+A+oh@fZ@2mxN+Q9hn{FE2bLlIk7lgZJ@{Bpi+M2nq-XG84kRg9zR}2YiAEhR#4M Sfj(Xl;rMVL54?X^^#1~5cruFs literal 0 HcmV?d00001 diff --git a/INSTALL b/INSTALL new file mode 100644 index 000000000..5e98466e5 --- /dev/null +++ b/INSTALL @@ -0,0 +1,22 @@ + +To compile and install SDL: + + 1. Run './configure; make; make install' + + If you are cross-compiling from Linux to Win32, you should read + the file README.Win32 + + If you are compiling using Visual C++ on Win32, you should read + the file VisualC.html + + 2. Look at the example programs in ./test, and check out the HTML + documentation in ./docs to see how to use the SDL library. + + 3. Join the SDL developer mailing list by sending E-mail to + majordomo@lokigames.com + and including the line "subscribe sdl" in the body. + + + +That's it! +Sam Lantinga diff --git a/MPWmake.sea.bin b/MPWmake.sea.bin new file mode 100644 index 0000000000000000000000000000000000000000..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I?iv69 literal 0 HcmV?d00001 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..482944b5f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,85 @@ +# The top-level input Makefile for SDL + +# require automake 1.4 +AUTOMAKE_OPTIONS = 1.4 + +## Any directories that you want built and installed should go here. +SUBDIRS = src include docs + +## Any directories you want a part of the distribution should be listed +## here, as well as have a Makefile generated at the end of configure.in +## +## This only works for subdirectories one level deep. +DIST_SUBDIRS = $(SUBDIRS) docs + +# SDL runtime configuration script +bin_SCRIPTS = sdl-config + +# All the rest of the distributed files +EXTRA_DIST = \ + BUGS \ + TODO \ + COPYING \ + CREDITS \ + INSTALL \ + README \ + README-SDL.txt \ + README.Win32 \ + README.WinCE \ + README.MacOS \ + README.MacOSX \ + VisualC.html \ + VisualC.zip \ + MPWmake.sea.bin \ + CWprojects.sea.bin \ + WhatsNew \ + docs.html \ + sdl.m4 \ + autogen.sh \ + strip_fPIC.sh + +# M4 macro file for inclusion with autoconf +m4datadir = $(datadir)/aclocal +m4data_DATA = sdl.m4 + +# Rule to build tar-gzipped distribution package +$(PACKAGE)-$(VERSION).tar.gz: dist + +# Rule to build RPM distribution package +rpm: $(PACKAGE)-$(VERSION).tar.gz + cp $(PACKAGE)-$(VERSION).tar.gz /usr/src/redhat/SOURCES + rpm -ba SDL.spec + +# Rule to rebuild the export lists for BeOS, MacOS and Win32. +exports: + (cd src/main/beos/exports; $(MAKE)) + (cd src/main/macos/exports; $(MAKE)) + (cd src/main/win32/exports; $(MAKE)) + +# Rule to force automake to rebuild the library +changed: + @echo "This build target is no longer necessary" + +# Rule to install the libraries only - prevent rebuilding apps +install-lib: + cd src && $(MAKE) install-libLTLIBRARIES + +# Run ldconfig after installing the library: +install-hook: + -ldconfig + +# Grab the test programs for the distribution: +dist-hook: + if test -f test/Makefile; then (cd test; make distclean); fi + cp -rp test $(distdir) + rm -rf `find $(distdir) -type d -name CVS -print` + +# Create a CVS snapshot that people can run update -d on +CVSROOT = :pserver:guest@cvs.lokigames.com:/cvs +snapshot: + cvs -d $(CVSROOT) login + cvs -d $(CVSROOT) checkout -r devel_1_1_0 SDL + (cd SDL && ./autogen.sh) + mv SDL SDL-1.2 + tar zcvf $(HOME)/SDL-1.2.tar.gz SDL-1.2 + rm -rf SDL-1.2 diff --git a/README b/README new file mode 100644 index 000000000..17b57875c --- /dev/null +++ b/README @@ -0,0 +1,44 @@ + + Simple DirectMedia Layer + + (SDL) + + Version 1.2 + +--- +http://www.libsdl.org/ + +This is the Simple DirectMedia Layer, a generic API that provides low +level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, +and 2D framebuffer across multiple platforms. + +SDL is written in C, but works with C++ natively, and has bindings to +several other languages, including Ada, Eiffel, ML, Perl, and Python. + +The current version supports Linux, Windows, BeOS, MacOS, MacOS X, +FreeBSD, Solaris, and IRIX. The code contains support for Windows CE, +OpenBSD, NetBSD, AIX, OSF/Tru64, and QNX, but these are not yet +officially supported. + +This library is distributed under GNU LGPL version 2, which can be +found in the file "COPYING". This license allows you to use SDL +freely in commercial programs as long as you link with the dynamic +library. + +The best way to learn how to use SDL is to check out the header files in +the "include" subdirectory and the programs in the "test" subdirectory. +The header files and test programs are well commented and always up to date. +More documentation is available in HTML format in "./docs/index.html" + +The test programs in the "test" subdirectory are in the public domain. + +Frequently asked questions are answered online: + http://www.libsdl.org/faqs.html + +If you need help with the library, or just want to discuss SDL related +issues, you can join the developers mailing list: + http://www.libsdl.org/mailing-list.html + +Enjoy! + Sam Lantinga (slouken@libsdl.org) + diff --git a/README-SDL.txt b/README-SDL.txt new file mode 100644 index 000000000..4d36ca9dc --- /dev/null +++ b/README-SDL.txt @@ -0,0 +1,13 @@ + +Please distribute this file with the SDL runtime environment: + +The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library +designed to make it easy to write multi-media software, such as games and +emulators. + +The Simple DirectMedia Layer library source code is available from: +http://www.libsdl.org/ + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + diff --git a/README.CVS b/README.CVS new file mode 100644 index 000000000..b223d525f --- /dev/null +++ b/README.CVS @@ -0,0 +1,13 @@ + +The latest development version of SDL is available via CVS: + +cvs -d :pserver:guest@cvs.lokigames.com:/cvs login +# use the password "guest" +cvs -d :pserver:guest@cvs.lokigames.com:/cvs checkout SDL + +When you check a fresh copy of SDL out of CVS, you need to generate +the files used by make by running the "autogen.sh" script, which will +run aclocal, automake, autoconf and then run configure. + +There is a web interface to cvs at http://cvs.lokigames.com/ + diff --git a/README.MacOS b/README.MacOS new file mode 100644 index 000000000..0b1de3e64 --- /dev/null +++ b/README.MacOS @@ -0,0 +1,60 @@ + +============================================================================== +Using the Simple DirectMedia Layer with MacOS 7,8,9 on PPC +============================================================================== + +These instructions are for people using the Apple MPW environment: +http://developer.apple.com/tools/mpw-tools/ + +CodeWarrior projects are available in the CWprojects directory. + +============================================================================== +I. Building the Simple DirectMedia Layer libraries: + (This step isn't necessary if you have the SDL binary distribution) + + First, unpack the MPWmake.sea.hqx archive and move SDL.make into the + SDL directory. + + Start MPW + + Set the current directory within MPW to the SDL toplevel directory. + + Build "SDL" (Type Command-B and enter "SDL" in the dialog) + + If everything compiles successfully, you now have the PPC libraries + "SDL" and "SDLmain.o" in the 'lib' subdirectory. + +============================================================================== +II. Building the Simple DirectMedia Layer test programs: + + First, unpack the MPWmake.sea.hqx archive, move the new rsrc directory to + the main SDL directory, and move the makefiles in the new test subdirectory + to the SDL 'test' subdirectory. + + Start MPW + + Set the current directory within MPW to the SDL 'test' subdirectory. + + Build the programs that have an associated MPW makefile (file ending + with .make), including "testwin", "testalpha", and "graywin". + + Copy the SDL library file into the test directory, and run! + +============================================================================== +III. Building the Simple DirectMedia Layer demo programs: + + Copy one of the test program Makefiles to the demo directory + and modify it to match the sources in the demo. + +============================================================================== +IV. Enjoy! :) + + If you have a project you'd like me to know about, or want to ask questions, + go ahead and join the SDL developer's mailing list by sending e-mail to: + + majordomo@lokigames.com + + and put the line "subscribe sdl" in the body of the message. + +============================================================================== + diff --git a/README.MacOSX b/README.MacOSX new file mode 100644 index 000000000..0295bb3a4 --- /dev/null +++ b/README.MacOSX @@ -0,0 +1,44 @@ +============================================================================== +Using the Simple DirectMedia Layer with Mac OS X +============================================================================== + +These instructions are for people using Apple's Mac OS X (pronounced +"ten"). + +From the developer's point of view, OS X is a sort of hybrid Mac and +Unix system, and you have the option of using either traditional +command line tools or Apple's IDE ProjectBuilder (PB). + +To build using the command line, use the standard configure and make +process: + + ./configure + make + make install + +(You may need to create the subdirs of /usr/local manually.) + +For some reason, libtool doesn't run ranlib properly, so do this +manually: + + ranlib /usr/local/lib/libSDL.a + +To use the library once it's built, you need to use the "Carbon +framework", which is the port of the old Mac Toolbox to OS X. +To do this, use the -F and -framework arguments for compiling +and linking, respectively: + + cc -c myprog.c -I/usr/local/include/SDL -F/System/Library/Frameworks/Carbon.framework + cc myprog.o -L/usr/local/lib -lSDL -framework Carbon + +sdl-config knows about the linking path and -framework, so it's +recommended to use it to fill in your Makefile variables. + +[Add instructions for how to build using PB] + +As of this writing (Sep 2000), OS X is in public beta. This means +that while most of the APIs are frozen, things are still subject to +change, and many of the known problems will be resolved before the +final release comes out. + +Known bugs are listed in the file "BUGS" diff --git a/README.Win32 b/README.Win32 new file mode 100644 index 000000000..417eaf033 --- /dev/null +++ b/README.Win32 @@ -0,0 +1,53 @@ + +============================================================================== +Using the Simple DirectMedia Layer with Windows 95,NT +============================================================================== + +These instructions are for people using the GNU free compilers. +If you want to use Microsoft VC++ with SDL, read "VisualC.html" + +============================================================================== +I. Building the Simple DirectMedia Layer libraries: + (This step isn't necessary if you have the SDL binary distribution) + + First, get gcc compiler for Win32, which can be found at: + http://www.libsdl.org/Xmingw32/index.html + + Grab the cross configure and make scripts, and then run: + sh cross-configure.sh + sh cross-make.sh install + If you have already built SDL natively, you must do "make distclean" + before you build for Win32. + + If everything compiles successfully, you now have SDL.dll and gcc archive + libraries libSDLmain.a and libSDL.a installed in /usr/local/cross-tools/ + +============================================================================== +II. Building the Simple DirectMedia Layer test programs: + + This is easy once you have built the libraries: + + cd test; sh ../cross-configure.sh; sh ../cross-make.sh + +============================================================================== +III. Building the Simple DirectMedia Layer demo programs: + + Go to the directory containing the demo you want to build and type: + + sh cross-configure.sh; sh cross-make.sh + + Be sure to rename the demo to use the .exe extension, or Windows will + not be able to execute it. + +============================================================================== +IV. Enjoy! :) + + If you have a project you'd like me to know about, or want to ask questions, + go ahead and join the SDL developer's mailing list by sending e-mail to: + + majordomo@lokigames.com + + and put the line "subscribe sdl" in the body of the message. + +============================================================================== + diff --git a/README.WinCE b/README.WinCE new file mode 100644 index 000000000..944df834b --- /dev/null +++ b/README.WinCE @@ -0,0 +1,37 @@ + +NOTE: +SDL is NOT SUPPORTED on the WinCE platform! This is for experimental +purposes only. + +There are several SDL features not available in the WinCE port of SDL. + +- DirectX is not yet available +- Semaphores are not available +- Joystick support is not available +- CD-ROM control is not available + +In addition, there are several features that run in "degraded" mode: + +Preprocessor Symbol Effect +=================== ================================= + +SDL_systimer.c: +USE_GETTICKCOUNT Less accurate values for SDL time functions +USE_SETTIMER Use only a single marginally accurate timer + +SDL_syswm.c: +DISABLE_ICON_SUPPORT Can't set the runtime window icon + +SDL_sysmouse.c: +USE_STATIC_CURSOR Only the arrow cursor is available + +SDL_sysevents.c: +NO_GETKEYBOARDSTATE Can't get modifier state on keyboard focus + +SDL_dibevents.c: +NO_GETKEYBOARDSTATE Very limited keycode translation + +SDL_dibvideo.c: +NO_GETDIBITS Can't distinguish between 15 bpp and 16 bpp +NO_CHANGEDISPLAYSETTINGS No fullscreen support +NO_GAMMA_SUPPORT Gamma correction not available diff --git a/SDL.spec.in b/SDL.spec.in new file mode 100644 index 000000000..d4f170795 --- /dev/null +++ b/SDL.spec.in @@ -0,0 +1,90 @@ +%define name @PACKAGE@ +%define version @VERSION@ +%define release 1 + +Summary: Simple DirectMedia Layer +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{name}-%{version}.tar.gz +URL: http://www.libsdl.org/ +Copyright: LGPL +Group: System Environment/Libraries +BuildRoot: /var/tmp/%{name}-buildroot +Prefix: %{_prefix} + +%description +This is the Simple DirectMedia Layer, a generic API that provides low +level access to audio, keyboard, mouse, and display framebuffer across +multiple platforms. + +%package devel +Summary: Libraries, includes and more to develop SDL applications. +Group: Development/Libraries +Requires: %{name} + +%description devel +This is the Simple DirectMedia Layer, a generic API that provides low +level access to audio, keyboard, mouse, and display framebuffer across +multiple platforms. + +This is the libraries, include files and other resources you can use +to develop SDL applications. + + +%prep +rm -rf ${RPM_BUILD_ROOT} + +%setup -q + +%build +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-svga --disable-video-ggi --disable-video-aalib --disable-debug --enable-xfree86-glidehack +make + +%install +rm -rf $RPM_BUILD_ROOT +make install prefix=$RPM_BUILD_ROOT/%{prefix} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README-SDL.txt COPYING CREDITS BUGS +%{prefix}/lib/lib*.so.* + +%files devel +%defattr(-,root,root) +%doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew docs.html +%doc docs/index.html docs/html +%{prefix}/bin/*-config +%{prefix}/lib/lib*.a +%{prefix}/lib/lib*.so +%{prefix}/include/SDL/ +%{prefix}/man/man3/* +%{prefix}/share/aclocal/* + +%changelog +* Wed Jan 19 2000 Sam Lantinga +- Re-integrated spec file into SDL distribution +- 'name' and 'version' come from configure +- Some of the documentation is devel specific +- Removed SMP support from %build - it doesn't work with libtool anyway + +* Tue Jan 18 2000 Hakan Tandogan +- Hacked Mandrake sdl spec to build 1.1 + +* Sun Dec 19 1999 John Buswell +- Build Release + +* Sat Dec 18 1999 John Buswell +- Add symlink for libSDL-1.0.so.0 required by sdlbomber +- Added docs + +* Thu Dec 09 1999 Lenny Cartier +- v 1.0.0 + +* Mon Nov 1 1999 Chmouel Boudjnah +- First spec file for Mandrake distribution. + +# end of file diff --git a/TODO b/TODO new file mode 100644 index 000000000..8f5207aec --- /dev/null +++ b/TODO @@ -0,0 +1,23 @@ + +TODO list for the 1.2 release: + + * Use /etc/fb.modes, if available, like GGI does + +Wish list for the 1.3 development branch: + + * Add mousewheel events (new unified event architecture?) + * DirectInput joystick support needs to be implemented + * Be able to enumerate and select available audio and video drivers + * Fullscreen video mode support for MacOS X + * Explicit vertical retrace wait (maybe separate from SDL_Flip?) + * Shaped windows, windows without borders + * Multiple windows, multiple display support + * SDL_INIT_EVENTTHREAD on Windows and MacOS? + * Add a timestamp to events + * Use RDTSC for timer resolution on x86 hardware + * Add audio input API + +In the jump from 1.2 to 1.3, we should change the SDL_Rect members to +int and evaluate all the rest of the datatypes. This is the only place +we should do it though, since the 1.2 series should not break binary +compatibility in this way. diff --git a/VisualC.html b/VisualC.html new file mode 100644 index 000000000..df746c78e --- /dev/null +++ b/VisualC.html @@ -0,0 +1,235 @@ + + + + + + + + + Using SDL with Microsoft Visual C++ 5 and 6 + + + + + + + + + + + +

Using SDL with Microsoft Visual C++ 5 and 6

+ +

+ by Lion Kimbro +

+ + + +

+ You can either use the precompiled libraries from + + the SDL Download web site , + or you can build SDL yourself. +

+ + +

Building SDL

+ +

+ Unzip the VisualC.zip file into the directory + that contains this file (VisualC.html). +

+ +

+ Be certain that you unzip VisualC.zip + into this directory and not any other + directory. If you are using WinZip, be careful to + make sure that it extracts to this + folder, because it's convenient feature of + unzipping to a folder with the name of the + file currently being unzipped will get you in + trouble if you use it right now. And that's all + I have to say about that. +

+ +

+ Now that it's unzipped, go into the VisualC directory + that is created, and double-click on the VC++ + workspace file "SDL.dsw". + This should open up VisualC. +

+ +

+ You may be prompted at this point to upgrade the + workspace, should you be using a more recent version + of Visual C++. If so, allow the workspace to be + upgraded. +

+ + +

+ Build the .dll and .lib files. +

+ +

+ This is done by right clicking on each project in turn + (Projects are listed in the Workspace panel in the + FileView tab), and selecting "Build". +

+ +

+ You may get a few warnings, but you should not get + any errors. You do have to have at least the DirectX + 5 SDK installed, however. (I believe...) The latest + version of DirectX can be downloaded or purchased + on a cheap CD (my recommendation) from + Microsoft . +

+ +

+ Later, we will refer to the following .lib and .dll + files that have just been generated: +

+ + +
  • SDL.dll +
  • SDL.lib +
  • SDLmain.lib + + +

    + Search for these using the Windows Find (Windows-F) + utility, if you don't already know where they should be. + For those of you with a clue, look inside the Debug + or Release directories of the subdirectories of the + VisualC folder. (It might be easier to just use + Windows Find if this sounds confusing. And don't worry + about needing a clue; we all need visits from the + clue fairy frequently.) +

    + + + +

    Creating a Project with SDL

    + +

    + Create a project as a Win32 Application. +

    + +

    + Create a C++ file for your project. +

    + +

    + Set the C runtime to "Multi-threaded DLL" in the menu: + Project|Settings|C/C++ tab|Code Generation|Runtime Library . +

    + +

    + Add the SDL include directory to your list + of includes in the menu: + Project|Settings|C/C++ tab|Preprocessor|Additional include directories . +

    + +

    + The "include directory" I am referring to is the + include folder within the main SDL + directory (the one that this HTML file located + within. +

    + +

    + Now we're going to use the files that we had created + earlier in the Build SDL step. +

    + +

    + Copy the following files into your Project directory: +

    + + +
  • SDL.dll
  • +
    + +

    + Copy the following files into your Project directory, + and add them to your Project as well: +

    + + +
  • SDL.lib
  • +
  • SDLmain.lib
  • +
    + +

    + (To add them to your project, right click on your + project, and select "Add files to project") +

    + +

    + (I believe that it's not necessary to actually + copy the .lib files into your directory; you only + have to be certain that you add them to your Project. + If someone is so inclined, correct this document, or + + e-mail me , + and I'll fix this document.) +

    + + + +

    SDL 101, First Day of Class

    + +

    + Now create the basic body of your project. + The body of your program should take the following form: + + +

    +#include "SDL.h"
    +
    +int main( int argc, char* argv[] )
    +{
    +  // Body of the program goes here.
    +  return 0;
    +}
    +
    + +

    + +

    That's it!

    + +

    + I hope that this document has helped you get + through the most difficult part of using the + SDL: installing it. Suggestions for improvements + to this document should be sent to the writers + of this document. +

    + +

    + Thanks to Paulus Esterhazy (pesterhazy@gmx.net), for the work on VC++ port. +

    + +

    + This document was originally called "VisualC.txt", + and was written by + Sam Lantinga. +

    + +

    + Later, it was converted to HTML and expanded into + the document that you see today by + Lion Kimbro. +

    + + + + + + + + + + diff --git a/VisualC.zip b/VisualC.zip new file mode 100644 index 0000000000000000000000000000000000000000..1ff7741b4d28b9293214029347ffdd06746bb464 GIT binary patch literal 17800 zcmcJ%byOAD`#nq}rF4gsbazN2C0)|pE!|yGf^>IEr*tFTASo@<-SOTlxH%8^2gox;hb|fdq2-U$Vh-gz=8ljl*5H6zdiWl%Oemp5G4~^dmVE@IzK4^BlV2#^!d6Hu8ypKANdQy>5ER67G(JKF~U3c! zpdcV}Fd!fpe*^diL#uD=_^p(+V|Px*A4-{=l$LI%$AmiI>TT}WZlokcqV-EaWV1%X z!U|DuoH+C`SXj&{BKA92==#9B)ay&)5O?l8`~K_xgb}`YpK(rWH!frjxlRdBY_c{# zW1k#4QD|K&4rXL%f)7SCRvv`Qu2he)Mu+aE^upJ=CpFOWbRazr;0JDHDZwc0h}`wI zubl42-B{hMwb!JQsj}>E4y{^BiH)LIF$;O(&3YZwQsZN1JZNlL=K85wmeCEVLqB1+ z%{?P8=09&{Uv?eEJ_)yP`HWNCv20y4dRuNI8}L-Tmb#~1HimPPL^ht{*_fk}%+?gi z0=*e}4??c7|pXh%K(I3#;%V1SOqvEVK&7+2ugpJ!ks)7Ho2iVZWUQc%4?IU zFoowV1|_);p>?vI>lgO{<>_qCu38#~7uNTWVgA~~N~utaAGaUM}&D_J*48~r4%G89P#9gK`pogKKZ z^)Er(_d1D?#!>Cu1hj-OeG?36G3eiPX>DeYZ1A*8(`$p8ioX%7U&;^&K(gH!5X7Vv z2(8xQy?1avTt?M|?v2RV6ku9yPFnTwsR;s)ZQsWvQ};Wt%~6eEC*bwr@oTdN3s_7U zIXMzYBnz`KI-+Of`|w4l2}-%YRI4NdNtnm+l{g5jLfmB1R+ybtHP`GLx=|W1yDFyr zqm{sBoy4$k(05qUUa2zKtxLg|^Zs6gHsWiP^hnxY)aAdT7sE!8a-V3ASh+FrSnwOb zL=pIuhYBSNc>05dKLSIqf68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fp_)z4;5`?{|fNgy8xC0@&#Q-W&!10dEff1@yZ+!w*1!E5sn#-fn*b`Udyle*lQU z8^nJhKKypSc6HD}ek|=C0Q~*8dngU~^EUltnYr+Os-hx6}ePWX3J;8K5o zi9c)qU(Pk!PqlAh{!{JWqI$on`tKpVAFF1>`VAhi-tUn;05UML_v>-~dr;>A83Y7K zhCz7$g#0bG1Hc2ucK*Wqi!FW*?EF~i$nWrgm41)!0FeKeHT{{`o)G<7>Gy&BH}3u2 z@%?$G|6{4Iehc{1gdb4s|8jVLCbq<9zZUy#r~a7z0U-aW+`mu#ek^zWUm*Vk|397C zpNWl{>Yqyf-p~K-8vlJP@MF=={|X8$`==qn-wwvZk^6hM@W zEO4IrC)5Yx1~vqKE$;8FfFFy)Vfh*6&&B|tC}3mY0SyxHmlOm97w{RGB: + SDL_SRCALPHA set: + alpha-blend (using alpha-channel). + SDL_SRCCOLORKEY ignored. + SDL_SRCALPHA not set: + copy RGB. + if SDL_SRCCOLORKEY set, only copy the pixels matching the + RGB values of the source colour key, ignoring alpha in the + comparison. + + RGB->RGBA: + SDL_SRCALPHA set: + alpha-blend (using the source per-surface alpha value); + set destination alpha to opaque. + SDL_SRCALPHA not set: + copy RGB, set destination alpha to opaque. + both: + if SDL_SRCCOLORKEY set, only copy the pixels matching the + source colour key. + + RGBA->RGBA: + SDL_SRCALPHA set: + alpha-blend (using the source alpha channel) the RGB values; + leave destination alpha untouched. [Note: is this correct?] + SDL_SRCCOLORKEY ignored. + SDL_SRCALPHA not set: + copy all of RGBA to the destination. + if SDL_SRCCOLORKEY set, only copy the pixels matching the + RGB values of the source colour key, ignoring alpha in the + comparison. + + RGB->RGB: + SDL_SRCALPHA set: + alpha-blend (using the source per-surface alpha value). + SDL_SRCALPHA not set: + copy RGB. + both: + if SDL_SRCCOLORKEY set, only copy the pixels matching the + source colour key. + + As a special case, blits from surfaces with per-surface alpha + value of 128 (50% transparency) are optimised and much faster + than other alpha values. This does not apply to surfaces with + alpha channels (per-pixel alpha). + + New functions for manipulating the gamma of the display have + been added: + int SDL_SetGamma(float red, float green, float blue); + int SDL_SetGammaRamp(Uint8 *red, Uint8 *green, Uint8 *blue); + int SDL_GetGammaRamp(Uint8 *red, Uint8 *green, Uint8 *blue); + Gamma ramps are tables with 256 entries which map the screen color + components into actually displayed colors. For an example of + implementing gamma correction and gamma fades, see test/testgamma.c + Gamma control is not supported on all hardware. + +1.1.4: + The size of the SDL_CDtrack structure changed from 8 to 12 bytes + as the size of the length member was extended to 32 bits. + + You can now use SDL for 2D blitting with a GL mode by passing the + SDL_OPENGLBLIT flag to SDL_SetVideoMode(). You can specify 16 or + 32 bpp, and the data in the framebuffer is put into the GL scene + when you call SDL_UpdateRects(), and the scene will be visible + when you call SDL_GL_SwapBuffers(). + + Run the "testgl" test program with the -logo command line option + to see an example of this blending of 2D and 3D in SDL. + +1.1.3: + Added SDL_FreeRW() to the API, to complement SDL_AllocRW() + + Added resizable window support - just add SDL_RESIZABLE to the + SDL_SetVideoMode() flags, and then wait for SDL_VIDEORESIZE events. + See SDL_events.h for details on the new SDL_ResizeEvent structure. + + Added condition variable support, based on mutexes and semaphores. + SDL_CreateCond() + SDL_DestroyCond() + SDL_CondSignal() + SDL_CondBroadcast() + SDL_CondWait() + SDL_CondTimedWait() + The new function prototypes are in SDL_mutex.h + + Added counting semaphore support, based on the mutex primitive. + SDL_CreateSemaphore() + SDL_DestroySemaphore() + SDL_SemWait() + SDL_SemTryWait() + SDL_SemWaitTimeout() + SDL_SemPost() + SDL_SemValue() + The new function prototypes are in SDL_mutex.h + + Added support for asynchronous blitting. To take advantage of this, + you must set the SDL_ASYNCBLIT flag when setting the video mode and + creating surfaces that you want accelerated in this way. You must + lock surfaces that have this flag set, and the lock will block until + any queued blits have completed. + + Added YUV video overlay support. + The supported YUV formats are: YV12, IYUV, YUY2, UYVY, and YVYU. + This function creates an overlay surface: + SDL_CreateYUVOverlay() + You must lock and unlock the overlay to get access to the data: + SDL_LockYUVOverlay() SDL_UnlockYUVOverlay() + You can then display the overlay: + SDL_DisplayYUVOverlay() + You must free the overlay when you are done using it: + SDL_FreeYUVOverlay() + See SDL_video.h for the full function prototypes. + + The joystick hat position constants have been changed: + Old constant New constant + ------------ ------------ + 0 SDL_HAT_CENTERED + 1 SDL_HAT_UP + 2 SDL_HAT_RIGHTUP + 3 SDL_HAT_RIGHT + 4 SDL_HAT_RIGHTDOWN + 5 SDL_HAT_DOWN + 6 SDL_HAT_LEFTDOWN + 7 SDL_HAT_LEFT + 8 SDL_HAT_LEFTUP + The new constants are bitmasks, so you can check for the + individual axes like this: + if ( hat_position & SDL_HAT_UP ) { + } + and you'll catch left-up, up, and right-up. + +1.1.2: + Added multiple timer support: + SDL_AddTimer() and SDL_RemoveTimer() + + SDL_WM_SetIcon() now respects the icon colorkey if mask is NULL. + +1.1.0: + Added initial OpenGL support. + First set GL attributes (such as RGB depth, alpha depth, etc.) + SDL_GL_SetAttribute() + Then call SDL_SetVideoMode() with the SDL_OPENGL flag. + Perform all of your normal GL drawing. + Finally swap the buffers with the new SDL function: + SDL_GL_SwapBuffers() + See the new 'testgl' test program for an example of using GL with SDL. + + You can load GL extension functions by using the function: + SDL_GL_LoadProcAddress() + + Added functions to initialize and cleanup specific SDL subsystems: + SDL_InitSubSystem() and SDL_QuitSubSystem() + + Added user-defined event type: + typedef struct { + Uint8 type; + int code; + void *data1; + void *data2; + } SDL_UserEvent; + This structure is in the "user" member of an SDL_Event. + + Added a function to push events into the event queue: + SDL_PushEvent() + + Example of using the new SDL user-defined events: + { + SDL_Event event; + + event.type = SDL_USEREVENT; + event.user.code = my_event_code; + event.user.data1 = significant_data; + event.user.data2 = 0; + SDL_PushEvent(&event); + } + + Added a function to get mouse deltas since last query: + SDL_GetRelativeMouseState() + + Added a boolean datatype to SDL_types.h: + SDL_bool = { SDL_TRUE, SDL_FALSE } + + Added a function to get the current audio status: + SDL_GetAudioState(); + It returns one of: + SDL_AUDIO_STOPPED, + SDL_AUDIO_PLAYING, + SDL_AUDIO_PAUSED + + Added an AAlib driver (ASCII Art) - by Stephane Peter. + +1.0.6: + The input grab state is reset after each call to SDL_SetVideoMode(). + The input is grabbed by default in fullscreen mode, and ungrabbed in + windowed mode. If you want to set input grab to a particular value, + you should set it after each call to SDL_SetVideoMode(). + +1.0.5: + Exposed SDL_AudioInit(), SDL_VideoInit() + Added SDL_AudioDriverName() and SDL_VideoDriverName() + + Added new window manager function: + SDL_WM_ToggleFullScreen() + This is currently implemented only on Linux + + The ALT-ENTER code has been removed - it's not appropriate for a + lib to bind keys when they aren't even emergency escape sequences. + + ALT-ENTER functionality can be implemented with the following code: + + int Handle_AltEnter(const SDL_Event *event) + { + if ( event->type == SDL_KEYDOWN ) { + if ( (event->key.keysym.sym == SDLK_RETURN) && + (event->key.keysym.mod & KMOD_ALT) ) { + SDL_WM_ToggleFullScreen(SDL_GetVideoSurface()); + return(0); + } + } + return(1); + } + SDL_SetEventFilter(Handle_AltEnter); + +1.0.3: + Under X11, if you grab the input and hide the mouse cursor, + the mouse will go into a "relative motion" mode where you + will always get relative motion events no matter how far in + each direction you move the mouse - relative motion is not + bounded by the edges of the window (though the absolute values + of the mouse positions are clamped by the size of the window). + The SVGAlib, framebuffer console, and DirectInput drivers all + have this behavior naturally, and the GDI and BWindow drivers + never go into "relative motion" mode. + +1.0.2: + Added a function to enable keyboard repeat: + SDL_EnableKeyRepeat() + + Added a function to grab the mouse and keyboard input + SDL_WM_GrabInput() + + Added a function to iconify the window. + SDL_WM_IconifyWindow() + If this function succeeds, the application will receive an event + signaling SDL_APPACTIVE event + +1.0.1: + Added constants to SDL_audio.h for 16-bit native byte ordering: + AUDIO_U16SYS, AUDIO_S16SYS + +1.0.0: + New public release + +Version 0.11: + +0.11.5: + A new function SDL_GetVideoSurface() has been added, and returns + a pointer to the current display surface. + + SDL_AllocSurface() has been renamed SDL_CreateRGBSurface(), and + a new function SDL_CreateRGBSurfaceFrom() has been added to allow + creating an SDL surface from an existing pixel data buffer. + + Added SDL_GetRGB() to the headers and documentation. + +0.11.4: + SDL_SetLibraryPath() is no longer meaningful, and has been removed. + +0.11.3: + A new flag for SDL_Init(), SDL_INIT_NOPARACHUTE, prevents SDL from + installing fatal signal handlers on operating systems that support + them. + +Version 0.9: + +0.9.15: + SDL_CreateColorCursor() has been removed. Color cursors should + be implemented as sprites, blitted by the application when the + cursor moves. To get smooth color cursor updates when the app + is busy, pass the SDL_INIT_EVENTTHREAD flag to SDL_Init(). This + allows you to handle the mouse motion in another thread from an + event filter function, but is currently only supported by Linux + and BeOS. Note that you'll have to protect the display surface + from multi-threaded access by using mutexes if you do this. + + Thread-safe surface support has been removed from SDL. + This makes blitting somewhat faster, by removing SDL_MiddleBlit(). + Code that used SDL_MiddleBlit() should use SDL_LowerBlit() instead. + You can make your surfaces thread-safe by allocating your own + mutex and making lock/unlock calls around accesses to your surface. + +0.9.14: + SDL_GetMouseState() now takes pointers to int rather than Uint16. + + If you set the SDL_WINDOWID environment variable under UNIX X11, + SDL will use that as the main window instead of creating it's own. + This is an unsupported extension to SDL, and not portable at all. + +0.9.13: + Added a function SDL_SetLibraryPath() which can be used to specify + the directory containing the SDL dynamic libraries. This is useful + for commercial applications which ship with particular versions + of the libraries, and for security on multi-user systems. + If this function is not used, the default system directories are + searched using the native dynamic object loading mechanism. + + In order to support C linkage under Visual C++, you must declare + main() without any return type: + main(int argc, char *argv[]) { + /* Do the program... */ + return(0); + } + C++ programs should also return a value if compiled under VC++. + + The blit_endian member of the SDL_VideoInfo struct has been removed. + + SDL_SymToASCII() has been replaced with SDL_GetKeyName(), so there + is now no longer any function to translate a keysym to a character. + + The SDL_keysym structure has been extended with a 'scancode' and + 'unicode' member. The 'scancode' is a hardware specific scancode + for the key that was pressed, and may be 0. The 'unicode' member + is a 16-bit UNICODE translation of the key that was pressed along + with any modifiers or compose keys that have been pressed. + If no UNICODE translation exists for the key, 'unicode' will be 0. + + Added a function SDL_EnableUNICODE() to enable/disable UNICODE + translation of character keypresses. Translation defaults off. + + To convert existing code to use the new API, change code which + uses SDL_SymToASCII() to get the keyname to use SDL_GetKeyName(), + and change code which uses it to get the ASCII value of a sym to + use the 'unicode' member of the event keysym. + +0.9.12: + There is partial support for 64-bit datatypes. I don't recommend + you use this if you have a choice, because 64-bit datatypes are not + supported on many platforms. On platforms for which it is supported, + the SDL_HAS_64BIT_TYPE C preprocessor define will be enabled, and + you can use the Uint64 and Sint64 datatypes. + + Added functions to SDL_endian.h to support 64-bit datatypes: + SDL_SwapLE64(), SDL_SwapBE64(), + SDL_ReadLE64(), SDL_ReadBE64(), SDL_WriteLE64(), SDL_WriteBE64() + + A new member "len_ratio" has been added to the SDL_AudioCVT structure, + and allows you to determine either the original buffer length or the + converted buffer length, given the other. + + A new function SDL_FreeWAV() has been added to the API to free data + allocated by SDL_LoadWAV_RW(). This is necessary under Win32 since + the gcc compiled DLL uses a different heap than VC++ compiled apps. + + SDL now has initial support for international keyboards using the + Latin character set. + If a particular mapping is desired, you can set the DEFAULT_KEYBOARD + compile-time variable, or you can set the environment variable + "SDL_KEYBOARD" to a string identifying the keyboard mapping you desire. + The valid values for these variables can be found in SDL_keyboard.c + + Full support for German and French keyboards under X11 is implemented. + +0.9.11: + The THREADED_EVENTS compile-time define has been replaced with the + SDL_INIT_EVENTTHREAD flag. If this flag is passed to SDL_Init(), + SDL will create a separate thread to perform input event handling. + If this flag is passed to SDL_Init(), and the OS doesn't support + event handling in a separate thread, SDL_Init() will fail. + Be sure to add calls to SDL_Delay() in your main thread to allow + the OS to schedule your event thread, or it may starve, leading + to slow event delivery and/or dropped events. + Currently MacOS and Win32 do not support this flag, while BeOS + and Linux do support it. I recommend that your application only + use this flag if absolutely necessary. + + The SDL thread function passed to SDL_CreateThread() now returns a + status. This status can be retrieved by passing a non-NULL pointer + as the 'status' argument to SDL_WaitThread(). + + The volume parameter to SDL_MixAudio() has been increased in range + from (0-8) to (0-128) + + SDL now has a data source abstraction which can encompass a file, + an area of memory, or any custom object you can envision. It uses + these abstractions, SDL_RWops, in the endian read/write functions, + and the built-in WAV and BMP file loaders. This means you can load + WAV chunks from memory mapped files, compressed archives, network + pipes, or anything else that has a data read abstraction. + + There are three built-in data source abstractions: + SDL_RWFromFile(), SDL_RWFromFP(), SDL_RWFromMem() + along with a generic data source allocation function: + SDL_AllocRW() + These data sources can be used like stdio file pointers with the + following convenience functions: + SDL_RWseek(), SDL_RWread(), SDL_RWwrite(), SDL_RWclose() + These functions are defined in the new header file "SDL_rwops.h" + + The endian swapping functions have been turned into macros for speed + and SDL_CalculateEndian() has been removed. SDL_endian.h now defines + SDL_BYTEORDER as either SDL_BIG_ENDIAN or SDL_LIL_ENDIAN depending on + the endianness of the host system. + + The endian read/write functions now take an SDL_RWops pointer + instead of a stdio FILE pointer, to support the new data source + abstraction. + + The SDL_*LoadWAV() functions have been replaced with a single + SDL_LoadWAV_RW() function that takes a SDL_RWops pointer as it's + first parameter, and a flag whether or not to automatically + free it as the second parameter. SDL_LoadWAV() is a macro for + backward compatibility and convenience: + SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); + + The SDL_*LoadBMP()/SDL_*SaveBMP() functions have each been replaced + with a single function that takes a SDL_RWops pointer as it's + first parameter, and a flag whether or not to automatically + free it as the second parameter. SDL_LoadBMP() and SDL_SaveBMP() + are macros for backward compatibility and convenience: + SDL_LoadBMP_RW(SDL_RWFromFile("sample.bmp", "rb"), 1, ...); + SDL_SaveBMP_RW(SDL_RWFromFile("sample.bmp", "wb"), 1, ...); + Note that these functions use SDL_RWseek() extensively, and should + not be used on pipes or other non-seekable data sources. + +0.9.10: + The Linux SDL_SysWMInfo and SDL_SysWMMsg structures have been + extended to support multiple types of display drivers, as well as + safe access to the X11 display when THREADED_EVENTS is enabled. + The new structures are documented in the SDL_syswm.h header file. + + Thanks to John Elliott , the UK keyboard + should now work properly, as well as the "Windows" keys on US + keyboards. + + The Linux CD-ROM code now reads the CD-ROM devices from /etc/fstab + instead of trying to open each block device on the system. + The CD must be listed in /etc/fstab as using the iso9660 filesystem. + + On Linux, if you define THREADED_EVENTS at compile time, a separate + thread will be spawned to gather X events asynchronously from the + graphics updates. This hasn't been extensively tested, but it does + provide a means of handling keyboard and mouse input in a separate + thread from the graphics thread. (This is now enabled by default.) + + A special access function SDL_PeepEvents() allows you to manipulate + the event queue in a thread-safe manner, including peeking at events, + removing events of a specified type, and adding new events of arbitrary + type to the queue (use the new 'user' member of the SDL_Event type). + + If you use SDL_PeepEvents() to gather events, then the main graphics + thread needs to call SDL_PumpEvents() periodically to drive the event + loop and generate input events. This is not necessary if SDL has been + compiled with THREADED_EVENTS defined, but doesn't hurt. + + A new function SDL_ThreadID() returns the identifier associated with + the current thread. + +0.9.9: + The AUDIO_STEREO format flag has been replaced with a new 'channels' + member of the SDL_AudioSpec structure. The channels are 1 for mono + audio, and 2 for stereo audio. In the future more channels may be + supported for 3D surround sound. + + The SDL_MixAudio() function now takes an additional volume parameter, + which should be set to SDL_MIX_MAXVOLUME for compatibility with the + original function. + + The CD-ROM functions which take a 'cdrom' parameter can now be + passed NULL, and will act on the last successfully opened CD-ROM. + +0.9.8: + No changes, bugfixes only. + +0.9.7: + No changes, bugfixes only. + +0.9.6: + Added a fast rectangle fill function: SDL_FillRect() + + Addition of a useful function for getting info on the video hardware: + const SDL_VideoInfo *SDL_GetVideoInfo(void) + This function replaces SDL_GetDisplayFormat(). + + Initial support for double-buffering: + Use the SDL_DOUBLEBUF flag in SDL_SetVideoMode() + Update the screen with a new function: SDL_Flip() + + SDL_AllocSurface() takes two new flags: + SDL_SRCCOLORKEY means that the surface will be used for colorkey blits + and if the hardware supports hardware acceleration of colorkey blits + between two surfaces in video memory, to place the surface in video + memory if possible, otherwise it will be placed in system memory. + SDL_SRCALPHA means that the surface will be used for alpha blits and + if the hardware supports hardware acceleration of alpha blits between + two surfaces in video memory, to place the surface in video memory + if possible, otherwise it will be placed in system memory. + SDL_HWSURFACE now means that the surface will be created with the + same format as the display surface, since having surfaces in video + memory is only useful for fast blitting to the screen, and you can't + blit surfaces with different surface formats in video memory. + +0.9.5: + You can now pass a NULL mask to SDL_WM_SetIcon(), and it will assume + that the icon consists of the entire image. + + SDL_LowerBlit() is back -- but don't use it on the display surface. + It is exactly the same as SDL_MiddleBlit(), but doesn't check for + thread safety. + + Added SDL_FPLoadBMP(), SDL_FPSaveBMP(), SDL_FPLoadWAV(), which take + a FILE pointer instead of a file name. + + Added CD-ROM audio control API: + SDL_CDNumDrives() + SDL_CDName() + SDL_CDOpen() + SDL_CDStatus() + SDL_CDPlayTracks() + SDL_CDPlay() + SDL_CDPause() + SDL_CDResume() + SDL_CDStop() + SDL_CDEject() + SDL_CDClose() + +0.9.4: + No changes, bugfixes only. + +0.9.3: + Mouse motion event now includes relative motion information: + Sint16 event->motion.xrel, Sint16 event->motion.yrel + + X11 keyrepeat handling can be disabled by defining IGNORE_X_KEYREPEAT + (Add -DIGNORE_X_KEYREPEAT to CFLAGS line in obj/x11Makefile) + +0.9.2: + No changes, bugfixes only. + +0.9.1: + Removed SDL_MapSurface() and SDL_UnmapSurface() -- surfaces are now + automatically mapped on blit. + +0.8.0: + SDL stable release diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 000000000..0670b2db9 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,619 @@ +# Local macros for the SDL configure.in script + +dnl Function to link an architecture specific file +dnl LINK_ARCH_SRC(source_dir, arch, source_file) +AC_DEFUN(COPY_ARCH_SRC, +[ + echo "Copying $1/$2/$3 -> $1/$3" + old="$srcdir/$1/$2/$3" + new="$srcdir/$1/$3" + cat >$new <<__EOF__ +/* WARNING: This file was automatically generated! + * Original: $old + */ +__EOF__ + cat >>$new <$old +]) + +# +# --- esd.m4 --- +# +# Configure paths for ESD +# Manish Singh 98-9-30 +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS +dnl +AC_DEFUN(AM_PATH_ESD, +[dnl +dnl Get the cflags and libraries from the esd-config script +dnl +AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], + esd_prefix="$withval", esd_prefix="") +AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], + esd_exec_prefix="$withval", esd_exec_prefix="") +AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], + , enable_esdtest=yes) + + if test x$esd_exec_prefix != x ; then + esd_args="$esd_args --exec-prefix=$esd_exec_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_exec_prefix/bin/esd-config + fi + fi + if test x$esd_prefix != x ; then + esd_args="$esd_args --prefix=$esd_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_prefix/bin/esd-config + fi + fi + + AC_PATH_PROG(ESD_CONFIG, esd-config, no) + min_esd_version=ifelse([$1], ,0.2.7,$1) + AC_MSG_CHECKING(for ESD - version >= $min_esd_version) + no_esd="" + if test "$ESD_CONFIG" = "no" ; then + no_esd=yes + else + ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` + ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` + + esd_major_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + esd_minor_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_esdtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" +dnl +dnl Now check if the installed ESD is sufficiently new. (Also sanity +dnl checks the results of esd-config to some extent +dnl + rm -f conf.esdtest + AC_TRY_RUN([ +#include +#include +#include +#include + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.esdtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_esd_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_esd_version"); + exit(1); + } + + if (($esd_major_version > major) || + (($esd_major_version == major) && ($esd_minor_version > minor)) || + (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); + printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); + printf("*** to point to the correct copy of esd-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_esd" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$ESD_CONFIG" = "no" ; then + echo "*** The esd-config script installed by ESD could not be found" + echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ESD_CONFIG environment variable to the" + echo "*** full path to esd-config." + else + if test -f conf.esdtest ; then + : + else + echo "*** Could not run ESD test program, checking why..." + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding ESD or finding the wrong" + echo "*** version of ESD. If it is not finding ESD, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means ESD was incorrectly installed" + echo "*** or that you have moved ESD since it was installed. In the latter case, you" + echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + ESD_CFLAGS="" + ESD_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(ESD_CFLAGS) + AC_SUBST(ESD_LIBS) + rm -f conf.esdtest +]) + +## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- +## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. +## Originally by Gordon Matzigkeit , 1996 +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## +## As a special exception to the GNU General Public License, if you +## distribute this file as part of a program that contains a +## configuration script generated by Autoconf, you may include it under +## the same distribution terms that you use for the rest of that program. + +# serial 40 AC_PROG_LIBTOOL +AC_DEFUN(AC_PROG_LIBTOOL, +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl + +# Save cache, so that ltconfig can load it +AC_CACHE_SAVE + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +|| AC_MSG_ERROR([libtool configure failed]) + +# Reload cache, that may have been modified by ltconfig +AC_CACHE_LOAD + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Redirect the config.log output again, so that the ltconfig log is not +# clobbered by the next message. +exec 5>>./config.log +]) + +AC_DEFUN(AC_LIBTOOL_SETUP, +[AC_PREREQ(2.13)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_RANLIB])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_NM])dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +dnl + +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + +# Check for any special flags to pass to ltconfig. +libtool_flags="--cache-file=$cache_file" +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], +[libtool_flags="$libtool_flags --enable-dlopen"]) +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[libtool_flags="$libtool_flags --enable-win32-dll"]) +AC_ARG_ENABLE(libtool-lock, + [ --disable-libtool-lock avoid locking (might break parallel builds)]) +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$lt_target" in +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +]) +esac +]) + +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support +AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) + +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's +AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) + +# AC_ENABLE_SHARED - implement the --enable-shared flag +# Usage: AC_ENABLE_SHARED[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_SHARED, [dnl +define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(shared, +changequote(<<, >>)dnl +<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl +]) + +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared +AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no)]) + +# AC_ENABLE_STATIC - implement the --enable-static flag +# Usage: AC_ENABLE_STATIC[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_STATIC, [dnl +define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(static, +changequote(<<, >>)dnl +<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl +]) + +# AC_DISABLE_STATIC - set the default static flag to --disable-static +AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no)]) + + +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl +define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(fast-install, +changequote(<<, >>)dnl +<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_fast_install=yes ;; +no) enable_fast_install=no ;; +*) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl +]) + +# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install +AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no)]) + +# AC_PROG_LD - find the path to the GNU or non-GNU linker +AC_DEFUN(AC_PROG_LD, +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + ac_prog=`($CC -print-prog-name=ld | tr -d '\r') 2>&5` + case "$ac_prog" in + # Accept absolute paths. +changequote(,)dnl + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' +changequote([,])dnl + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(ac_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$ac_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_PROG_LD_GNU +]) + +AC_DEFUN(AC_PROG_LD_GNU, +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi]) +]) + +# AC_PROG_NM - find the path to a BSD-compatible name lister +AC_DEFUN(AC_PROG_NM, +[AC_MSG_CHECKING([for BSD-compatible nm]) +AC_CACHE_VAL(ac_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + break + else + ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm +fi]) +NM="$ac_cv_path_NM" +AC_MSG_RESULT([$NM]) +]) + +# AC_CHECK_LIBM - check for math library +AC_DEFUN(AC_CHECK_LIBM, +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case "$lt_target" in +*-*-beos* | *-*-cygwin*) + # These system don't have libm + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, main, LIBM="-lm") + ;; +esac +]) + +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl convenience library and INCLTDL to the include flags for +# the libltdl header and adds --enable-ltdl-convenience to the +# configure arguments. Note that LIBLTDL and INCLTDL are not +# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not +# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed +# with '${top_builddir}/' and INCLTDL will be prefixed with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case "$enable_ltdl_convenience" in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) +]) + +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl installable library and INCLTDL to the include flags for +# the libltdl header and adds --enable-ltdl-install to the configure +# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is +# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed +# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will +# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed +# with '${top_srcdir}/' (note the single quotes!). If your package is +# not flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, main, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + INCLTDL= + fi +]) + +dnl old names +AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl +AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl +AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl +AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl +AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl +AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl +AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl + +dnl This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL])dnl diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 000000000..d0df72a92 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +echo "Generating build information using aclocal, automake and autoconf" +echo "This may take a while ..." + +# Touch the timestamps on all the files since CVS messes them up +directory=`dirname $0` +touch $directory/configure.in + +# Regenerate configuration files +aclocal +automake --foreign --include-deps +autoconf +(cd test; aclocal; automake --foreign --include-deps; autoconf) + +# Run configure for this platform +#./configure $* +echo "Now you are ready to run ./configure" diff --git a/config.guess b/config.guess new file mode 100755 index 000000000..71de137a6 --- /dev/null +++ b/config.guess @@ -0,0 +1,1368 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-03-16' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + ppc:Linux:*:*) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unknown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then LIBC="libc1" ; fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 ;; + alpha:Linux:*:*) + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i?86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i?86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + esac + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i?86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i?86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100755 index 000000000..7146a2ffc --- /dev/null +++ b/config.sub @@ -0,0 +1,1357 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-03-19' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[234567]86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure.in b/configure.in new file mode 100644 index 000000000..850b927f0 --- /dev/null +++ b/configure.in @@ -0,0 +1,1891 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(README) + +dnl Set various version strings - taken gratefully from the GTk sources +# +# Making releases: +# Edit include/SDL/SDL_version.h and change the version, then: +# SDL_MICRO_VERSION += 1; +# SDL_INTERFACE_AGE += 1; +# SDL_BINARY_AGE += 1; +# if any functions have been added, set SDL_INTERFACE_AGE to 0. +# if backwards compatibility has been broken, +# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0. +# +SDL_MAJOR_VERSION=1 +SDL_MINOR_VERSION=2 +SDL_MICRO_VERSION=0 +SDL_INTERFACE_AGE=0 +SDL_BINARY_AGE=0 +SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION + +AC_SUBST(SDL_MAJOR_VERSION) +AC_SUBST(SDL_MINOR_VERSION) +AC_SUBST(SDL_MICRO_VERSION) +AC_SUBST(SDL_INTERFACE_AGE) +AC_SUBST(SDL_BINARY_AGE) +AC_SUBST(SDL_VERSION) + +# libtool versioning +LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION +LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE` +LT_REVISION=$SDL_INTERFACE_AGE +LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE` + +AC_SUBST(LT_RELEASE) +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) + +dnl Setup for automake +AM_INIT_AUTOMAKE(SDL, $SDL_VERSION) + +dnl Detect the canonical host and target build environment +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +dnl Check for tools + +AC_LIBTOOL_WIN32_DLL +AM_PROG_LIBTOOL +AC_PROG_MAKE_SET +AC_PROG_CC +AC_C_INLINE +AC_C_CONST +case "$target" in + *-*-beos*) + AC_PROG_CXX + ;; + *-*-aix*) + AC_PROG_CXX + ;; + # This is stupid, but necessary on some versions of Linux (joysticks) + *-*-linux*) + AC_PROG_CXX + ;; +esac +AC_PROG_INSTALL +AC_FUNC_ALLOCA + +dnl The alpha architecture needs special flags for binary portability +case "$target" in + alpha*-*-linux*) + if test x$ac_cv_prog_gcc = xyes; then + CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" + fi + ;; +esac + +dnl Add compiler-specific optimization flags + +dnl See if the user wants aggressive optimizations of the code +AC_ARG_ENABLE(debug, +[ --enable-debug Disable aggressive optimizations [default=yes]], + , enable_debug=yes) +if test x$enable_debug != xyes; then + if test x$ac_cv_prog_gcc = xyes; then + CFLAGS="$CFLAGS -fexpensive-optimizations" + # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2 + # CFLAGS="$CFLAGS -fomit-frame-pointer" + fi + case "$target" in + i486-*-*) + if test x$ac_cv_prog_gcc = xyes; then + CFLAGS="$CFLAGS -march=486" + fi + ;; + i?86-*-*) + if test x$ac_cv_prog_gcc = xyes; then + CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro" + fi + ;; + *-*-osf*) + if test x$ac_cv_prog_gcc != xyes; then + CFLAGS="-g3 -fast -arch host" + fi + ;; + esac +fi + +dnl Add verbose warnings by default, and allow ANSI compliance checking +AC_ARG_ENABLE(strict-ansi, +[ --enable-strict-ansi Enable strict ANSI compliance build [default=no]], + , enable_strict_ansi=no) +if test x$ac_cv_prog_gcc = xyes; then + CFLAGS="$CFLAGS -Wall" + if test x$enable_strict_ansi = xyes; then + CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE" + fi +fi + +dnl Initialize the compiler and linker flags for SDL applications + +SDL_CFLAGS="" +SDL_LIBS="-lSDL" + +dnl Add the math library for the new gamma correction support + +case "$target" in + *-*-cygwin* | *-*-mingw32*) + MATHLIB="" + ;; + *-*-beos*) + MATHLIB="" + ;; + *-*-darwin*) + MATHLIB="" + ;; + *) + MATHLIB="-lm" + ;; +esac +SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB" + +dnl Enable/disable various subsystems of the SDL library + +AC_ARG_ENABLE(audio, +[ --enable-audio Enable the audio subsystem [default=yes]], + , enable_audio=yes) +if test x$enable_audio = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS audio" + SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la" +else + CFLAGS="$CFLAGS -DDISABLE_AUDIO" +fi +AC_ARG_ENABLE(video, +[ --enable-video Enable the video subsystem [default=yes]], + , enable_video=yes) +if test x$enable_video = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS video" + SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la" +else + CFLAGS="$CFLAGS -DDISABLE_VIDEO" +fi +AC_ARG_ENABLE(events, +[ --enable-events Enable the events subsystem [default=yes]], + , enable_events=yes) +if test x$enable_video = xyes -a x$enable_events = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS events" + SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la" +else + CFLAGS="$CFLAGS -DDISABLE_EVENTS" +fi +AC_ARG_ENABLE(joystick, +[ --enable-joystick Enable the joystick subsystem [default=yes]], + , enable_joystick=yes) +if test x$enable_joystick = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS joystick" + SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la" +else + CFLAGS="$CFLAGS -DDISABLE_JOYSTICK" +fi +AC_ARG_ENABLE(cdrom, +[ --enable-cdrom Enable the cdrom subsystem [default=yes]], + , enable_cdrom=yes) +if test x$enable_cdrom = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom" + SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la" +else + CFLAGS="$CFLAGS -DDISABLE_CDROM" +fi +AC_ARG_ENABLE(threads, +[ --enable-threads Enable the threading subsystem [default=yes]], + , enable_threads=yes) +SDL_EXTRADIRS="$SDL_EXTRADIRS thread" +SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la" +if test x$enable_threads != xyes; then + CFLAGS="$CFLAGS -DDISABLE_THREADS" + COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) +fi +AC_ARG_ENABLE(timers, +[ --enable-timers Enable the timer subsystem [default=yes]], + , enable_timers=yes) +if test x$enable_timers = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS timer" + SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la" +else + CFLAGS="$CFLAGS -DDISABLE_TIMERS" +fi +AC_ARG_ENABLE(endian, +[ --enable-endian Enable the endian subsystem [default=yes]], + , enable_endian=yes) +if test x$enable_endian = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS endian" + SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la" +else + CFLAGS="$CFLAGS -DDISABLE_ENDIAN" +fi +AC_ARG_ENABLE(file, +[ --enable-file Enable the file subsystem [default=yes]], + , enable_file=yes) +if test x$enable_file = xyes; then + SDL_EXTRADIRS="$SDL_EXTRADIRS file" + SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la" +else + CFLAGS="$CFLAGS -DDISABLE_FILE" +fi + +dnl See if the OSS audio interface is supported +CheckOSS() +{ + AC_ARG_ENABLE(oss, +[ --enable-oss support the OSS audio API [default=yes]], + , enable_oss=yes) + if test x$enable_audio = xyes -a x$enable_oss = xyes; then + AC_MSG_CHECKING(for OSS audio support) + have_oss=no + AC_TRY_COMPILE([ + #ifdef linux + #include + #endif + #ifdef __FreeBSD__ + #include + #endif + #ifdef __bsdi__ + #include + #endif + #ifdef __USLC__ + #include + #endif + ],[ + int arg = SNDCTL_DSP_SETFRAGMENT; + ],[ + have_oss=yes + ]) + AC_MSG_RESULT($have_oss) + if test x$have_oss = xyes; then + CFLAGS="$CFLAGS -DOSS_SUPPORT" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp" + AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma" + AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la" + fi + fi +} + +dnl See if the ALSA audio interface is supported +CheckALSA() +{ + AC_ARG_ENABLE(alsa, +[ --enable-alsa support the ALSA audio API [default=yes]], + , enable_alsa=yes) + if test x$enable_audio = xyes -a x$enable_alsa = xyes; then + have_alsa=no + AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes) + AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes) + if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then + CFLAGS="$CFLAGS -DALSA_SUPPORT" + SYSTEM_LIBS="$SYSTEM_LIBS -lasound" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa" + AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la" + fi + fi +} + +dnl Find the ESD includes and libraries +CheckESD() +{ + AC_ARG_ENABLE(esd, +[ --enable-esd support the Enlightened Sound Daemon [default=yes]], + , enable_esd=yes) + if test x$enable_audio = xyes -a x$enable_esd = xyes; then + AM_PATH_ESD(0.2.8, [ + CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS" + SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd" + AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la" + ]) + fi +} + +CheckARTSC() +{ + AC_ARG_ENABLE(arts, +[ --enable-arts support the Analog Real Time Synthesizer [default=yes]], + , enable_arts=yes) + if test x$enable_audio = xyes -a x$enable_arts = xyes; then + AC_PATH_PROG(ARTSCCONFIG, artsc-config) + if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then + : # arts isn't installed + else + ARTSC_CFLAGS=`$ARTSCCONFIG --cflags` + ARTSC_LIBS=`$ARTSCCONFIG --libs` + AC_MSG_CHECKING(for aRts development environment) + audio_arts=no + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ARTSC_CFLAGS" + AC_TRY_COMPILE([ + #include + ],[ + arts_stream_t stream; + ],[ + audio_arts=yes + ]) + CFLAGS="$save_CFLAGS" + AC_MSG_RESULT($audio_arts) + if test x$audio_arts = xyes; then + CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS" + SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts" + AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la" + fi + fi + fi +} + +dnl See if the NAS audio interface is supported +CheckNAS() +{ + AC_ARG_ENABLE(nas, +[ --enable-nas support the NAS audio API [default=yes]], + , enable_nas=yes) + if test x$enable_audio = xyes -a x$enable_nas = xyes; then + AC_MSG_CHECKING(for NAS audio support) + have_nas=no + if test -r /usr/X11R6/include/audio/audiolib.h ; then + have_nas=yes + fi + AC_MSG_RESULT($have_nas) + if test x$have_nas = xyes; then + CFLAGS="$CFLAGS -DNAS_SUPPORT" + SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas" + AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la" + fi + fi +} + +dnl See if we can use x86 assembly blitters +CheckNASM() +{ + dnl Make sure we are running on an x86 platform + case $target in + i?86*) + ;; + *) + # Nope, bail early. + return + ;; + esac + dnl Check for NASM (for assembly blit routines) + AC_ARG_ENABLE(nasm, +[ --enable-nasm use nasm assembly blitters on x86 [default=yes]], + , enable_nasm=yes) + if test x$enable_video = xyes -a x$enable_nasm = xyes; then + AC_PATH_PROG(NASM, nasm) + if test x$NASM = x -o x$NASM = x'"$NASM"'; then + : # nasm isn't installed + else + CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes" + case $ARCH in + win32) + NASMFLAGS="-f win32" + ;; + *) + NASMFLAGS="-f elf" + ;; + esac + AC_SUBST(NASMFLAGS) + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes" + SDL_EXTRADIRS="$SDL_EXTRADIRS hermes" + SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la" + fi + fi +} + +dnl Find the X11 include and library directories +CheckX11() +{ + AC_ARG_ENABLE(video-x11, +[ --enable-video-x11 use X11 video driver [default=yes]], + , enable_video_x11=yes) + if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then + AC_PATH_X + AC_PATH_XTRA + if test x$have_x = xyes; then + CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11" + if test x$ac_cv_func_shmat != xyes; then + CFLAGS="$CFLAGS -DNO_SHARED_MEMORY" + fi + SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11" + VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la" + + AC_ARG_ENABLE(video-x11-vm, +[ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]], + , enable_video_x11_vm=yes) + if test x$enable_video_x11_vm = xyes; then + AC_MSG_CHECKING(for XFree86 VidMode 1.0 support) + video_x11_vm=no + AC_TRY_COMPILE([ + #include + #include + ],[ + ],[ + video_x11_vm=yes + ]) + AC_MSG_RESULT($video_x11_vm) + if test x$video_x11_vm = xyes; then + CFLAGS="$CFLAGS -DXFREE86_VM" + # Check for nasty XFree86 4.0/Glide hack + AC_ARG_ENABLE(xfree86_glidehack, +[ --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]], + , enable_xfreeglidehack=no) + if test x$enable_xfree86_glidehack = xyes; then + ac_save_libs="$LIBS" + LIBS="$LIBS $X_LIBS -lX11 -lXext" + if test x$xfree86_glidehack = x; then + AC_CHECK_LIB(Xxf86vm, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm) + fi + if test x$xfree86_glidehack = x; then + AC_CHECK_LIB(Xxf86vm40, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm40) + fi + LIBS="$ac_save_libs" + fi + if test x$xfree86_glidehack != x; then + CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK" + SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack" + else + SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm" + fi + AC_MSG_CHECKING(for XFree86 VidMode gamma support) + video_x11_vmgamma=no + AC_TRY_COMPILE([ + #include + #include + ],[ + XF86VidModeGamma gamma; + ],[ + video_x11_vmgamma=yes + ]) + AC_MSG_RESULT($video_x11_vmgamma) + if test x$video_x11_vmgamma = xyes; then + CFLAGS="$CFLAGS -DXFREE86_VMGAMMA" + fi + fi + fi + AC_ARG_ENABLE(video-x11-dgamouse, +[ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]], + , enable_video_x11_dgamouse=yes) + AC_MSG_CHECKING(for XFree86 DGA 1.0 support) + video_x11_dga=no + AC_TRY_COMPILE([ + #include + #include + ],[ + ],[ + video_x11_dga=yes + ]) + AC_MSG_RESULT($video_x11_dga) + if test x$video_x11_dga = xyes; then + CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE" + if test x$enable_video_x11_dgamouse = xyes; then + CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE" + fi + SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga" + fi + AC_ARG_ENABLE(video-x11-xv, +[ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]], + , enable_video_x11_xv=yes) + if test x$enable_video_x11_xv = xyes; then + AC_MSG_CHECKING(for XFree86 XvImage support) + video_x11_xv=no + AC_TRY_COMPILE([ + #include + #include + #include + #include + #include + ],[ + XvImage *image; + ],[ + video_x11_xv=yes + ]) + AC_MSG_RESULT($video_x11_xv) + if test x$video_x11_xv = xyes; then + CFLAGS="$CFLAGS -DXFREE86_XV" + SYSTEM_LIBS="$SYSTEM_LIBS -lXv" + fi + fi + fi + fi +} +CheckPHOTON() +{ + AC_ARG_ENABLE(video-photon, +[ --enable-video-photon use QNX Photonvideo driver [default=yes]], + , enable_video_photon=yes) + if test x$enable_video = xyes -a x$enable_video_photon = xyes; then + AC_MSG_CHECKING(for QNX Photon support) + video_photon=no + AC_TRY_COMPILE([ + #include + #include + #include + #include + ],[ + PgDisplaySettings_t *visual; + ],[ + video_photon=yes + ]) + AC_MSG_RESULT($video_photon) + if test x$video_photon = xyes; then + SYSTEM_LIBS="$SYSTEM_LIBS -lph" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon" + VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la" + fi + fi +} + +dnl Find the X11 DGA 2.0 include and library directories +CheckDGA() +{ + AC_ARG_ENABLE(video-dga, +[ --enable-video-dga use DGA 2.0 video driver [default=yes]], + , enable_video_dga=yes) + if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then + AC_MSG_CHECKING(for XFree86 DGA 2.0 support) + video_x11_dga2=no + AC_TRY_COMPILE([ + #include + #include + ],[ + XDGAEvent xevent; + ],[ + video_x11_dga2=yes + ]) + AC_MSG_RESULT($video_x11_dga2) + if test x$video_x11_dga2 = xyes; then + CFLAGS="$CFLAGS -DENABLE_DGA" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga" + VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la" + fi + fi +} + +dnl Find the framebuffer console includes +CheckFBCON() +{ + AC_ARG_ENABLE(video-fbcon, +[ --enable-video-fbcon use framebuffer console video driver [default=yes]], + , enable_video_fbcon=yes) + if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then + AC_MSG_CHECKING(for framebuffer console support) + video_fbcon=no + AC_TRY_COMPILE([ + #include + #include + #include + ],[ + ],[ + video_fbcon=yes + ]) + AC_MSG_RESULT($video_fbcon) + if test x$video_fbcon = xyes; then + CFLAGS="$CFLAGS -DENABLE_FBCON" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon" + VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la" + fi + fi +} + +dnl Find the GGI includes +CheckGGI() +{ + AC_ARG_ENABLE(video-ggi, +[ --enable-video-ggi use GGI video driver [default=no]], + , enable_video_ggi=no) + if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then + AC_MSG_CHECKING(for GGI support) + video_ggi=no + AC_TRY_COMPILE([ + #include + #include + ],[ + ],[ + video_ggi=yes + ]) + AC_MSG_RESULT($video_ggi) + if test x$video_ggi = xyes; then + CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI" + SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg" + + VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi" + VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la" + fi + fi +} + +dnl Find the SVGAlib includes and libraries +CheckSVGA() +{ + AC_ARG_ENABLE(video-svga, +[ --enable-video-svga use SVGAlib video driver [default=no]], + , enable_video_svga=no) + if test x$enable_video = xyes -a x$enable_video_svga = xyes; then + AC_MSG_CHECKING(for SVGAlib (1.4.0+) support) + video_svga=no + AC_TRY_COMPILE([ + #include + #include + #include + ],[ + if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) { + exit(0); + } + ],[ + video_svga=yes + ]) + AC_MSG_RESULT($video_svga) + if test x$video_svga = xyes; then + CFLAGS="$CFLAGS -DENABLE_SVGALIB" + SYSTEM_LIBS="$SYSTEM_LIBS -lvga" + + VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga" + VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la" + fi + fi +} + +dnl Find the AAlib includes +CheckAAlib() +{ + AC_ARG_ENABLE(video-aalib, +[ --enable-video-aalib use AAlib video driver [default=no]], + , enable_video_aalib=no) + if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then + AC_MSG_CHECKING(for AAlib support) + video_aalib=no + AC_TRY_COMPILE([ + #include + ],[ + ],[ + video_aalib=yes + ]) + AC_MSG_RESULT($video_aalib) + if test x$video_aalib = xyes; then + CFLAGS="$CFLAGS -DENABLE_AALIB" + SYSTEM_LIBS="$SYSTEM_LIBS -laa" + + VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib" + VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la" + fi + fi +} + +dnl Check to see if OpenGL support is desired +AC_ARG_ENABLE(video-opengl, +[ --enable-video-opengl include OpenGL context creation [default=yes]], + , enable_video_opengl=yes) + +dnl Find OpenGL +CheckOpenGL() +{ + if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then + AC_MSG_CHECKING(for OpenGL (GLX) support) + video_opengl=no + AC_TRY_COMPILE([ + #include + #include + #include /* For loading extensions */ + ],[ + ],[ + video_opengl=yes + ]) + AC_MSG_RESULT($video_opengl) + if test x$video_opengl = xyes; then + CFLAGS="$CFLAGS -DHAVE_OPENGL" + AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl") + fi + fi +} + +dnl Check for BeOS OpenGL +CheckBeGL() +{ + if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then + CFLAGS="$CFLAGS -DHAVE_OPENGL" + SYSTEM_LIBS="$SYSTEM_LIBS -lGL" + fi +} + +dnl Check for MacOS OpenGL +CheckMacGL() +{ + if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then + CFLAGS="$CFLAGS -DHAVE_OPENGL" + case "$target" in + *-*-darwin*) + SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL" + esac + fi +} + +dnl See if we can use the new unified event interface in Linux 2.4 +CheckInputEvents() +{ + dnl Check for Linux 2.4 unified input event interface support + AC_ARG_ENABLE(input-events, +[ --enable-input-events use Linux 2.4 unified input interface [default=yes]], + , enable_input_events=yes) + if test x$enable_input_events = xyes; then + AC_MSG_CHECKING(for Linux 2.4 unified input interface) + use_input_events=no + AC_TRY_COMPILE([ + #include + ],[ + #ifndef EVIOCGNAME + #error EVIOCGNAME() ioctl not available + #endif + ],[ + use_input_events=yes + ]) + AC_MSG_RESULT($use_input_events) + if test x$use_input_events = xyes; then + CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS" + fi + fi +} + +dnl See what type of thread model to use on Linux and Solaris +CheckPTHREAD() +{ + dnl Check for pthread support + AC_ARG_ENABLE(pthreads, +[ --enable-pthreads use POSIX threads for multi-threading [default=yes]], + , enable_pthreads=yes) + dnl This is used on Linux for glibc binary compatibility (Doh!) + AC_ARG_ENABLE(pthread-sem, +[ --enable-pthread-sem use pthread semaphores [default=yes]], + , enable_pthread_sem=yes) + ac_save_libs="$LIBS" + case "$target" in + *-*-bsdi*) + pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" + pthread_lib="" + ;; + *-*-darwin*) + pthread_cflags="-D_THREAD_SAFE" +# causes Carbon.p complaints? +# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" + ;; + *-*-freebsd*) + pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" + pthread_lib="-pthread" + ;; + *-*-openbsd*) + pthread_cflags="-D_REENTRANT" + pthread_lib="-pthread" + ;; + *-*-solaris*) + pthread_cflags="-D_REENTRANT" + pthread_lib="-lpthread -lposix4" + ;; + *-*-sysv5*) + pthread_cflags="-D_REENTRANT -Kthread" + pthread_lib="" + ;; + *-*-irix*) + pthread_cflags="-D_SGI_MP_SOURCE" + pthread_lib="-lpthread" + ;; + *-*-aix*) + pthread_cflags="-D_REENTRANT -mthreads" + pthread_lib="-lpthread" + ;; + *-*-qnx*) + pthread_cflags="" + pthread_lib="" + ;; + *) + pthread_cflags="-D_REENTRANT" + pthread_lib="-lpthread" + ;; + esac + LIBS="$LIBS $pthread_lib" + if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then + AC_MSG_CHECKING(for pthreads) + use_pthreads=no + AC_TRY_LINK([ + #include + ],[ + pthread_attr_t type; + pthread_attr_init(&type); + ],[ + use_pthreads=yes + ]) + AC_MSG_RESULT($use_pthreads) + if test x$use_pthreads = xyes; then + CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS" + SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags" + SDL_LIBS="$SDL_LIBS $pthread_lib" + + # Check to see if recursive mutexes are available + AC_MSG_CHECKING(for recursive mutexes) + has_recursive_mutexes=no + AC_TRY_LINK([ + #include + ],[ + pthread_mutexattr_t attr; + #ifdef linux + pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + #else + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + #endif + ],[ + has_recursive_mutexes=yes + ]) + # Some systems have broken recursive mutex implementations + case "$target" in + *-*-solaris*) + has_recursive_mutexes=no + ;; + esac + AC_MSG_RESULT($has_recursive_mutexes) + if test x$has_recursive_mutexes != xyes; then + CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX" + fi + + # Check to see if this is broken glibc 2.0 pthreads + case "$target" in + *-*-linux*) + AC_MSG_CHECKING(for broken glibc 2.0 pthreads) + glibc20_pthreads=no + AC_TRY_COMPILE([ + #include + #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0) + #warning Working around a bug in glibc 2.0 pthreads + #else + #error pthread implementation okay + #endif /* glibc 2.0 */ + ],[ + ],[ + glibc20_pthreads=yes + ]) + AC_MSG_RESULT($glibc20_pthreads) + esac + fi + fi + LIBS="$ac_save_libs" + + AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h) + have_semun=no + AC_TRY_COMPILE([ + #include + #include + ],[ + union semun t; + ],[ + have_semun=yes + ]) + AC_MSG_RESULT($have_semun) + if test x$have_semun = xyes; then + CFLAGS="$CFLAGS -DHAVE_SEMUN" + fi + + # See if we can use clone() on Linux directly + use_clone=no + if test x$enable_threads = xyes -a x$use_pthreads != xyes; then + case "$target" in + *-*-linux*) + use_clone=yes + ;; + *) + CFLAGS="$CFLAGS -DFORK_HACK" + ;; + esac + fi + AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes) +} + +dnl Determine whether the compiler can produce Win32 executables +CheckWIN32() +{ + AC_MSG_CHECKING(Win32 compiler) + have_win32_gcc=no + AC_TRY_COMPILE([ + #include + ],[ + ],[ + have_win32_gcc=yes + ]) + AC_MSG_RESULT($have_win32_gcc) + if test x$have_win32_gcc != xyes; then + AC_MSG_ERROR([ +*** Your compiler ($CC) does not produce Win32 executables! + ]) + fi + + dnl See if the user wants to redirect standard output to files + AC_ARG_ENABLE(stdio-redirect, +[ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]], + , enable_stdio_redirect=yes) + if test x$enable_stdio_redirect != xyes; then + CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT" + fi +} + +dnl Find the DirectX includes and libraries +CheckDIRECTX() +{ + AC_ARG_ENABLE(directx, +[ --enable-directx use DirectX for Win32 audio/video [default=yes]], + , enable_directx=yes) + if test x$enable_directx = xyes; then + AC_MSG_CHECKING(for DirectX headers and libraries) + use_directx=no + AC_TRY_COMPILE([ + #include "src/video/windx5/directx.h" + ],[ + ],[ + use_directx=yes + ]) + AC_MSG_RESULT($use_directx) + fi + AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes) + + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon" + SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon" + VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la" + # Enable the DIB driver + CFLAGS="$CFLAGS -DENABLE_WINDIB" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib" + VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la" + # See if we should enable the DirectX driver + if test x$use_directx = xyes; then + CFLAGS="$CFLAGS -DENABLE_DIRECTX" + SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5" + VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la" + fi +} + +dnl Set up the BWindow video driver on BeOS +CheckBWINDOW() +{ + CFLAGS="$CFLAGS -DENABLE_BWINDOW" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow" + VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la" +} + +dnl Set up the Mac toolbox video driver for Mac OS 7-9 +CheckTOOLBOX() +{ + VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon" + VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" + VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" +} + +dnl Set up the Mac toolbox video driver for Mac OS X +CheckCARBON() +{ + # "MACOSX" is not an official definition, but it's commonly + # accepted as a way to differentiate between what runs on X + # and what runs on older Macs - while in theory "Carbon" defns + # are consistent between the two, in practice Carbon is still + # changing. -sts Aug 2000 + mac_autoconf_target_workaround="MAC" + CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \ + -fpascal-strings -DENABLE_TOOLBOX -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/maccommon -I\$(top_srcdir)/src/video/macrom -I\$(top_srcdir)/src/video/macdsp" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon" + VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" + VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" +} + +dnl Set up the kernel statistics library for Solaris +CheckKSTAT() +{ + CFLAGS="$CFLAGS -DHAVE_KSTAT" + SYSTEM_LIBS="$SYSTEM_LIBS -lkstat" +} + +case "$target" in + *-*-linux*) + ARCH=linux + CheckNASM + CheckOSS + CheckALSA + CheckARTSC + CheckESD + CheckNAS + CheckX11 + CheckDGA + CheckFBCON + CheckGGI + CheckSVGA + CheckAAlib + CheckOpenGL + CheckInputEvents + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + # We use the OSS and ALSA API's, not the Sun audio API + #if test x$enable_audio = xyes; then + # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + #fi + # Set up files for the joystick library + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + if test x$use_pthreads != xyes; then + COPY_ARCH_SRC(src/thread, linux, clone.S) + fi + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + else + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + fi + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + if test x$glibc20_pthreads = xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + else + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-bsdi*) + ARCH=bsdi + CheckNASM + CheckOSS + CheckNAS + CheckX11 + CheckDGA + CheckSVGA + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + # (No cdrom support yet) + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-freebsd*) + ARCH=freebsd + CheckNASM + CheckOSS + CheckARTSC + CheckESD + CheckNAS + CheckX11 + CheckDGA + CheckSVGA + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + # We use the OSS and ALSA API's, not the Sun audio API + #if test x$enable_audio = xyes; then + # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + #fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, freebsd, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + else + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + fi + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-netbsd*) + ARCH=netbsd + CheckNASM + CheckOSS + CheckARTSC + CheckESD + CheckNAS + CheckX11 + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + # NetBSD does not define "unix" + CFLAGS="$CFLAGS -Dunix" + ;; + *-*-openbsd*) + ARCH=openbsd + CheckNASM + CheckOSS + CheckARTSC + CheckESD + CheckNAS + CheckX11 + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + else + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + fi + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-sysv5*) + ARCH=sysv5 + CheckNASM + CheckOSS + CheckARTSC + CheckESD + CheckNAS + CheckX11 + CheckAAlib + CheckOpenGL + CheckPTHREAD + CheckKSTAT + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-solaris*) + ARCH=solaris + CheckNASM + CheckARTSC + CheckESD + CheckNAS + CheckX11 + CheckAAlib + CheckOpenGL + CheckPTHREAD + CheckKSTAT + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-irix*) + ARCH=irix + CheckNAS + CheckX11 + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia" + AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la" + LIBS="$LIBS -laudio" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + # (No CD-ROM support yet) + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + if test x$use_pthreads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + if test x$enable_pthread_sem != xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + else + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + fi + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + else + COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-hpux*) + ARCH=hpux + CheckNAS + CheckX11 + CheckGGI + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + # (No CD-ROM support yet) + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-aix*) + ARCH=aix + CheckNAS + CheckX11 + CheckGGI + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio" + AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, aix, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-osf*) + ARCH=osf + CheckNAS + CheckX11 + CheckGGI + CheckAAlib + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + # (No joystick support yet) + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + # (No cdrom support yet) + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-qnx*) + ARCH=qnx + CheckNAS + CheckPHOTON + CheckX11 + CheckOpenGL + CheckPTHREAD + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + CFLAGS="$CFLAGS -DALSA_SUPPORT" + SYSTEM_LIBS="$SYSTEM_LIBS -lasound" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto" + AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" + fi + # Set up files for the joystick library + if test x$enable_joystick = xyes; then + # (No joystick support yet) + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, qnx, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + ;; + *-*-cygwin* | *-*-mingw32*) + ARCH=win32 + if test "$build" != "$target"; then # cross-compiling + # Default cross-compile location + ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc + else + # Look for the location of the tools and install there + ac_default_prefix=$BUILD_PREFIX + fi + CheckWIN32 + CheckDIRECTX + CheckNASM + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, win32, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib" + AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la" + if test x$use_directx = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5" + AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la" + fi + fi + # Set up files for the joystick library + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, win32, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c) + fi + # The Win32 platform requires special setup + SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" + SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" + ;; + *-*-beos*) + ARCH=beos + ac_default_prefix=/boot/develop/tools/gnupro + CheckNASM + CheckBWINDOW + CheckBeGL + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc) + COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio" + AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la" + fi + # Set up files for the joystick library + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, beos, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c) + fi + # The BeOS platform requires special libraries + SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" + ;; + *-*-macos*) + # This would be used if cross-compiling to MacOS 9. No way to + # use it at present, but Apple is working on a X-to-9 compiler + # for which this case would be handy. + ARCH=macos + CheckTOOLBOX + CheckMacGL + # Set up files for the main() stub + COPY_ARCH_SRC(src/main, macos, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" + AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" + fi + # Set up files for the joystick library + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, macos, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) + COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c) + fi + # The MacOS platform requires special setup + SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" + SDL_LIBS="-lSDLmain $SDL_LIBS" + ;; + *-*-darwin* ) + # Strictly speaking, we want "Mac OS X", not "Darwin", which is + # just the OS X kernel sans upper layers like Carbon. But + # config.guess comes back with "darwin", so go with the flow. + ARCH=macos + CheckCARBON + CheckMacGL + CheckPTHREAD + # Set up files for the main() stub + # COPY_ARCH_SRC(src/main, macos, SDL_main.c) + COPY_ARCH_SRC(src/main, linux, SDL_main.c) + # Set up files for the audio library + if test x$enable_audio = xyes; then + AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" + AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" + fi + # Set up files for the joystick library + if test x$enable_joystick = xyes; then + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" + fi + # Set up files for the cdrom library + if test x$enable_cdrom = xyes; then + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) + fi + # Set up files for the thread library + if test x$enable_threads = xyes; then + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) + else + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) + fi + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) + fi + # Set up files for the timer library + if test x$enable_timers = xyes; then + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) + fi + # The MacOS X platform requires special setup + SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework" + SDL_LIBS="$SDL_LIBS -framework Carbon" + ;; + *) + AC_MSG_ERROR(Unsupported target: Please add to configure.in) + ;; +esac +AC_SUBST(ARCH) + +# Set the conditional variables for this target +AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux) +AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris) +AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix) +AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi) +AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd) +AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd) +AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix) +AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32) +AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos) +AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos) + +# Set conditional variables for shared and static library selection. +# These are not used in any Makefile.am but in sdl-config.in. +AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes]) +AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) + +# Set runtime shared library paths as needed + +if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then + SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" +fi + +if test $ARCH = solaris; then + SDL_RLD_FLAGS="-R\${exec_prefix}/lib" +fi + +dnl Output the video drivers we use +if test x$enable_video = xtrue; then + if test "$VIDEO_SUBDIRS" = ""; then + AC_MSG_ERROR(*** No video drivers are enabled!) + fi +fi +AC_SUBST(AUDIO_SUBDIRS) +AC_SUBST(AUDIO_DRIVERS) +AC_SUBST(VIDEO_SUBDIRS) +AC_SUBST(VIDEO_DRIVERS) +AC_SUBST(JOYSTICK_SUBDIRS) +AC_SUBST(JOYSTICK_DRIVERS) +AC_SUBST(SDL_EXTRADIRS) +AC_SUBST(SDL_EXTRALIBS) +AC_SUBST(SYSTEM_LIBS) + +dnl Expand the cflags and libraries needed by apps using SDL +AC_SUBST(SDL_CFLAGS) +AC_SUBST(SDL_LIBS) +AC_SUBST(SDL_RLD_FLAGS) + +dnl Expand the libraries needed for static linking +AC_SUBST(SYSTEM_LIBS) +dnl Expand the include directories for building SDL +CFLAGS="$CFLAGS -I\$(top_srcdir)/include" +CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian" +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file" +CXXFLAGS="$CFLAGS" + +# Finally create all the generated files +dnl Important: Any directory that you want to be in the distcheck should +dnl have a file listed here, so that configure generates the +dnl subdirectories on the build target. +AC_OUTPUT([ +Makefile +docs/Makefile +docs/html/Makefile +docs/man3/Makefile +include/Makefile +src/Makefile +src/main/Makefile +src/audio/Makefile +src/audio/alsa/Makefile +src/audio/arts/Makefile +src/audio/baudio/Makefile +src/audio/dma/Makefile +src/audio/dmedia/Makefile +src/audio/dsp/Makefile +src/audio/esd/Makefile +src/audio/macrom/Makefile +src/audio/nas/Makefile +src/audio/nto/Makefile +src/audio/paudio/Makefile +src/audio/sun/Makefile +src/audio/ums/Makefile +src/audio/windib/Makefile +src/audio/windx5/Makefile +src/video/Makefile +src/video/cybergfx/Makefile +src/video/x11/Makefile +src/video/dga/Makefile +src/video/fbcon/Makefile +src/video/ggi/Makefile +src/video/maccommon/Makefile +src/video/macdsp/Makefile +src/video/macrom/Makefile +src/video/svga/Makefile +src/video/aalib/Makefile +src/video/wincommon/Makefile +src/video/windib/Makefile +src/video/windx5/Makefile +src/video/bwindow/Makefile +src/video/photon/Makefile +src/events/Makefile +src/joystick/Makefile +src/joystick/beos/Makefile +src/joystick/dummy/Makefile +src/joystick/linux/Makefile +src/joystick/macos/Makefile +src/joystick/win32/Makefile +src/cdrom/Makefile +src/thread/Makefile +src/timer/Makefile +src/endian/Makefile +src/file/Makefile +src/hermes/Makefile +sdl-config +SDL.spec +], [chmod +x sdl-config]) diff --git a/docs.html b/docs.html new file mode 100644 index 000000000..5ba0a187d --- /dev/null +++ b/docs.html @@ -0,0 +1,498 @@ + +SDL Stable Release + + +[separator] +

    +This source is in development. It may contain API changes, and may not be +fully tested on all supported platforms. The current stable release may +be found at the main SDL page. +

    + +

    API Documentation

    +

    + +

    +Major changes since SDL 1.0.0: +

    +
      +
    • 1.2.0: Added initial support for HP-UX (thanks Stephanie) +
    • 1.2.0: Added initial support for BSDI (thanks Kurt) +
    • 1.2.0: Fixed blitting 32-bit ARGB images to SDL_OPENGLBLIT screens +
    • 1.2.0: Fixed automake build dependencies (thanks Markus!) +
    • 1.2.0: Added 24 bpp support to software YUV display functions +
    • 1.2.0: Don't bomb trying to get DGA mouse on XFree86 4.0 +
    • 1.2.0: Added initial support for OSF/Tru64 (thanks Anders) +
    • 1.1.8: Fixed joystick hat motion on MacOS +
    • 1.1.8: Don't detect mouse and keyboard as joystick on MacOS +
    • 1.1.8: Check for OpenGL 1.2 before using 16-bit SDL_OPENGLBLIT +
    • 1.1.8: Added support for /dev/sound/* in Linux 2.4 +
    • 1.1.8: Fixed crash when blitting to RLE encoded surfaces +
    • 1.1.8: Fixed 8-bit audio on MacOS X +
    • 1.1.8: Fixed keyboard handling on MacOS X and MacOS classic +
    • 1.1.8: Fixed mouse cursor visibility when switching apps on MacOS +
    • 1.1.8: Implemented semaphore support on MacOS X +
    • 1.1.8: Worked around broken sem_getvalue() on MacOS X +
    • 1.1.8: Fixed 16-bit big-endian audio on MacOS X and MacOS classic +
    • 1.1.8: Fixed mutex locking on Linux glibc 2.0 +
    • 1.1.8: SDL_Quit() removes the parachute signal handlers +
    • 1.1.8: Added NAS audio server support (thanks Erik!) +
    • 1.1.8: Added SDL_NOFRAME for frameless windows (thanks Andreas) +
    • 1.1.8: Added support for resizable windows on MacOS +
    • 1.1.8: Added a function to query the surface clip rectangle +
    • 1.1.8: Added a function to query the current event filter +
    • 1.1.8: The X11 XVideo adapter is now locked (thanks Jeffrey) +
    • 1.1.8: Improved the speed of fullscreen OpenGL on Windows +
    • 1.1.8: Added ELO touchscreen support for fbcon (thanks Alex) +
    • 1.1.8: Added accelerated MacOS X OpenGL support +
    • 1.1.8: Surface lock and unlock operations can now be nested +
    • 1.1.8: Optimized fillrect for PPC video memory (thanks Mattias) +
    • 1.1.8: Work around "blackout" problem with XVideo acceleration +
    • 1.1.8: Obtain correct key state on X11 focus (thanks Mattias) +
    • 1.1.8: Fixed keyboard handling on the framebuffer console +
    • 1.1.8: Added basic support for VGA16 framebuffer console +
    • 1.1.8: Open a new virtual terminal if possible on fbcon +
    • 1.1.8: Fixed default audio driver on FreeBSD (thanks Maxim) +
    • 1.1.8: Fixed joystick crash on Windows (thanks Pete) +
    • 1.1.7: Expanded documentation from the SDL Documentation Project +
    • 1.1.7: Report X11 client message events if SYSWMEVENTS enabled +
    • 1.1.7: Added support for a single hat on Windows joysticks +
    • 1.1.7: The gamma ramp routines now take arrays of Uint16 values +
    • 1.1.7: Added initial support for QNX RTP (thanks Patrick) +
    • 1.1.7: Added ALSA sound driver (thanks Patrick Trainor) +
    • 1.1.7: Added aRts UNIX sound driver (thanks Neil Stevens) +
    • 1.1.7: Get keyboard modifier state on input focus on Win32 +
    • 1.1.7: SDL_ConvertSurface() now accepts SDL_RLEACCEL as a flag +
    • 1.1.7: Added initial UnixWare 7 support (thanks rr) +
    • 1.1.7: Added working YUY -> RGB conversion code (thanks Eugene) +
    • 1.1.7: Fixed video initialization crash on IRIX +
    • 1.1.7: Fixed MacOS fullscreen palette code (thanks Darrell) +
    • 1.1.7: Fixed background brush flicker on Win32 (thanks Gautier) +
    • 1.1.7: Fixed incorrect pitch when switching to window on Win32 +
    • 1.1.7: Fixed memory leak when switching video modes on Win32 +
    • 1.1.7: Init of fbcon shouldn't automatically set graphics mode +
    • 1.1.6: Allow SDL_VIDEO_INIT when built without thread support +
    • 1.1.6: Fixed palette problems with non-X11 fullscreen displays +
    • 1.1.6: Fixed Win32 crash with SDL_OPENGLBLIT and GL functions +
    • 1.1.6: Improved default MacOS millisecond time resolution +
    • 1.1.6: Fixed X11 overlapping endian blit bug (thanks Mattias) +
    • 1.1.6: Fixed starting directory on BeOS (thanks Samuel) +
    • 1.1.6: Integrated FreeBSD SVGAlib support (thanks folks) +
    • 1.1.6: Fixed middle-button handling on DirectInput +
    • 1.1.6: Added SDL_GetThreadID() to get a specific thread's ID +
    • 1.1.6: Worked around a crash in pthreads on RedHat 7 +
    • 1.1.6: Fixed a brown-bag crash in clipping code +
    • 1.1.5: Convert from '/' to ':' opening files on MacOS +
    • 1.1.5: Clean up empty output files on Win32 and MacOS +
    • 1.1.5: Run command dialog if command key on startup on MacOS +
    • 1.1.5: Initial NetBSD support (thanks Krister Walfridsson) +
    • 1.1.5: Expanded the YUV overlay to handle odd (ATI) hardware +
    • 1.1.5: Fixed MacOS GL attribute selection (thanks Darrell) +
    • 1.1.5: Implemented gamma correction on 8-bit hardware displays +
    • 1.1.5: Performed logical/physical palette split (thanks Mattias) +
    • 1.1.5: Added initial MacOS X support (thanks Stan) +
    • 1.1.5: SDL_WarpMouse() now works on BeOS (thanks Christian) +
    • 1.1.5: Windows GDI driver now supports 565 modes (thanks Ben) +
    • 1.1.5: Correctly load OpenGL extensions on Win32 (thanks Beosil) +
    • 1.1.5: Fixed crash with some threaded audio drivers +
    • 1.1.5: Audio is now closed in SDL_Quit(), if necessary +
    • 1.1.5: Win32 version now uses MSVC multi-threaded DLL runtime +
    • 1.1.5: Replaced useless SDL_SetClipping() with SDL_SetClipRect() +
    • 1.1.5: Added a flag to YUV overlays to show hardware support +
    • 1.1.5: Added SDL_WasInit() to see what is currently initialized +
    • 1.1.5: YUV overlays can now be accelerated with DirectX +
    • 1.1.5: YUV overlays now have working pitch (thanks Vivien) +
    • 1.1.5: Prompt the user if MacOS mode change may damage hardware +
    • 1.1.5: Fixed DrawSprocket video mode lists and mode changes +
    • 1.1.5: Added DrawSprocket acceleration of colorkey blits +
    • 1.1.5: MacOS event handling is much more responsive by default +
    • 1.1.5: MacOS modifier keys now generate key events +
    • 1.1.5: Mattias Engdegård did the "Great Alpha Flip" +
    • 1.1.5: Added SDL_DisplayFormatAlpha() for fast alpha blits +
    • 1.1.5: Added SDL_MapRGBA() and SDL_GetRGBA() to handle alpha +
    • 1.1.5: SDL_SetAlpha() now accepts the SDL_RLEACCEL flag +
    • 1.1.5: Blit semantics involving alpha are now well defined +
    • 1.1.5: Added support for X11 DirectColor visuals for gamma API +
    • 1.1.5: Added initial AmigaOS support (thanks Gabriele Greco) +
    • 1.1.5: Added an initial gamma correction API (thanks Daniel) +
    • 1.1.5: Disable DGA mouse while X11 application is iconified +
    • 1.1.5: Allow 16-bit audio on Solaris (thanks Mattias) +
    • 1.1.5: Added RLE acceleration of alpha blits (thanks Mattias) +
    • 1.1.5: New documentation from the SDL Documentation Project +
    • 1.1.4: Work around window resize bug in KDE 1.2 +
    • 1.1.4: Command-click is interpreted as right click on MacOS +
    • 1.1.4: Removed ESounD detection on Solaris +
    • 1.1.4: Updated to libtool 1.3.5 and latest config.guess +
    • 1.1.4: testgl now works on 8-bit displays under X11 +
    • 1.1.4: SDL_WINDOWID hack now works with OpenGL on Linux +
    • 1.1.4: Builds correctly on UNIX without X11 installed +
    • 1.1.4: Fixed default GL driver loading on Win32 +
    • 1.1.4: Implemented fullscreen toggle on BeOS (thanks David) +
    • 1.1.4: No longer use DirectDraw with OpenGL modes on Win32 +
    • 1.1.4: Added support for 320x200x8 in SVGAlib (thanks Michele) +
    • 1.1.4: Implemented resizable windows on BeOS (thanks David) +
    • 1.1.4: RLE colorkey encoding reduces memory use (thanks Mattias) +
    • 1.1.4: The CD track length variable is now 32-bits (thanks Martin) +
    • 1.1.4: Fixed crashing bug in Win32 semaphores (thanks Markus) +
    • 1.1.4: Disabled aggresive gcc optimizations on X86 +
    • 1.1.4: Added support for blitting with GL (thanks Daniel Vogel) +
    • 1.1.4: Improved the speed of the 16-bit colorkey copy blit +
    • 1.1.4: Fixed pthread condition variable timeout +
    • 1.1.3: Use timeGetTime() instead of GetTickCount() on Win32 +
    • 1.1.3: Release mouse when popped out of fullscreen on X11 +
    • 1.1.3: IRIX 6.5 and FreeBSD 4.0 are now officially supported +
    • 1.1.3: Added optimization flags when compiling on x86 with gcc +
    • 1.1.3: On BeOS, change to app directory when launched by Tracker +
    • 1.1.3: Hold the option key on launch to get dialog on MacOS +
    • 1.1.3: Added DrawSprockets on MacOS (thanks Darrell Walisser) +
    • 1.1.3: Added support for Linux 2.4 input interface (HID) +
    • 1.1.3: Fixed 24-bpp blits on big-endian systems (thanks Mattias) +
    • 1.1.3: Don't try to use DGA mouse support on XFree86 4.00 +
    • 1.1.3: Don't create an X11 shared memory buffer for GL displays +
    • 1.1.3: Framebuffer console acceleration disabled (broken) on G200 +
    • 1.1.3: Allow maximize on resizable Win32 surfaces (thanks Randi) +
    • 1.1.3: Much faster RLE colorkey blit (thanks Xark and Mattias) +
    • 1.1.3: Fixed some problems with iconification and focus in X11 +
    • 1.1.3: Added IMPS/2 protocol support for framebuffer console +
    • 1.1.3: Added user-resizable video mode support +
    • 1.1.3: Added arbitrary scaling of YUV overlay surfaces +
    • 1.1.3: Added support for semaphores and condition variables +
    • 1.1.3: Added SDL_ASYNCBLIT flag for asynchronous video updates +
    • 1.1.3: Don't let the WM place window in X11 fullscreen mode +
    • 1.1.3: Unload GL library after X11 display has closed +
    • 1.1.3: Fixed X11 error when a clipped rectangle is updated +
    • 1.1.3: Fixed crash when surface memory can't be allocated +
    • 1.1.3: Added a check for DirectX 5 audio (thanks Markus) +
    • 1.1.3: Added inline MMX assembly for YUV -> RGB conversion +
    • 1.1.3: Fixed startup crash in X11_RefreshDisplay() +
    • 1.1.3: SDL_Init(SDL_INIT_AUDIO) no longer fails with no soundcard +
    • 1.1.3: Initial YUV video overlay support (supports XvImages) +
    • 1.1.3: Fixed BadMatch X11 error with GLX 1.3 +
    • 1.1.3: Worked around incompatibilities with XFree86 4.0 vidmode +
    • 1.1.3: The audio Makefile no longer takes forever to create +
    • 1.1.3: The joystick hat positions changed to constants +
    • 1.1.3: Fixed overlapping copy blit with odd widths +
    • 1.1.3: Fix for SDL_WINDOWID crash contributed by Mattias +
    • 1.1.3: Speeded up 32-bit alpha channel blits by nearly 100% +
    • 1.1.3: Added experimental DGA 2.0 support (set SDL_VIDEODRIVER) +
    • 1.1.2: Fixed crash running on NT with a read-only filesystem +
    • 1.1.2: Re-use thread creation mutex on glibc-2.0 systems +
    • 1.1.2: SDL_WM_SetIcon() now uses icon colorkey if mask is NULL +
    • 1.1.2: Win32 relative mouse mode fixes (thanks Randi Relander) +
    • 1.1.2: Not being able to set audio frags is no longer fatal +
    • 1.1.2: Added support for multiple timers (thanks Stephane Peter) +
    • 1.1.2: Copy blits optimized using inline assembly on x86 Linux +
    • 1.1.2: Copy blit can now handle overlapping blits +
    • 1.1.2: Fixed GL direct rendering on Utah GLX (thanks John Fulmer) +
    • 1.1.2: Added unofficial support for AIX (thanks Carsten Griwodz) +
    • 1.1.2: Enabled X11 VidMode extension on remote displays +
    • 1.1.2: Load libGL.so.1 under X11 if an app isn't linked with GL +
    • 1.1.2: Don't restack windows in the X11 environment +
    • 1.1.2: Multiple X11 visual support (thanks Mattias Engdegård) +
    • 1.1.0: Internal event state is updated before filter is called +
    • 1.1.0: Worked around DGA mouse cursor bug in Voodoo X server +
    • 1.1.0: Added SDL OpenGL documentation (thanks Nicholas Vining) +
    • 1.1.0: Added AAlib video driver support (thanks Stephane Peter) +
    • 1.1.0: Added fullscreen support for Win32 GDI video driver +
    • 1.1.0: Added SDL_GetAudioState() to get current audio status +
    • 1.1.0: Added SDL_GetRelativeMouseState() to get relative motion +
    • 1.1.0: Added 32-bit PII MMX optimized blitters from Hermes +
    • 1.1.0: Added SDL_bool datatype for functions returning true/false +
    • 1.1.0: Improved alpha blend speed (thanks Alexandre Courbot) +
    • 1.1.0: Added function to queue events: SDL_PushEvent() +
    • 1.1.0: Added user-defined event type to SDL_Event structure +
    • 1.1.0: Added SDL_InitSubSystem() and SDL_QuitSubSystem() +
    • 1.1.0: Added BDirectWindow fullscreen support on BeOS +
    • 1.1.0: Added initial joystick support (Linux, Win32, BeOS, MacOS) +
    • 1.1.0: The timer now runs in a separate thread if possible +
    • 1.1.0: Added initial OpenGL support (Linux, Win32, BeOS, MacOS) +
    • 1.0.9: Avoid potential crash in Win32 mouse handling (thanks Cliff) +
    • 1.0.9: Fixed bug where /dev/dsp was incorrectly marked available +
    • 1.0.9: Fixed DirectX crash if video height is larger than width +
    • 1.0.9: Fixed win32 timer error message typo (thanks Martin Dvorak) +
    • 1.0.8: Fixed deadlock if SDL_LockAudio() called from audio thread +
    • 1.0.8: Fixed a race condition in thread creation +
    • 1.0.7: Added detection for Linux supermount CD-ROM drives +
    • 1.0.6: Added --static-libs option to sdl-config +
    • 1.0.6: Fixed a clipping bug in the RLE colorkey blitting +
    • 1.0.6: Mouse window manager routines implemented on MacOS +
    • 1.0.6: Fixed SDL_HWPALETTE in fullscreen X11 video driver +
    • 1.0.6: Improved relative mouse warping in X11 video driver +
    • 1.0.6: DGA mouse mode is now enabled by SDL_VIDEO_X11_DGAMOUSE +
    • 1.0.6: Grab input by default in fullscreen mode +
    • 1.0.6: Detect hanging (incorrectly configured) Linux soundcard +
    • 1.0.6: If ESPEAKER env variable is set, use ESD audio driver +
    • 1.0.5: Fixed audio structure alignment for packing compilers +
    • 1.0.5: Exposed SDL_AudioInit() and SDL_VideoInit() +
    • 1.0.5: Added SDL_WM_ToggleFullScreen(), implemented for X11 +
    • 1.0.5: Removed ALT-Enter functionality - should be in apps +
    • 1.0.5: The DSP audio driver is used by default on Linux +
    • 1.0.4: Added optional DMA support for the Linux audio driver +
    • 1.0.4: Fixed CD-ROM opening on the iBook under MacOS +
    • 1.0.4: Fixed a crash in 8-bit mode when using X11 video +
    • 1.0.4: Initial audio support on MacOS (thanks Darrell Walisser) +
    • 1.0.4: The audio thread runs at high priority on Win32 +
    • 1.0.4: ESD audio support is now a separate selectable driver +
    • 1.0.4: Initial OpenBSD support (thanks Federico Schwindt) +
    • 1.0.4: Fixed hang when closing audio on Windows 2000 +
    • 1.0.4: Warn about monochrome X displays (thanks Christian Bauer) +
    • 1.0.4: Fixed spurious X11 mouse focus events at ALT-ENTER +
    • 1.0.4: Perform input ungrab at video quit, just in case +
    • 1.0.4: Corrected X11 depth reporting in SDL_VideoModeOK() +
    • 1.0.3: Disable mouse threshold when X11 mouse is in warp mode +
    • 1.0.3: Fixed black-screen on exit in fbcon video driver +
    • 1.0.3: Much improved console switching in fbcon video driver +
    • 1.0.3: Fixed X11 UNICODE translation bug (thanks Andreas Arens) +
    • 1.0.3: Fixed WaveOut mutex logic bug (thanks Markus Oberhum) +
    • 1.0.3: Use X11 mouse warping when cursor hidden and input grabbed +
    • 1.0.3: Doesn't try to use TrackMouseEvent() on Win95 +
    • 1.0.3: DirectColor support in fbcon driver (thanks Adam Meyerowitz) +
    • 1.0.3: Fixed ALT-ENTER key state problem on X11 +
    • 1.0.2: Fixed Win32 code to run on VMWare with DIB video driver +
    • 1.0.2: Added window manager function: SDL_WM_GrabInput() +
    • 1.0.2: Added window manager function: SDL_WM_IconifyWindow() +
    • 1.0.2: Added ALT-ENTER fullscreen toggle for X11 video driver +
    • 1.0.2: X11 fullscreen mode uses DGA mouse if cursor is hidden +
    • 1.0.2: New X11 fullscreen code doesn't require root +
    • 1.0.2: Mouse focus and position is now updated at video mode set +
    • 1.0.2: Mouse focus loss is now detected under Win32 +
    • 1.0.2: Menubar hiding is more robust on MacOS (thanks Matt Slott) +
    • 1.0.2: Added CD-ROM support on MacOS (thanks Matt Slott) +
    • 1.0.2: Added non-root fullscreen modes under X11 (thanks Stephane) +
    • 1.0.2: Added docs for time functions (thanks Christian Biesinger) +
    • 1.0.2: Squeezed a little more speed out of blitters (Duff's device) +
    • 1.0.2: Added hardware acceleration for 3Dfx to fbcon driver. +
    • 1.0.2: Added hardware acceleration for Matrox to fbcon driver. +
    • 1.0.2: Windows mouse driver now recognizes the middle button. +
    • 1.0.2: X11 driver now recognizes the "unix:0" display as local. +
    • 1.0.2: Fixed a bug in DGA support which crashed some X servers. +
    • 1.0.2: Added GPM repeater support (gpm -R) to fbcon driver +
    • 1.0.2: Added support for hardware surfaces to fbcon driver +
    • 1.0.2: Implemented console switching in fbcon driver +
    • 1.0.2: Implemented graphics mode detection in fbcon driver +
    • 1.0.2: Added SDL_EnableKeyRepeat() (thanks Jim Kutter) +
    • 1.0.2: Enabled DirectSound on Windows 2000 +
    • 1.0.1: Fixed the frame buffer video driver on LinuxPPC +
    • 1.0.1: Stopped using DirectSound on Windows NT. +
    • 1.0.1: Stopped using DirectX when DINPUT.DLL is not installed. +
    • 1.0.1: Added pthread detection to configure.in for FreeBSD. +
    • 1.0.1: Updated the Solaris audio code for the 1.0 API +
    • 1.0.1: Updated the MacOS code for the 1.0 internal API +
    + +

    +Major changes since SDL 0.10.0: +

    +
      +
    • 0.11.5: Fixed mouse warping in fullscreen mode +
    • 0.11.5: Added a new function SDL_GetVideoSurface() +
    • 0.11.5: Renamed SDL_AllocSurface() SDL_CreateRGBSurface() +
    • 0.11.5: Added a new function SDL_CreateRGBSurfaceFrom() +
    • 0.11.4: Added support for multiple compiled-in video drivers +
    • 0.11.3: Fixed 16 --> 32 bpp blitting - using C instead of Hermes. +
    • 0.11.3: Fixed double-buffering bug in the DirectX driver +
    • 0.11.3: Added GGI video driver (thanks Jon Taylor) +
    • 0.11.2: Added automake/aclocal/autoconf support +
    • 0.11.1: Added an initial (buggy) MacOS CD-ROM driver +
    • 0.11.1: Improved Linux CD-ROM detection +
    • 0.11.1: Added a workaround for DGA mouse bug on Voodoo 3 +
    • 0.11.1: Fixed 24bpp --> 8bpp blit crash +
    • 0.11.1: Fixed a bug in blit mapping when palette changed +
    • 0.11.1: Added a Linux SBLive beta driver workaround +
    • 0.11.1: Fixed Win32 cross-compile problem with mingw32 +
    • 0.11.1: Loss of keyboard focus now causes keys to be reset +
    • 0.11.1: DGA DirectMouse is conditionally compiled (default off) +
    + +

    +Major changes since SDL 0.8.0: +

    +
      +
    • 0.9.16: Made SDL error messages thread-safe +
    • 0.9.15: If you have r/w access to /dev/mem, DGA works on Linux +
    • 0.9.15: Added support for Linux on the ARM (Netwinder) +
    • 0.9.14: Removed color cursor support, fixed b/w cursors +
    • 0.9.14: Fixed long-standing X11 DGA colormap problem +
    • 0.9.13: Added dynamic load function: SDL_SetLibraryPath() +
    • 0.9.13: Added unofficial support for MacOS +
    • 0.9.13: Added unofficial support for FreeBSD +
    • 0.9.13: Added unofficial support for IRIX +
    • 0.9.13: Updated support for BeOS from R3 to R4.5 +
    • 0.9.13: Added SDL_SetLibraryPath() function (thanks Karsten Laux) +
    • 0.9.13: Fixed 8-bit audio conversion when using SDL_MixAudio() +
    • 0.9.13: Fixed audio thread lingering when app dies on Linux +
    • 0.9.13: Fixed color problem in X display to other-endian systems +
    • 0.9.13: Finally able to detect X11 key repeat (thanks GII team!) +
    • 0.9.13: Added support for Visual C++ 5.0 development environment +
    • 0.9.13: Added support for Linux on the Alpha +
    • 0.9.13: Added support for international keyboards (see WhatsNew) +
    • 0.9.12: Added support for loading IMA ADPCM compressed WAV files +
    • 0.9.12: Fixed bug when mixing 8-bit audio in SDL_MixAudio() +
    • 0.9.12: Added Enlightenment Sound Daemon audio support on Linux +
    • 0.9.12: Added MTRR support for Linux/X11 (thanks David Barth) +
    • 0.9.12: Added support for LinuxPPC 5.0 +
    • 0.9.12: Fixed place where some audio conversions aren't detected +
    • 0.9.12: Fixed serious bug in installation script +
    • 0.9.12: Added SDL_FreeWAV() function for freeing DLL memory +
    • 0.9.12: Fixed potential memory leak in SDL_LoadWAV_RW() +
    • 0.9.11: Freeing video surface has no longer crashes SDL_Quit() +
    • 0.9.11: Included new asm blitters from Hermes library 1.2.4 +
    • 0.9.11: SDL_WaitThread() now gets the thread's return status +
    • 0.9.11: SDL_MixAudio() takes a larger volume range (0-128) +
    • 0.9.11: SDL no longer changes the X11 keyboard repeat +
    • 0.9.11: Added a data source abstraction for loading/saving data +
    • 0.9.11: Added three built in data abstractions:
      + SDL_RWFromFile(), SDL_RWFromFP(), SDL_RWFromMem() +
    • 0.9.11: Added stdio-like functions for using data sources:
      + SDL_RWseek(), SDL_RWread(), SDL_RWwrite(), SDL_RWclose() +
    • 0.9.11: Replaced SDL_CalculateEndian() with SDL_BYTEORDER macro +
    • 0.9.11: Endian swapping functions are now macros, for speed. +
    • 0.9.11: Endian read/write functions now use data sources +
    • 0.9.11: Added function SDL_LoadWAV_RW() for data sources +
    • 0.9.11: Added function SDL_LoadBMP_RW() for data sources +
    • 0.9.11: Added function SDL_SaveBMP_RW() for data sources +
    • 0.9.10: Mixer no longer fails if timidity isn't installed +
    • 0.9.10: Mixer restarts MOD files on play (thanks Bill Kendrick) +
    • 0.9.10: Fixed occasional crashing of the mixer library +
    • 0.9.10: Fixed icon display on Afterstep under Linux +
    • 0.9.10: Fixed occasional crash in mixer example +
    • 0.9.10: Linux cdrom list now comes from /etc/fstab +
    • 0.9.10: Fixed support for UK keyboard (thanks John Elliott) +
    • 0.9.10: The event queue is now thread-safe +
    • 0.9.10: Added event queue pump function: SDL_PumpEvents() +
    • 0.9.10: Added low level event function: SDL_PeepEvents() +
    • 0.9.10: Added a new thread function: SDL_ThreadID() +
    • 0.9.10: Fixed an audio rate conversion memory overrun +
    • 0.9.10: Fixed crash with RLE acceleration on big surfaces +
    • 0.9.10: Improved MacOS display driver - added fullscreen +
    • 0.9.10: Removed spurious warnings from Linux X11 driver +
    • 0.9.10: Fixed memory leak in SDL_InvalidateMap() +
    • 0.9.10: Fixed right button of 2-button mice on Win32 +
    • 0.9.10: Enabled XFree86 mode changes on older servers +
    • 0.9.9: SDL_LoadBMP() handles BMP files created with GIMP +
    • 0.9.9: SDL_LoadWAV() handles WAV files with "LIST" chunks +
    • 0.9.9: Fixed problem with audio underflow on Solaris +
    • 0.9.9: Initial support for 4-speaker audio output devices +
    • 0.9.8: Fixed corrupt VC++ 5.0 desktop file +
    • 0.9.8: Now detects fixed version of Metro-X X11 server +
    • 0.9.8: Fixed XFree86 DGA banked mode update +
    • 0.9.8: Fixed mouse press viewport shift on XFree86 DGA +
    • 0.9.7: Fixed problem with displaying remotely via X11 +
    • 0.9.7: Win32 uses software cursor when fullscreen +
    • 0.9.7: Win32 mouse uses DirectInput when fullscreen +
    • 0.9.7: Added OpenGL software rendering via Mesa (demos archive) +
    • 0.9.7: Fixed memory leak in ADPCM WAV decoding +
    • 0.9.6: Added CD-ROM audio API documentation +
    • 0.9.6: Fixed potential BeOS audio-related crash +
    • 0.9.6: Fixed crash when resetting the video mode in DirectX +
    • 0.9.6: Fixed errors compiling with the SparcWorks compiler +
    • 0.9.6: Replaced SDL_GetDisplayFormat() with SDL_GetVideoInfo() +
    • 0.9.6: Added a new fast fill function: SDL_FillRect() +
    • 0.9.6: Added blit acceleration flags to SDL_AllocSurface() +
    • 0.9.6: Added new double-buffering function: SDL_Flip() +
    • 0.9.6: Fixed problem with buggy Metro-X X11 server +
    • 0.9.6: Fixed 8-bit audio on Solaris with dbri hardware +
    • 0.9.6: Fixed alarm clock problem with Solaris pthreads +
    • 0.9.6: Fixed BeOS compilation problem +
    • 0.9.5: Added tools to create Win32 icons in directx/icon/ +
    • 0.9.5: You can now pass a NULL mask to SDL_WM_SetIcon() +
    • 0.9.5: Added support files for compiling with VC++ 5.0 +
    • 0.9.5: Fixed icon color bug under Win32 +
    • 0.9.5: Re-added SDL_LowerBlit() - not safe for use on display +
    • 0.9.5: Fixed 0.9.x cursor blit deadlock +
    • 0.9.5: Added SDL_FPLoadWAV(), SDL_FPLoadBMP(), SDL_FPSaveBMP() +
    • 0.9.5: Added Linux, Win32, and BeOS CD audio support +
    • 0.9.5: MMX accelerated blit disabled -- temporarily broken +
    • 0.9.4: Fixed endianness issue with BeOS x86 blitting +
    • 0.9.4: Fixed quit interrupt delivery on BeOS +
    • 0.9.4: Fixed dynamic loading on BeOS +
    • 0.9.4: Fixed DirectX audio on Win98 +
    • 0.9.4: Fixed possible sound-related crash on Linux PPC +
    • 0.9.3: Mouse motion arrives as absolute and relative coordinates +
    • 0.9.3: Fixed Visual C++ structure packing +
    • 0.9.3: Fixed UNIX dynamic link library installation +
    • 0.9.2: DirectX audio no longer hangs when app loses focus +
    • 0.9.2: Fixed DirectX HiColor crash (palette bug) +
    • 0.9.1: Fixed DirectX <ALT> key handling +
    • 0.9.1: Fixed DirectX windowed palette problems +
    • 0.9.1: Removed SDL_MapSurface() and SDL_UnmapSurface() +
    • 0.9.0: Initial port to IRIX 6.x +
    • 0.9.0: Initial port to OSF/1 3.2 (no sound yet) +
    • 0.9.0: MacOS port in progress +
    + +

    +Major changes since SDL 0.7: +

    +
      +
    • Separated the demos and examples into a separate archive +
    • Added support for loading Microsoft compressed WAV files +
    • Added "soft" application crash recovery (signal handlers) +
    • Fixed POSIX signal handling interaction with threads +
    • Fixed audio output on MKLinux +
    • Added dynamic library version checking +
    • Updated for DirectX 6.0 +
    • Cleaned up dynamic linking and added static linking +
    • Added automatic audio format and rate conversion +
    • Optimized some blitter cases (8 --> 16/32 and 32 --> 16/8) +
    • Removed precalculated alpha blending acceleration +
    • Key and mouse button events are split into up/down events +
    • It is now much easier to set an optimal video mode +
    + +

    +Major changes since SDL 0.5: +

    +
      +
    • Ported to Solaris 2.6 +
    • Added XFree86 Direct Graphic Access support +
    • Supports LinuxPPC without threads +
    • Completely rewritten video/surface API -- see SDL_video.h +
    • Completely rewritten event API +
    • Optimized black-white cursor creation +
    • Added support for run-length-encoded colorkeying +
    • Added support for hardware accelerated blits +
    • Added support for blitting from 1-bit surfaces (bitmaps) +
    • Added a function to simplify setting video modes +
    • Added support for loading WAV files +
    • Added endian swapping functions for memory values +
    • Added alpha blending using alpha value or channel +
    • Added precalculated alpha blending acceleration +
    • Added function to return current time in milliseconds +
    • New event type SDL_ACTIVEEVENT, to detect iconification +
    • New event type SDL_SYSWMEVENT, for custom window hooks +
    • Added a platform dependent function to get window handle +
    • Added a function to check the run-time version of SDL +
    • Added periodic timer support at 10 ms resolution +
    • Added support for the SDL_DEBUG environment variable +
    • Miscellaneous internal cleanups +
    + +

    +Major changes since SDL 0.4: +

    +
      +
    • SDL library code is now dynamically loaded +
    • Added support for pthreads (Linux glibc2) +
    • Removed SDL_mutexN() and SDL_mutexIncr() +
    + +

    +Major changes since SDL 0.3: +

    +
      +
    • Added support for DirectX 5.0 +
    • Added support for surfaces in video memory +
    • Added support for source color-key blitting +
    • Added support for single-rectangle clipping +
    • Added support for warping (moving) the cursor +
    • Added support for color cursors +
    • Greatly simplified internal event queue +
    • Minor bug-fixes +
    + +

    +[separator] + + + diff --git a/docs/.cvsignore b/docs/.cvsignore new file mode 100644 index 000000000..3dda72986 --- /dev/null +++ b/docs/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 000000000..895c22f15 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,4 @@ + +SUBDIRS = html man3 + +EXTRA_DIST = index.html diff --git a/docs/html/.cvsignore b/docs/html/.cvsignore new file mode 100644 index 000000000..3dda72986 --- /dev/null +++ b/docs/html/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/docs/html/Makefile.am b/docs/html/Makefile.am new file mode 100644 index 000000000..b9db82902 --- /dev/null +++ b/docs/html/Makefile.am @@ -0,0 +1,199 @@ +EXTRA_DIST = \ + audio.html \ + cdrom.html \ + event.html \ + eventfunctions.html \ + eventstructures.html \ + general.html \ + guide.html \ + guideaboutsdldoc.html \ + guideaudioexamples.html \ + guidebasicsinit.html \ + guidecdromexamples.html \ + guidecredits.html \ + guideeventexamples.html \ + guideexamples.html \ + guideinput.html \ + guideinputkeyboard.html \ + guidepreface.html \ + guidethebasics.html \ + guidetimeexamples.html \ + guidevideo.html \ + guidevideoexamples.html \ + index.html \ + joystick.html \ + reference.html \ + sdlactiveevent.html \ + sdladdtimer.html \ + sdlaudiocvt.html \ + sdlaudiospec.html \ + sdlblitsurface.html \ + sdlbuildaudiocvt.html \ + sdlcd.html \ + sdlcdclose.html \ + sdlcdeject.html \ + sdlcdname.html \ + sdlcdnumdrives.html \ + sdlcdopen.html \ + sdlcdpause.html \ + sdlcdplay.html \ + sdlcdplaytracks.html \ + sdlcdresume.html \ + sdlcdstatus.html \ + sdlcdstop.html \ + sdlcdtrack.html \ + sdlcloseaudio.html \ + sdlcolor.html \ + sdlcondbroadcast.html \ + sdlcondsignal.html \ + sdlcondwait.html \ + sdlcondwaittimeout.html \ + sdlconvertaudio.html \ + sdlconvertsurface.html \ + sdlcreatecond.html \ + sdlcreatecursor.html \ + sdlcreatemutex.html \ + sdlcreatergbsurface.html \ + sdlcreatergbsurfacefrom.html \ + sdlcreatesemaphore.html \ + sdlcreatethread.html \ + sdlcreateyuvoverlay.html \ + sdldelay.html \ + sdldestroycond.html \ + sdldestroymutex.html \ + sdldestroysemaphore.html \ + sdldisplayformat.html \ + sdldisplayformatalpha.html \ + sdldisplayyuvoverlay.html \ + sdlenablekeyrepeat.html \ + sdlenableunicode.html \ + sdlevent.html \ + sdleventstate.html \ + sdlfillrect.html \ + sdlflip.html \ + sdlfreecursor.html \ + sdlfreesurface.html \ + sdlfreewav.html \ + sdlfreeyuvoverlay.html \ + sdlgetappstate.html \ + sdlgetaudiostatus.html \ + sdlgetcliprect.html \ + sdlgetcursor.html \ + sdlgeteventfilter.html \ + sdlgetgammaramp.html \ + sdlgetkeyname.html \ + sdlgetkeystate.html \ + sdlgetmodstate.html \ + sdlgetmousestate.html \ + sdlgetrelativemousestate.html \ + sdlgetrgb.html \ + sdlgetrgba.html \ + sdlgetthreadid.html \ + sdlgetticks.html \ + sdlgetvideoinfo.html \ + sdlgetvideosurface.html \ + sdlglattr.html \ + sdlglgetattribute.html \ + sdlglgetprocaddress.html \ + sdlglloadlibrary.html \ + sdlglsetattribute.html \ + sdlglswapbuffers.html \ + sdlinit.html \ + sdlinitsubsystem.html \ + sdljoyaxisevent.html \ + sdljoyballevent.html \ + sdljoybuttonevent.html \ + sdljoyhatevent.html \ + sdljoystickclose.html \ + sdljoystickeventstate.html \ + sdljoystickgetaxis.html \ + sdljoystickgetball.html \ + sdljoystickgetbutton.html \ + sdljoystickgethat.html \ + sdljoystickindex.html \ + sdljoystickname.html \ + sdljoysticknumaxes.html \ + sdljoysticknumballs.html \ + sdljoysticknumbuttons.html \ + sdljoysticknumhats.html \ + sdljoystickopen.html \ + sdljoystickopened.html \ + sdljoystickupdate.html \ + sdlkey.html \ + sdlkeyboardevent.html \ + sdlkeysym.html \ + sdlkillthread.html \ + sdllistmodes.html \ + sdlloadbmp.html \ + sdlloadwav.html \ + sdllockaudio.html \ + sdllocksurface.html \ + sdllockyuvoverlay.html \ + sdlmaprgb.html \ + sdlmaprgba.html \ + sdlmixaudio.html \ + sdlmousebuttonevent.html \ + sdlmousemotionevent.html \ + sdlmutexp.html \ + sdlmutexv.html \ + sdlnumjoysticks.html \ + sdlopenaudio.html \ + sdloverlay.html \ + sdlpalette.html \ + sdlpauseaudio.html \ + sdlpeepevents.html \ + sdlpixelformat.html \ + sdlpollevent.html \ + sdlpumpevents.html \ + sdlpushevent.html \ + sdlquit.html \ + sdlquitevent.html \ + sdlquitsubsystem.html \ + sdlrect.html \ + sdlremovetimer.html \ + sdlresizeevent.html \ + sdlsavebmp.html \ + sdlsempost.html \ + sdlsemtrywait.html \ + sdlsemvalue.html \ + sdlsemwait.html \ + sdlsemwaittimeout.html \ + sdlsetalpha.html \ + sdlsetcliprect.html \ + sdlsetcolorkey.html \ + sdlsetcolors.html \ + sdlsetcursor.html \ + sdlseteventfilter.html \ + sdlsetgamma.html \ + sdlsetgammaramp.html \ + sdlsetmodstate.html \ + sdlsetpalette.html \ + sdlsettimer.html \ + sdlsetvideomode.html \ + sdlshowcursor.html \ + sdlsurface.html \ + sdlsyswmevent.html \ + sdlthreadid.html \ + sdlunlockaudio.html \ + sdlunlocksurface.html \ + sdlunlockyuvoverlay.html \ + sdlupdaterect.html \ + sdlupdaterects.html \ + sdluserevent.html \ + sdlvideodrivername.html \ + sdlvideoinfo.html \ + sdlvideomodeok.html \ + sdlwaitevent.html \ + sdlwaitthread.html \ + sdlwarpmouse.html \ + sdlwasinit.html \ + sdlwmgetcaption.html \ + sdlwmgrabinput.html \ + sdlwmiconifywindow.html \ + sdlwmsetcaption.html \ + sdlwmseticon.html \ + sdlwmtogglefullscreen.html \ + thread.html \ + time.html \ + video.html \ + wm.html diff --git a/docs/html/audio.html b/docs/html/audio.html new file mode 100644 index 000000000..4f47a7c15 --- /dev/null +++ b/docs/html/audio.html @@ -0,0 +1,234 @@ +Audio

    SDL Library Documentation
    PrevNext

    Chapter 10. Audio

    Table of Contents
    SDL_AudioSpec — Audio Specification Structure
    SDL_OpenAudio — Opens the audio device with the desired parameters.
    SDL_PauseAudio — Pauses and unpauses the audio callback processing
    SDL_GetAudioStatus — Get the current audio state
    SDL_LoadWAV — Load a WAVE file
    SDL_FreeWAV — Frees previously opened WAV data
    SDL_AudioCVT — Audio Conversion Structure
    SDL_BuildAudioCVT — Initializes a SDL_AudioCVT structure for conversion
    SDL_ConvertAudio — Convert audio data to a desired audio format.
    SDL_MixAudio — Mix audio data
    SDL_LockAudio — Lock out the callback function
    SDL_UnlockAudio — Unlock the callback function
    SDL_CloseAudio — Shuts down audio processing and closes the audio device.

    Sound on the computer is translated from waves that you hear into a series of +values, or samples, each representing the amplitude of the wave. When these +samples are sent in a stream to a sound card, an approximation of the original +wave can be recreated. The more bits used to represent the amplitude, and the +greater frequency these samples are gathered, the closer the approximated +sound is to the original, and the better the quality of sound.

    This library supports both 8 and 16 bit signed and unsigned sound samples, +at frequencies ranging from 11025 Hz to 44100 Hz, depending on the +underlying hardware. If the hardware doesn't support the desired audio +format or frequency, it can be emulated if desired (See +SDL_OpenAudio())

    A commonly supported audio format is 16 bits per sample at 22050 Hz.


    PrevHomeNext
    SDL_JoystickCloseUpSDL_AudioSpec
    \ No newline at end of file diff --git a/docs/html/cdrom.html b/docs/html/cdrom.html new file mode 100644 index 000000000..abd0b96a5 --- /dev/null +++ b/docs/html/cdrom.html @@ -0,0 +1,252 @@ +CD-ROM
    SDL Library Documentation
    PrevNext

    Chapter 11. CD-ROM

    Table of Contents
    SDL_CDNumDrives — Returns the number of CD-ROM drives on the system.
    SDL_CDName — Returns a human-readable, system-dependent identifier for the CD-ROM.
    SDL_CDOpen — Opens a CD-ROM drive for access.
    SDL_CDStatus — Returns the current status of the given drive.
    SDL_CDPlay — Play a CD
    SDL_CDPlayTracks — Play the given CD track(s)
    SDL_CDPause — Pauses a CDROM
    SDL_CDResume — Resumes a CDROM
    SDL_CDStop — Stops a CDROM
    SDL_CDEject — Ejects a CDROM
    SDL_CDClose — Closes a SDL_CD handle
    SDL_CD — CDROM Drive Information
    SDL_CDtrack — CD Track Information Structure

    SDL supports audio control of up to 32 local CD-ROM drives at once.

    You use this API to perform all the basic functions of a CD player, +including listing the tracks, playing, stopping, and ejecting the CD-ROM. +(Currently, multi-changer CD drives are not supported.)

    Before you call any of the SDL CD-ROM functions, you must first call +"SDL_Init(SDL_INIT_CDROM)", which scans the system for +CD-ROM drives, and sets the program up for audio control. Check the +return code, which should be 0, to see if there +were any errors in starting up.

    After you have initialized the library, you can find out how many drives +are available using the SDL_CDNumDrives() function. +The first drive listed is the system default CD-ROM drive. After you have +chosen a drive, and have opened it with SDL_CDOpen(), +you can check the status and start playing if there's a CD in the drive.

    A CD-ROM is organized into one or more tracks, each consisting of a certain +number of "frames". Each frame is ~2K in size, and at normal playing speed, +a CD plays 75 frames per second. SDL works with the number of frames on a +CD, but this can easily be converted to the more familiar minutes/seconds +format by using the FRAMES_TO_MSF() macro.


    PrevHomeNext
    SDL_CloseAudioUpSDL_CDNumDrives
    \ No newline at end of file diff --git a/docs/html/event.html b/docs/html/event.html new file mode 100644 index 000000000..e66a9aae8 --- /dev/null +++ b/docs/html/event.html @@ -0,0 +1,208 @@ +Events
    SDL Library Documentation
    PrevNext

    Chapter 8. Events

    Introduction

    Event handling allows your application to receive input from the user. Event handling is initalised (along with video) with a call to: +

    SDL_Init(SDL_INIT_VIDEO);
    +Interally, SDL stores all the events waiting to be handled in an event queue. Using functions like SDL_PollEvent and SDL_PeepEvents you can observe and handle waiting input events.

    The key to event handling in SDL is the SDL_Event union. The event queue itself is composed of a series of SDL_Event unions, one for each waiting event. SDL_Event unions are read from the queue with the SDL_PollEvent function and it is then up to the application to process the information stored with them.


    PrevHomeNext
    SDL_WM_GrabInputUpSDL Event Structures.
    \ No newline at end of file diff --git a/docs/html/eventfunctions.html b/docs/html/eventfunctions.html new file mode 100644 index 000000000..a887b9f2d --- /dev/null +++ b/docs/html/eventfunctions.html @@ -0,0 +1,236 @@ +Event Functions.
    SDL Library Documentation
    PrevChapter 8. EventsNext

    Event Functions.

    Table of Contents
    SDL_PumpEvents — Pumps the event loop, gathering events from the input devices.
    SDL_PeepEvents — Checks the event queue for messages and optionally returns them.
    SDL_PollEvent — Polls for currently pending events.
    SDL_WaitEvent — Waits indefinitely for the next available event.
    SDL_PushEvent — Pushes an event onto the event queue
    SDL_SetEventFilter — Sets up a filter to process all events before they are posted +to the event queue.
    SDL_GetEventFilter — Retrieves a pointer to he event filter
    SDL_EventState — This function allows you to set the state of processing certain events.
    SDL_GetKeyState — Get a snapshot of the current keyboard state
    SDL_GetModState — Get the state of modifier keys.
    SDL_SetModState — Set the current key modifier state
    SDL_GetKeyName — Get the name of an SDL virtual keysym
    SDL_EnableUNICODE — Enable UNICODE translation
    SDL_EnableKeyRepeat — Set keyboard repeat rate.
    SDL_GetMouseState — Retrieve the current state of the mouse
    SDL_GetRelativeMouseState — Retrieve the current state of the mouse
    SDL_GetAppState — Get the state of the application
    SDL_JoystickEventState — Enable/disable joystick event polling

    PrevHomeNext
    SDLKeyUpSDL_PumpEvents
    \ No newline at end of file diff --git a/docs/html/eventstructures.html b/docs/html/eventstructures.html new file mode 100644 index 000000000..e45c22ec0 --- /dev/null +++ b/docs/html/eventstructures.html @@ -0,0 +1,220 @@ +SDL Event Structures.
    SDL Library Documentation
    PrevChapter 8. EventsNext

    SDL Event Structures.

    Table of Contents
    SDL_Event — General event structure
    SDL_ActiveEvent — Application visibility event structure
    SDL_KeyboardEvent — Keyboard event structure
    SDL_MouseMotionEvent — Mouse motion event structure
    SDL_MouseButtonEvent — Mouse button event structure
    SDL_JoyAxisEvent — Joystick axis motion event structure
    SDL_JoyButtonEvent — Joystick button event structure
    SDL_JoyHatEvent — Joystick hat position change event structure
    SDL_JoyBallEvent — Joystick trackball motion event structure
    SDL_ResizeEvent — Window resize event structure
    SDL_SysWMEvent — Platform-dependent window manager event.
    SDL_UserEvent — A user-defined event type
    SDL_QuitEvent — Quit requested event
    SDL_keysym — Keysym structure
    SDLKey — Keysym definitions.

    PrevHomeNext
    EventsUpSDL_Event
    \ No newline at end of file diff --git a/docs/html/general.html b/docs/html/general.html new file mode 100644 index 000000000..54026c44a --- /dev/null +++ b/docs/html/general.html @@ -0,0 +1,207 @@ +General
    SDL Library Documentation
    PrevNext

    Chapter 5. General

    Table of Contents
    SDL_Init — Initializes SDL
    SDL_InitSubSystem — Initialize subsystems
    SDL_QuitSubSystem — Shut down a subsystem
    SDL_Quit — Shut down SDL
    SDL_WasInit — Check which subsystems are initialized

    Before SDL can be used in a program it must be initialized with SDL_Init. SDL_Init initializes all the subsystems that the user requests (video, audio, joystick, timers and/or cdrom). Once SDL is initialized with SDL_Init subsystems can be shut down and initialized as needed using SDL_InitSubSystem and SDL_QuitSubSystem.

    SDL must also be shut down before the program exits to make sure it cleans up correctly. Calling SDL_Quit shuts down all subsystems and frees any resources allocated to SDL.


    PrevHomeNext
    SDL ReferenceUpSDL_Init
    \ No newline at end of file diff --git a/docs/html/guide.html b/docs/html/guide.html new file mode 100644 index 000000000..b192ce888 --- /dev/null +++ b/docs/html/guide.html @@ -0,0 +1,167 @@ +SDL Guide
    SDL Library Documentation
    PrevNext

    I. SDL Guide


    PrevHomeNext
    SDL Library Documentation Preface
    \ No newline at end of file diff --git a/docs/html/guideaboutsdldoc.html b/docs/html/guideaboutsdldoc.html new file mode 100644 index 000000000..9ea85f22c --- /dev/null +++ b/docs/html/guideaboutsdldoc.html @@ -0,0 +1,140 @@ +About SDLdoc
    SDL Library Documentation
    PrevPrefaceNext

    About SDLdoc

    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 proplr working with SDL in their spare time to people who use SDL in their everyday working lives.

    The latest version of this documentation can always be found at the project homepage: http://sdldoc.sourceforge.net.


    PrevHomeNext
    PrefaceUpCredits
    \ No newline at end of file diff --git a/docs/html/guideaudioexamples.html b/docs/html/guideaudioexamples.html new file mode 100644 index 000000000..844c18138 --- /dev/null +++ b/docs/html/guideaudioexamples.html @@ -0,0 +1,220 @@ +Audio Examples
    SDL Library Documentation
    PrevChapter 4. ExamplesNext

    Audio Examples

    Opening the audio device

        SDL_AudioSpec wanted;
    +    extern void fill_audio(void *udata, Uint8 *stream, int len);
    +
    +    /* Set the audio format */
    +    wanted.freq = 22050;
    +    wanted.format = AUDIO_S16;
    +    wanted.channels = 2;    /* 1 = mono, 2 = stereo */
    +    wanted.samples = 1024;  /* Good low-latency value for callback */
    +    wanted.callback = fill_audio;
    +    wanted.userdata = NULL;
    +
    +    /* Open the audio device, forcing the desired format */
    +    if ( SDL_OpenAudio(&wanted, NULL) < 0 ) {
    +        fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
    +        return(-1);
    +    }
    +    return(0);

    Playing audio

        static Uint8 *audio_chunk;
    +    static Uint32 audio_len;
    +    static Uint8 *audio_pos;
    +
    +    /* The audio function callback takes the following parameters:
    +       stream:  A pointer to the audio buffer to be filled
    +       len:     The length (in bytes) of the audio buffer
    +    */
    +    void fill_audio(void *udata, Uint8 *stream, int len)
    +    {
    +        /* Only play if we have data left */
    +        if ( audio_len == 0 )
    +            return;
    +
    +        /* Mix as much data as possible */
    +        len = ( len > audio_len ? audio_len : len );
    +        SDL_MixAudio(stream, audio_pos, len, SDL_MIX_MAXVOLUME)
    +        audio_pos += len;
    +        audio_len -= len;
    +    }
    +
    +    /* Load the audio data ... */
    +
    +    ;;;;;
    +
    +    audio_pos = audio_chunk;
    +
    +    /* Let the callback function play the audio chunk */
    +    SDL_PauseAudio(0);
    +
    +    /* Do some processing */
    +
    +    ;;;;;
    +
    +    /* Wait for sound to complete */
    +    while ( audio_len > 0 ) {
    +        SDL_Delay(100);         /* Sleep 1/10 second */
    +    }
    +    SDL_CloseAudio();


    PrevHomeNext
    Event ExamplesUpCDROM Examples
    \ No newline at end of file diff --git a/docs/html/guidebasicsinit.html b/docs/html/guidebasicsinit.html new file mode 100644 index 000000000..dda5b46bd --- /dev/null +++ b/docs/html/guidebasicsinit.html @@ -0,0 +1,224 @@ +Initializing SDL
    SDL Library Documentation
    PrevChapter 1. The BasicsNext

    Initializing SDL

    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 SDL_Init (or SDL_InitSubSystem. SDL_Init 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: +

        SDL_Init ( SDL_INIT_VIDEO );
    +To initialize the default subsystems, the Video subsystem and the Timers subsystem you would call: +
        SDL_Init ( SDL_INIT_VIDEO | SDL_INIT_TIMER );

    SDL_Init is complemented by SDL_Quit (and SDL_QuitSubSystem). SDL_Quit shuts down all subsystems, including the default ones. It should always be called before a SDL application exits.

    With SDL_Init and SDL_Quit 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, SDL_Init, 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 SDL_GetError. Use this often, you can never know too much about an error.

    #include "SDL.h"   /* All SDL App's need this */
    +#include <stdio.h>
    +
    +int main() {
    +    
    +    printf("Initializing SDL.\n");
    +    
    +    /* Initialize defaults, Video and Audio */
    +    if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) { 
    +        printf("Could not initialize SDL: %s.\n", SDL_GetError());
    +        exit(-1);
    +    }
    +
    +    printf("SDL initialized.\n");
    +
    +    printf("Quiting SDL.\n");
    +    
    +    /* Shutdown all subsystems */
    +    SDL_Quit();
    +    
    +    printf("Quiting....\n");
    +
    +    exit(0);
    +}


    PrevHomeNext
    The BasicsUpGraphics and Video
    \ No newline at end of file diff --git a/docs/html/guidecdromexamples.html b/docs/html/guidecdromexamples.html new file mode 100644 index 000000000..80aa6a1ec --- /dev/null +++ b/docs/html/guidecdromexamples.html @@ -0,0 +1,267 @@ +CDROM Examples
    SDL Library Documentation
    PrevChapter 4. ExamplesNext

    CDROM Examples

    Listing CD-ROM drives

        #include "SDL.h"
    +
    +    /* Initialize SDL first */
    +    if ( SDL_Init(SDL_INIT_CDROM) < 0 ) {
    +        fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError());
    +        exit(1);
    +    }
    +    atexit(SDL_Quit);
    +
    +    /* Find out how many CD-ROM drives are connected to the system */
    +    printf("Drives available: %d\n", SDL_CDNumDrives());
    +    for ( i=0; i<SDL_CDNumDrives(); ++i ) {
    +        printf("Drive %d:  \"%s\"\n", i, SDL_CDName(i));
    +    }

    Opening the default drive

        SDL_CD *cdrom;
    +    CDstatus status;
    +    char *status_str;
    +
    +    cdrom = SDL_CDOpen(0);
    +    if ( cdrom == NULL ) {
    +        fprintf(stderr, "Couldn't open default CD-ROM drive: %s\n",
    +                        SDL_GetError());
    +        exit(2);
    +    }
    +
    +    status = SDL_CDStatus(cdrom);
    +    switch (status) {
    +        case CD_TRAYEMPTY:
    +            status_str = "tray empty";
    +            break;
    +        case CD_STOPPED:
    +            status_str = "stopped";
    +            break;
    +        case CD_PLAYING:
    +            status_str = "playing";
    +            break;
    +        case CD_PAUSED:
    +            status_str = "paused";
    +            break;
    +        case CD_ERROR:
    +            status_str = "error state";
    +            break;
    +    }
    +    printf("Drive status: %s\n", status_str);
    +    if ( status >= CD_PLAYING ) {
    +        int m, s, f;
    +        FRAMES_TO_MSF(cdrom->cur_frame, &m, &s, &f);
    +        printf("Currently playing track %d, %d:%2.2d\n",
    +        cdrom->track[cdrom->cur_track].id, m, s);
    +    }

    Listing the tracks on a CD

        SDL_CD *cdrom;          /* Assuming this has already been set.. */
    +    int i;
    +    int m, s, f;
    +
    +    SDL_CDStatus(cdrom);
    +    printf("Drive tracks: %d\n", cdrom->numtracks);
    +    for ( i=0; i<cdrom->numtracks; ++i ) {
    +        FRAMES_TO_MSF(cdrom->track[i].length, &m, &s, &f);
    +        if ( f > 0 )
    +            ++s;
    +        printf("\tTrack (index %d) %d: %d:%2.2d\n", i,
    +        cdrom->track[i].id, m, s);
    +    }

    Play an entire CD

        SDL_CD *cdrom;          /* Assuming this has already been set.. */
    +
    +    // Play entire CD:
    +    if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
    +        SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
    +
    +        // Play last track:
    +        if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
    +            SDL_CDPlayTracks(cdrom, cdrom->numtracks-1, 0, 0, 0);
    +        }
    +
    +        // Play first and second track and 10 seconds of third track:
    +        if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
    +            SDL_CDPlayTracks(cdrom, 0, 0, 2, 10);


    PrevHomeNext
    Audio ExamplesUpTime Examples
    \ No newline at end of file diff --git a/docs/html/guidecredits.html b/docs/html/guidecredits.html new file mode 100644 index 000000000..72e1ae79e --- /dev/null +++ b/docs/html/guidecredits.html @@ -0,0 +1,179 @@ +Credits
    SDL Library Documentation
    PrevPrefaceNext

    Credits

    Martin Donlon, akawaka@skynet.ie
    Julian Peterson
    Ken Jordan
    Maxim Sobolev
    Wesley Poole
    Michael Vance
    Andreas Umbach
    Andreas Hofmeister


    PrevHomeNext
    About SDLdocUpThe Basics
    \ No newline at end of file diff --git a/docs/html/guideeventexamples.html b/docs/html/guideeventexamples.html new file mode 100644 index 000000000..c2fed8899 --- /dev/null +++ b/docs/html/guideeventexamples.html @@ -0,0 +1,239 @@ +Event Examples
    SDL Library Documentation
    PrevChapter 4. ExamplesNext

    Event Examples

    Filtering and Handling Events

    #include <stdio.h>
    +#include <stdlib.h>
    +
    +#include "SDL.h"
    +
    +/* This function may run in a separate event thread */
    +int FilterEvents(const SDL_Event *event) {
    +    static int boycott = 1;
    +
    +    /* This quit event signals the closing of the window */
    +    if ( (event->type == SDL_QUIT) && boycott ) {
    +        printf("Quit event filtered out -- try again.\n");
    +        boycott = 0;
    +        return(0);
    +    }
    +    if ( event->type == SDL_MOUSEMOTION ) {
    +        printf("Mouse moved to (%d,%d)\n",
    +                event->motion.x, event->motion.y);
    +        return(0);    /* Drop it, we've handled it */
    +    }
    +    return(1);
    +}
    +
    +int main(int argc, char *argv[])
    +{
    +    SDL_Event event;
    +
    +    /* Initialize the SDL library (starts the event loop) */
    +    if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
    +        fprintf(stderr,
    +                "Couldn't initialize SDL: %s\n", SDL_GetError());
    +        exit(1);
    +    }
    +
    +    /* Clean up on exit, exit on window close and interrupt */
    +    atexit(SDL_Quit);
    +
    +    /* Ignore key events */
    +    SDL_EventState(SDL_KEYDOWN, SDL_IGNORE);
    +    SDL_EventState(SDL_KEYUP, SDL_IGNORE);
    +
    +    /* Filter quit and mouse motion events */
    +    SDL_SetEventFilter(FilterEvents);
    +
    +    /* The mouse isn't much use unless we have a display for reference */
    +    if ( SDL_SetVideoMode(640, 480, 8, 0) == NULL ) {
    +        fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
    +                        SDL_GetError());
    +        exit(1);
    +    }
    +
    +    /* Loop waiting for ESC+Mouse_Button */
    +    while ( SDL_WaitEvent(&event) >= 0 ) {
    +        switch (event.type) {
    +            case SDL_ACTIVEEVENT: {
    +                if ( event.active.state & SDL_APPACTIVE ) {
    +                    if ( event.active.gain ) {
    +                        printf("App activated\n");
    +                    } else {
    +                        printf("App iconified\n");
    +                    }
    +                }
    +            }
    +            break;
    +                    
    +            case SDL_MOUSEBUTTONDOWN: {
    +                Uint8 *keys;
    +
    +                keys = SDL_GetKeyState(NULL);
    +                if ( keys[SDLK_ESCAPE] == SDL_PRESSED ) {
    +                    printf("Bye bye...\n");
    +                    exit(0);
    +                }
    +                printf("Mouse button pressed\n");
    +            }
    +            break;
    +
    +            case SDL_QUIT: {
    +                printf("Quit requested, quitting.\n");
    +                exit(0);
    +            }
    +            break;
    +        }
    +    }
    +    /* This should never happen */
    +    printf("SDL_WaitEvent error: %s\n", SDL_GetError());
    +    exit(1);
    +}


    PrevHomeNext
    Video ExamplesUpAudio Examples
    \ No newline at end of file diff --git a/docs/html/guideexamples.html b/docs/html/guideexamples.html new file mode 100644 index 000000000..fa4e961ff --- /dev/null +++ b/docs/html/guideexamples.html @@ -0,0 +1,185 @@ +Examples
    SDL Library Documentation
    PrevNext

    Chapter 4. Examples

    Introduction

    For the moment these examples are taken directly from the old SDL documentation.


    PrevHomeNext
    Handling the KeyboardUpVideo Examples
    diff --git a/docs/html/guideinput.html b/docs/html/guideinput.html new file mode 100644 index 000000000..d79300497 --- /dev/null +++ b/docs/html/guideinput.html @@ -0,0 +1,647 @@ +Input handling
    SDL Library Documentation
    PrevNext

    Chapter 3. Input handling

    Handling Joysticks

    Initialization

    The first step in using a joystick in a SDL program is to initialize the Joystick subsystems of SDL. This done by passing the SDL_INIT_JOYSTICK flag to SDL_Init. 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. +

        if ( ! SDL_Init( SDL_INIT_VIDEO | SDL_INIT_JOYSTICK ) )
    +    {
    +        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    +        exit(1);
    +    }
    +This will attempt to start SDL with both the video and the joystick subsystems activated.

    Querying

    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 SDL_NumJoysticks.

    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 SDL_JoystickName. The joystick is specified by an index where 0 is the first joystick and the last joystick is the number returned by SDL_NumJoysticks - 1. In the demonstration a list of all available joysticks is printed to stdout. +

        printf("%i joysticks were found.\n\n", SDL_NumJoysticks() );
    +    printf("The names of the joysticks are:\n");
    +		
    +    for( i=0; i < SDL_NumJoysticks(); i++ ) 
    +    {
    +        printf("    %s\n", SDL_JoystickName(i));
    +    }

    Opening a Joystick and Receiving Joystick Events

    SDL's event driven architecture makes working with joysticks a snap. Joysticks can trigger 4 different types of events: +

    SDL_JoyAxisEventOccurs when an axis changes
    SDL_JoyBallEventOccurs when a joystick trackball's position changes
    SDL_JoyHatEventOccurs when a hat's position changes
    SDL_JoyButtonEventOccurs when a button is pressed or released

    Events are received from all joysticks opened. The first thing that needs to be done in order to receive joystick events is to call SDL_JoystickEventState with the SDL_ENABLE flag. Next you must open the joysticks that you want to receive envents from. This is done with the SDL_JoystickOpen 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: +

        SDL_Joystick *joystick;
    +
    +    SDL_JoystickEventState(SDL_ENABLE);
    +    joystick = SDL_JoystickOpen(0);
    +If we wanted to receive events for other joysticks we would open them with calls to SDL_JoystickOpen just like we opened joystick 0, except we would store the SDL_Joystick 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.

    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: +

        SDL_Event *event;
    +    /* Other initializtion code goes here */   
    +
    +    /* Start main game loop here */
    +
    +    while(SDL_PollEvent(&event))
    +    {  
    +        switch(event.type)
    +        {  
    +            case SDL_KEYDOWN:
    +            /* handle keyboard stuff here */				
    +            break;
    +
    +            case SDL_QUIT:
    +            /* Set whatever flags are necessary to */
    +            /* end the main game loop here */
    +            break;
    +        }
    +    }
    +
    +    /* End loop here */
    +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: +
        case SDL_JOYAXISMOTION:  /* Handle Joystick Motion */
    +    if ( ( event.jaxis.value < -3200 ) || (event.jaxis.value > 3200 ) ) 
    +    {
    +      /* code goes here */
    +    }
    +    break;
    +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: +
        case SDL_JOYAXISMOTION:  /* Handle Joystick Motion */
    +    if ( ( event.jaxis.value < -3200 ) || (event.jaxis.value > 3200 ) ) 
    +    {
    +        if( event.jaxis.axis == 0) 
    +        {
    +            /* Left-right movement code goes here */
    +        }
    +
    +        if( event.jaxis.axis == 1) 
    +        {
    +            /* Up-Down movement code goes here */
    +        }
    +    }
    +    break;
    +Ideally the code here should use event.jaxis.value 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.

    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 event.jaxis.axis values.

    Button handling is simple compared to the axis checking. +

        case SDL_JOYBUTTONDOWN:  /* Handle Joystick Button Presses */
    +    if ( event.jbutton.button == 0 ) 
    +    {
    +        /* code goes here */
    +    }
    +    break;
    + +Button checks are simpler than axis checks because a button can only be pressed or not pressed. The SDL_JOYBUTTONDOWN event is triggered when a button is pressed and the SDL_JOYBUTTONUP event is fired when a button is released. We do have to know what button was pressed though, that is done by reading the event.jbutton.button field.

    Lastly when we are through using our joysticks we should close them with a call to SDL_JoystickClose. To close our opened joystick 0 we would do this at the end of our program: +

        SDL_JoystickClose(joystick);

    Advanced Joystick Functions

    That takes care of the controls that you can count on being on every joystick under the sun, but there are a few extra things that SDL can support. Joyballs are next on our list, they are alot like axis we a few minor differences. Joyballs store relative changes unlike the the absolute postion stored in a axis event. Also one trackball event contains both the change in x and they change in y. Our case for it is as follows: +

        case SDL_JOYBALLMOTION:  /* Handle Joyball Motion */
    +    if( event.jball.ball == 0 )
    +    {
    +      /* ball handling */
    +    }
    +    break;
    +The above checks the first joyball on the joystick. The change in position will be stored in event.jball.xrel and event.jball.yrel.

    Finally we have the hat event. Hats report only the direction they are pushed in. We check hat's position with the bitmasks: + +

    SDL_HAT_CENTERED
    SDL_HAT_UP
    SDL_HAT_RIGHT
    SDL_HAT_DOWN
    SDL_HAT_LEFT

    + +Also there are some predefined combinations of the above: +

    SDL_HAT_RIGHTUP
    SDL_HAT_RIGHTDOWN
    SDL_HAT_LEFTUP
    SDL_HAT_LEFTDOWN

    + +Our case for the hat may resemble the following: + +
        case SDL_JOYHATMOTION:  /* Handle Hat Motion */
    +    if ( event.jhat.hat | SDL_HAT_UP )
    +    {
    +        /* Do up stuff here */
    +    }
    +
    +    if ( event.jhat.hat | SDL_HAT_LEFT )
    +    {
    +        /* Do left stuff here */
    +    }
    +
    +    if ( event.jhat.hat | SDL_HAT_RIGHTDOWN )
    +    {
    +        /* Do right and down together stuff here */
    +    }
    +    break;

    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: +

    SDL_JoystickNumAxesReturns the number of joysitck axes
    SDL_JoystickNumButtonsReturns the number of joysitck buttons
    SDL_JoystickNumBallsReturns the number of joysitck balls
    SDL_JoystickNumHatsReturns the number of joysitck hats

    + +To use these functions we just have to pass in the joystick structure we got when we opened the joystick. For Example: + +
        int number_of_buttons;
    +    SDL_Joystick *joystick;
    +
    +    joystick = SDL_JoystickOpen(0);
    +    number_of_buttons = SDL_JoystickNumButtons(joystick);
    + +This block of code would get the number of buttons on the first joystick in the system.


    PrevHomeNext
    Graphics and VideoUpHandling the Keyboard
    \ No newline at end of file diff --git a/docs/html/guideinputkeyboard.html b/docs/html/guideinputkeyboard.html new file mode 100644 index 000000000..6b3ea19fb --- /dev/null +++ b/docs/html/guideinputkeyboard.html @@ -0,0 +1,715 @@ +Handling the Keyboard
    SDL Library Documentation
    PrevChapter 3. Input handlingNext

    Handling the Keyboard

    Keyboard Related Structures

    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.

    SDLKey

    SDLKey is an enumerated type defined in SDL/include/SDL_keysym.h and detailed here. Each SDLKey symbol represents a key, SDLK_a corresponds to the 'a' key on a keyboard, SDLK_SPACE corresponds to the space bar, and so on.

    SDLMod

    SDLMod is an enumerated type, similar to SDLKey, however it enumerates keyboard modifiers (Control, Alt, Shift). The full list of modifier symbols is here. SDLMod values can be AND'd together to represent several modifiers.

    SDL_keysym

    typedef struct{
    +  Uint8 scancode;
    +  SDLKey sym;
    +  SDLMod mod;
    +  Uint16 unicode;
    +} SDL_keysym;

    The SDL_keysym structure describes a key press or a key release. The scancode field is hardware specific and should be ignored unless you know what your doing. The sym field is the SDLKey value of the key being pressed or released. The mod field describes the state of the keyboard modifiers at the time the key press or release occurred. So a value of KMOD_NUM | KMOD_CAPS | KMOD_LSHIFT would mean that Numlock, Capslock and the left shift key were all press (or enabled in the case of the lock keys). Finally, the unicode field stores the 16-bit unicode value of the key.

    Note: It should be noted and understood that this field is only valid when the SDL_keysym 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 www.unicode.org

    Note: Unicode translation must be enabled using the SDL_EnableUNICODE function.

    SDL_KeyboardEvent

    typedef struct{
    +  Uint8 type;
    +  Uint8 state;
    +  SDL_keysym keysym;
    +} SDL_KeyboardEvent;

    The SDL_KeyboardEvent describes a keyboard event (obviously). The key member of the SDL_Event union is a SDL_KeyboardEvent structure. The type field specifies whether the event is a key release (SDL_KEYUP) or a key press (SDL_KEYDOWN) event. The state is largely redundant, it reports the same information as the type field but uses different values (SDL_RELEASED and SDL_PRESSED). The keysym contains information of the key press or release that this event represents (see above).

    Reading Keyboard Events

    Reading keybaord events from the event queue is quite simple (the event queue and using it is described here). We read events using SDL_PollEvent in a while() loop and check for SDL_KEYUP and SDL_KEYDOWN events using a switch statement, like so: +

      SDL_Event event;
    +  .
    +  .
    +  /* Poll for events. SDL_PollEvent() returns 0 when there are no  */
    +  /* more events on the event queue, our while loop will exit when */
    +  /* that occurs.                                                  */
    +  while( SDL_PollEvent( &event ) ){
    +    /* We are only worried about SDL_KEYDOWN and SDL_KEYUP events */
    +    switch( event.type ){
    +      case SDL_KEYDOWN:
    +        printf( "Key press detected\n" );
    +        break;
    +
    +      case SDL_KEYUP:
    +        printf( "Key release detected\n" );
    +        break;
    +
    +      default:
    +        break;
    +    }
    +  }
    +  .
    +  .
    +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.

    A More Detailed Look

    Before we can read events SDL must be initialised with SDL_Init and a video mode must be set using SDL_SetVideoMode. There are, however, two other functions we must use to obtain all the information required. We must enable unicode translation by calling SDL_EnableUNICODE(1) and we must convert SDLKey values into something printable, using SDL_GetKeyName

    Note: It is useful to note that unicode values < 0x80 translate directly a characters ASCII value. THis is used in the example below

    Example 3-1. keys.c - Key event information

    
    #include "SDL.h"
    +
    +    /* Function Prototypes */
    +    void PrintKeyInfo( SDL_KeyboardEvent *key );
    +    void PrintModifiers( SDLMod mod );
    +
    +    /* main */
    +    int main( int argc, char *argv[] ){
    +        
    +        SDL_Event event;
    +        int quit = 0;
    +        
    +        /* Initialise SDL */
    +        if( SDL_Init( SDL_INIT_VIDEO ) ){
    +            fprintf( stderr, "Could not initialise SDL: %s\n", SDL_GetError() );
    +            exit( -1 );
    +        }
    +
    +        /* Set a video mode */
    +        if( !SDL_SetVideoMode( 320, 200, 0, 0 ) ){
    +            fprintf( stderr, "Could not set video mode: %s\n", SDL_GetError() );
    +            SDL_Quit();
    +            exit( -1 );
    +        }
    +
    +        /* Enable Unicode translation */
    +        SDL_EnableUNICODE( 1 );
    +
    +        /* Loop until an SDL_QUIT event is found */
    +        while( !quit ){
    +
    +            /* Poll for events */
    +            while( SDL_PollEvent( &event ) ){
    +                
    +                switch( event.type ){
    +                    /* Keyboard event */
    +                    /* Pass the event data onto PrintKeyInfo() */
    +                    case SDL_KEYDOWN:
    +                    case SDL_KEYUP:
    +                        PrintKeyInfo( &event.key );
    +                        break;
    +
    +                    /* SDL_QUIT event (window close) */
    +                    case SDL_QUIT:
    +                        quit = 1;
    +                        break;
    +
    +                    default:
    +                        break;
    +                }
    +
    +            }
    +
    +        }
    +
    +        /* Clean up */
    +        SDL_Quit();
    +        exit( 0 );
    +    }
    +
    +    /* Print all information about a key event */
    +    void PrintKeyInfo( SDL_KeyboardEvent *key ){
    +        /* Is it a release or a press? */
    +        if( key->type == SDL_KEYUP )
    +            printf( "Release:- " );
    +        else
    +            printf( "Press:- " );
    +
    +        /* Print the hardware scancode first */
    +        printf( "Scancode: 0x%02X", key->keysym.scancode );
    +        /* Print the name of the key */
    +        printf( ", Name: %s", SDL_GetKeyName( key->keysym.sym ) );
    +        /* We want to print the unicode info, but we need to make */
    +        /* sure its a press event first (remember, release events */
    +        /* don't have unicode info                                */
    +        if( key->type == SDL_KEYDOWN ){
    +            /* If the Unicode value is less than 0x80 then the    */
    +            /* unicode value can be used to get a printable       */
    +            /* representation of the key, using (char)unicode.    */
    +            printf(", Unicode: " );
    +            if( key->keysym.unicode < 0x80 && key->keysym.unicode > 0 ){
    +                printf( "%c (0x%04X)", (char)key->keysym.unicode,
    +                        key->keysym.unicode );
    +            }
    +            else{
    +                printf( "? (0x%04X)", key->keysym.unicode );
    +            }
    +        }
    +        printf( "\n" );
    +        /* Print modifier info */
    +        PrintModifiers( key->keysym.mod );
    +    }
    +
    +    /* Print modifier info */
    +    void PrintModifiers( SDLMod mod ){
    +        printf( "Modifers: " );
    +
    +        /* If there are none then say so and return */
    +        if( mod == KMOD_NONE ){
    +            printf( "None\n" );
    +            return;
    +        }
    +
    +        /* Check for the presence of each SDLMod value */
    +        /* This looks messy, but there really isn't    */
    +        /* a clearer way.                              */
    +        if( mod & KMOD_NUM ) printf( "NUMLOCK " );
    +        if( mod & KMOD_CAPS ) printf( "CAPSLOCK " );
    +        if( mod & KMOD_LCTRL ) printf( "LCTRL " );
    +        if( mod & KMOD_RCTRL ) printf( "RCTRL " );
    +        if( mod & KMOD_RSHIFT ) printf( "RSHIFT " );
    +        if( mod & KMOD_LSHIFT ) printf( "LSHIFT " );
    +        if( mod & KMOD_RALT ) printf( "RALT " );
    +        if( mod & KMOD_LALT ) printf( "LALT " );
    +        if( mod & KMOD_CTRL ) printf( "CTRL " );
    +        if( mod & KMOD_SHIFT ) printf( "SHIFT " );
    +        if( mod & KMOD_ALT ) printf( "ALT " );
    +        printf( "\n" );
    +    }

    Game-type Input

    I have found that people using keyboard events for games and other interactive applications don't always understand one fundemental point.

    Keyboard events only take place when a keys state changes from being unpressed to pressed, and vice versa.

    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, when you press the down key you want him to slide down the screen. Examine the following code, it highlights and error that many people have made. +

        /* Alien screen coordinates */
    +    int alien_x=0, alien_y=0;
    +    .
    +    .
    +    /* Initialise SDL and video modes and all that */
    +    .
    +    /* Main game loop */
    +    /* Check for events */
    +    while( SDL_PollEvent( &event ) ){
    +        switch( event.type ){
    +            /* Look for a keypress */
    +            case SDL_KEYDOWN:
    +                /* Check the SDLKey values and move change the coords */
    +                switch( event.key.keysym.sym ){
    +                    case SDLK_LEFT:
    +                        alien_x -= 1;
    +                        break;
    +                    case SDLK_RIGHT:
    +                        alien_x += 1;
    +                        break;
    +                    case SDLK_UP:
    +                        alien_y -= 1;
    +                        break;
    +                    case SDLK_DOWN:
    +                        alien_y += 1;
    +                        break;
    +                    default:
    +                        break;
    +                }
    +            }
    +        }
    +    }
    +    .
    +    .
    +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.

    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: +

        /* Alien screen coordinates */
    +    int alien_x=0, alien_y=0;
    +    int alien_xvel=0, alien_yvel=0;
    +    .
    +    .
    +    /* Initialise SDL and video modes and all that */
    +    .
    +    /* Main game loop */
    +    /* Check for events */
    +    while( SDL_PollEvent( &event ) ){
    +        switch( event.type ){
    +            /* Look for a keypress */
    +            case SDL_KEYDOWN:
    +                /* Check the SDLKey values and move change the coords */
    +                switch( event.key.keysym.sym ){
    +                    case SDLK_LEFT:
    +                        alien_xvel = -1;
    +                        break;
    +                    case SDLK_RIGHT:
    +                        alien_xvel =  1;
    +                        break;
    +                    case SDLK_UP:
    +                        alien_yvel = -1;
    +                        break;
    +                    case SDLK_DOWN:
    +                        alien_yvel =  1;
    +                        break;
    +                    default:
    +                        break;
    +                }
    +                break;
    +            /* We must also use the SDL_KEYUP events to zero the x */
    +            /* and y velocity variables. But we must also be       */
    +            /* careful not to zero the velocities when we shouldn't*/
    +            case SDL_KEYUP:
    +                switch( event.key.keysym.sym ){
    +                    case SDLK_LEFT:
    +                        /* We check to make sure the alien is moving */
    +                        /* to the left. If it is then we zero the    */
    +                        /* velocity. If the alien is moving to the   */
    +                        /* right then the right key is still press   */
    +                        /* so we don't tocuh the velocity            */
    +                        if( alien_xvel < 0 )
    +                            alien_xvel = 0;
    +                        break;
    +                    case SDLK_RIGHT:
    +                        if( alien_xvel > 0 )
    +                            alien_xvel = 0;
    +                        break;
    +                    case SDLK_UP:
    +                        if( alien_yvel < 0 )
    +                            alien_yvel = 0;
    +                        break;
    +                    case SDLK_DOWN:
    +                        if( alien_yvel > 0 )
    +                            alien_yvel = 0;
    +                        break;
    +                    default:
    +                        break;
    +                }
    +                break;
    +            
    +            default:
    +                break;
    +        }
    +    }
    +    .
    +    .
    +    /* Update the alien position */
    +    alien_x += alien_xvel;
    +    alien_y += alien_yvel;
    +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.


    PrevHomeNext
    Input handlingUpExamples
    \ No newline at end of file diff --git a/docs/html/guidepreface.html b/docs/html/guidepreface.html new file mode 100644 index 000000000..63a4423ce --- /dev/null +++ b/docs/html/guidepreface.html @@ -0,0 +1,170 @@ +Preface
    SDL Library Documentation
    PrevNext

    Preface

    About SDL

    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.


    PrevHomeNext
    SDL GuideUpAbout SDLdoc
    \ No newline at end of file diff --git a/docs/html/guidethebasics.html b/docs/html/guidethebasics.html new file mode 100644 index 000000000..298c6be82 --- /dev/null +++ b/docs/html/guidethebasics.html @@ -0,0 +1,165 @@ +The Basics
    SDL Library Documentation
    PrevNext

    Chapter 1. The Basics

    Introduction

    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/.


    PrevHomeNext
    CreditsUpInitializing SDL
    \ No newline at end of file diff --git a/docs/html/guidetimeexamples.html b/docs/html/guidetimeexamples.html new file mode 100644 index 000000000..adedcc0fd --- /dev/null +++ b/docs/html/guidetimeexamples.html @@ -0,0 +1,173 @@ +Time Examples
    SDL Library Documentation
    PrevChapter 4. ExamplesNext

    Time Examples

    Time based game loop

    #define TICK_INTERVAL    30
    +
    +Uint32 TimeLeft(void)
    +{
    +    static Uint32 next_time = 0;
    +    Uint32 now;
    +
    +    now = SDL_GetTicks();
    +    if ( next_time <= now ) {
    +        next_time = now+TICK_INTERVAL;
    +        return(0);
    +    }
    +    return(next_time-now);
    +}
    +
    +
    +/* main game loop
    +
    +    while ( game_running ) {
    +        UpdateGameState();
    +        SDL_Delay(TimeLeft());
    +    }


    PrevHomeNext
    CDROM ExamplesUpSDL Reference
    \ No newline at end of file diff --git a/docs/html/guidevideo.html b/docs/html/guidevideo.html new file mode 100644 index 000000000..9b02f8141 --- /dev/null +++ b/docs/html/guidevideo.html @@ -0,0 +1,705 @@ +Graphics and Video
    SDL Library Documentation
    PrevNext

    Chapter 2. Graphics and Video

    Using OpenGL With SDL

    SDL has the ability to create and use OpenGL contexts on several platforms(Linux/X11, Win32, BeOS, MacOS Classic/Toolbox, MacOS 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).

    Initialisation

    Initialising SDL to use OpenGL is not very different to initialising SDL normally. There are three differences; you must pass SDL_OPENGL to SDL_SetVideoMode, you must specify several GL attributes (depth buffer size, framebuffer sizes) using SDL_GL_SetAttribute and finally, if you wish to use double buffering you must specify it as a GL attribute, not by passing the SDL_DOUBLEBUF flag to SDL_SetVideoMode. +

        /* Information about the current video settings. */
    +    const SDL_VideoInfo* info = NULL;
    +    /* Dimensions of our window. */
    +    int width = 0;
    +    int height = 0;
    +    /* Color depth in bits of our window. */
    +    int bpp = 0;
    +    /* Flags we will pass into SDL_SetVideoMode. */
    +    int flags = 0;
    +
    +    /* First, initialize SDL's video subsystem. */
    +    if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
    +        /* Failed, exit. */
    +        fprintf( stderr, "Video initialization failed: %s\n",
    +             SDL_GetError( ) );
    +        quit_tutorial( 1 );
    +    }
    +
    +    /* Let's get some video information. */
    +    info = SDL_GetVideoInfo( );
    +
    +    if( !info ) {
    +        /* This should probably never happen. */
    +        fprintf( stderr, "Video query failed: %s\n",
    +             SDL_GetError( ) );
    +        quit_tutorial( 1 );
    +    }
    +
    +    /*
    +     * Set our width/height to 640/480 (you would
    +     * of course let the user decide this in a normal
    +     * app). We get the bpp we will request from
    +     * the display. On X11, VidMode can't change
    +     * resolution, so this is probably being overly
    +     * safe. Under Win32, ChangeDisplaySettings
    +     * can change the bpp.
    +     */
    +    width = 640;
    +    height = 480;
    +    bpp = info->vfmt->BitsPerPixel;
    +
    +    /*
    +     * Now, we want to setup our requested
    +     * window attributes for our OpenGL window.
    +     * We want *at least* 5 bits of red, green
    +     * and blue. We also want at least a 16-bit
    +     * depth buffer.
    +     *
    +     * The last thing we do is request a double
    +     * buffered window. '1' turns on double
    +     * buffering, '0' turns it off.
    +     *
    +     * Note that we do not use SDL_DOUBLEBUF in
    +     * the flags to SDL_SetVideoMode. That does
    +     * not affect the GL attribute state, only
    +     * the standard 2D blitting setup.
    +     */
    +    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
    +    SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
    +    SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
    +    SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
    +    SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
    +
    +    /*
    +     * We want to request that SDL provide us
    +     * with an OpenGL window, in a fullscreen
    +     * video mode.
    +     *
    +     * EXERCISE:
    +     * Make starting windowed an option, and
    +     * handle the resize events properly with
    +     * glViewport.
    +     */
    +    flags = SDL_OPENGL | SDL_FULLSCREEN;
    +
    +    /*
    +     * Set the video mode
    +     */
    +    if( SDL_SetVideoMode( width, height, bpp, flags ) == 0 ) {
    +        /* 
    +         * This could happen for a variety of reasons,
    +         * including DISPLAY not being set, the specified
    +         * resolution not being available, etc.
    +         */
    +        fprintf( stderr, "Video mode set failed: %s\n",
    +             SDL_GetError( ) );
    +        quit_tutorial( 1 );
    +    }

    Drawing

    Apart from initialisation, using OpenGL within SDL is the same as using. However if you have request a double buffered display (using SDL_GL_SetAttribute) and one (which can be checked by using SDL_GL_GetAttribute), then you must use SDL_GL_SwapBuffers() to swap the buffers and update the display.

    A full example code listing is now presented below.

    Example 2-1. gl.c - SDL OpenGL Example

    /*
    + * SDL OpenGL Tutorial.
    + * (c) Michael Vance, 2000
    + * briareos@lokigames.com
    + *
    + * Distributed under terms of the LGPL. 
    + */
    +
    +#include <SDL/SDL.h>
    +#include <GL/gl.h>
    +#include <GL/glu.h>
    +
    +#include <stdio.h>
    +#include <stdlib.h>
    +
    +static GLboolean should_rotate = GL_TRUE;
    +
    +static void quit_tutorial( int code )
    +{
    +    /*
    +     * Quit SDL so we can release the fullscreen
    +     * mode and restore the previous video settings,
    +     * etc.
    +     */
    +    SDL_Quit( );
    +
    +    /* Exit program. */
    +    exit( code );
    +}
    +
    +static void handle_key_down( SDL_keysym* keysym )
    +{
    +
    +    /* 
    +     * We're only interested if 'Esc' has
    +     * been presssed.
    +     *
    +     * EXERCISE: 
    +     * Handle the arrow keys and have that change the
    +     * viewing position/angle.
    +     */
    +    switch( keysym->sym ) {
    +    case SDLK_ESCAPE:
    +        quit_tutorial( 0 );
    +        break;
    +    case SDLK_SPACE:
    +        should_rotate = !should_rotate;
    +        break;
    +    default:
    +        break;
    +    }
    +
    +}
    +
    +static void process_events( void )
    +{
    +    /* Our SDL event placeholder. */
    +    SDL_Event event;
    +
    +    /* Grab all the events off the queue. */
    +    while( SDL_PollEvent( &event ) ) {
    +
    +        switch( event.type ) {
    +        case SDL_KEYDOWN:
    +            /* Handle key presses. */
    +            handle_key_down( &event.key.keysym );
    +            break;
    +        case SDL_QUIT:
    +            /* Handle quit requests (like Ctrl-c). */
    +            quit_tutorial( 0 );
    +            break;
    +        }
    +
    +    }
    +
    +}
    +
    +static void draw_screen( void )
    +{
    +    /* Our angle of rotation. */
    +    static float angle = 0.0f;
    +
    +    /*
    +     * EXERCISE:
    +     * Replace this awful mess with vertex
    +     * arrays and a call to glDrawElements.
    +     *
    +     * EXERCISE:
    +     * After completing the above, change
    +     * it to use compiled vertex arrays.
    +     *
    +     * EXERCISE:
    +     * Verify my windings are correct here ;).
    +     */
    +    static GLfloat v0[] = { -1.0f, -1.0f,  1.0f };
    +    static GLfloat v1[] = {  1.0f, -1.0f,  1.0f };
    +    static GLfloat v2[] = {  1.0f,  1.0f,  1.0f };
    +    static GLfloat v3[] = { -1.0f,  1.0f,  1.0f };
    +    static GLfloat v4[] = { -1.0f, -1.0f, -1.0f };
    +    static GLfloat v5[] = {  1.0f, -1.0f, -1.0f };
    +    static GLfloat v6[] = {  1.0f,  1.0f, -1.0f };
    +    static GLfloat v7[] = { -1.0f,  1.0f, -1.0f };
    +    static GLubyte red[]    = { 255,   0,   0, 255 };
    +    static GLubyte green[]  = {   0, 255,   0, 255 };
    +    static GLubyte blue[]   = {   0,   0, 255, 255 };
    +    static GLubyte white[]  = { 255, 255, 255, 255 };
    +    static GLubyte yellow[] = {   0, 255, 255, 255 };
    +    static GLubyte black[]  = {   0,   0,   0, 255 };
    +    static GLubyte orange[] = { 255, 255,   0, 255 };
    +    static GLubyte purple[] = { 255,   0, 255,   0 };
    +
    +    /* Clear the color and depth buffers. */
    +    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
    +
    +    /* We don't want to modify the projection matrix. */
    +    glMatrixMode( GL_MODELVIEW );
    +    glLoadIdentity( );
    +
    +    /* Move down the z-axis. */
    +    glTranslatef( 0.0, 0.0, -5.0 );
    +
    +    /* Rotate. */
    +    glRotatef( angle, 0.0, 1.0, 0.0 );
    +
    +    if( should_rotate ) {
    +
    +        if( ++angle > 360.0f ) {
    +            angle = 0.0f;
    +        }
    +
    +    }
    +
    +    /* Send our triangle data to the pipeline. */
    +    glBegin( GL_TRIANGLES );
    +
    +    glColor4ubv( red );
    +    glVertex3fv( v0 );
    +    glColor4ubv( green );
    +    glVertex3fv( v1 );
    +    glColor4ubv( blue );
    +    glVertex3fv( v2 );
    +
    +    glColor4ubv( red );
    +    glVertex3fv( v0 );
    +    glColor4ubv( blue );
    +    glVertex3fv( v2 );
    +    glColor4ubv( white );
    +    glVertex3fv( v3 );
    +
    +    glColor4ubv( green );
    +    glVertex3fv( v1 );
    +    glColor4ubv( black );
    +    glVertex3fv( v5 );
    +    glColor4ubv( orange );
    +    glVertex3fv( v6 );
    +
    +    glColor4ubv( green );
    +    glVertex3fv( v1 );
    +    glColor4ubv( orange );
    +    glVertex3fv( v6 );
    +    glColor4ubv( blue );
    +    glVertex3fv( v2 );
    +
    +    glColor4ubv( black );
    +    glVertex3fv( v5 );
    +    glColor4ubv( yellow );
    +    glVertex3fv( v4 );
    +    glColor4ubv( purple );
    +    glVertex3fv( v7 );
    +
    +    glColor4ubv( black );
    +    glVertex3fv( v5 );
    +    glColor4ubv( purple );
    +    glVertex3fv( v7 );
    +    glColor4ubv( orange );
    +    glVertex3fv( v6 );
    +
    +    glColor4ubv( yellow );
    +    glVertex3fv( v4 );
    +    glColor4ubv( red );
    +    glVertex3fv( v0 );
    +    glColor4ubv( white );
    +    glVertex3fv( v3 );
    +
    +    glColor4ubv( yellow );
    +    glVertex3fv( v4 );
    +    glColor4ubv( white );
    +    glVertex3fv( v3 );
    +    glColor4ubv( purple );
    +    glVertex3fv( v7 );
    +
    +    glColor4ubv( white );
    +    glVertex3fv( v3 );
    +    glColor4ubv( blue );
    +    glVertex3fv( v2 );
    +    glColor4ubv( orange );
    +    glVertex3fv( v6 );
    +
    +    glColor4ubv( white );
    +    glVertex3fv( v3 );
    +    glColor4ubv( orange );
    +    glVertex3fv( v6 );
    +    glColor4ubv( purple );
    +    glVertex3fv( v7 );
    +
    +    glColor4ubv( green );
    +    glVertex3fv( v1 );
    +    glColor4ubv( red );
    +    glVertex3fv( v0 );
    +    glColor4ubv( yellow );
    +    glVertex3fv( v4 );
    +
    +    glColor4ubv( green );
    +    glVertex3fv( v1 );
    +    glColor4ubv( yellow );
    +    glVertex3fv( v4 );
    +    glColor4ubv( black );
    +    glVertex3fv( v5 );
    +
    +    glEnd( );
    +
    +    /*
    +     * EXERCISE:
    +     * Draw text telling the user that 'Spc'
    +     * pauses the rotation and 'Esc' quits.
    +     * Do it using vetors and textured quads.
    +     */
    +
    +    /*
    +     * Swap the buffers. This this tells the driver to
    +     * render the next frame from the contents of the
    +     * back-buffer, and to set all rendering operations
    +     * to occur on what was the front-buffer.
    +     *
    +     * Double buffering prevents nasty visual tearing
    +     * from the application drawing on areas of the
    +     * screen that are being updated at the same time.
    +     */
    +    SDL_GL_SwapBuffers( );
    +}
    +
    +static void setup_opengl( int width, int height )
    +{
    +    float ratio = (float) width / (float) height;
    +
    +    /* Our shading model--Gouraud (smooth). */
    +    glShadeModel( GL_SMOOTH );
    +
    +    /* Culling. */
    +    glCullFace( GL_BACK );
    +    glFrontFace( GL_CCW );
    +    glEnable( GL_CULL_FACE );
    +
    +    /* Set the clear color. */
    +    glClearColor( 0, 0, 0, 0 );
    +
    +    /* Setup our viewport. */
    +    glViewport( 0, 0, width, height );
    +
    +    /*
    +     * Change to the projection matrix and set
    +     * our viewing volume.
    +     */
    +    glMatrixMode( GL_PROJECTION );
    +    glLoadIdentity( );
    +    /*
    +     * EXERCISE:
    +     * Replace this with a call to glFrustum.
    +     */
    +    gluPerspective( 60.0, ratio, 1.0, 1024.0 );
    +}
    +
    +int main( int argc, char* argv[] )
    +{
    +    /* Information about the current video settings. */
    +    const SDL_VideoInfo* info = NULL;
    +    /* Dimensions of our window. */
    +    int width = 0;
    +    int height = 0;
    +    /* Color depth in bits of our window. */
    +    int bpp = 0;
    +    /* Flags we will pass into SDL_SetVideoMode. */
    +    int flags = 0;
    +
    +    /* First, initialize SDL's video subsystem. */
    +    if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
    +        /* Failed, exit. */
    +        fprintf( stderr, "Video initialization failed: %s\n",
    +             SDL_GetError( ) );
    +        quit_tutorial( 1 );
    +    }
    +
    +    /* Let's get some video information. */
    +    info = SDL_GetVideoInfo( );
    +
    +    if( !info ) {
    +        /* This should probably never happen. */
    +        fprintf( stderr, "Video query failed: %s\n",
    +             SDL_GetError( ) );
    +        quit_tutorial( 1 );
    +    }
    +
    +    /*
    +     * Set our width/height to 640/480 (you would
    +     * of course let the user decide this in a normal
    +     * app). We get the bpp we will request from
    +     * the display. On X11, VidMode can't change
    +     * resolution, so this is probably being overly
    +     * safe. Under Win32, ChangeDisplaySettings
    +     * can change the bpp.
    +     */
    +    width = 640;
    +    height = 480;
    +    bpp = info->vfmt->BitsPerPixel;
    +
    +    /*
    +     * Now, we want to setup our requested
    +     * window attributes for our OpenGL window.
    +     * We want *at least* 5 bits of red, green
    +     * and blue. We also want at least a 16-bit
    +     * depth buffer.
    +     *
    +     * The last thing we do is request a double
    +     * buffered window. '1' turns on double
    +     * buffering, '0' turns it off.
    +     *
    +     * Note that we do not use SDL_DOUBLEBUF in
    +     * the flags to SDL_SetVideoMode. That does
    +     * not affect the GL attribute state, only
    +     * the standard 2D blitting setup.
    +     */
    +    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
    +    SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
    +    SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
    +    SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
    +    SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
    +
    +    /*
    +     * We want to request that SDL provide us
    +     * with an OpenGL window, in a fullscreen
    +     * video mode.
    +     *
    +     * EXERCISE:
    +     * Make starting windowed an option, and
    +     * handle the resize events properly with
    +     * glViewport.
    +     */
    +    flags = SDL_OPENGL | SDL_FULLSCREEN;
    +
    +    /*
    +     * Set the video mode
    +     */
    +    if( SDL_SetVideoMode( width, height, bpp, flags ) == 0 ) {
    +        /* 
    +         * This could happen for a variety of reasons,
    +         * including DISPLAY not being set, the specified
    +         * resolution not being available, etc.
    +         */
    +        fprintf( stderr, "Video mode set failed: %s\n",
    +             SDL_GetError( ) );
    +        quit_tutorial( 1 );
    +    }
    +
    +    /*
    +     * At this point, we should have a properly setup
    +     * double-buffered window for use with OpenGL.
    +     */
    +    setup_opengl( width, height );
    +
    +    /*
    +     * Now we want to begin our normal app process--
    +     * an event loop with a lot of redrawing.
    +     */
    +    while( 1 ) {
    +        /* Process incoming events. */
    +        process_events( );
    +        /* Draw the screen. */
    +        draw_screen( );
    +    }
    +
    +    /*
    +     * EXERCISE:
    +     * Record timings using SDL_GetTicks() and
    +     * and print out frames per second at program
    +     * end.
    +     */
    +
    +    /* Never reached. */
    +    return 0;
    +}

    PrevHomeNext
    Initializing SDLUpInput handling
    \ No newline at end of file diff --git a/docs/html/guidevideoexamples.html b/docs/html/guidevideoexamples.html new file mode 100644 index 000000000..6d6e93c21 --- /dev/null +++ b/docs/html/guidevideoexamples.html @@ -0,0 +1,473 @@ +Video Examples
    SDL Library Documentation
    PrevChapter 4. ExamplesNext

    Video Examples

    Initializing the video display

        SDL_Surface *screen;
    +
    +    /* Initialize the SDL library */
    +    if( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
    +        fprintf(stderr,
    +                "Couldn't initialize SDL: %s\n", SDL_GetError());
    +        exit(1);
    +    }
    +
    +    /* Clean up on exit */
    +    atexit(SDL_Quit);
    +
    +    /* Initialize the display in a 640x480 8-bit palettized mode */
    +    screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE);
    +    if ( screen == NULL ) {
    +        fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
    +                        SDL_GetError());
    +        exit(1);
    +    }

    Initializing the best video mode

        /* Have a preference for 8-bit, but accept any depth */
    +    screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE|SDL_ANYFORMAT);
    +    if ( screen == NULL ) {
    +        fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
    +                        SDL_GetError());
    +        exit(1);
    +    }
    +    printf("Set 640x480 at %d bits-per-pixel mode\n",
    +           screen->format->BitsPerPixel);

    Loading and displaying a BMP file

        SDL_Surface *image;
    +    SDL_Rect dest;
    +    int ncolors, i;
    +    SDL_Color *colors;
    +
    +    /* Load the BMP file into a surface */
    +    image = SDL_LoadBMP("sample.bmp");
    +    if ( image == NULL ) {
    +        fprintf(stderr, "Couldn't load sample.bmp: %s\n",
    +                        SDL_GetError());
    +        return;
    +    }
    +
    +    /* Set the display colors -- SDL_SetColors() only does something on
    +       palettized displays, but it doesn't hurt anything on HiColor or
    +       TrueColor displays.
    +       If the display colors have already been set, this step can be
    +       skipped, and the library will automatically map the image to
    +       the current display colors.
    +    */
    +    if ( image->format->palette ) {
    +        ncolors = image->format->palette->ncolors;
    +        colors  = (SDL_Color *)malloc(ncolors*sizeof(SDL_Color));
    +        memcpy(colors, image->format->palette->colors, ncolors);
    +    } 
    +    else {
    +        int r, g, b;
    +
    +        /* Allocate 256 color palette */
    +        ncolors = 256;
    +        colors  = (SDL_Color *)malloc(ncolors*sizeof(SDL_Color));
    +
    +        /* Set a 3,3,2 color cube */
    +        for ( r=0; r<8; ++r ) {
    +            for ( g=0; g<8; ++g ) {
    +                for ( b=0; b<4; ++b ) {
    +                    i = ((r<<5)|(g<<2)|b);
    +                    colors[i].r = r<<5;
    +                    colors[i].g = g<<5;
    +                    colors[i].b = b<<6;
    +                }
    +            }
    +        }
    +        /* Note: A better way of allocating the palette might be
    +           to calculate the frequency of colors in the image
    +           and create a palette based on that information.
    +        */
    +    }
    +    /* Set colormap, try for all the colors, but don't worry about it */
    +    SDL_SetColors(screen, colors, 0, ncolors);
    +    free(colors);
    +
    +    /* Blit onto the screen surface */
    +    dest.x = 0;
    +    dest.y = 0;
    +    dest.w = image->w;
    +    dest.h = image->h;
    +    SDL_BlitSurface(image, NULL, screen, &dest);
    +
    +    SDL_UpdateRects(screen, 1, &dest);
    +
    +    /* Free the allocated BMP surface */
    +    SDL_FreeSurface(image);
    +    return;

    Drawing directly to the display

        /* Code to set a yellow pixel at the center of the screen */
    +
    +    Sint32   X, Y;
    +    Uint32   pixel;
    +    Uint8   *bits, bpp;
    +
    +    /* Map the color yellow to this display (R=0xFF, G=0xFF, B=0x00)
    +       Note:  If the display is palettized, you must set the palette first.
    +    */
    +    pixel = SDL_MapRGB(screen->format, 0xFF, 0xFF, 0x00);
    +
    +    /* Calculate the framebuffer offset of the center of the screen */
    +    if ( SDL_MUSTLOCK(screen) ) {
    +        if ( SDL_LockSurface(screen) < 0 )
    +            return;
    +    }
    +    bpp = screen->format->BytesPerPixel;
    +    X = screen->w/2;
    +    Y = screen->h/2;
    +    bits = ((Uint8 *)screen->pixels)+Y*screen->pitch+X*bpp;
    +
    +    /* Set the pixel */
    +    switch(bpp) {
    +        case 1:
    +            *((Uint8 *)(bits)) = (Uint8)pixel;
    +            break;
    +        case 2:
    +            *((Uint16 *)(bits)) = (Uint16)pixel;
    +            break;
    +        case 3: { /* Format/endian independent */
    +            Uint8 r, g, b;
    +
    +            r = (pixel>>screen->format->Rshift)&0xFF;
    +            g = (pixel>>screen->format->Gshift)&0xFF;
    +            b = (pixel>>screen->format->Bshift)&0xFF;
    +            *((bits)+screen->format->Rshift/8) = r; 
    +            *((bits)+screen->format->Gshift/8) = g;
    +            *((bits)+screen->format->Bshift/8) = b;
    +            }
    +            break;
    +        case 4:
    +            *((Uint32 *)(bits)) = (Uint32)pixel;
    +            break;
    +    }
    +
    +    /* Update the display */
    +    if ( SDL_MUSTLOCK(screen) ) {
    +        SDL_UnlockSurface(screen);
    +    }
    +    SDL_UpdateRect(screen, X, Y, 1, 1);
    +
    +    return;

    Fastest possible surface blit

    There are three different ways you can draw an image to the screen: +

    1.Create a surface and use SDL_BlitSurface to blit it to the screen
    2.Create the video surface in system memory and call SDL_UpdateRect
    3.Create the video surface in video memory and call SDL_LockSurface

    +The best way to do this is to combine methods: +
    #include <stdio.h>
    +#include <stdlib.h>
    +#include "SDL.h"
    +#include "SDL_timer.h"
    +
    +void ComplainAndExit(void)
    +{
    +    fprintf(stderr, "Problem: %s\n", SDL_GetError());
    +    exit(1);
    +}
    +
    +int main(int argc, char *argv[])
    +{
    +    SDL_PixelFormat fmt;
    +    SDL_Surface *screen, *locked;
    +    SDL_Surface *imagebmp, *image;
    +    SDL_Rect dstrect;
    +    int i;
    +    Uint8 *buffer;
    +
    +    /* Initialize SDL */
    +    if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
    +        ComplainAndExit();
    +    }
    +    atexit(SDL_Quit);
    +
    +    /* Load a BMP image into a surface */
    +    imagebmp = SDL_LoadBMP("image.bmp");
    +    if ( imagebmp == NULL ) {
    +        ComplainAndExit();
    +    }
    +
    +    /* Set the video mode (640x480 at native depth) */
    +    screen = SDL_SetVideoMode(640, 480, 0, SDL_HWSURFACE|SDL_FULLSCREEN);
    +    if ( screen == NULL ) {
    +        ComplainAndExit();
    +    }
    +
    +    /* Set the video colormap */
    +    if ( imagebmp->format->palette != NULL ) {
    +        SDL_SetColors(screen,
    +                      imagebmp->format->palette->colors, 0,
    +                      imagebmp->format->palette->ncolors);
    +    }
    +
    +    /* Convert the image to the video format (maps colors) */
    +    image = SDL_DisplayFormat(imagebmp);
    +    SDL_FreeSurface(imagebmp);
    +    if ( image == NULL ) {
    +        ComplainAndExit();
    +    }
    +
    +    /* Draw bands of color on the raw surface */
    +    if ( SDL_MUSTLOCK(screen) ) {
    +        if ( SDL_LockSurface(screen) < 0 )
    +            ComplainAndExit();
    +    }
    +    buffer=(Uint8 *)screen->pixels;
    +    for ( i=0; i<screen->h; ++i ) {
    +        memset(buffer,(i*255)/screen->h,
    +               screen->w*screen->format->BytesPerPixel);
    +               buffer += screen->pitch;
    +    }
    +    if ( SDL_MUSTLOCK(screen) ) {
    +        SDL_UnlockSurface(screen);
    +    }
    +
    +    /* Blit the image to the center of the screen */
    +    dstrect.x = (screen->w-image->w)/2;
    +    dstrect.y = (screen->h-image->h)/2;
    +    dstrect.w = image->w;
    +    dstrect.h = image->h;
    +    if ( SDL_BlitSurface(image, NULL, screen, &dstrect) < 0 ) {
    +        SDL_FreeSurface(image);
    +        ComplainAndExit();
    +    }
    +    SDL_FreeSurface(image);
    +
    +    /* Update the screen */
    +    SDL_UpdateRects(screen, 1, &dstrect);
    +
    +    SDL_Delay(5000);        /* Wait 5 seconds */
    +    exit(0);
    +}


    PrevHomeNext
    ExamplesUpEvent Examples
    \ No newline at end of file diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 000000000..ed2dc1624 --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,1049 @@ +
    Table of Contents
    I. SDL Guide
    Preface
    About SDL
    About SDLdoc
    Credits
    1. The Basics
    Introduction
    Initializing SDL
    2. Graphics and Video
    Using OpenGL With SDL
    3. Input handling
    Handling Joysticks
    Handling the Keyboard
    4. Examples
    Introduction
    Video Examples
    Event Examples
    Audio Examples
    CDROM Examples
    Time Examples
    II. SDL Reference
    5. General
    SDL_Init — Initializes SDL
    SDL_InitSubSystem — Initialize subsystems
    SDL_QuitSubSystem — Shut down a subsystem
    SDL_Quit — Shut down SDL
    SDL_WasInit — Check which subsystems are initialized
    6. Video
    SDL_GetVideoSurface — returns a pointer to the current display surface
    SDL_GetVideoInfo — returns a pointer to information about the video hardware
    SDL_VideoDriverName — Obtain the name of the video driver
    SDL_ListModes — Returns a pointer to an array of available screen dimensions for +the given format and video flags
    SDL_VideoModeOK — Check to see if a particular video mode is supported.
    SDL_SetVideoMode — Set up a video mode with the specified width, height and bits-per-pixel.
    SDL_UpdateRect — Makes sure the given area is updated on the given screen.
    SDL_UpdateRects — Makes sure the given list of rectangles is updated on the given screen.
    SDL_Flip — Swaps screen buffers
    SDL_SetColors — Sets a portion of the colormap for the given 8-bit surface.
    SDL_SetPalette — Sets the colors in the palette of an 8-bit surface.
    SDL_SetGamma — Sets the color gamma function for the display
    SDL_GetGammaRamp — Gets the color gamma lookup tables for the display
    SDL_SetGammaRamp — Sets the color gamma lookup tables for the display
    SDL_MapRGB — Map a RGB color value to a pixel format.
    SDL_MapRGBA — Map a RGBA color value to a pixel format.
    SDL_GetRGB — Get RGB values from a pixel in the specified pixel format.
    SDL_GetRGBA — Get RGBA values from a pixel in the specified pixel format.
    SDL_CreateRGBSurface — Create an empty SDL_Surface
    SDL_CreateRGBSurfaceFrom — Create an SDL_Surface from pixel data
    SDL_FreeSurface — Frees (deletes) and SDL_Surface
    SDL_LockSurface — Lock a surface for directly access.
    SDL_UnlockSurface — Unlocks a previously locked surface.
    SDL_LoadBMP — Load a Windows BMP file into an SDL_Surface.
    SDL_SaveBMP — Save an SDL_Surface as a Windows BMP file.
    SDL_SetColorKey — Sets the color key (transparent pixel) in a blittable surface and +RLE acceleration.
    SDL_SetAlpha — Adjust the alpha properties of a surface
    SDL_SetClipRect — Sets the clipping rectangle for a surface.
    SDL_GetClipRect — Gets the clipping rectangle for a surface.
    SDL_ConvertSurface — Converts a surface to the same format as another surface.
    SDL_BlitSurface — This performs a fast blit from the source surface to the destination surface.
    SDL_FillRect — This function performs a fast fill of the given rectangle with some color
    SDL_DisplayFormat — Convert a surface to the display format
    SDL_DisplayFormatAlpha — Convert a surface to the display format
    SDL_WarpMouse — Set the position of the mouse cursor.
    SDL_CreateCursor — Creates a new mouse cursor.
    SDL_FreeCursor — Frees a cursor created with SDL_CreateCursor.
    SDL_SetCursor — Set the currently active mouse cursor.
    SDL_GetCursor — Get the currently active mouse cursor.
    SDL_ShowCursor — Toggle whether or not the cursor is shown on the screen.
    SDL_GL_LoadLibrary — Specify an OpenGL library
    SDL_GL_GetProcAddress — Get the address of a GL function
    SDL_GL_GetAttribute — Get the value of a special SDL/OpenGL attribute
    SDL_GL_SetAttribute — Set a special SDL/OpenGL attribute
    SDL_GL_SwapBuffers — Swap OpenGL framebuffers/Update Display
    SDL_CreateYUVOverlay — Create a YUV video overlay
    SDL_LockYUVOverlay — Lock an overlay
    SDL_UnlockYUVOverlay — Unlock an overlay
    SDL_DisplayYUVOverlay — Blit the overlay to the display
    SDL_FreeYUVOverlay — Free a YUV video overlay
    SDL_GLattr — SDL GL Attributes
    SDL_Rect — Defines a rectangular area
    SDL_Color — Format independent color description
    SDL_Palette — Color palette for 8-bit pixel formats
    SDL_PixelFormat — Stores surface format information
    SDL_Surface — Graphical Surface Structure
    SDL_VideoInfo — Video Target information
    SDL_Overlay — YUV video overlay
    7. Window Management
    SDL_WM_SetCaption — Sets the window tile and icon name.
    SDL_WM_GetCaption — Gets the window title and icon name.
    SDL_WM_SetIcon — Sets the icon for the display window.
    SDL_WM_IconifyWindow — Iconify/Minimise the window
    SDL_WM_ToggleFullScreen — Toggles fullscreen mode
    SDL_WM_GrabInput — Grabs mouse and keyboard input.
    8. Events
    Introduction
    SDL Event Structures.
    Event Functions.
    9. Joystick
    SDL_NumJoysticks — Count available joysticks.
    SDL_JoystickName — Get joystick name.
    SDL_JoystickOpen — Opens a joystick for use.
    SDL_JoystickOpened — Determine if a joystick has been opened
    SDL_JoystickIndex — Get the index of an SDL_Joystick.
    SDL_JoystickNumAxes — Get the number of joystick axes
    SDL_JoystickNumBalls — Get the number of joystick trackballs
    SDL_JoystickNumHats — Get the number of joystick hats
    SDL_JoystickNumButtons — Get the number of joysitck buttons
    SDL_JoystickUpdate — Updates the state of all joysticks
    SDL_JoystickGetAxis — Get the current state of an axis
    SDL_JoystickGetHat — Get the current state of a joystick hat
    SDL_JoystickGetButton — Get the current state of a given button on a given joystick
    SDL_JoystickGetBall — Get relative trackball motion
    SDL_JoystickClose — Closes a previously opened joystick
    10. Audio
    SDL_AudioSpec — Audio Specification Structure
    SDL_OpenAudio — Opens the audio device with the desired parameters.
    SDL_PauseAudio — Pauses and unpauses the audio callback processing
    SDL_GetAudioStatus — Get the current audio state
    SDL_LoadWAV — Load a WAVE file
    SDL_FreeWAV — Frees previously opened WAV data
    SDL_AudioCVT — Audio Conversion Structure
    SDL_BuildAudioCVT — Initializes a SDL_AudioCVT structure for conversion
    SDL_ConvertAudio — Convert audio data to a desired audio format.
    SDL_MixAudio — Mix audio data
    SDL_LockAudio — Lock out the callback function
    SDL_UnlockAudio — Unlock the callback function
    SDL_CloseAudio — Shuts down audio processing and closes the audio device.
    11. CD-ROM
    SDL_CDNumDrives — Returns the number of CD-ROM drives on the system.
    SDL_CDName — Returns a human-readable, system-dependent identifier for the CD-ROM.
    SDL_CDOpen — Opens a CD-ROM drive for access.
    SDL_CDStatus — Returns the current status of the given drive.
    SDL_CDPlay — Play a CD
    SDL_CDPlayTracks — Play the given CD track(s)
    SDL_CDPause — Pauses a CDROM
    SDL_CDResume — Resumes a CDROM
    SDL_CDStop — Stops a CDROM
    SDL_CDEject — Ejects a CDROM
    SDL_CDClose — Closes a SDL_CD handle
    SDL_CD — CDROM Drive Information
    SDL_CDtrack — CD Track Information Structure
    12. Multi-threaded Programming
    SDL_CreateThread — Creates a new thread of execution that shares its parent's properties.
    SDL_ThreadID — Get the 32-bit thread identifier for the current thread.
    SDL_GetThreadID — Get the SDL thread ID of a SDL_Thread
    SDL_WaitThread — Wait for a thread to finish.
    SDL_KillThread — Gracelessly terminates the thread.
    SDL_CreateMutex — Create a mutex
    SDL_DestroyMutex — Destroy a mutex
    SDL_mutexP — Lock a mutex
    SDL_mutexV — Unlock a mutex
    SDL_CreateSemaphore — Creates a new semaphore and assigns an initial value to it.
    SDL_DestroySemaphore — Destroys a semaphore that was created by SDL_CreateSemaphore.
    SDL_SemWait — Lock a semaphore and suspend the thread if the semaphore value is zero.
    SDL_SemTryWait — Attempt to lock a semaphore but don't suspend the thread.
    SDL_SemWaitTimeout — Lock a semaphore, but only wait up to a specified maximum time.
    SDL_SemPost — Unlock a semaphore.
    SDL_SemValue — Return the current value of a semaphore.
    SDL_CreateCond — Create a condition variable
    SDL_DestroyCond — Destroy a condition variable
    SDL_CondSignal — Restart a thread wait on a condition variable
    SDL_CondBroadcast — Restart all threads waiting on a condition variable
    SDL_CondWait — Wait on a condition variable
    SDL_CondWaitTimeout — Wait on a condition variable, with timeout
    13. Time
    SDL_GetTicks — Get the number of milliseconds since the SDL library initialization.
    SDL_Delay — Wait a specified number of milliseconds before returning.
    SDL_AddTimer — Add a timer which will call a callback after the specified number of milliseconds has +elapsed.
    SDL_RemoveTimer — Remove a timer which was added with +SDL_AddTimer.
    SDL_SetTimer — Set a callback to run after the specified number of milliseconds has +elapsed.

      Next
      SDL Guide
    \ No newline at end of file diff --git a/docs/html/joystick.html b/docs/html/joystick.html new file mode 100644 index 000000000..48dff1de1 --- /dev/null +++ b/docs/html/joystick.html @@ -0,0 +1,285 @@ +Joystick
    SDL Library Documentation
    PrevNext

    Chapter 9. Joystick

    Table of Contents
    SDL_NumJoysticks — Count available joysticks.
    SDL_JoystickName — Get joystick name.
    SDL_JoystickOpen — Opens a joystick for use.
    SDL_JoystickOpened — Determine if a joystick has been opened
    SDL_JoystickIndex — Get the index of an SDL_Joystick.
    SDL_JoystickNumAxes — Get the number of joystick axes
    SDL_JoystickNumBalls — Get the number of joystick trackballs
    SDL_JoystickNumHats — Get the number of joystick hats
    SDL_JoystickNumButtons — Get the number of joysitck buttons
    SDL_JoystickUpdate — Updates the state of all joysticks
    SDL_JoystickGetAxis — Get the current state of an axis
    SDL_JoystickGetHat — Get the current state of a joystick hat
    SDL_JoystickGetButton — Get the current state of a given button on a given joystick
    SDL_JoystickGetBall — Get relative trackball motion
    SDL_JoystickClose — Closes a previously opened joystick

    Joysticks, and other similar input devices, have a very strong role in game playing and SDL provides comprehensive support for them. Axes, Buttons, POV Hats and trackballs are all supported.

    Joystick support is initialized by passed the SDL_INIT_JOYSTICK flag to SDL_Init. Once initilized joysticks must be opened using SDL_JoystickOpen.

    While using the functions describe in this secton may seem like the best way to access and read from joysticks, in most cases they aren't. Ideally joysticks should be read using the event system. To enable this, you must set the joystick event processing state with SDL_JoystickEventState. Joysticks must be opened before they can be used of course.

    Note: If you are not handling the joystick via the event queue then you must explicitly request a joystick update by calling SDL_JoystickUpdate.

    Note: Force Feedback is not yet support. Sam (slouken@libsdl.org) is soliciting suggestions from people with force-feedback experience on the best wat to desgin the API.


    PrevHomeNext
    SDL_JoystickEventStateUpSDL_NumJoysticks
    \ No newline at end of file diff --git a/docs/html/reference.html b/docs/html/reference.html new file mode 100644 index 000000000..d728b6d15 --- /dev/null +++ b/docs/html/reference.html @@ -0,0 +1,187 @@ +SDL Reference
    SDL Library Documentation
    PrevNext

    II. SDL Reference


    PrevHomeNext
    Time Examples General
    \ No newline at end of file diff --git a/docs/html/sdlactiveevent.html b/docs/html/sdlactiveevent.html new file mode 100644 index 000000000..65e9cbdb4 --- /dev/null +++ b/docs/html/sdlactiveevent.html @@ -0,0 +1,327 @@ +SDL_ActiveEvent
    SDL Library Documentation
    PrevNext

    SDL_ActiveEvent

    Name

    SDL_ActiveEvent -- Application visibility event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 gain;
    +  Uint8 state;
    +} SDL_ActiveEvent;

    Structure Data

    typeSDL_ACTIVEEVENT.
    gain0 if the event is a loss or 1 if it is a gain.
    stateSDL_APPMOUSEFOCUS if mouse focus was gained or lost, SDL_APPINPUTFOCUS if input focus was gained or lost, or SDL_APPACTIVE if the application was iconified (gain=0) or restored(gain=1).

    Description

    SDL_ActiveEvent is a member of the SDL_Event union and is used when an event of type SDL_ACTIVEEVENT is reported.

    When the mouse leaves or enters the window area a SDL_APPMOUSEFOCUS type activation event occurs, if the mouse entered the window then gain will be 1, otherwise gain will be 0. A SDL_APPINPUTFOCUS type activation event occurs when the application loses or gains keyboard focus. This usually occurs when another application is made active. Finally, a SDL_APPACTIVE type event occurs when the application is either minimised/iconified (gain=0) or restored.

    Note: This event does not occur when an application window is first created.


    PrevHomeNext
    SDL_EventUpSDL_KeyboardEvent
    \ No newline at end of file diff --git a/docs/html/sdladdtimer.html b/docs/html/sdladdtimer.html new file mode 100644 index 000000000..77c49cd15 --- /dev/null +++ b/docs/html/sdladdtimer.html @@ -0,0 +1,275 @@ +SDL_AddTimer
    SDL Library Documentation
    PrevNext

    SDL_AddTimer

    Name

    SDL_AddTimer -- Add a timer which will call a callback after the specified number of milliseconds has +elapsed.

    Synopsis

    #include "SDL.h"

    SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);

    Callback

    /* type definition for the "new" timer callback function */
    +typedef Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param);

    Description

    Adds a callback function to be run after the specified number of +milliseconds has elapsed. The callback function is passed the current +timer interval and the user supplied parameter from the +SDL_AddTimer call and returns the next timer +interval. If the returned value from the callback is the same as the one +passed in, the periodic alarm continues, otherwise a new alarm is +scheduled.

    To cancel a currently running timer call +SDL_RemoveTimer with the +timer ID returned from +SDL_AddTimer.

    The timer callback function may run in a different thread than your +main program, and so shouldn't call any functions from within itself.

    The maximum resolution of this timer is 10 ms, which means that if +you request a 16 ms timer, your callback will run approximately 20 ms +later on an unloaded system. If you wanted to set a flag signaling +a frame update at 30 frames per second (every 33 ms), you might set a +timer for 30 ms (see example below). + +If you use this function, you need to pass SDL_INIT_TIMER +to SDL_Init.

    Return Value

    Returns an ID value for the added timer or +NULL if there was an error.

    Examples

    my_timer_id = SDL_AddTimer((33/10)*10, my_callbackfunc, my_callback_param);


    PrevHomeNext
    SDL_DelayUpSDL_RemoveTimer
    \ No newline at end of file diff --git a/docs/html/sdlaudiocvt.html b/docs/html/sdlaudiocvt.html new file mode 100644 index 000000000..84d108f15 --- /dev/null +++ b/docs/html/sdlaudiocvt.html @@ -0,0 +1,548 @@ +SDL_AudioCVT
    SDL Library Documentation
    PrevNext

    SDL_AudioCVT

    Name

    SDL_AudioCVT -- Audio Conversion Structure

    Structure Definition

    typedef struct{
    +  int needed;
    +  Uint16 src_format;
    +  Uint16 dest_format;
    +  double rate_incr;
    +  Uint8 *buf;
    +  int len;
    +  int len_cvt;
    +  int len_mult;
    +  double len_ratio;
    +  void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
    +  int filter_index;
    +} SDL_AudioCVT;

    Structure Data

    neededSet to one if the conversion is possible
    src_formatAudio format of the source
    dest_formatAudio format of the destination
    rate_incrRate conversion increment
    bufAudio buffer
    lenLength of the original audio buffer in bytes
    len_cvtLength of converted audio buffer in bytes (calculated)
    len_multbuf must be len*len_mult bytes in size(calculated)
    len_ratioFinal audio size is len*len_ratio
    filters[10](..)Pointers to functions needed for this conversion
    filter_indexCurrent conversion function

    Description

    The SDL_AudioCVT is used to convert audio data between different formats. A SDL_AudioCVT structure is created with the SDL_BuildAudioCVT function, while the actual conversion is done by the SDL_ConvertAudio function.

    Many of the fields in the SDL_AudioCVT structure should be considered private and their function will not be discussed here.

    Uint8 *buf

    This points to the audio data that will be used in the conversion. It is both the source and the destination, which means the converted audio data overwrites the original data. It also means that the converted data may be larger than the original data (if you were converting from 8-bit to 16-bit, for instance), so you must ensure buf is large enough. See below.

    int len

    This is the length of the original audio data in bytes.

    int len_mult

    As explained above, the audio buffer needs to be big enough to store the converted data, which may be bigger than the original audio data. The length of buf should be len*len_mult.

    double len_ratio

    When you have finished converting your audio data, you need to know how much of your audio buffer is valid. len*len_ratio is the size of the converted audio data in bytes. This is very similar to len_mult, however when the convert audio data is shorter than the original len_mult would be 1. len_ratio, on the other hand, would be a fractional number between 0 and 1.


    PrevHomeNext
    SDL_FreeWAVUpSDL_BuildAudioCVT
    \ No newline at end of file diff --git a/docs/html/sdlaudiospec.html b/docs/html/sdlaudiospec.html new file mode 100644 index 000000000..dd7203566 --- /dev/null +++ b/docs/html/sdlaudiospec.html @@ -0,0 +1,581 @@ +SDL_AudioSpec
    SDL Library Documentation
    PrevNext

    SDL_AudioSpec

    Name

    SDL_AudioSpec -- Audio Specification Structure

    Structure Definition

    typedef struct{
    +  int freq;
    +  Uint16 format;
    +  Uint8 channels;
    +  Uint8 silence;
    +  Uint16 samples;
    +  Uint32 size;
    +  void (*callback)(void *userdata, Uint8 *stream, int len);
    +  void *userdata;
    +} SDL_AudioSpec;

    Structure Data

    freqAudio frequency in samples per second
    formatAudio data format
    channelsNumber of channels: 1 mono, 2 stereo
    silenceAudio buffer silence value (calculated)
    samplesAudio buffer size in samples
    sizeAudio buffer size in bytes (calculated)
    callback(..)Callback function for filling the audio buffer
    userdataPointer the user data which is passed to the callback function

    Description

    The SDL_AudioSpec structure is used to describe the format of some audio data. This structure is used by SDL_OpenAudio and SDL_LoadWAV. While all fields are used by SDL_OpenAudio only freq, format, samples and channels are used by SDL_LoadWAV. We will detail these common members here.

    freq

    The number of samples sent to the sound device every second. Common values are 11025, 22050 and 44100. The higher the better.

    format

    Specifies the size and type of each sample element +

    AUDIO_U8

    Unsigned 8-bit samples

    AUDIO_S8

    Signed 8-bit samples

    AUDIO_U16 or AUDIO_U16LSB

    Unsigned 16-bit little-endian samples

    AUDIO_S16 or AUDIO_S16LSB

    Signed 16-bit little-endian samples

    AUDIO_U16MSB

    Unsigned 16-bit big-endian samples

    AUDIO_S16MSB

    Signed 16-bit big-endian samples

    AUDIO_U16SYS

    Either AUDIO_U16LSB or AUDIO_U16MSB depending on you systems endianness

    AUDIO_S16SYS

    Either AUDIO_S16LSB or AUDIO_S16MSB depending on you systems endianness

    channelsThe number of seperate sound channels. 1 is mono (single channel), 2 is stereo (dual channel).
    samplesWhen used with SDL_OpenAudio this refers to the size of the audio buffer in samples. A sample a chunk of audio data of the size specified in format mulitplied by the number of channels. When the SDL_AudioSpec is used with SDL_LoadWAV samples is set to 4096.


    PrevHomeNext
    AudioUpSDL_OpenAudio
    \ No newline at end of file diff --git a/docs/html/sdlblitsurface.html b/docs/html/sdlblitsurface.html new file mode 100644 index 000000000..c844fa071 --- /dev/null +++ b/docs/html/sdlblitsurface.html @@ -0,0 +1,322 @@ +SDL_BlitSurface
    SDL Library Documentation
    PrevNext

    SDL_BlitSurface

    Name

    SDL_BlitSurface -- This performs a fast blit from the source surface to the destination surface.

    Synopsis

    #include "SDL.h"

    int SDL_BlitSurface(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect);

    Description

    This performs a fast blit from the source surface to the destination surface.

    Only the position is used in the dstrect (the +width and height are ignored).

    If either srcrect or +dstrect are NULL, the entire +surface (src or dst) is +copied.

    The final blit rectangle is saved in +dstrect after all clipping is performed +(srcrect is not modified).

    The blit function should not be called on a locked surface.

    Note: The results of blitting operations vary greatly depending on whether SDL_SRCAPLHA is set or not. See SDL_SetAlpha.

    Return Value

    If the blit is successful, it returns 0, +otherwise it returns -1.

    If either of the surfaces were in video memory, and the blit returns +-2, the video memory was lost, so it should be +reloaded with artwork and re-blitted: +

            while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
    +                while ( SDL_LockSurface(image)) < 0 )
    +                        Sleep(10);
    +                -- Write image pixels to image->pixels --
    +                SDL_UnlockSurface(image);
    +        }
    +This happens under DirectX 5.0 when the system switches away from your +fullscreen application. Locking the surface will also fail until you +have access to the video memory again.


    PrevHomeNext
    SDL_ConvertSurfaceUpSDL_FillRect
    \ No newline at end of file diff --git a/docs/html/sdlbuildaudiocvt.html b/docs/html/sdlbuildaudiocvt.html new file mode 100644 index 000000000..b585e4911 --- /dev/null +++ b/docs/html/sdlbuildaudiocvt.html @@ -0,0 +1,283 @@ +SDL_BuildAudioCVT
    SDL Library Documentation
    PrevNext

    SDL_BuildAudioCVT

    Name

    SDL_BuildAudioCVT -- Initializes a SDL_AudioCVT structure for conversion

    Synopsis

    #include "SDL.h"

    int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int dst_rate);

    Description

    Before an SDL_AudioCVT structure can be used to convert audio data it must be initialized with source and destination information.

    src_format and dst_format are the source and destination format of the conversion. (For information on audio formats see SDL_AudioSpec). src_channels and dst_channels are the number of channels in the source and destination formats. Finally, src_rate and dst_rate are the frequency or samples-per-second of the source and destination formats. Once again, see SDL_AudioSpec.

    Return Values

    Returns -1 if the filter could not be built or 1 if it could.

    Examples

    See SDL_ConvertAudio.


    PrevHomeNext
    SDL_AudioCVTUpSDL_ConvertAudio
    \ No newline at end of file diff --git a/docs/html/sdlcd.html b/docs/html/sdlcd.html new file mode 100644 index 000000000..db4e37d38 --- /dev/null +++ b/docs/html/sdlcd.html @@ -0,0 +1,351 @@ +SDL_CD
    SDL Library Documentation
    PrevNext

    SDL_CD

    Name

    SDL_CD -- CDROM Drive Information

    Structure Definition

    typedef struct{
    +  int id;
    +  CDstatus status;
    +  int numtracks;
    +  int cur_track;
    +  int cur_frame;
    +  SDL_CDtrack track[SDL_MAX_TRACKS+1];
    +} SDL_CD;

    Structure Data

    idPrivate drive identifier
    statusDrive status
    numtracksNumber of tracks on the CD
    cur_trackCurrent track
    cur_frameCurrent frame offset within the track
    track[SDL_MAX_TRACKS+1]Array of track descriptions. (see SDL_CDtrack)

    Description

    An SDL_CD structure is returned by SDL_CDOpen. It represents an opened CDROM device and stores information on the layout of the tracks on the disc.

    A frame is the base data unit of a CD. CD_FPS frames is equal to 1 second of music. SDL provides two macros for converting between time and frames: FRAMES_TO_MSF(f, M,S,F) and MSF_TO_FRAMES.

    Examples

    int min, sec, frame;
    +int frame_offset;
    +
    +FRAMES_TO_MSF(cdrom->cur_frame, &min, &sec, &frame);
    +printf("Current Position: %d minutes, %d seconds, %d frames\n", min, sec, frame);
    +
    +frame_offset=MSF_TO_FRAMES(min, sec, frame);

    PrevHomeNext
    SDL_CDCloseUpSDL_CDtrack
    \ No newline at end of file diff --git a/docs/html/sdlcdclose.html b/docs/html/sdlcdclose.html new file mode 100644 index 000000000..5b50e5671 --- /dev/null +++ b/docs/html/sdlcdclose.html @@ -0,0 +1,209 @@ +SDL_CDClose
    SDL Library Documentation
    PrevNext

    SDL_CDClose

    Name

    SDL_CDClose -- Closes a SDL_CD handle

    Synopsis

    #include "SDL.h"

    void SDL_CDClose(SDL_CD *cdrom);

    Description

    Closes the given cdrom handle.

    See Also

    SDL_CDOpen, +SDL_CD


    PrevHomeNext
    SDL_CDEjectUpSDL_CD
    \ No newline at end of file diff --git a/docs/html/sdlcdeject.html b/docs/html/sdlcdeject.html new file mode 100644 index 000000000..669a30a1f --- /dev/null +++ b/docs/html/sdlcdeject.html @@ -0,0 +1,218 @@ +SDL_CDEject
    SDL Library Documentation
    PrevNext

    SDL_CDEject

    Name

    SDL_CDEject -- Ejects a CDROM

    Synopsis

    #include "SDL.h"

    int SDL_CDEject(SDL_CD *cdrom);

    Description

    Ejects the given cdrom.

    Return Value

    Returns 0 on success, or -1 on an error.

    See Also

    SDL_CD


    PrevHomeNext
    SDL_CDStopUpSDL_CDClose
    \ No newline at end of file diff --git a/docs/html/sdlcdname.html b/docs/html/sdlcdname.html new file mode 100644 index 000000000..63e8fa73c --- /dev/null +++ b/docs/html/sdlcdname.html @@ -0,0 +1,231 @@ +SDL_CDName
    SDL Library Documentation
    PrevNext

    SDL_CDName

    Name

    SDL_CDName -- Returns a human-readable, system-dependent identifier for the CD-ROM.

    Synopsis

    #include "SDL.h"

    const char *SDL_CDName(int drive);

    Description

    Returns a human-readable, system-dependent identifier for the CD-ROM. drive is the index of the drive. Drive indices start to 0 and end at SDL_CDNumDrives()-1.

    Examples

    • "/dev/cdrom"

    • "E:"

    • "/dev/disk/ide/1/master"


    PrevHomeNext
    SDL_CDNumDrivesUpSDL_CDOpen
    \ No newline at end of file diff --git a/docs/html/sdlcdnumdrives.html b/docs/html/sdlcdnumdrives.html new file mode 100644 index 000000000..1d7326bcc --- /dev/null +++ b/docs/html/sdlcdnumdrives.html @@ -0,0 +1,197 @@ +SDL_CDNumDrives
    SDL Library Documentation
    PrevNext

    SDL_CDNumDrives

    Name

    SDL_CDNumDrives -- Returns the number of CD-ROM drives on the system.

    Synopsis

    #include "SDL.h"

    int SDL_CDNumDrives(void);

    Description

    Returns the number of CD-ROM drives on the system.

    See Also

    SDL_CDOpen


    PrevHomeNext
    CD-ROMUpSDL_CDName
    \ No newline at end of file diff --git a/docs/html/sdlcdopen.html b/docs/html/sdlcdopen.html new file mode 100644 index 000000000..d2a6f051e --- /dev/null +++ b/docs/html/sdlcdopen.html @@ -0,0 +1,267 @@ +SDL_CDOpen
    SDL Library Documentation
    PrevNext

    SDL_CDOpen

    Name

    SDL_CDOpen -- Opens a CD-ROM drive for access.

    Synopsis

    #include "SDL.h"

    SDL_CD *SDL_CDOpen(int drive);

    Description

    Opens a CD-ROM drive for access. It returns a SDL_CD structure on success, or NULL if the drive was invalid or busy. This newly opened CD-ROM becomes the default CD used when other CD functions are passed a NULL CD-ROM handle.

    Drives are numbered starting with 0. +Drive 0 is the system default CD-ROM.

    Examples

    SDL_CD *cdrom;
    +int cur_track;
    +int min, sec, frame;
    +SDL_Init(SDL_INIT_CDROM);
    +atexit(SDL_Quit);
    +
    +/* Check for CD drives */
    +if(!SDL_CDNumDrives()){
    +  /* None found */
    +  fprintf(stderr, "No CDROM devices available\n");
    +  exit(-1);
    +}
    +
    +/* Open the default drive */
    +cdrom=SDL_CDOpen(0);
    +
    +/* Did if open? Check if cdrom is NULL */
    +if(!cdrom){
    +  fprintf(stderr, "Couldn't open drive: %s\n", SDL_GetError());
    +  exit(-1);
    +}
    +
    +/* Print Volume info */
    +printf("Name: %s\n", SDL_CDName(0));
    +printf("Tracks: %d\n", cdrom->numtracks);
    +for(cur_track=0;cur_track < cdrom->numtracks; cur_track++){
    +  FRAMES_TO_MSF(cdrom->track[cur_track].length, &min, &sec, &frame);
    +  printf("\tTrack %d: Length %d:%d\n", cur_track, min, sec);
    +}
    +
    +SDL_CDClose(cdrom);

    PrevHomeNext
    SDL_CDNameUpSDL_CDStatus
    \ No newline at end of file diff --git a/docs/html/sdlcdpause.html b/docs/html/sdlcdpause.html new file mode 100644 index 000000000..6ae053824 --- /dev/null +++ b/docs/html/sdlcdpause.html @@ -0,0 +1,225 @@ +SDL_CDPause
    SDL Library Documentation
    PrevNext

    SDL_CDPause

    Name

    SDL_CDPause -- Pauses a CDROM

    Synopsis

    #include "SDL.h"

    int SDL_CDPause(SDL_CD *cdrom);

    Description

    Pauses play on the given cdrom.

    Return Value

    Returns 0 on success, or -1 on an error.


    PrevHomeNext
    SDL_CDPlayTracksUpSDL_CDResume
    \ No newline at end of file diff --git a/docs/html/sdlcdplay.html b/docs/html/sdlcdplay.html new file mode 100644 index 000000000..0593617e1 --- /dev/null +++ b/docs/html/sdlcdplay.html @@ -0,0 +1,235 @@ +SDL_CDPlay
    SDL Library Documentation
    PrevNext

    SDL_CDPlay

    Name

    SDL_CDPlay -- Play a CD

    Synopsis

    #include "SDL.h"

    int SDL_CDPlay(SDL_CD *cdrom, int start, int length);

    Description

    Plays the given cdrom, starting a frame start for length frames.

    Return Values

    Returns 0 on success, or -1 on an error.


    PrevHomeNext
    SDL_CDStatusUpSDL_CDPlayTracks
    \ No newline at end of file diff --git a/docs/html/sdlcdplaytracks.html b/docs/html/sdlcdplaytracks.html new file mode 100644 index 000000000..4278b68ac --- /dev/null +++ b/docs/html/sdlcdplaytracks.html @@ -0,0 +1,317 @@ +SDL_CDPlayTracks
    SDL Library Documentation
    PrevNext

    SDL_CDPlayTracks

    Name

    SDL_CDPlayTracks -- Play the given CD track(s)

    Synopsis

    #include "SDL.h"

    int SDL_CDPlayTracks(SDL_CD *cdrom, int start_track, int start_frame, int ntracks, int nframes));

    Description

    SDL_CDPlayTracks plays the given CD starting at track +start_track, for ntracks tracks.

    start_frame is the frame offset, from the beginning of the start_track, at which to start. nframes is the frame offset, from the beginning of the last track (start_track+ntracks), at which to end playing.

    SDL_CDPlayTracks should only be called after calling +SDL_CDStatus +to get track information about the CD.

    Note: Data tracks are ignored.

    Return Value

    Returns 0, or -1 +if there was an error.

    Examples

    /* assuming cdrom is a previously opened device */
    +/* Play the entire CD */
    +if(CD_INDRIVE(SDL_CDStatus(cdrom)))
    +  SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
    +
    +/* Play the first track */
    +if(CD_INDRIVE(SDL_CDStatus(cdrom)))
    +  SDL_CDPlayTracks(cdrom, 0, 0, 1, 0);
    +
    +/* Play first 15 seconds of the 2nd track */
    +if(CD_INDRIVE(SDL_CDStatus(cdrom)))
    +  SDL_CDPlayTracks(cdrom, 1, 0, 0, CD_FPS*15);
    +


    PrevHomeNext
    SDL_CDPlayUpSDL_CDPause
    \ No newline at end of file diff --git a/docs/html/sdlcdresume.html b/docs/html/sdlcdresume.html new file mode 100644 index 000000000..dc7eaf829 --- /dev/null +++ b/docs/html/sdlcdresume.html @@ -0,0 +1,225 @@ +SDL_CDResume
    SDL Library Documentation
    PrevNext

    SDL_CDResume

    Name

    SDL_CDResume -- Resumes a CDROM

    Synopsis

    #include "SDL.h"

    int SDL_CDResume(SDL_CD *cdrom);

    Description

    Resumes play on the given cdrom.

    Return Value

    Returns 0 on success, or -1 on an error.


    PrevHomeNext
    SDL_CDPauseUpSDL_CDStop
    \ No newline at end of file diff --git a/docs/html/sdlcdstatus.html b/docs/html/sdlcdstatus.html new file mode 100644 index 000000000..82c8db098 --- /dev/null +++ b/docs/html/sdlcdstatus.html @@ -0,0 +1,265 @@ +SDL_CDStatus
    SDL Library Documentation
    PrevNext

    SDL_CDStatus

    Name

    SDL_CDStatus -- Returns the current status of the given drive.

    Synopsis

    #include "SDL.h"

    CDstatus SDL_CDStatus(SDL_CD *cdrom);

    /* Given a status, returns true if there's a disk in the drive */
    +#define CD_INDRIVE(status)      ((int)status > 0)

    Description

    This function returns the current status of the given drive. Status is described like so: +

    typedef enum {
    +  CD_TRAYEMPTY,
    +  CD_STOPPED,
    +  CD_PLAYING,
    +  CD_PAUSED,
    +  CD_ERROR = -1
    +} CDstatus;

    If the drive has a CD in it, the table of contents of the CD and current +play position of the CD will be stored in the SDL_CD structure.

    The macro CD_INDRIVE is provided for convenience, +and given a status returns true if there's a disk in the drive.

    Note: SDL_CDStatus also updates the SDL_CD structure passed to it.

    Example

    int playTrack(int track)
    +{
    +  int playing = 0;
    +
    +  if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
    +  /* clamp to the actual number of tracks on the CD */
    +    if (track >= cdrom->numtracks) {
    +      track = cdrom->numtracks-1;
    +    }
    +
    +    if ( SDL_CDPlayTracks(cdrom, track, 0, 1, 0) == 0 ) {
    +      playing = 1;
    +    }
    +  }
    +  return playing;
    +}

    See Also

    SDL_CD


    PrevHomeNext
    SDL_CDOpenUpSDL_CDPlay
    \ No newline at end of file diff --git a/docs/html/sdlcdstop.html b/docs/html/sdlcdstop.html new file mode 100644 index 000000000..4975a8855 --- /dev/null +++ b/docs/html/sdlcdstop.html @@ -0,0 +1,218 @@ +SDL_CDStop
    SDL Library Documentation
    PrevNext

    SDL_CDStop

    Name

    SDL_CDStop -- Stops a CDROM

    Synopsis

    #include "SDL.h"

    int SDL_CDStop(SDL_CD *cdrom);

    Description

    Stops play on the given cdrom.

    Return Value

    Returns 0 on success, or -1 on an error.

    See Also

    SDL_CDPlay,


    PrevHomeNext
    SDL_CDResumeUpSDL_CDEject
    \ No newline at end of file diff --git a/docs/html/sdlcdtrack.html b/docs/html/sdlcdtrack.html new file mode 100644 index 000000000..e44ac8cd0 --- /dev/null +++ b/docs/html/sdlcdtrack.html @@ -0,0 +1,305 @@ +SDL_CDtrack
    SDL Library Documentation
    PrevNext

    SDL_CDtrack

    Name

    SDL_CDtrack -- CD Track Information Structure

    Structure Definition

    typedef struct{
    +  Uint8 id;
    +  Uint8 type;
    +  Uint32 length;
    +  Uint32 offset;
    +} SDL_CDtrack;

    Structure Data

    idTrack number (0-99)
    typeSDL_AUDIO_TRACK or SDL_DATA_TRACK
    lengthLength, in frames, of this track
    offsetFrame offset to the beginning of this track

    Description

    SDL_CDtrack stores data on each track on a CD, its fields should be pretty self explainatory. It is a member a the SDL_CD structure.

    Note: Frames can be converted to standard timings. There are CD_FPS frames per second, so SDL_CDtrack.length/CD_FPS=length_in_seconds.

    See Also

    SDL_CD


    PrevHomeNext
    SDL_CDUpMulti-threaded Programming
    \ No newline at end of file diff --git a/docs/html/sdlcloseaudio.html b/docs/html/sdlcloseaudio.html new file mode 100644 index 000000000..18010af0f --- /dev/null +++ b/docs/html/sdlcloseaudio.html @@ -0,0 +1,197 @@ +SDL_CloseAudio
    SDL Library Documentation
    PrevNext

    SDL_CloseAudio

    Name

    SDL_CloseAudio -- Shuts down audio processing and closes the audio device.

    Synopsis

    #include "SDL.h"

    void SDL_CloseAudio(void);

    Description

    This function shuts down audio processing and closes the audio device.

    See Also

    SDL_OpenAudio


    PrevHomeNext
    SDL_UnlockAudioUpCD-ROM
    \ No newline at end of file diff --git a/docs/html/sdlcolor.html b/docs/html/sdlcolor.html new file mode 100644 index 000000000..cf8d9f735 --- /dev/null +++ b/docs/html/sdlcolor.html @@ -0,0 +1,292 @@ +SDL_Color
    SDL Library Documentation
    PrevNext

    SDL_Color

    Name

    SDL_Color -- Format independent color description

    Structure Definition

    typedef struct{
    +  Uint8 r;
    +  Uint8 g;
    +  Uint8 b;
    +  Uint8 unused;
    +} SDL_Color;

    Structure Data

    rRed intensity
    gGreen intensity
    bBlue intensity
    unusedUnused

    Description

    SDL_Color describes a color in a format independent way. You can convert a SDL_Color to a pixel value for a certain pixel format using SDL_MapRGB.


    PrevHomeNext
    SDL_RectUpSDL_Palette
    \ No newline at end of file diff --git a/docs/html/sdlcondbroadcast.html b/docs/html/sdlcondbroadcast.html new file mode 100644 index 000000000..230d54bb2 --- /dev/null +++ b/docs/html/sdlcondbroadcast.html @@ -0,0 +1,216 @@ +SDL_CondBroadcast
    SDL Library Documentation
    PrevNext

    SDL_CondBroadcast

    Name

    SDL_CondBroadcast -- Restart all threads waiting on a condition variable

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_CondBroadcast(SDL_cond *cond);

    Description

    Restarts all threads that are waiting on the condition variable, cond. Returns 0 on success, or -1 on an error.


    PrevHomeNext
    SDL_CondSignalUpSDL_CondWait
    \ No newline at end of file diff --git a/docs/html/sdlcondsignal.html b/docs/html/sdlcondsignal.html new file mode 100644 index 000000000..ca288cdfc --- /dev/null +++ b/docs/html/sdlcondsignal.html @@ -0,0 +1,216 @@ +SDL_CondSignal
    SDL Library Documentation
    PrevNext

    SDL_CondSignal

    Name

    SDL_CondSignal -- Restart a thread wait on a condition variable

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_CondSignal(SDL_cond *cond);

    Description

    Restart one of the threads that are waiting on the condition variable, cond. Returns 0 on success of -1 on an error.


    PrevHomeNext
    SDL_DestroyCondUpSDL_CondBroadcast
    \ No newline at end of file diff --git a/docs/html/sdlcondwait.html b/docs/html/sdlcondwait.html new file mode 100644 index 000000000..9bafdaa1f --- /dev/null +++ b/docs/html/sdlcondwait.html @@ -0,0 +1,223 @@ +SDL_CondWait
    SDL Library Documentation
    PrevNext

    SDL_CondWait

    Name

    SDL_CondWait -- Wait on a condition variable

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);

    Description

    Wait on the condition variable cond and unlock the provided mutex. The mutex must the locked before entering this function. Returns 0 when it is signalled, or -1 on an error.


    PrevHomeNext
    SDL_CondBroadcastUpSDL_CondWaitTimeout
    \ No newline at end of file diff --git a/docs/html/sdlcondwaittimeout.html b/docs/html/sdlcondwaittimeout.html new file mode 100644 index 000000000..412522f67 --- /dev/null +++ b/docs/html/sdlcondwaittimeout.html @@ -0,0 +1,222 @@ +SDL_CondWaitTimeout
    SDL Library Documentation
    PrevNext

    SDL_CondWaitTimeout

    Name

    SDL_CondWaitTimeout -- Wait on a condition variable, with timeout

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms);

    Description

    Wait on the condition variable cond for, at most, ms milliseconds. mut is unlocked so it must be locked when the function is called. Returns SDL_MUTEX_TIMEDOUT if the condition is not signalled in the allotted time, 0 if it was signalled or -1 on an error.

    See Also

    SDL_CondWait


    PrevHomeNext
    SDL_CondWaitUpTime
    \ No newline at end of file diff --git a/docs/html/sdlconvertaudio.html b/docs/html/sdlconvertaudio.html new file mode 100644 index 000000000..b05aab09d --- /dev/null +++ b/docs/html/sdlconvertaudio.html @@ -0,0 +1,399 @@ +SDL_ConvertAudio
    SDL Library Documentation
    PrevNext

    SDL_ConvertAudio

    Name

    SDL_ConvertAudio -- Convert audio data to a desired audio format.

    Synopsis

    #include "SDL.h"

    int SDL_ConvertAudio(SDL_AudioCVT *cvt);

    Description

    SDL_ConvertAudio takes one parameter, cvt, which was previously initilized. Initilizing a SDL_AudioCVT is a two step process. First of all, the structure must be passed to SDL_BuildAudioCVT along with source and destination format parameters. Secondly, the cvt->buf and cvt->len fields must be setup. cvt->buf should point to the audio data and cvt->len should be set to the length of the audio data in bytes. Remember, the length of the buffer pointed to by buf show be len*len_mult bytes in length.

    Once the SDL_AudioCVTstructure is initilized then we can pass it to SDL_ConvertAudio, which will convert the audio data pointer to by cvt->buf. If SDL_ConvertAudio returned 0 then the conversion was completed successfully, otherwise -1 is returned.

    If the conversion completed successfully then the converted audio data can be read from cvt->buf. The amount of valid, converted, audio data in the buffer is equal to cvt->len*cvt->len_ratio.

    Examples

    /* Converting some WAV data to hardware format */
    +void my_audio_callback(void *userdata, Uint8 *stream, int len);
    +
    +SDL_AudioSpec *desired, *obtained;
    +SDL_AudioSpec wav_spec;
    +SDL_AudioCVT  wav_cvt;
    +Uint32 wav_len;
    +Uint8 *wav_buf;
    +int ret;
    +
    +/* Allocated audio specs */
    +desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
    +obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
    +
    +/* Set desired format */
    +desired->freq=22050;
    +desired->format=AUDIO_S16LSB;
    +desired->samples=8192;
    +desired->callback=my_audio_callback;
    +desired->userdata=NULL;
    +
    +/* Open the audio device */
    +if ( SDL_OpenAudio(desired, obtained) < 0 ){
    +  fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
    +  exit(-1);
    +}
    +        
    +free(desired);
    +
    +/* Load the test.wav */
    +if( SDL_LoadWAV("test.wav", &wav_spec, &wav_buf, &wav_len) == NULL ){
    +  fprintf(stderr, "Could not open test.wav: %s\n", SDL_GetError());
    +  SDL_CloseAudio();
    +  free(obtained);
    +  exit(-1);
    +}
    +                                            
    +/* Build AudioCVT */
    +ret = SDL_BuildAudioCVT(&wav_cvt,
    +                        wav_spec.format, wav_spec.channels, wav_spec.freq,
    +                        obtained->format, obtained->channels, obtained->freq);
    +
    +/* Check that the convert was built */
    +if(ret==-1){
    +  fprintf(stderr, "Couldn't build converter!\n");
    +  SDL_CloseAudio();
    +  free(obtained);
    +  SDL_FreeWAV(wav_buf);
    +}
    +
    +/* Setup for conversion */
    +wav_cvt.buf=(Uint8 *)malloc(wav_len*wav_cvt.len_mult);
    +wav_cvt.len=wav_len;
    +memcpy(wav_cvt.buf, wav_buf, wav_len);
    +
    +/* We can delete to original WAV data now */
    +SDL_FreeWAV(wav_buf);
    +
    +/* And now we're ready to convert */
    +SDL_ConvertAudio(&wav_cvt);
    +
    +/* do whatever */
    +.
    +.
    +.
    +.
    +

    PrevHomeNext
    SDL_BuildAudioCVTUpSDL_MixAudio
    \ No newline at end of file diff --git a/docs/html/sdlconvertsurface.html b/docs/html/sdlconvertsurface.html new file mode 100644 index 000000000..d61cff003 --- /dev/null +++ b/docs/html/sdlconvertsurface.html @@ -0,0 +1,261 @@ +SDL_ConvertSurface
    SDL Library Documentation
    PrevNext

    SDL_ConvertSurface

    Name

    SDL_ConvertSurface -- Converts a surface to the same format as another surface.

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_ConvertSurface(SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags);

    Description

    Creates a new surface of the specified format, and then copies and maps +the given surface to it. If this function fails, it returns +NULL.

    The flags parameter is passed to +SDL_CreateRGBSurface +and has those semantics.

    This function is used internally by +SDL_DisplayFormat.

    Return Value

    Returns either a pointer to the new surface, or +NULL on error.


    PrevHomeNext
    SDL_GetClipRectUpSDL_BlitSurface
    \ No newline at end of file diff --git a/docs/html/sdlcreatecond.html b/docs/html/sdlcreatecond.html new file mode 100644 index 000000000..1c79c743b --- /dev/null +++ b/docs/html/sdlcreatecond.html @@ -0,0 +1,232 @@ +SDL_CreateCond
    SDL Library Documentation
    PrevNext

    SDL_CreateCond

    Name

    SDL_CreateCond -- Create a condition variable

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    SDL_cond *SDL_CreateCond(void);

    Description

    Creates a condition variable.

    Examples

    SDL_cond *cond;
    +
    +cond=SDL_CreateCond();
    +.
    +.
    +/* Do stuff */
    +
    +.
    +.
    +SDL_DestroyCond(cond);

    PrevHomeNext
    SDL_SemValueUpSDL_DestroyCond
    \ No newline at end of file diff --git a/docs/html/sdlcreatecursor.html b/docs/html/sdlcreatecursor.html new file mode 100644 index 000000000..909a45cac --- /dev/null +++ b/docs/html/sdlcreatecursor.html @@ -0,0 +1,390 @@ +SDL_CreateCursor
    SDL Library Documentation
    PrevNext

    SDL_CreateCursor

    Name

    SDL_CreateCursor -- Creates a new mouse cursor.

    Synopsis

    #include "SDL.h"

    SDL_Cursor *SDL_CreateCursor(Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);

    Description

    Create a cursor using the specified data and mask (in MSB format). +The cursor width must be a multiple of 8 bits.

    The cursor is created in black and white according to the following: +

    Data / MaskResulting pixel on screen
    0 / 1White
    1 / 1Black
    0 / 0Transparent
    1 / 0Inverted color if possible, black if not.

    Cursors created with this function must be freed with +SDL_FreeCursor.

    Example

    /* Stolen from the mailing list */
    +/* Creates a new mouse cursor from an XPM */
    +
    +
    +/* XPM */
    +static const char *arrow[] = {
    +  /* width height num_colors chars_per_pixel */
    +  "    32    32        3            1",
    +  /* colors */
    +  "X c #000000",
    +  ". c #ffffff",
    +  "  c None",
    +  /* pixels */
    +  "X                               ",
    +  "XX                              ",
    +  "X.X                             ",
    +  "X..X                            ",
    +  "X...X                           ",
    +  "X....X                          ",
    +  "X.....X                         ",
    +  "X......X                        ",
    +  "X.......X                       ",
    +  "X........X                      ",
    +  "X.....XXXXX                     ",
    +  "X..X..X                         ",
    +  "X.X X..X                        ",
    +  "XX  X..X                        ",
    +  "X    X..X                       ",
    +  "     X..X                       ",
    +  "      X..X                      ",
    +  "      X..X                      ",
    +  "       XX                       ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "                                ",
    +  "0,0"
    +};
    +
    +static SDL_Cursor *init_system_cursor(const char *image[])
    +{
    +  int i, row, col;
    +  Uint8 data[4*32];
    +  Uint8 mask[4*32];
    +  int hot_x, hot_y;
    +
    +  i = -1;
    +  for ( row=0; row<32; ++row ) {
    +    for ( col=0; col<32; ++col ) {
    +      if ( col % 8 ) {
    +        data[i] <<= 1;
    +        mask[i] <<= 1;
    +      } else {
    +        ++i;
    +        data[i] = mask[i] = 0;
    +      }
    +      switch (image[4+row][col]) {
    +        case 'X':
    +          data[i] |= 0x01;
    +          k[i] |= 0x01;
    +          break;
    +        case '.':
    +          mask[i] |= 0x01;
    +          break;
    +        case ' ':
    +          break;
    +      }
    +    }
    +  }
    +  sscanf(image[4+row], "%d,%d", &hot_x, &hot_y);
    +  return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y);
    +}

    PrevHomeNext
    SDL_WarpMouseUpSDL_FreeCursor
    \ No newline at end of file diff --git a/docs/html/sdlcreatemutex.html b/docs/html/sdlcreatemutex.html new file mode 100644 index 000000000..a58400252 --- /dev/null +++ b/docs/html/sdlcreatemutex.html @@ -0,0 +1,241 @@ +SDL_CreateMutex
    SDL Library Documentation
    PrevNext

    SDL_CreateMutex

    Name

    SDL_CreateMutex -- Create a mutex

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    SDL_mutex *SDL_CreateMutex(void);

    Description

    Create a new, unlocked mutex.

    Examples

    SDL_mutex *mut;
    +
    +mut=SDL_CreateMutex();
    +.
    +.
    +if(SDL_mutexP(mut)==-1){
    +  fprintf(stderr, "Couldn't lock mutex\n");
    +  exit(-1);
    +}
    +.
    +/* Do stuff while mutex is locked */
    +.
    +.
    +if(SDL_mutexV(mut)==-1){
    +  fprintf(stderr, "Couldn't unlock mutex\n");
    +  exit(-1);
    +}
    +
    +SDL_DestroyMutex(mut);

    PrevHomeNext
    SDL_KillThreadUpSDL_DestroyMutex
    \ No newline at end of file diff --git a/docs/html/sdlcreatergbsurface.html b/docs/html/sdlcreatergbsurface.html new file mode 100644 index 000000000..c8d672c3b --- /dev/null +++ b/docs/html/sdlcreatergbsurface.html @@ -0,0 +1,332 @@ +SDL_CreateRGBSurface
    SDL Library Documentation
    PrevNext

    SDL_CreateRGBSurface

    Name

    SDL_CreateRGBSurface -- Create an empty SDL_Surface

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);

    Description

    Allocate an empty surface (must be called after SDL_SetVideoMode)

    If depth is 8 bits an empty palette is allocated for the surface, otherwise a 'packed-pixel' SDL_PixelFormat is created using the [RGBA]mask's provided (see SDL_PixelFormat). The flags specifies the type of surface that should be created, it is an OR'd combination of the following possible values.

    SDL_SWSURFACESDL will create the surface in system memory. This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting.
    SDL_HWSURFACESDL will attempt to create the surface in video memory. This will allow SDL to take advantage of Video->Video blits (which are often accelerated).
    SDL_SRCCOLORKEYWith this flag SDL will attempt to find the best location for this surface, either in system memory or video memory, to obtain hardware colorkey blitting support.
    SDL_SRCALPHAWith this flag SDL will attempt to find the best location for this surface, either in system memory or video memory, to obtain hardware alpha support


    PrevHomeNext
    SDL_GetRGBAUpSDL_CreateRGBSurfaceFrom
    \ No newline at end of file diff --git a/docs/html/sdlcreatergbsurfacefrom.html b/docs/html/sdlcreatergbsurfacefrom.html new file mode 100644 index 000000000..b72c6ad90 --- /dev/null +++ b/docs/html/sdlcreatergbsurfacefrom.html @@ -0,0 +1,235 @@ +SDL_CreateRGBSurfaceFrom
    SDL Library Documentation
    PrevNext

    SDL_CreateRGBSurfaceFrom

    Name

    SDL_CreateRGBSurfaceFrom -- Create an SDL_Surface from pixel data

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);

    Description

    Creates an SDL_Surface from the provided pixel data.

    The data stored in pixels is assumed to be of the depth specified in the parameter list. The pixel data is not copied into the SDL_Surface structure so it should no be freed until the surface has been freed with a called to SDL_FreeSurface. pitch is the length of each scanline in bytes.

    See SDL_CreateRGBSurface for a more detailed description of the other parameters.


    PrevHomeNext
    SDL_CreateRGBSurfaceUpSDL_FreeSurface
    \ No newline at end of file diff --git a/docs/html/sdlcreatesemaphore.html b/docs/html/sdlcreatesemaphore.html new file mode 100644 index 000000000..1041338a6 --- /dev/null +++ b/docs/html/sdlcreatesemaphore.html @@ -0,0 +1,295 @@ +SDL_CreateSemaphore
    SDL Library Documentation
    PrevNext

    SDL_CreateSemaphore

    Name

    SDL_CreateSemaphore -- Creates a new semaphore and assigns an initial value to it.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    SDL_sem *SDL_CreateSemaphore(Uint32 initial_value);

    Description

    SDL_CreateSemaphore() creates a new semaphore and +initializes it with the value initial_value. +Each locking operation on the semaphore by +SDL_SemWait, +SDL_SemTryWait or +SDL_SemWaitTimeout +will atomically decrement the semaphore value. The locking operation will be blocked +if the semaphore value is not positive (greater than zero). Each unlock operation by +SDL_SemPost +will atomically increment the semaphore value.

    Return Value

    Returns a pointer to an initialized semaphore or +NULL if there was an error.

    Examples

    SDL_sem *my_sem;
    +
    +my_sem = SDL_CreateSemaphore(INITIAL_SEM_VALUE);
    +
    +if (my_sem == NULL) {
    +        return CREATE_SEM_FAILED;
    +}


    PrevHomeNext
    SDL_mutexVUpSDL_DestroySemaphore
    \ No newline at end of file diff --git a/docs/html/sdlcreatethread.html b/docs/html/sdlcreatethread.html new file mode 100644 index 000000000..68aa7c397 --- /dev/null +++ b/docs/html/sdlcreatethread.html @@ -0,0 +1,215 @@ +SDL_CreateThread
    SDL Library Documentation
    PrevNext

    SDL_CreateThread

    Name

    SDL_CreateThread -- Creates a new thread of execution that shares its parent's properties.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    SDL_Thread *SDL_CreateThread(int (*fn)(void *), void *data);

    Description

    SDL_CreateThread creates a new thread of execution +that shares all of its parent's global memory, signal handlers, +file descriptors, etc, and runs the function fn +passed the void pointer data +The thread quits when this function returns.


    PrevHomeNext
    Multi-threaded ProgrammingUpSDL_ThreadID
    \ No newline at end of file diff --git a/docs/html/sdlcreateyuvoverlay.html b/docs/html/sdlcreateyuvoverlay.html new file mode 100644 index 000000000..b463c6c6e --- /dev/null +++ b/docs/html/sdlcreateyuvoverlay.html @@ -0,0 +1,248 @@ +SDL_CreateYUVOverlay
    SDL Library Documentation
    PrevNext

    SDL_CreateYUVOverlay

    Name

    SDL_CreateYUVOverlay -- Create a YUV video overlay

    Synopsis

    #include "SDL.h"

    SDL_Overlay *SDL_CreateYUVOverlay(int width, int height, Uint32 format, SDL_Surface *display);

    Description

    SDL_CreateYUVOverlay creates a YUV overlay of the specified width, height and format (see SDL_Overlay for a list of available formats), for the provided display. A SDL_Overlay structure is returned.

    The term 'overlay' is a misnomer since, unless the overlay is created in hardware, the contents for the display surface underneath the area where the overlay is shown will be overwritten when the overlay is displayed.


    PrevHomeNext
    SDL_GL_SwapBuffersUpSDL_LockYUVOverlay
    \ No newline at end of file diff --git a/docs/html/sdldelay.html b/docs/html/sdldelay.html new file mode 100644 index 000000000..398534126 --- /dev/null +++ b/docs/html/sdldelay.html @@ -0,0 +1,203 @@ +SDL_Delay
    SDL Library Documentation
    PrevNext

    SDL_Delay

    Name

    SDL_Delay -- Wait a specified number of milliseconds before returning.

    Synopsis

    #include "SDL.h"

    void SDL_Delay(Uint32 ms);

    Description

    Wait a specified number of milliseconds before returning. SDL_Delay will wait at least the specified time, but possible longer due to OS scheduling.

    See Also

    SDL_AddTimer


    PrevHomeNext
    SDL_GetTicksUpSDL_AddTimer
    \ No newline at end of file diff --git a/docs/html/sdldestroycond.html b/docs/html/sdldestroycond.html new file mode 100644 index 000000000..647805b07 --- /dev/null +++ b/docs/html/sdldestroycond.html @@ -0,0 +1,198 @@ +SDL_DestroyCond
    SDL Library Documentation
    PrevNext

    SDL_DestroyCond

    Name

    SDL_DestroyCond -- Destroy a condition variable

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    void SDL_DestroyCond(SDL_cond *cond);

    Description

    Destroys a condition variable.


    PrevHomeNext
    SDL_CreateCondUpSDL_CondSignal
    \ No newline at end of file diff --git a/docs/html/sdldestroymutex.html b/docs/html/sdldestroymutex.html new file mode 100644 index 000000000..510ea518f --- /dev/null +++ b/docs/html/sdldestroymutex.html @@ -0,0 +1,201 @@ +SDL_DestroyMutex
    SDL Library Documentation
    PrevNext

    SDL_DestroyMutex

    Name

    SDL_DestroyMutex -- Destroy a mutex

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    void SDL_DestroyMutex(SDL_mutex *mutex);

    Description

    Destroy a previously created mutex.


    PrevHomeNext
    SDL_CreateMutexUpSDL_mutexP
    \ No newline at end of file diff --git a/docs/html/sdldestroysemaphore.html b/docs/html/sdldestroysemaphore.html new file mode 100644 index 000000000..0b19a48d3 --- /dev/null +++ b/docs/html/sdldestroysemaphore.html @@ -0,0 +1,270 @@ +SDL_DestroySemaphore
    SDL Library Documentation
    PrevNext

    SDL_DestroySemaphore

    Name

    SDL_DestroySemaphore -- Destroys a semaphore that was created by SDL_CreateSemaphore.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    void SDL_DestroySemaphore(SDL_sem *sem);

    Description

    SDL_DestroySemaphore destroys the semaphore pointed to +by sem that was created by +SDL_CreateSemaphore. +It is not safe to destroy a semaphore if there are threads currently blocked +waiting on it.

    Examples

    if (my_sem != NULL) {
    +        SDL_DestroySemaphore(my_sem);
    +        my_sem = NULL;
    +}


    PrevHomeNext
    SDL_CreateSemaphoreUpSDL_SemWait
    \ No newline at end of file diff --git a/docs/html/sdldisplayformat.html b/docs/html/sdldisplayformat.html new file mode 100644 index 000000000..1eadce813 --- /dev/null +++ b/docs/html/sdldisplayformat.html @@ -0,0 +1,254 @@ +SDL_DisplayFormat
    SDL Library Documentation
    PrevNext

    SDL_DisplayFormat

    Name

    SDL_DisplayFormat -- Convert a surface to the display format

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_DisplayFormat(SDL_Surface *surface);

    Description

    This function takes a surface and copies it to a new surface of the +pixel format and colors of the video framebuffer, suitable for fast +blitting onto the display surface. It calls +SDL_ConvertSurface

    If you want to take advantage of hardware colorkey or alpha blit +acceleration, you should set the colorkey and alpha value before +calling this function.

    If you want an alpha channel, see SDL_DisplayFormatAlpha.

    Return Value

    If the conversion fails or runs out of memory, it returns +NULL


    PrevHomeNext
    SDL_FillRectUpSDL_DisplayFormatAlpha
    \ No newline at end of file diff --git a/docs/html/sdldisplayformatalpha.html b/docs/html/sdldisplayformatalpha.html new file mode 100644 index 000000000..3c2fb947f --- /dev/null +++ b/docs/html/sdldisplayformatalpha.html @@ -0,0 +1,234 @@ +SDL_DisplayFormatAlpha
    SDL Library Documentation
    PrevNext

    SDL_DisplayFormatAlpha

    Name

    SDL_DisplayFormatAlpha -- Convert a surface to the display format

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_DisplayFormatAlpha(SDL_Surface *surface);

    Description

    This function takes a surface and copies it to a new surface of the +pixel format and colors of the video framebuffer plus an alpha channel, +suitable for fast blitting onto the display surface. It calls +SDL_ConvertSurface

    If you want to take advantage of hardware colorkey or alpha blit +acceleration, you should set the colorkey and alpha value before +calling this function.

    Return Value

    If the conversion fails or runs out of memory, it returns +NULL


    PrevHomeNext
    SDL_DisplayFormatUpSDL_WarpMouse
    \ No newline at end of file diff --git a/docs/html/sdldisplayyuvoverlay.html b/docs/html/sdldisplayyuvoverlay.html new file mode 100644 index 000000000..ddbfa359e --- /dev/null +++ b/docs/html/sdldisplayyuvoverlay.html @@ -0,0 +1,228 @@ +SDL_DisplayYUVOverlay
    SDL Library Documentation
    PrevNext

    SDL_DisplayYUVOverlay

    Name

    SDL_DisplayYUVOverlay -- Blit the overlay to the display

    Synopsis

    #include "SDL.h"

    int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect);

    Description

    Blit the overlay to the surface specified when it was created. The SDL_Rect structure, dstrect, specifies the position and size of the destination. If the dstrect is a larger or smaller than the overlay then the overlay will be scaled, this is optimized for 2x scaling.


    PrevHomeNext
    SDL_UnlockYUVOverlayUpSDL_FreeYUVOverlay
    \ No newline at end of file diff --git a/docs/html/sdlenablekeyrepeat.html b/docs/html/sdlenablekeyrepeat.html new file mode 100644 index 000000000..521b85dce --- /dev/null +++ b/docs/html/sdlenablekeyrepeat.html @@ -0,0 +1,230 @@ +SDL_EnableKeyRepeat
    SDL Library Documentation
    PrevNext

    SDL_EnableKeyRepeat

    Name

    SDL_EnableKeyRepeat -- Set keyboard repeat rate.

    Synopsis

    #include "SDL.h"

    int SDL_EnableKeyRepeat(int delay, int interval);

    Description

    Enables or disables the keyboard repeat rate. delay specifies how long the key must be pressed before it begins repeating, it then repeats at the speed specified by interval. Both delay and interval are expressed in milliseconds.

    Setting delay to 0 disables key repeating completely. Good default values are SDL_DEFAULT_REPEAT_DELAY and SDL_DEFAULT_REPEAT_INTERVAL.

    Return Value

    Returns 0 on success and -1 on failure.


    PrevHomeNext
    SDL_EnableUNICODEUpSDL_GetMouseState
    \ No newline at end of file diff --git a/docs/html/sdlenableunicode.html b/docs/html/sdlenableunicode.html new file mode 100644 index 000000000..01793bf25 --- /dev/null +++ b/docs/html/sdlenableunicode.html @@ -0,0 +1,228 @@ +SDL_EnableUNICODE
    SDL Library Documentation
    PrevNext

    SDL_EnableUNICODE

    Name

    SDL_EnableUNICODE -- Enable UNICODE translation

    Synopsis

    #include "SDL.h"

    int SDL_EnableUNICODE(int enable);

    Description

    Enables/Disables UNICODE keyboard translation.

    If you wish to translate a keysym to it's printable representation, you need to enable UNICODE translation +using this function (enable=0) and then look in the unicode member +of the SDL_keysym structure. This value will be zero for keysyms +that do not have a printable representation. UNICODE translation is disabled by default as the conversion can cause a slight overhead.

    Return Value

    Returns the previous translation mode.

    See Also

    SDL_keysym


    PrevHomeNext
    SDL_GetKeyNameUpSDL_EnableKeyRepeat
    \ No newline at end of file diff --git a/docs/html/sdlevent.html b/docs/html/sdlevent.html new file mode 100644 index 000000000..0a341d567 --- /dev/null +++ b/docs/html/sdlevent.html @@ -0,0 +1,942 @@ +SDL_Event
    SDL Library Documentation
    PrevNext

    SDL_Event

    Name

    SDL_Event -- General event structure

    Structure Definition

    typedef union{
    +  Uint8 type;
    +  SDL_ActiveEvent active;
    +  SDL_KeyboardEvent key;
    +  SDL_MouseMotionEvent motion;
    +  SDL_MouseButtonEvent button;
    +  SDL_JoyAxisEvent jaxis;
    +  SDL_JoyBallEvent jball;
    +  SDL_JoyHatEvent jhat;
    +  SDL_JoyButtonEvent jbutton;
    +  SDL_ResizeEvent resize;
    +  SDL_QuitEvent quit;
    +  SDL_UserEvent user;
    +  SDL_SywWMEvent syswm;
    +} SDL_Event;

    Description

    The SDL_Event union is the core to all event handling is SDL, its probably the most important structure after SDL_Surface. SDL_Event is a union of all event structures used in SDL, using it is a simple matter of knowing which union member relates to which event type.

    Event typeEvent Structure
    SDL_ACTIVEEVENTSDL_ActiveEvent
    SDL_KEYDOWN/UPSDL_KeyboardEvent
    SDL_MOUSEMOTIONSDL_MouseMotionEvent
    SDL_MOUSEBUTTONDOWN/UPSDL_MouseButtonEvent
    SDL_JOYAXISMOTIONSDL_JoyAxisEvent
    SDL_JOYBALLMOTIONSDL_JoyBallEvent
    SDL_JOYHATMOTIONSDL_JoyHatEvent
    SDL_JOYBUTTONDOWN/UPSDL_JoyButtonEvent
    SDL_QUITSDL_QuitEvent
    SDL_SYSWMEVENTSDL_SysWMEvent
    SDL_VIDEORESIZESDL_ResizeEvent
    SDL_USEREVENTSDL_UserEvent

    Use

    The SDL_Event structure has two uses

    • Reading events on the event queue

    • Placing events on the event queue

    Reading events from the event queue is done with either SDL_PollEvent or SDL_PeepEvents. We'll use SDL_PollEvent and step through an example.

    First off, we create an empty SDL_Event structure. +

    SDL_Event test_event;
    +SDL_PollEvent removes the next event from the event queue, if there are no events on the queue it returns 0 otherwise it returns 1. We use a while loop to process each event in turn. +
    while(SDL_PollEvent(&test_event)) {
    +The SDL_PollEvent function take a pointer to an SDL_Event structure that is to be filled with event information. We know that if SDL_PollEvent removes an event from the queue then the event information will be placed in our test_event structure, but we also know that the type of event will be placed in the type member of test_event. So to handle each event type seperately we use a switch statement. +
      switch(test_event.type) {
    +We need to know what kind of events we're looking for and the event type's of those events. So lets assume we want to detect where the user is moving the mouse pointer within our application. We look through our event types and notice that SDL_MOUSEMOTION is, more than likely, the event we're looking for. A little more research tells use that SDL_MOUSEMOTION events are handled within the SDL_MouseMotionEvent structure which is the motion member of SDL_Event. We can check for the SDL_MOUSEMOTION event type within our switch statement like so: +
        case SDL_MOUSEMOTION:
    +All we need do now is read the information out of the motion member of test_event. +
          printf("We got a motion event.\n");
    +      printf("Current mouse position is: (%d, %d)\n", test_event.motion.x, test_event.motion.y);
    +      break;
    +    default:
    +      printf("Unhandled Event!\n");
    +      break;
    +  }
    +}
    +printf("Event queue empty.\n");

    It is also possible to push events onto the event queue and so use it as a two-way communication path. Both SDL_PushEvent and SDL_PeepEvents allow you to place events onto the event queue. This is usually used to place a SDL_USEREVENT on the event queue, however you could use it to post fake input events if you wished. Creating your own events is a simple matter of choosing the event type you want, setting the type member and filling the appropriate member structure with information. +

    SDL_Event user_event;
    +
    +user_event.type=SDL_USEREVENT;
    +user_event.user.code=2;
    +user_event.user.data1=NULL;
    +user_event.user.data2=NULL;
    +SDL_PushEvent(&user_event);


    PrevHomeNext
    SDL Event Structures.UpSDL_ActiveEvent
    \ No newline at end of file diff --git a/docs/html/sdleventstate.html b/docs/html/sdleventstate.html new file mode 100644 index 000000000..23c1dd871 --- /dev/null +++ b/docs/html/sdleventstate.html @@ -0,0 +1,268 @@ +SDL_EventState
    SDL Library Documentation
    PrevNext

    SDL_EventState

    Name

    SDL_EventState -- This function allows you to set the state of processing certain events.

    Synopsis

    #include "SDL.h"

    Uint8 SDL_EventState(Uint8 type, int state);

    Description

    This function allows you to set the state of processing certain event type's.

    If state is set to SDL_IGNORE, +that event type will be automatically dropped from the event queue and will +not be filtered.

    If state is set to SDL_ENABLE, +that event type will be processed normally.

    If state is set to SDL_QUERY, +SDL_EventState will return the current processing +state of the specified event type.

    A list of event type's can be found in the SDL_Event section.

    See Also

    SDL_Event


    PrevHomeNext
    SDL_GetEventFilterUpSDL_GetKeyState
    \ No newline at end of file diff --git a/docs/html/sdlfillrect.html b/docs/html/sdlfillrect.html new file mode 100644 index 000000000..f34c173c1 --- /dev/null +++ b/docs/html/sdlfillrect.html @@ -0,0 +1,270 @@ +SDL_FillRect
    SDL Library Documentation
    PrevNext

    SDL_FillRect

    Name

    SDL_FillRect -- This function performs a fast fill of the given rectangle with some color

    Synopsis

    #include "SDL.h"

    int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);

    Description

    This function performs a fast fill of the given rectangle with +color. If dstrect +is NULL, the whole surface will be filled with +color.

    The color should be a pixel of the format used by the surface, and +can be generated by the +SDL_MapRGB +function.

    If there is a clip rectangle set on the destination (set via +SDL_SetClipRect) then this +function will clip based on the intersection of the clip rectangle and +the dstrect rectangle.

    Return Value

    This function returns 0 on success, or +-1 on error.


    PrevHomeNext
    SDL_BlitSurfaceUpSDL_DisplayFormat
    \ No newline at end of file diff --git a/docs/html/sdlflip.html b/docs/html/sdlflip.html new file mode 100644 index 000000000..ad4b1414e --- /dev/null +++ b/docs/html/sdlflip.html @@ -0,0 +1,251 @@ +SDL_Flip
    SDL Library Documentation
    PrevNext

    SDL_Flip

    Name

    SDL_Flip -- Swaps screen buffers

    Synopsis

    #include "SDL.h"

    int SDL_Flip(SDL_Surface *screen);

    Description

    On hardware that supports double-buffering, this function sets up a flip +and returns. The hardware will wait for vertical retrace, and then swap +video buffers before the next video surface blit or lock will return. +On hardware that doesn't support double-buffering, this is equivalent +to calling SDL_UpdateRect(screen, 0, 0, 0, 0)

    The SDL_DOUBLEBUF flag must have been passed to +SDL_SetVideoMode, + when +setting the video mode for this function to perform hardware flipping.

    Return Value

    This function returns 0 if successful, or +-1 if there was an error.


    PrevHomeNext
    SDL_UpdateRectsUpSDL_SetColors
    \ No newline at end of file diff --git a/docs/html/sdlfreecursor.html b/docs/html/sdlfreecursor.html new file mode 100644 index 000000000..96b48ca44 --- /dev/null +++ b/docs/html/sdlfreecursor.html @@ -0,0 +1,201 @@ +SDL_FreeCursor
    SDL Library Documentation
    PrevNext

    SDL_FreeCursor

    Name

    SDL_FreeCursor -- Frees a cursor created with SDL_CreateCursor.

    Synopsis

    #include "SDL.h"

    void SDL_FreeCursor(SDL_Cursor *cursor);

    Description

    Frees a SDL_Cursor that was created using +SDL_CreateCursor.


    PrevHomeNext
    SDL_CreateCursorUpSDL_SetCursor
    \ No newline at end of file diff --git a/docs/html/sdlfreesurface.html b/docs/html/sdlfreesurface.html new file mode 100644 index 000000000..a31c47d73 --- /dev/null +++ b/docs/html/sdlfreesurface.html @@ -0,0 +1,211 @@ +SDL_FreeSurface
    SDL Library Documentation
    PrevNext

    SDL_FreeSurface

    Name

    SDL_FreeSurface -- Frees (deletes) and SDL_Surface

    Synopsis

    #include "SDL.h"

    void SDL_FreeSurface(SDL_Surface *surface);

    Description

    Frees the resources used by a previously created SDL_Surface. If the surface was created using +SDL_CreateRGBSurfaceFrom then the pixel data is not freed.


    PrevHomeNext
    SDL_CreateRGBSurfaceFromUpSDL_LockSurface
    \ No newline at end of file diff --git a/docs/html/sdlfreewav.html b/docs/html/sdlfreewav.html new file mode 100644 index 000000000..a243a9ed0 --- /dev/null +++ b/docs/html/sdlfreewav.html @@ -0,0 +1,214 @@ +SDL_FreeWAV
    SDL Library Documentation
    PrevNext

    SDL_FreeWAV

    Name

    SDL_FreeWAV -- Frees previously opened WAV data

    Synopsis

    #include "SDL.h"

    void SDL_FreeWAV(Uint8 *audio_buf);

    Description

    After a WAVE file has been opened with SDL_LoadWAV its data can eventually be freed with SDL_FreeWAV. audio_buf is a pointer to the buffer created by SDL_LoadWAV.

    See Also

    SDL_LoadWAV


    PrevHomeNext
    SDL_LoadWAVUpSDL_AudioCVT
    \ No newline at end of file diff --git a/docs/html/sdlfreeyuvoverlay.html b/docs/html/sdlfreeyuvoverlay.html new file mode 100644 index 000000000..df4833771 --- /dev/null +++ b/docs/html/sdlfreeyuvoverlay.html @@ -0,0 +1,225 @@ +SDL_FreeYUVOverlay
    SDL Library Documentation
    PrevNext

    SDL_FreeYUVOverlay

    Name

    SDL_FreeYUVOverlay -- Free a YUV video overlay

    Synopsis

    #include "SDL.h"

    void SDL_FreeYUVOverlay(SDL_Overlay *overlay);

    Description

    Frees and overlay created by SDL_CreateYUVOverlay.


    PrevHomeNext
    SDL_DisplayYUVOverlayUpSDL_GLattr
    \ No newline at end of file diff --git a/docs/html/sdlgetappstate.html b/docs/html/sdlgetappstate.html new file mode 100644 index 000000000..57fadb5b7 --- /dev/null +++ b/docs/html/sdlgetappstate.html @@ -0,0 +1,255 @@ +SDL_GetAppState
    SDL Library Documentation
    PrevNext

    SDL_GetAppState

    Name

    SDL_GetAppState -- Get the state of the application

    Synopsis

    #include "SDL.h"

    Uint8 SDL_GetAppState(void);

    Description

    This function returns the current state of the application. The value returned is a bitwise combination of:

    SDL_APPMOUSEFOCUSThe application has mouse focus.
    SDL_APPINPUTFOCUSThe application has keyboard focus
    SDL_APPACTIVEThe application is visible


    PrevHomeNext
    SDL_GetRelativeMouseStateUpSDL_JoystickEventState
    \ No newline at end of file diff --git a/docs/html/sdlgetaudiostatus.html b/docs/html/sdlgetaudiostatus.html new file mode 100644 index 000000000..c30b30e48 --- /dev/null +++ b/docs/html/sdlgetaudiostatus.html @@ -0,0 +1,213 @@ +SDL_GetAudioStatus
    SDL Library Documentation
    PrevNext

    SDL_GetAudioStatus

    Name

    SDL_GetAudioStatus -- Get the current audio state

    Synopsis

    #include "SDL.h"

    SDL_audiostatusSDL_GetAudioStatus(void);

    Description

    typedef enum{
    +  SDL_AUDIO_STOPPED,
    +  SDL_AUDIO_PAUSED,
    +  SDL_AUDIO_PLAYING
    +} SDL_audiostatus;

    Returns either SDL_AUDIO_STOPPED, SDL_AUDIO_PAUSED or SDL_AUDIO_PLAYING depending on the current audio state.


    PrevHomeNext
    SDL_PauseAudioUpSDL_LoadWAV
    \ No newline at end of file diff --git a/docs/html/sdlgetcliprect.html b/docs/html/sdlgetcliprect.html new file mode 100644 index 000000000..2891ab82f --- /dev/null +++ b/docs/html/sdlgetcliprect.html @@ -0,0 +1,221 @@ +SDL_GetClipRect
    SDL Library Documentation
    PrevNext

    SDL_GetClipRect

    Name

    SDL_GetClipRect -- Gets the clipping rectangle for a surface.

    Synopsis

    #include "SDL.h"

    void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);

    Description

    Gets the clipping rectangle for a surface. When this surface is the +destination of a blit, only the area within the clip rectangle is +drawn into.

    The rectangle pointed to by rect will be +filled with the clipping rectangle of the surface.


    PrevHomeNext
    SDL_SetClipRectUpSDL_ConvertSurface
    \ No newline at end of file diff --git a/docs/html/sdlgetcursor.html b/docs/html/sdlgetcursor.html new file mode 100644 index 000000000..9403fe30b --- /dev/null +++ b/docs/html/sdlgetcursor.html @@ -0,0 +1,211 @@ +SDL_GetCursor
    SDL Library Documentation
    PrevNext

    SDL_GetCursor

    Name

    SDL_GetCursor -- Get the currently active mouse cursor.

    Synopsis

    #include "SDL.h"

    SDL_Cursor *SDL_GetCursor(void);

    Description

    Returns the currently active mouse cursor.


    PrevHomeNext
    SDL_SetCursorUpSDL_ShowCursor
    \ No newline at end of file diff --git a/docs/html/sdlgeteventfilter.html b/docs/html/sdlgeteventfilter.html new file mode 100644 index 000000000..40f09e630 --- /dev/null +++ b/docs/html/sdlgeteventfilter.html @@ -0,0 +1,227 @@ +SDL_GetEventFilter
    SDL Library Documentation
    PrevNext

    SDL_GetEventFilter

    Name

    SDL_GetEventFilter -- Retrieves a pointer to he event filter

    Synopsis

    #include "SDL.h"

    SDL_EventFilter SDL_GetEventFilter(void);

    Description

    This function retrieces a pointer to the event filter that was previously set using SDL_SetEventFilter. An SDL_EventFilter function is defined as: +

    typedef int (*SDL_EventFilter)(const SDL_Event *event);

    Return Value

    Returns a pointer to the event filter or NULL if no filter has been set.


    PrevHomeNext
    SDL_SetEventFilterUpSDL_EventState
    \ No newline at end of file diff --git a/docs/html/sdlgetgammaramp.html b/docs/html/sdlgetgammaramp.html new file mode 100644 index 000000000..08172d202 --- /dev/null +++ b/docs/html/sdlgetgammaramp.html @@ -0,0 +1,211 @@ +SDL_GetGammaRamp
    SDL Library Documentation
    PrevNext

    SDL_GetGammaRamp

    Name

    SDL_GetGammaRamp -- Gets the color gamma lookup tables for the display

    Synopsis

    #include "SDL.h"

    int SDL_GetGammaRamp(Uint16 *redtable, Uint16 *greentable, Uint16 *bluetable);

    Description

    Gets the gamma translation lookup tables currently used by the display. +Each table is an array of 256 Uint16 values.

    Not all display hardware is able to change gamma.

    Return Value

    Returns -1 on error.


    PrevHomeNext
    SDL_SetGammaUpSDL_SetGammaRamp
    \ No newline at end of file diff --git a/docs/html/sdlgetkeyname.html b/docs/html/sdlgetkeyname.html new file mode 100644 index 000000000..37cbb78ed --- /dev/null +++ b/docs/html/sdlgetkeyname.html @@ -0,0 +1,208 @@ +SDL_GetKeyName
    SDL Library Documentation
    PrevNext

    SDL_GetKeyName

    Name

    SDL_GetKeyName -- Get the name of an SDL virtual keysym

    Synopsis

    #include "SDL.h"

    char *SDL_GetKeyName(SDLKey key);

    Description

    Returns the SDL-defined name of the SDLKey key.

    See Also

    SDLKey


    PrevHomeNext
    SDL_SetModStateUpSDL_EnableUNICODE
    \ No newline at end of file diff --git a/docs/html/sdlgetkeystate.html b/docs/html/sdlgetkeystate.html new file mode 100644 index 000000000..781759b7b --- /dev/null +++ b/docs/html/sdlgetkeystate.html @@ -0,0 +1,245 @@ +SDL_GetKeyState
    SDL Library Documentation
    PrevNext

    SDL_GetKeyState

    Name

    SDL_GetKeyState -- Get a snapshot of the current keyboard state

    Synopsis

    #include "SDL.h"

    Uint8 *SDL_GetKeyState(int *numkeys);

    Description

    Gets a snapshot of the current keyboard state. The current state is return as a pointer to an array, the size of this array is stored in numkeys. The array is indexed by the SDLK_* symbols. A value of 1 means the key is pressed and a value of 0 means its not.

    Note: Use SDL_PumpEvents to update the state array.

    Example

    Uint8 *keystate = SDL_GetKeyState(NULL);
    +if ( keystate[SDLK_RETURN] ) printf("Return Key Pressed.\n");


    PrevHomeNext
    SDL_EventStateUpSDL_GetModState
    \ No newline at end of file diff --git a/docs/html/sdlgetmodstate.html b/docs/html/sdlgetmodstate.html new file mode 100644 index 000000000..cab374992 --- /dev/null +++ b/docs/html/sdlgetmodstate.html @@ -0,0 +1,249 @@ +SDL_GetModState
    SDL Library Documentation
    PrevNext

    SDL_GetModState

    Name

    SDL_GetModState -- Get the state of modifier keys.

    Synopsis

    #include "SDL.h"

    SDLMod SDL_GetModState(void);

    Description

    Returns the current of the modifier keys (CTRL, ALT, etc.).

    Return Value

    The return value can be an OR'd combination of the SDLMod enum.

    SDLMod

    typedef enum {
    +  KMOD_NONE  = 0x0000,
    +  KMOD_LSHIFT= 0x0001,
    +  KMOD_RSHIFT= 0x0002,
    +  KMOD_LCTRL = 0x0040,
    +  KMOD_RCTRL = 0x0080,
    +  KMOD_LALT  = 0x0100,
    +  KMOD_RALT  = 0x0200,
    +  KMOD_LMETA = 0x0400,
    +  KMOD_RMETA = 0x0800,
    +  KMOD_NUM   = 0x1000,
    +  KMOD_CAPS  = 0x2000,
    +  KMOD_MODE  = 0x4000,
    +} SDLMod;
    +SDL also defines the following symbols for convenience: +
    #define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
    +#define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)
    +#define KMOD_ALT  (KMOD_LALT|KMOD_RALT)
    +#define KMOD_META (KMOD_LMETA|KMOD_RMETA)


    PrevHomeNext
    SDL_GetKeyStateUpSDL_SetModState
    \ No newline at end of file diff --git a/docs/html/sdlgetmousestate.html b/docs/html/sdlgetmousestate.html new file mode 100644 index 000000000..85440d4d2 --- /dev/null +++ b/docs/html/sdlgetmousestate.html @@ -0,0 +1,245 @@ +SDL_GetMouseState
    SDL Library Documentation
    PrevNext

    SDL_GetMouseState

    Name

    SDL_GetMouseState -- Retrieve the current state of the mouse

    Synopsis

    #include "SDL.h"

    Uint8 SDL_GetMouseState(int *x, int *y);

    Description

    The current button state is returned as a button bitmask, which can +be tested using the SDL_BUTTON(X) macros, and x and y are set to the +current mouse cursor position. You can pass NULL for either x or y.

    Example

    SDL_PumpEvents();
    +if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1))
    +  printf("Mouse Button 1(left) is pressed.\n");

    PrevHomeNext
    SDL_EnableKeyRepeatUpSDL_GetRelativeMouseState
    \ No newline at end of file diff --git a/docs/html/sdlgetrelativemousestate.html b/docs/html/sdlgetrelativemousestate.html new file mode 100644 index 000000000..789c94955 --- /dev/null +++ b/docs/html/sdlgetrelativemousestate.html @@ -0,0 +1,227 @@ +SDL_GetRelativeMouseState
    SDL Library Documentation
    PrevNext

    SDL_GetRelativeMouseState

    Name

    SDL_GetRelativeMouseState -- Retrieve the current state of the mouse

    Synopsis

    #include "SDL.h"

    Uint8 SDL_GetRelativeMouseState(int *x, int *y);

    Description

    The current button state is returned as a button bitmask, which can +be tested using the SDL_BUTTON(X) macros, and x and y are set to the change in the mouse position since the last call to SDL_GetRelativeMouseState or since event initialization. You can pass NULL for either x or y.


    PrevHomeNext
    SDL_GetMouseStateUpSDL_GetAppState
    \ No newline at end of file diff --git a/docs/html/sdlgetrgb.html b/docs/html/sdlgetrgb.html new file mode 100644 index 000000000..f10b2707e --- /dev/null +++ b/docs/html/sdlgetrgb.html @@ -0,0 +1,223 @@ +SDL_GetRGB
    SDL Library Documentation
    PrevNext

    SDL_GetRGB

    Name

    SDL_GetRGB -- Get RGB values from a pixel in the specified pixel format.

    Synopsis

    #include "SDL.h"

    void SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b);

    Description

    Get RGB component values from a pixel stored in the specified pixel format.

    This function uses the entire 8-bit [0..255] range when converting color +components from pixel formats with less than 8-bits per RGB component +(e.g., a completely white pixel in 16-bit RGB565 format would return +[0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).


    PrevHomeNext
    SDL_MapRGBAUpSDL_GetRGBA
    \ No newline at end of file diff --git a/docs/html/sdlgetrgba.html b/docs/html/sdlgetrgba.html new file mode 100644 index 000000000..7a19fba30 --- /dev/null +++ b/docs/html/sdlgetrgba.html @@ -0,0 +1,214 @@ +SDL_GetRGBA
    SDL Library Documentation
    PrevNext

    SDL_GetRGBA

    Name

    SDL_GetRGBA -- Get RGBA values from a pixel in the specified pixel format.

    Synopsis

    #include "SDL.h"

    void SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);

    Description

    Get RGBA component values from a pixel stored in the specified pixel format.

    This function uses the entire 8-bit [0..255] range when converting color +components from pixel formats with less than 8-bits per RGB component +(e.g., a completely white pixel in 16-bit RGB565 format would return +[0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

    If the surface has no alpha component, the alpha will be returned as 0xff +(100% opaque).


    PrevHomeNext
    SDL_GetRGBUpSDL_CreateRGBSurface
    \ No newline at end of file diff --git a/docs/html/sdlgetthreadid.html b/docs/html/sdlgetthreadid.html new file mode 100644 index 000000000..6dc451915 --- /dev/null +++ b/docs/html/sdlgetthreadid.html @@ -0,0 +1,201 @@ +SDL_GetThreadID
    SDL Library Documentation
    PrevNext

    SDL_GetThreadID

    Name

    SDL_GetThreadID -- Get the SDL thread ID of a SDL_Thread

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    Uint32 SDL_GetThreadID(SDL_Thread *thread);

    Description

    Returns the ID of a SDL_Thread created by SDL_CreateThread.


    PrevHomeNext
    SDL_ThreadIDUpSDL_WaitThread
    \ No newline at end of file diff --git a/docs/html/sdlgetticks.html b/docs/html/sdlgetticks.html new file mode 100644 index 000000000..12de3fb88 --- /dev/null +++ b/docs/html/sdlgetticks.html @@ -0,0 +1,198 @@ +SDL_GetTicks
    SDL Library Documentation
    PrevNext

    SDL_GetTicks

    Name

    SDL_GetTicks -- Get the number of milliseconds since the SDL library initialization.

    Synopsis

    #include "SDL.h"

    Uint32 SDL_GetTicks(void);

    Description

    Get the number of milliseconds since the SDL library initialization. +Note that this value wraps if the program runs for more than ~49 days.

    See Also

    SDL_Delay


    PrevHomeNext
    TimeUpSDL_Delay
    \ No newline at end of file diff --git a/docs/html/sdlgetvideoinfo.html b/docs/html/sdlgetvideoinfo.html new file mode 100644 index 000000000..197cb787a --- /dev/null +++ b/docs/html/sdlgetvideoinfo.html @@ -0,0 +1,218 @@ +SDL_GetVideoInfo
    SDL Library Documentation
    PrevNext

    SDL_GetVideoInfo

    Name

    SDL_GetVideoInfo -- returns a pointer to information about the video hardware

    Synopsis

    #include "SDL.h"

    SDL_VideoInfo *SDL_GetVideoInfo(void);

    Description

    This function returns a read-only pointer to information about the video +hardware. If this is called before SDL_SetVideoMode, the +vfmt member of the returned structure will contain the +pixel format of the "best" video mode.


    PrevHomeNext
    SDL_GetVideoSurfaceUpSDL_VideoDriverName
    \ No newline at end of file diff --git a/docs/html/sdlgetvideosurface.html b/docs/html/sdlgetvideosurface.html new file mode 100644 index 000000000..dc3638451 --- /dev/null +++ b/docs/html/sdlgetvideosurface.html @@ -0,0 +1,200 @@ +SDL_GetVideoSurface
    SDL Library Documentation
    PrevNext

    SDL_GetVideoSurface

    Name

    SDL_GetVideoSurface -- returns a pointer to the current display surface

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_GetVideoSurface(void);

    Description

    This function returns a pointer to the current display surface. +If SDL is doing format conversion on the display surface, this +function returns the publicly visible surface, not the real video +surface.

    See Also

    SDL_Surface


    PrevHomeNext
    VideoUpSDL_GetVideoInfo
    \ No newline at end of file diff --git a/docs/html/sdlglattr.html b/docs/html/sdlglattr.html new file mode 100644 index 000000000..a2debf026 --- /dev/null +++ b/docs/html/sdlglattr.html @@ -0,0 +1,368 @@ +SDL_GLattr
    SDL Library Documentation
    PrevNext

    SDL_GLattr

    Name

    SDL_GLattr -- SDL GL Attributes

    Attributes

    SDL_GL_RED_SIZESize of the framebuffer red component, in bits
    SDL_GL_GREEN_SIZESize of the framebuffer green component, in bits
    SDL_GL_BLUE_SIZESize of the framebuffer blue component, in bits
    SDL_GL_ALPHA_SIZESize of the framebuffer alpha component, in bits
    SDL_GL_DOUBLEBUFFER0 or 1, enable or disable double buffering
    SDL_GL_BUFFER_SIZESize of the framebuffer, in bits
    SDL_GL_DEPTH_SIZESize of the depth buffer, in bits
    SDL_GL_STENCIL_SIZESize of the stencil buffer, in bits
    SDL_GL_ACCUM_RED_SIZESize of the accumulation buffer red component, in bits
    SDL_GL_ACCUM_GREEN_SIZESize of the accumulation buffer green component, in bits
    SDL_GL_ACCUM_BLUE_SIZESize of the accumulation buffer blue component, in bits
    SDL_GL_ACCUM_ALPHA_SIZESize of the accumulation buffer alpha component, in bits

    Description

    While you can set most OpenGL attributes normally, the attributes list above must be known before SDL sets the video mode. These attributes a set and read with SDL_GL_SetAttribute and SDL_GL_GetAttribute.


    PrevHomeNext
    SDL_FreeYUVOverlayUpSDL_Rect
    \ No newline at end of file diff --git a/docs/html/sdlglgetattribute.html b/docs/html/sdlglgetattribute.html new file mode 100644 index 000000000..3fa5ea3be --- /dev/null +++ b/docs/html/sdlglgetattribute.html @@ -0,0 +1,239 @@ +SDL_GL_GetAttribute
    SDL Library Documentation
    PrevNext

    SDL_GL_GetAttribute

    Name

    SDL_GL_GetAttribute -- Get the value of a special SDL/OpenGL attribute

    Synopsis

    #include "SDL.h"

    int SDL_GL_GetAttribute(SDLGLattr attr, int *value);

    Description

    Places the value of the SDL/OpenGL attribute attr into value. This is useful after a call to SDL_SetVideoMode to check whether your attributes have been set as you expected.

    Return Value

    Returns 0 on success, or -1 on an error.


    PrevHomeNext
    SDL_GL_GetProcAddressUpSDL_GL_SetAttribute
    \ No newline at end of file diff --git a/docs/html/sdlglgetprocaddress.html b/docs/html/sdlglgetprocaddress.html new file mode 100644 index 000000000..ab4555be7 --- /dev/null +++ b/docs/html/sdlglgetprocaddress.html @@ -0,0 +1,251 @@ +SDL_GL_GetProcAddress
    SDL Library Documentation
    PrevNext

    SDL_GL_GetProcAddress

    Name

    SDL_GL_GetProcAddress -- Get the address of a GL function

    Synopsis

    #include "SDL.h"

    void *SDL_GL_GetProcAddress(const char* proc);

    Description

    Returns the address of the GL function proc, or NULL if the function is not found. If the GL library is loaded at runtime, with SDL_GL_LoadLibrary, then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL extensions.

    Example

    typedef void (*GL_ActiveTextureARB_Func)(unsigned int);
    +GL_ActiveTextureARB_Func glActiveTextureARB_ptr = 0;
    +int has_multitexture=1;
    +.
    +.
    +.
    +/* Get function pointer */
    +glActiveTextureARB_ptr=(GL_ActiveTextureARB_Func) SDL_GL_GetProcAddress("glActiveTextureARB");
    +
    +/* Check for a valid function ptr */
    +if(!glActiveTextureARB_ptr){
    +  fprintf(stderr, "Multitexture Extensions not present.\n");
    +  has_multitexture=0;
    +}
    +.
    +.
    +.
    +.
    +if(has_multitexture){
    +  glActiveTextureARB_ptr(GL_TEXTURE0_ARB);
    +  .
    +  .
    +}
    +else{
    +  .
    +  .
    +}

    PrevHomeNext
    SDL_GL_LoadLibraryUpSDL_GL_GetAttribute
    \ No newline at end of file diff --git a/docs/html/sdlglloadlibrary.html b/docs/html/sdlglloadlibrary.html new file mode 100644 index 000000000..27518e37c --- /dev/null +++ b/docs/html/sdlglloadlibrary.html @@ -0,0 +1,223 @@ +SDL_GL_LoadLibrary
    SDL Library Documentation
    PrevNext

    SDL_GL_LoadLibrary

    Name

    SDL_GL_LoadLibrary -- Specify an OpenGL library

    Synopsis

    #include "SDL.h"

    int SDL_GL_LoadLibrary(const char *path);

    Description

    If you wish, you may load the OpenGL library at runtime, this must be done before SDL_SetVideoMode is called. The path of the GL library is passed to SDL_GL_LoadLibrary and it returns 0 on success, or -1 on an error. You must then use SDL_GL_GetProcAddress to retrieve function pointers to GL functions.


    PrevHomeNext
    SDL_ShowCursorUpSDL_GL_GetProcAddress
    \ No newline at end of file diff --git a/docs/html/sdlglsetattribute.html b/docs/html/sdlglsetattribute.html new file mode 100644 index 000000000..d42824839 --- /dev/null +++ b/docs/html/sdlglsetattribute.html @@ -0,0 +1,278 @@ +SDL_GL_SetAttribute
    SDL Library Documentation
    PrevNext

    SDL_GL_SetAttribute

    Name

    SDL_GL_SetAttribute -- Set a special SDL/OpenGL attribute

    Synopsis

    #include "SDL.h"

    int SDL_GL_SetAttribute(SDL_GLattr attr, int value);

    Description

    Sets the OpenGL attribute attr to value. The attributes you set don't take effect until after a call to SDL_SetVideoMode. You should use SDL_GL_GetAttribute to check the values after a SDL_SetVideoMode call.

    Return Value

    Returns 0 on success, or -1 on error.

    Example

    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
    +SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
    +SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
    +SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
    +SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
    +if ( (screen=SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL )) == NULL ) {
    +  fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError());
    +  SDL_Quit();
    +  return;
    +}

    Note: The SDL_DOUBLEBUF flag is not required to enable double buffering when setting an OpenGL video mode. Double buffering is enabled or disabled using the SDL_GL_DOUBLEBUFFER attribute.


    PrevHomeNext
    SDL_GL_GetAttributeUpSDL_GL_SwapBuffers
    \ No newline at end of file diff --git a/docs/html/sdlglswapbuffers.html b/docs/html/sdlglswapbuffers.html new file mode 100644 index 000000000..bb00be1d8 --- /dev/null +++ b/docs/html/sdlglswapbuffers.html @@ -0,0 +1,204 @@ +SDL_GL_SwapBuffers
    SDL Library Documentation
    PrevNext

    SDL_GL_SwapBuffers

    Name

    SDL_GL_SwapBuffers -- Swap OpenGL framebuffers/Update Display

    Synopsis

    #include "SDL.h"

    void SDL_GL_SwapBuffers(void );

    Description

    Swap the OpenGL buffers, if double-buffering is supported.


    PrevHomeNext
    SDL_GL_SetAttributeUpSDL_CreateYUVOverlay
    \ No newline at end of file diff --git a/docs/html/sdlinit.html b/docs/html/sdlinit.html new file mode 100644 index 000000000..fa07f04c0 --- /dev/null +++ b/docs/html/sdlinit.html @@ -0,0 +1,360 @@ +SDL_Init
    SDL Library Documentation
    PrevNext

    SDL_Init

    Name

    SDL_Init -- Initializes SDL

    Synopsis

    #include "SDL.h"

    int SDL_Init(Uint32 flags);

    Description

    Initializes SDL. This should be called before all other SDL functions. The flags parameter specifies what part(s) of SDL to initialize.

    SDL_INIT_TIMERInitializes the timer subsystem.
    SDL_INIT_AUDIOInitializes the audio subsystem.
    SDL_INIT_VIDEOInitializes the video subsystem.
    SDL_INIT_CDROMInitializes the cdrom subsystem.
    SDL_INIT_JOYSTICKInitializes the joystick subsystem.
    SDL_INIT_EVERYTHINGInitialize all of the above.
    SDL_INIT_NOPARACHUTEPrevents SDL from catching fatal signals.
    SDL_INIT_EVENTTHREAD 

    Return Value

    Returns -1 on an error or 0 on success.


    PrevHomeNext
    GeneralUpSDL_InitSubSystem
    \ No newline at end of file diff --git a/docs/html/sdlinitsubsystem.html b/docs/html/sdlinitsubsystem.html new file mode 100644 index 000000000..0c3088927 --- /dev/null +++ b/docs/html/sdlinitsubsystem.html @@ -0,0 +1,275 @@ +SDL_InitSubSystem
    SDL Library Documentation
    PrevNext

    SDL_InitSubSystem

    Name

    SDL_InitSubSystem -- Initialize subsystems

    Synopsis

    #include "SDL.h"

    int SDL_InitSubSystem(Uint32 flags);

    Description

    After SDL has been initialized with SDL_Init you may initialize uninitialized subsystems with SDL_InitSubSystem. The flags parameter is the same as that used in SDL_Init.

    Examples

    /* Seperating Joystick and Video initialization. */
    +SDL_Init(SDL_INIT_VIDEO);
    +.
    +.
    +SDL_SetVideoMode(640, 480, 16, SDL_DOUBLEBUF|SDL_FULLSCREEN);
    +.
    +/* Do Some Video stuff */
    +.
    +.
    +/* Initialize the joystick subsystem */
    +SDL_InitSubSystem(SDL_INIT_JOYSTICK);
    +
    +/* Do some stuff with video and joystick */
    +.
    +.
    +.
    +/* Shut them both down */
    +SDL_Quit();

    Return Value

    Returns -1 on an error or 0 on success.


    PrevHomeNext
    SDL_InitUpSDL_QuitSubSystem
    \ No newline at end of file diff --git a/docs/html/sdljoyaxisevent.html b/docs/html/sdljoyaxisevent.html new file mode 100644 index 000000000..0f1d71a55 --- /dev/null +++ b/docs/html/sdljoyaxisevent.html @@ -0,0 +1,322 @@ +SDL_JoyAxisEvent
    SDL Library Documentation
    PrevNext

    SDL_JoyAxisEvent

    Name

    SDL_JoyAxisEvent -- Joystick axis motion event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 which;
    +  Uint8 axis;
    +  Sint16 value;
    +} SDL_JoyAxisEvent;

    Structure Data

    typeSDL_JOYAXISMOTION
    whichJoystick device index
    axisJoystick axis index
    valueAxis value (range: -32768 to 32767)

    Description

    SDL_JoyAxisEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYAXISMOTION is reported.

    A SDL_JOYAXISMOTION event occurs when ever a user moves an axis on the joystick. The field which is the index of the joystick that reported the event and axis is the index of the axis (for a more detailed explaination see the Joystick section). value is the current position of the axis.


    PrevHomeNext
    SDL_MouseButtonEventUpSDL_JoyButtonEvent
    \ No newline at end of file diff --git a/docs/html/sdljoyballevent.html b/docs/html/sdljoyballevent.html new file mode 100644 index 000000000..71d2b1b6d --- /dev/null +++ b/docs/html/sdljoyballevent.html @@ -0,0 +1,332 @@ +SDL_JoyBallEvent
    SDL Library Documentation
    PrevNext

    SDL_JoyBallEvent

    Name

    SDL_JoyBallEvent -- Joystick trackball motion event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 which;
    +  Uint8 ball;
    +  Sint16 xrel, yrel;
    +} SDL_JoyBallEvent;

    Structure Data

    typeSDL_JOYBALLMOTION
    whichJoystick device index
    ballJoystick trackball index
    xrel, yrelThe relative motion in the X/Y direction

    Description

    SDL_JoyBallEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBALLMOTION is reported.

    A SDL_JOYBALLMOTION event occurs when a user moves a trackball on the joystick. The field which is the index of the joystick that reported the event and ball is the index of the trackball (for a more detailed explaination see the Joystick section). Trackballs only return relative motion, this is the change in position on the ball since it was last polled (last cycle of the event loop) and it is stored in xrel and yrel.


    PrevHomeNext
    SDL_JoyHatEventUpSDL_ResizeEvent
    \ No newline at end of file diff --git a/docs/html/sdljoybuttonevent.html b/docs/html/sdljoybuttonevent.html new file mode 100644 index 000000000..0533eea28 --- /dev/null +++ b/docs/html/sdljoybuttonevent.html @@ -0,0 +1,343 @@ +SDL_JoyButtonEvent
    SDL Library Documentation
    PrevNext

    SDL_JoyButtonEvent

    Name

    SDL_JoyButtonEvent -- Joystick button event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 which;
    +  Uint8 button;
    +  Uint8 state;
    +} SDL_JoyButtonEvent;

    Structure Data

    typeSDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP
    whichJoystick device index
    buttonJoystick button index
    stateSDL_PRESSED or SDL_RELEASED

    Description

    SDL_JoyButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP is reported.

    A SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs when ever a user presses or releases a button on a joystick. The field which is the index of the joystick that reported the event and button is the index of the button (for a more detailed explaination see the Joystick section). state is the current state or the button which is either SDL_PRESSED or SDL_RELEASED.


    PrevHomeNext
    SDL_JoyAxisEventUpSDL_JoyHatEvent
    \ No newline at end of file diff --git a/docs/html/sdljoyhatevent.html b/docs/html/sdljoyhatevent.html new file mode 100644 index 000000000..cf12eac5f --- /dev/null +++ b/docs/html/sdljoyhatevent.html @@ -0,0 +1,405 @@ +SDL_JoyHatEvent
    SDL Library Documentation
    PrevNext

    SDL_JoyHatEvent

    Name

    SDL_JoyHatEvent -- Joystick hat position change event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 which;
    +  Uint8 hat;
    +  Uint8 value;
    +} SDL_JoyHatEvent;

    Structure Data

    typeSDL_JOY
    whichJoystick device index
    hatJoystick hat index
    valueHat position

    Description

    SDL_JoyHatEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYHATMOTION is reported.

    A SDL_JOYHATMOTION event occurs when ever a user moves a hat on the joystick. The field which is the index of the joystick that reported the event and hat is the index of the hat (for a more detailed exlaination see the Joystick section). value is the current position of the hat. It is a logically OR'd combination of the following values (whose meanings should be pretty obvious:) :

    SDL_HAT_CENTERED
    SDL_HAT_UP
    SDL_HAT_RIGHT
    SDL_HAT_DOWN
    SDL_HAT_LEFT

    The following defines are also provided:

    SDL_HAT_RIGHTUP
    SDL_HAT_RIGHTDOWN
    SDL_HAT_LEFTUP
    SDL_HAT_LEFTDOWN


    PrevHomeNext
    SDL_JoyButtonEventUpSDL_JoyBallEvent
    \ No newline at end of file diff --git a/docs/html/sdljoystickclose.html b/docs/html/sdljoystickclose.html new file mode 100644 index 000000000..4651fb339 --- /dev/null +++ b/docs/html/sdljoystickclose.html @@ -0,0 +1,215 @@ +SDL_JoystickClose
    SDL Library Documentation
    PrevNext

    SDL_JoystickClose

    Name

    SDL_JoystickClose -- Closes a previously opened joystick

    Synopsis

    #include "SDL.h"

    void SDL_JoystickClose(SDL_Joystick *joystick);

    Description

    Close a joystick that was previously opened with SDL_JoystickOpen.


    PrevHomeNext
    SDL_JoystickGetBallUpAudio
    \ No newline at end of file diff --git a/docs/html/sdljoystickeventstate.html b/docs/html/sdljoystickeventstate.html new file mode 100644 index 000000000..5a2f89d2c --- /dev/null +++ b/docs/html/sdljoystickeventstate.html @@ -0,0 +1,282 @@ +SDL_JoystickEventState
    SDL Library Documentation
    PrevNext

    SDL_JoystickEventState

    Name

    SDL_JoystickEventState -- Enable/disable joystick event polling

    Synopsis

    #include "SDL.h"

    int SDL_JoystickEventState(int state);

    Description

    This function is used to enable or disable joystick event processing. With joystick event processing disabled you will have to update joystick states with SDL_JoystickUpdate and read the joystick information manually. state is either SDL_QUERY, SDL_ENABLE or SDL_IGNORE.

    Note: Joystick event handling is prefered

    Return Value

    If state is SDL_QUERY then the current state is returned, otherwise the new processing state is returned.


    PrevHomeNext
    SDL_GetAppStateUpJoystick
    \ No newline at end of file diff --git a/docs/html/sdljoystickgetaxis.html b/docs/html/sdljoystickgetaxis.html new file mode 100644 index 000000000..8a5783994 --- /dev/null +++ b/docs/html/sdljoystickgetaxis.html @@ -0,0 +1,263 @@ +SDL_JoystickGetAxis
    SDL Library Documentation
    PrevNext

    SDL_JoystickGetAxis

    Name

    SDL_JoystickGetAxis -- Get the current state of an axis

    Synopsis

    #include "SDL.h"

    Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);

    Description

    SDL_JoystickGetAxis returns the current state of the given axis on the given joystick.

    On most modern joysticks the X axis is usually represented by axis 0 and the Y axis by axis 1. The value returned by SDL_JoystickGetAxis is a signed integer (-32768 to 32768) representing the current position of the axis, it maybe necessary to impose certain tolerances on these values to account for jitter. It is worth noting that some joysticks use axes 2 and 3 for extra buttons.

    Return Value

    Returns a 16-bit signed integer representing the current position of the axis.

    Examples

    Sint16 x_move, y_move;
    +SDL_Joystick *joy1;
    +.
    +.
    +x_move=SDL_JoystickGetAxis(joy1, 0);
    +y_move=SDL_JoystickGetAxis(joy1, 1);


    PrevHomeNext
    SDL_JoystickUpdateUpSDL_JoystickGetHat
    \ No newline at end of file diff --git a/docs/html/sdljoystickgetball.html b/docs/html/sdljoystickgetball.html new file mode 100644 index 000000000..00928c232 --- /dev/null +++ b/docs/html/sdljoystickgetball.html @@ -0,0 +1,254 @@ +SDL_JoystickGetBall
    SDL Library Documentation
    PrevNext

    SDL_JoystickGetBall

    Name

    SDL_JoystickGetBall -- Get relative trackball motion

    Synopsis

    #include "SDL.h"

    int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);

    Description

    Get the ball axis change.

    Trackballs can only return relative motion since the last call to SDL_JoystickGetBall, these motion deltas a placed into dx and dy.

    Return Value

    Returns 0 on success or -1 on failure

    Examples

    int delta_x, delta_y;
    +SDL_Joystick *joy;
    +.
    +.
    +.
    +SDL_JoystickUpdate();
    +if(SDL_JoystickGetBall(joy, 0, &delta_x, &delta_y)==-1)
    +  printf("TrackBall Read Error!\n");
    +printf("Trackball Delta- X:%d, Y:%d\n", delta_x, delta_y);


    PrevHomeNext
    SDL_JoystickGetButtonUpSDL_JoystickClose
    \ No newline at end of file diff --git a/docs/html/sdljoystickgetbutton.html b/docs/html/sdljoystickgetbutton.html new file mode 100644 index 000000000..654b5826f --- /dev/null +++ b/docs/html/sdljoystickgetbutton.html @@ -0,0 +1,223 @@ +SDL_JoystickGetButton
    SDL Library Documentation
    PrevNext

    SDL_JoystickGetButton

    Name

    SDL_JoystickGetButton -- Get the current state of a given button on a given joystick

    Synopsis

    #include "SDL.h"

    Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button);

    Description

    SDL_JoystickGetButton returns the current state of the given button on the given joystick.

    Return Value

    1 if the button is pressed. Otherwise, 0.


    PrevHomeNext
    SDL_JoystickGetHatUpSDL_JoystickGetBall
    \ No newline at end of file diff --git a/docs/html/sdljoystickgethat.html b/docs/html/sdljoystickgethat.html new file mode 100644 index 000000000..680843139 --- /dev/null +++ b/docs/html/sdljoystickgethat.html @@ -0,0 +1,289 @@ +SDL_JoystickGetHat
    SDL Library Documentation
    PrevNext

    SDL_JoystickGetHat

    Name

    SDL_JoystickGetHat -- Get the current state of a joystick hat

    Synopsis

    #include "SDL.h"

    Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);

    Description

    SDL_JoystickGetHat returns the current state of the given hat on the given joystick.

    Return Value

    The current state is returned as a Uint8 which is defined as an OR'd combination of one or more of the following

    SDL_HAT_CENTERED
    SDL_HAT_UP
    SDL_HAT_RIGHT
    SDL_HAT_DOWN
    SDL_HAT_LEFT
    SDL_HAT_RIGHTUP
    SDL_HAT_RIGHTDOWN
    SDL_HAT_LEFTUP
    SDL_HAT_LEFTDOWN


    PrevHomeNext
    SDL_JoystickGetAxisUpSDL_JoystickGetButton
    \ No newline at end of file diff --git a/docs/html/sdljoystickindex.html b/docs/html/sdljoystickindex.html new file mode 100644 index 000000000..414f9f415 --- /dev/null +++ b/docs/html/sdljoystickindex.html @@ -0,0 +1,210 @@ +SDL_JoystickIndex
    SDL Library Documentation
    PrevNext

    SDL_JoystickIndex

    Name

    SDL_JoystickIndex -- Get the index of an SDL_Joystick.

    Synopsis

    #include "SDL.h"

    int SDL_JoystickIndex(SDL_Joystick *joystick);

    Description

    Returns the index of a given SDL_Joystick structure.

    Return Value

    Index number of the joystick.


    PrevHomeNext
    SDL_JoystickOpenedUpSDL_JoystickNumAxes
    \ No newline at end of file diff --git a/docs/html/sdljoystickname.html b/docs/html/sdljoystickname.html new file mode 100644 index 000000000..489b67ba4 --- /dev/null +++ b/docs/html/sdljoystickname.html @@ -0,0 +1,230 @@ +SDL_JoystickName
    SDL Library Documentation
    PrevNext

    SDL_JoystickName

    Name

    SDL_JoystickName -- Get joystick name.

    Synopsis

    #include "SDL.h"

    const char *SDL_JoystickName(int index);

    Description

    Get the implementation dependent name of joystick. The index parameter refers to the N'th joystick on the system.

    Return Value

    Returns a char pointer to the joystick name.

    Examples

    /* Print the names of all attached joysticks */
    +int num_joy, i;
    +num_joy=SDL_NumJoysticks();
    +printf("%d joysticks found\n", num_joy);
    +for(i=0;i<num_joy;i++)
    +  printf("%s\n", SDL_JoystickName(i);


    PrevHomeNext
    SDL_NumJoysticksUpSDL_JoystickOpen
    \ No newline at end of file diff --git a/docs/html/sdljoysticknumaxes.html b/docs/html/sdljoysticknumaxes.html new file mode 100644 index 000000000..5cd5d6e78 --- /dev/null +++ b/docs/html/sdljoysticknumaxes.html @@ -0,0 +1,217 @@ +SDL_JoystickNumAxes
    SDL Library Documentation
    PrevNext

    SDL_JoystickNumAxes

    Name

    SDL_JoystickNumAxes -- Get the number of joystick axes

    Synopsis

    #include "SDL.h"

    int SDL_JoystickNumAxes(SDL_Joystick *joystick);

    Description

    Return the number of axes available from a previously opened SDL_Joystick.

    Return Value

    Number of axes.


    PrevHomeNext
    SDL_JoystickIndexUpSDL_JoystickNumBalls
    \ No newline at end of file diff --git a/docs/html/sdljoysticknumballs.html b/docs/html/sdljoysticknumballs.html new file mode 100644 index 000000000..b3405f260 --- /dev/null +++ b/docs/html/sdljoysticknumballs.html @@ -0,0 +1,217 @@ +SDL_JoystickNumBalls
    SDL Library Documentation
    PrevNext

    SDL_JoystickNumBalls

    Name

    SDL_JoystickNumBalls -- Get the number of joystick trackballs

    Synopsis

    #include "SDL.h"

    int SDL_JoystickNumBalls(SDL_Joystick *joystick);

    Description

    Return the number of trackballs available from a previously opened SDL_Joystick.

    Return Value

    Number of trackballs.


    PrevHomeNext
    SDL_JoystickNumAxesUpSDL_JoystickNumHats
    \ No newline at end of file diff --git a/docs/html/sdljoysticknumbuttons.html b/docs/html/sdljoysticknumbuttons.html new file mode 100644 index 000000000..36912a520 --- /dev/null +++ b/docs/html/sdljoysticknumbuttons.html @@ -0,0 +1,217 @@ +SDL_JoystickNumButtons
    SDL Library Documentation
    PrevNext

    SDL_JoystickNumButtons

    Name

    SDL_JoystickNumButtons -- Get the number of joysitck buttons

    Synopsis

    #include "SDL.h"

    int SDL_JoystickNumButtons(SDL_Joystick *joystick);

    Description

    Return the number of buttons available from a previously opened SDL_Joystick.

    Return Value

    Number of buttons.


    PrevHomeNext
    SDL_JoystickNumHatsUpSDL_JoystickUpdate
    \ No newline at end of file diff --git a/docs/html/sdljoysticknumhats.html b/docs/html/sdljoysticknumhats.html new file mode 100644 index 000000000..a2b814b55 --- /dev/null +++ b/docs/html/sdljoysticknumhats.html @@ -0,0 +1,217 @@ +SDL_JoystickNumHats
    SDL Library Documentation
    PrevNext

    SDL_JoystickNumHats

    Name

    SDL_JoystickNumHats -- Get the number of joystick hats

    Synopsis

    #include "SDL.h"

    int SDL_JoystickNumHats(SDL_Joystick *joystick);

    Description

    Return the number of hats available from a previously opened SDL_Joystick.

    Return Value

    Number of hats.


    PrevHomeNext
    SDL_JoystickNumBallsUpSDL_JoystickNumButtons
    \ No newline at end of file diff --git a/docs/html/sdljoystickopen.html b/docs/html/sdljoystickopen.html new file mode 100644 index 000000000..575e6c928 --- /dev/null +++ b/docs/html/sdljoystickopen.html @@ -0,0 +1,251 @@ +SDL_JoystickOpen
    SDL Library Documentation
    PrevNext

    SDL_JoystickOpen

    Name

    SDL_JoystickOpen -- Opens a joystick for use.

    Synopsis

    #include "SDL.h"

    SDL_Joystick *SDL_JoystickOpen(int index);

    Description

    Opens a joystick for use within SDL. The index refers to the N'th joystick in the system. A joystick must be opened before it game be used.

    Return Value

    Returns a SDL_Joystick structure on success. NULL on failure.

    Examples

    SDL_Joystick *joy;
    +// Check for joystick
    +if(SDL_NumJoysticks()>0){
    +  // Open joystick
    +  joy=SDL_JoystickOpen(0);
    +  
    +  if(joy)
    +  {
    +    printf("Opened Joystick 0\n");
    +    printf("Name: %s\n", SDL_JoystickName(0));
    +    printf("Number of Axes: %s\n", SDL_JoystickNumAxes(joy));
    +    printf("Number of Buttons: %s\n", SDL_JoystickNumButtons(joy));
    +    printf("Number of Balls: %s\n", SDL_JoystickNumBalls(joy));
    +  }
    +  else
    +    printf("Couldn't open Joystick 0\n");
    +  
    +  // Close if opened
    +  if(SDL_JoystickOpened(0))
    +    SDL_JoystickClose(joy);
    +}


    PrevHomeNext
    SDL_JoystickNameUpSDL_JoystickOpened
    \ No newline at end of file diff --git a/docs/html/sdljoystickopened.html b/docs/html/sdljoystickopened.html new file mode 100644 index 000000000..2fd98c5f6 --- /dev/null +++ b/docs/html/sdljoystickopened.html @@ -0,0 +1,225 @@ +SDL_JoystickOpened
    SDL Library Documentation
    PrevNext

    SDL_JoystickOpened

    Name

    SDL_JoystickOpened -- Determine if a joystick has been opened

    Synopsis

    #include "SDL.h"

    int SDL_JoystickOpened(int index);

    Description

    Determines whether a joystick has already been opened within the application. index refers to the N'th joystick on the system.

    Return Value

    Returns 1 if the joystick has been opened, or 0 if it has not.


    PrevHomeNext
    SDL_JoystickOpenUpSDL_JoystickIndex
    \ No newline at end of file diff --git a/docs/html/sdljoystickupdate.html b/docs/html/sdljoystickupdate.html new file mode 100644 index 000000000..dc4c35670 --- /dev/null +++ b/docs/html/sdljoystickupdate.html @@ -0,0 +1,203 @@ +SDL_JoystickUpdate
    SDL Library Documentation
    PrevNext

    SDL_JoystickUpdate

    Name

    SDL_JoystickUpdate -- Updates the state of all joysticks

    Synopsis

    #include "SDL.h"

    void SDL_JoystickUpdate(void);

    Description

    Updates the state(position, buttons, etc.) of all open joysticks. If joystick events have been enabled with SDL_JoystickEventState then this is called automatically in the event loop.


    PrevHomeNext
    SDL_JoystickNumButtonsUpSDL_JoystickGetAxis
    \ No newline at end of file diff --git a/docs/html/sdlkey.html b/docs/html/sdlkey.html new file mode 100644 index 000000000..48b4f5e03 --- /dev/null +++ b/docs/html/sdlkey.html @@ -0,0 +1,2622 @@ +SDLKey
    SDL Library Documentation
    PrevNext

    SDLKey

    Name

    SDLKey -- Keysym definitions.

    Description

    Table 8-1. SDL Keysym definitions

    SDLKeyASCII valueCommon name
    SDLK_BACKSPACE'\b'backspace
    SDLK_TAB'\t'tab
    SDLK_CLEAR clear
    SDLK_RETURN'\r'return
    SDLK_PAUSE pause
    SDLK_ESCAPE'^['escape
    SDLK_SPACE' 'space
    SDLK_EXCLAIM'!'exclaim
    SDLK_QUOTEDBL'"'quotedbl
    SDLK_HASH'#'hash
    SDLK_DOLLAR'$'dollar
    SDLK_AMPERSAND'&'ampersand
    SDLK_QUOTE'''quote
    SDLK_LEFTPAREN'('left parenthesis
    SDLK_RIGHTPAREN')'right parenthesis
    SDLK_ASTERISK'*'asterisk
    SDLK_PLUS'+'plus sign
    SDLK_COMMA','comma
    SDLK_MINUS'-'minus sign
    SDLK_PERIOD'.'period
    SDLK_SLASH'/'forward slash
    SDLK_0'0'0
    SDLK_1'1'1
    SDLK_2'2'2
    SDLK_3'3'3
    SDLK_4'4'4
    SDLK_5'5'5
    SDLK_6'6'6
    SDLK_7'7'7
    SDLK_8'8'8
    SDLK_9'9'9
    SDLK_COLON':'colon
    SDLK_SEMICOLON';'semicolon
    SDLK_LESS'<'less-than sign
    SDLK_EQUALS'='equals sign
    SDLK_GREATER'>'greater-than sign
    SDLK_QUESTION'?'question mark
    SDLK_AT'@'at
    SDLK_LEFTBRACKET'['left bracket
    SDLK_BACKSLASH'\'backslash
    SDLK_RIGHTBRACKET']'right bracket
    SDLK_CARET'^'caret
    SDLK_UNDERSCORE'_'underscore
    SDLK_BACKQUOTE'`'grave
    SDLK_a'a'a
    SDLK_b'b'b
    SDLK_c'c'c
    SDLK_d'd'd
    SDLK_e'e'e
    SDLK_f'f'f
    SDLK_g'g'g
    SDLK_h'h'h
    SDLK_i'i'i
    SDLK_j'j'j
    SDLK_k'k'k
    SDLK_l'l'l
    SDLK_m'm'm
    SDLK_n'n'n
    SDLK_o'o'o
    SDLK_p'p'p
    SDLK_q'q'q
    SDLK_r'r'r
    SDLK_s's's
    SDLK_t't't
    SDLK_u'u'u
    SDLK_v'v'v
    SDLK_w'w'w
    SDLK_x'x'x
    SDLK_y'y'y
    SDLK_z'z'z
    SDLK_DELETE'^?'delete
    SDLK_KP0 keypad 0
    SDLK_KP1 keypad 1
    SDLK_KP2 keypad 2
    SDLK_KP3 keypad 3
    SDLK_KP4 keypad 4
    SDLK_KP5 keypad 5
    SDLK_KP6 keypad 6
    SDLK_KP7 keypad 7
    SDLK_KP8 keypad 8
    SDLK_KP9 keypad 9
    SDLK_KP_PERIOD'.'keypad period
    SDLK_KP_DIVIDE'/'keypad divide
    SDLK_KP_MULTIPLY'*'keypad multiply
    SDLK_KP_MINUS'-'keypad minus
    SDLK_KP_PLUS'+'keypad plus
    SDLK_KP_ENTER'\r'keypad enter
    SDLK_KP_EQUALS'='keypad equals
    SDLK_UP up arrow
    SDLK_DOWN down arrow
    SDLK_RIGHT right arrow
    SDLK_LEFT left arrow
    SDLK_INSERT insert
    SDLK_HOME home
    SDLK_END end
    SDLK_PAGEUP page up
    SDLK_PAGEDOWN page down
    SDLK_F1 F1
    SDLK_F2 F2
    SDLK_F3 F3
    SDLK_F4 F4
    SDLK_F5 F5
    SDLK_F6 F6
    SDLK_F7 F7
    SDLK_F8 F8
    SDLK_F9 F9
    SDLK_F10 F10
    SDLK_F11 F11
    SDLK_F12 F12
    SDLK_F13 F13
    SDLK_F14 F14
    SDLK_F15 F15
    SDLK_NUMLOCK numlock
    SDLK_CAPSLOCK capslock
    SDLK_SCROLLOCK scrollock
    SDLK_RSHIFT right shift
    SDLK_LSHIFT left shift
    SDLK_RCTRL right ctrl
    SDLK_LCTRL left ctrl
    SDLK_RALT right alt
    SDLK_LALT left alt
    SDLK_RMETA right meta
    SDLK_LMETA left meta
    SDLK_LSUPER left windows key
    SDLK_RSUPER right windows key
    SDLK_MODE mode shift
    SDLK_HELP help
    SDLK_PRINT print-screen
    SDLK_SYSREQ SysRq
    SDLK_BREAK break
    SDLK_MENU menu
    SDLK_POWER power
    SDLK_EURO euro
    + +

    Table 8-2. SDL modifier definitions

    SDL ModifierMeaning
    KMOD_NONENo modifiers applicable
    KMOD_NUMNumlock is down
    KMOD_CAPSCapslock is down
    KMOD_LCTRLLeft Control is down
    KMOD_RCTRLRight Control is down
    KMOD_RSHIFTRight Shift is down
    KMOD_LSHIFTLeft Shift is down
    KMOD_RALTRight Alt is down
    KMOD_LALTLeft Alt is down
    KMOD_CTRLA Control key is down
    KMOD_SHIFTA Shift key is down
    KMOD_ALTAn Alt key is down


    PrevHomeNext
    SDL_keysymUpEvent Functions.
    \ No newline at end of file diff --git a/docs/html/sdlkeyboardevent.html b/docs/html/sdlkeyboardevent.html new file mode 100644 index 000000000..1bd634f5d --- /dev/null +++ b/docs/html/sdlkeyboardevent.html @@ -0,0 +1,367 @@ +SDL_KeyboardEvent
    SDL Library Documentation
    PrevNext

    SDL_KeyboardEvent

    Name

    SDL_KeyboardEvent -- Keyboard event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 state;
    +  SDL_keysym keysym;
    +} SDL_KeyboardEvent;

    Structure Data

    typeSDL_KEYDOWN or SDL_KEYUP
    stateSDL_PRESSED or SDL_RELEASED
    keysymContains key press information

    Description

    SDL_KeyboardEvent is a member of the SDL_Event union and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported.

    The type and state actually report the same information, they just use different values to do it! A keyboard event occurs when a key is released (type=SDK_KEYUP or state=SDL_RELEASED) and when a key is pressed (type=SDL_KEYDOWN or state=SDL_PRESSED). The information on what key was pressed or released is in the keysym structure.

    Note: Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see SDL_EnableKeyRepeat).


    PrevHomeNext
    SDL_ActiveEventUpSDL_MouseMotionEvent
    \ No newline at end of file diff --git a/docs/html/sdlkeysym.html b/docs/html/sdlkeysym.html new file mode 100644 index 000000000..cac315c69 --- /dev/null +++ b/docs/html/sdlkeysym.html @@ -0,0 +1,347 @@ +SDL_keysym
    SDL Library Documentation
    PrevNext

    SDL_keysym

    Name

    SDL_keysym -- Keysym structure

    Structure Definition

    typedef struct{
    +  Uint8 scancode;
    +  SDLKey sym;
    +  SDLMod mod;
    +  Uint16 unicode;
    +} SDL_keysym;

    Structure Data

    scancodeHardware specific scancode
    symSDL virtual keysym
    modCurrent key modifiers
    unicodeTranslated character

    Description

    The SDL_keysym structure is used by reporting key presses and releases since it is a part of the SDL_KeyboardEvent.

    The scancode field should generally be left alone, it is the hardware dependent scancode returned by the keyboard. The sym field is extremely useful. It is the SDL-defined value of the key (see SDL Key Syms. This field is very useful when you are checking for certain key presses, like so: +

    .
    +.
    +while(SDL_PollEvent(&event)){
    +  switch(event.type){
    +    case SDL_KEYDOWN:
    +      if(event.key.keysym.sym==SDLK_LEFT)
    +        move_left();
    +      break;
    +    .
    +    .
    +    .
    +  }
    +}
    +.
    +.
    +mod stores the current state of the keyboard modifiers as explained in SDL_GetModState. The unicode is only used when UNICODE translation is enabled with SDL_EnableUNICODE. If unicode is non-zero then this a the UNICODE character corresponding to the keypress. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character: +
    char ch;
    +if ( (keysym.unicode & 0xFF80) == 0 ) {
    +  ch = keysym.unicode & 0x7F;
    +}
    +else {
    +  printf("An International Character.\n");
    +}
    +UNICODE translation does have a slight overhead so don't enable it unless its needed.

    See Also

    SDLKey


    PrevHomeNext
    SDL_QuitEventUpSDLKey
    \ No newline at end of file diff --git a/docs/html/sdlkillthread.html b/docs/html/sdlkillthread.html new file mode 100644 index 000000000..9c4525e5d --- /dev/null +++ b/docs/html/sdlkillthread.html @@ -0,0 +1,215 @@ +SDL_KillThread
    SDL Library Documentation
    PrevNext

    SDL_KillThread

    Name

    SDL_KillThread -- Gracelessly terminates the thread.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    void SDL_KillThread(SDL_Thread *thread);

    Description

    SDL_KillThread gracelessly terminates the thread +associated with thread. If possible, you should +use some other form of IPC to signal the thread to quit.


    PrevHomeNext
    SDL_WaitThreadUpSDL_CreateMutex
    \ No newline at end of file diff --git a/docs/html/sdllistmodes.html b/docs/html/sdllistmodes.html new file mode 100644 index 000000000..e21903f6a --- /dev/null +++ b/docs/html/sdllistmodes.html @@ -0,0 +1,302 @@ +SDL_ListModes
    SDL Library Documentation
    PrevNext

    SDL_ListModes

    Name

    SDL_ListModes -- Returns a pointer to an array of available screen dimensions for +the given format and video flags

    Synopsis

    #include "SDL.h"

    SDL_Rect **SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);

    Description

    Return a pointer to an array of available screen dimensions for the given +format and video flags, sorted largest to smallest. Returns +NULL if there are no dimensions available for a particular +format, or -1 if any dimension is okay for +the given format.

    If format is NULL, the mode list +will be for the format returned by SDL_GetVideoInfo()->vfmt. The flag parameter is an OR'd combination of surface flags. The flags are the same as those used SDL_SetVideoMode and they play a strong role in deciding what modes are valid. For instance, if you pass SDL_HWSURFACE as a flag only modes that support hardware video surfaces will be returned.

    Example

    SDL_Rect **modes;
    +int i;
    +.
    +.
    +.
    +
    +/* Get available fullscreen/hardware modes */
    +modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
    +
    +/* Check is there are any modes available */
    +if(modes == (SDL_Rect **)0){
    +  printf("No modes available!\n");
    +  exit(-1);
    +}
    +
    +/* Check if or resolution is restricted */
    +if(modes == (SDL_Rect **)-1){
    +  printf("All resolutions available.\n");
    +}
    +else{
    +  /* Print valid modes */
    +  printf("Available Modes\n");
    +  for(i=0;modes[i];++i)
    +    printf("  %d x %d\n", modes[i]->w, modes[i]->h);
    +}
    +.
    +.

    PrevHomeNext
    SDL_VideoDriverNameUpSDL_VideoModeOK
    \ No newline at end of file diff --git a/docs/html/sdlloadbmp.html b/docs/html/sdlloadbmp.html new file mode 100644 index 000000000..cd3eafdf3 --- /dev/null +++ b/docs/html/sdlloadbmp.html @@ -0,0 +1,211 @@ +SDL_LoadBMP
    SDL Library Documentation
    PrevNext

    SDL_LoadBMP

    Name

    SDL_LoadBMP -- Load a Windows BMP file into an SDL_Surface.

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_LoadBMP(const char *file);

    Description

    Loads a surface from a named Windows BMP file.

    Return Value

    Returns the new surface, or NULL +if there was an error.

    See Also

    SDL_SaveBMP


    PrevHomeNext
    SDL_UnlockSurfaceUpSDL_SaveBMP
    \ No newline at end of file diff --git a/docs/html/sdlloadwav.html b/docs/html/sdlloadwav.html new file mode 100644 index 000000000..59fa1e701 --- /dev/null +++ b/docs/html/sdlloadwav.html @@ -0,0 +1,288 @@ +SDL_LoadWAV
    SDL Library Documentation
    PrevNext

    SDL_LoadWAV

    Name

    SDL_LoadWAV -- Load a WAVE file

    Synopsis

    #include "SDL.h"

    SDL_AudioSpec *SDL_LoadWAV(const char *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);

    Description

    SDL_LoadWAV +This function loads a WAVE file into memory.

    If this function succeeds, it returns the given +SDL_AudioSpec, +filled with the audio data format of the wave data, and sets +audio_buf to a malloc'd +buffer containing the audio data, and sets audio_len +to the length of that audio buffer, in bytes. You need to free the audio +buffer with SDL_FreeWAV when you are +done with it.

    This function returns NULL and sets the SDL +error message if the wave file cannot be opened, uses an unknown data format, +or is corrupt. Currently raw, MS-ADPCM and IMA-ADPCM WAVE files are supported.

    Example

    SDL_AudioSpec wav_spec;
    +Uint32 wav_length;
    +Uint8 *wav_buffer;
    +
    +/* Load the WAV */
    +if( SDL_LoadWAV("test.wav", &wav_spec, &wav_buffer, &wav_length) == NULL ){
    +  fprintf(stderr, "Could not open test.wav: %s\n", SDL_GetError());
    +  exit(-1);
    +}
    +.
    +.
    +.
    +/* Do stuff with the WAV */
    +.
    +.
    +/* Free It */
    +SDL_FreeWAV(wav_buffer);

    PrevHomeNext
    SDL_GetAudioStatusUpSDL_FreeWAV
    \ No newline at end of file diff --git a/docs/html/sdllockaudio.html b/docs/html/sdllockaudio.html new file mode 100644 index 000000000..8612a1236 --- /dev/null +++ b/docs/html/sdllockaudio.html @@ -0,0 +1,200 @@ +SDL_LockAudio
    SDL Library Documentation
    PrevNext

    SDL_LockAudio

    Name

    SDL_LockAudio -- Lock out the callback function

    Synopsis

    #include "SDL.h"

    void SDL_LockAudio(void);

    Description

    The lock manipulated by these functions protects the callback function. +During a LockAudio period, you can be guaranteed that the +callback function is not running. Do not call these from the callback +function or you will cause deadlock.


    PrevHomeNext
    SDL_MixAudioUpSDL_UnlockAudio
    \ No newline at end of file diff --git a/docs/html/sdllocksurface.html b/docs/html/sdllocksurface.html new file mode 100644 index 000000000..536593400 --- /dev/null +++ b/docs/html/sdllocksurface.html @@ -0,0 +1,299 @@ +SDL_LockSurface
    SDL Library Documentation
    PrevNext

    SDL_LockSurface

    Name

    SDL_LockSurface -- Lock a surface for directly access.

    Synopsis

    #include "SDL.h"

    int SDL_LockSurface(SDL_Surface *surface);

    Description

    SDL_LockSurface sets up a surface for directly +accessing the pixels. Between calls to SDL_LockSurface +and SDL_UnlockSurface, you can write to and read from +surface->pixels, using the pixel format stored in +surface->format. Once you are done accessing the +surface, you should use SDL_UnlockSurface to release it.

    Not all surfaces require locking. +If SDL_MUSTLOCK(surface) +evaluates to 0, then you can read and write to the +surface at any time, and the pixel format of the surface will not change.

    No operating system or library calls should be made between lock/unlock +pairs, as critical system locks may be held during this time.

    It should be noted, that since SDL 1.1.8 surface locks are recursive. This means that you can lock a surface multiple times, but each lock must have a match unlock. +

        .
    +    .
    +    SDL_LockSurface( surface );
    +    .
    +    /* Surface is locked */
    +    /* Direct pixel access on surface here */
    +    .
    +    SDL_LockSurface( surface );
    +    .
    +    /* More direct pixel access on surface */
    +    .
    +    SDL_UnlockSurface( surface );
    +    /* Surface is still locked */
    +    /* Note: Is versions < 1.1.8, the surface would have been */
    +    /* no longer locked at this stage                         */
    +    .
    +    SDL_UnlockSurface( surface );
    +    /* Surface is now unlocked */
    +    .
    +    .
    +

    Return Value

    SDL_LockSurface returns 0, +or -1 if the surface couldn't be locked.


    PrevHomeNext
    SDL_FreeSurfaceUpSDL_UnlockSurface
    \ No newline at end of file diff --git a/docs/html/sdllockyuvoverlay.html b/docs/html/sdllockyuvoverlay.html new file mode 100644 index 000000000..e95007861 --- /dev/null +++ b/docs/html/sdllockyuvoverlay.html @@ -0,0 +1,244 @@ +SDL_LockYUVOverlay
    SDL Library Documentation
    PrevNext

    SDL_LockYUVOverlay

    Name

    SDL_LockYUVOverlay -- Lock an overlay

    Synopsis

    #include "SDL.h"

    int SDL_LockYUVOverlay(SDL_Overlay *overlay);

    Description

    Much the same as SDL_LockSurface, SDL_LockYUVOverlay locks the overlay for direct access to pixel data.

    Return Value

    Returns 0 on success, or -1 on an error.


    PrevHomeNext
    SDL_CreateYUVOverlayUpSDL_UnlockYUVOverlay
    \ No newline at end of file diff --git a/docs/html/sdlmaprgb.html b/docs/html/sdlmaprgb.html new file mode 100644 index 000000000..dd8b2e751 --- /dev/null +++ b/docs/html/sdlmaprgb.html @@ -0,0 +1,246 @@ +SDL_MapRGB
    SDL Library Documentation
    PrevNext

    SDL_MapRGB

    Name

    SDL_MapRGB -- Map a RGB color value to a pixel format.

    Synopsis

    #include "SDL.h"

    Uint32 SDL_MapRGB(SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b);

    Description

    Maps the RGB color value to the specified pixel format and returns the +pixel value as a 32-bit int.

    If the format has a palette (8-bit) the index of the closest matching +color in the palette will be returned.

    If the specified pixel format has an alpha component it will be returned +as all 1 bits (fully opaque).

    Return Value

    A pixel value best approximating the given RGB color value for a given +pixel format. If the pixel format bpp (color depth) is less than 32-bpp +then the unused upper bits of the return value can safely be ignored +(e.g., with a 16-bpp format the return value can be assigned to a +Uint16, and similarly a Uint8 for an 8-bpp +format).


    PrevHomeNext
    SDL_SetGammaRampUpSDL_MapRGBA
    \ No newline at end of file diff --git a/docs/html/sdlmaprgba.html b/docs/html/sdlmaprgba.html new file mode 100644 index 000000000..64ec3c4bf --- /dev/null +++ b/docs/html/sdlmaprgba.html @@ -0,0 +1,234 @@ +SDL_MapRGBA
    SDL Library Documentation
    PrevNext

    SDL_MapRGBA

    Name

    SDL_MapRGBA -- Map a RGBA color value to a pixel format.

    Synopsis

    #include "SDL.h"

    Uint32 SDL_MapRGBA(SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b, Uint8 a);

    Description

    Maps the RGBA color value to the specified pixel format and returns the +pixel value as a 32-bit int.

    If the format has a palette (8-bit) the index of the closest matching +color in the palette will be returned.

    If the specified pixel format has no alpha component the alpha value +will be ignored (as it will be in formats with a palette).

    Return Value

    A pixel value best approximating the given RGBA color value for a given +pixel format. If the pixel format bpp (color depth) is less than 32-bpp +then the unused upper bits of the return value can safely be ignored +(e.g., with a 16-bpp format the return value can be assigned to a +Uint16, and similarly a Uint8 for an 8-bpp +format).


    PrevHomeNext
    SDL_MapRGBUpSDL_GetRGB
    \ No newline at end of file diff --git a/docs/html/sdlmixaudio.html b/docs/html/sdlmixaudio.html new file mode 100644 index 000000000..a35398b21 --- /dev/null +++ b/docs/html/sdlmixaudio.html @@ -0,0 +1,210 @@ +SDL_MixAudio
    SDL Library Documentation
    PrevNext

    SDL_MixAudio

    Name

    SDL_MixAudio -- Mix audio data

    Synopsis

    #include "SDL.h"

    void SDL_MixAudio(Uint8 *dst, Uint8 *src, Uint32 len, int volume);

    Description

    This takes two audio buffers of the playing audio format and mixes +them, performing addition, volume adjustment, and overflow clipping. +The volume ranges from 0 - 128, +and should be set to SDL_MIX_MAXVOLUME +for full audio volume. Note this does not change hardware volume. +This is provided for convenience -- you can mix your own audio data.


    PrevHomeNext
    SDL_ConvertAudioUpSDL_LockAudio
    \ No newline at end of file diff --git a/docs/html/sdlmousebuttonevent.html b/docs/html/sdlmousebuttonevent.html new file mode 100644 index 000000000..98138c5ba --- /dev/null +++ b/docs/html/sdlmousebuttonevent.html @@ -0,0 +1,338 @@ +SDL_MouseButtonEvent
    SDL Library Documentation
    PrevNext

    SDL_MouseButtonEvent

    Name

    SDL_MouseButtonEvent -- Mouse button event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 button;
    +  Uint8 state;
    +  Uint16 x, y;
    +} SDL_MouseButtonEvent;

    Structure Data

    typeSDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP
    buttonThe mouse button index (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT)
    stateSDL_PRESSED or SDL_RELEASED
    x, yThe X/Y coordinates of the mouse at press/release time

    Description

    SDL_MouseButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP is reported.

    When a mouse button press or release is detected then number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into button, the position of the mouse when this event occured is stored in the x and the y fields. Like SDL_KeyboardEvent, information on whether the event was a press or a release event is stored in both the type and state fields, but this should be obvious.


    PrevHomeNext
    SDL_MouseMotionEventUpSDL_JoyAxisEvent
    \ No newline at end of file diff --git a/docs/html/sdlmousemotionevent.html b/docs/html/sdlmousemotionevent.html new file mode 100644 index 000000000..a463d36b4 --- /dev/null +++ b/docs/html/sdlmousemotionevent.html @@ -0,0 +1,357 @@ +SDL_MouseMotionEvent
    SDL Library Documentation
    PrevNext

    SDL_MouseMotionEvent

    Name

    SDL_MouseMotionEvent -- Mouse motion event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  Uint8 state;
    +  Uint16 x, y;
    +  Sint16 xrel, yrel;
    +} SDL_MouseMotionEvent;

    Structure Data

    typeSDL_MOUSEMOTION
    stateThe current button state
    x, yThe X/Y coordinates of the mouse
    xrel, yrelRelative motion in the X/Y direction

    Description

    SDL_MouseMotionEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEMOTION is reported.

    Simply put, a SDL_MOUSEMOTION type event occurs when a user moves the mouse within the application window or when SDL_WarpMouse is called. Both the absolute (x and y) and relative (xrel and yrel) coordinates are reported along with the current button states (state). The button state can be interpreted using the SDL_BUTTON macro (see SDL_GetMouseState).

    If the cursor is hidden (SDL_ShowCursor(0)) and the input is grabbed (SDL_WM_GrabInput(SDL_GRAB_ON)), then the mouse will give relative motion events even when the cursor reaches the edge fo the screen. This is currently only implemented on Windows and Linux/Unix-a-likes.


    PrevHomeNext
    SDL_KeyboardEventUpSDL_MouseButtonEvent
    \ No newline at end of file diff --git a/docs/html/sdlmutexp.html b/docs/html/sdlmutexp.html new file mode 100644 index 000000000..a6160c97e --- /dev/null +++ b/docs/html/sdlmutexp.html @@ -0,0 +1,233 @@ +SDL_mutexP
    SDL Library Documentation
    PrevNext

    SDL_mutexP

    Name

    SDL_mutexP -- Lock a mutex

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_mutexP(SDL_mutex *mutex);

    Description

    Locks the mutex, which was previously created with SDL_CreateMutex. If the mutex is already locked then SDL_mutexP will not return until it is unlocked. Returns 0 on success, or -1 on an error.

    SDL also defines a macro #define SDL_LockMutex(m) SDL_mutexP(m).


    PrevHomeNext
    SDL_DestroyMutexUpSDL_mutexV
    \ No newline at end of file diff --git a/docs/html/sdlmutexv.html b/docs/html/sdlmutexv.html new file mode 100644 index 000000000..0458396b8 --- /dev/null +++ b/docs/html/sdlmutexv.html @@ -0,0 +1,227 @@ +SDL_mutexV
    SDL Library Documentation
    PrevNext

    SDL_mutexV

    Name

    SDL_mutexV -- Unlock a mutex

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_mutexV(SDL_mutex *mutex);

    Description

    Unlocks the mutex, which was previously created with SDL_CreateMutex. Returns 0 on success, or -1 on an error.

    SDL also defines a macro #define SDL_UnlockMutex(m) SDL_mutexV(m).


    PrevHomeNext
    SDL_mutexPUpSDL_CreateSemaphore
    \ No newline at end of file diff --git a/docs/html/sdlnumjoysticks.html b/docs/html/sdlnumjoysticks.html new file mode 100644 index 000000000..346f9c7d5 --- /dev/null +++ b/docs/html/sdlnumjoysticks.html @@ -0,0 +1,214 @@ +SDL_NumJoysticks
    SDL Library Documentation
    PrevNext

    SDL_NumJoysticks

    Name

    SDL_NumJoysticks -- Count available joysticks.

    Synopsis

    #include "SDL.h"

    int SDL_NumJoysticks(void);

    Description

    Counts the number of joysticks attached to the system.

    Return Value

    Returns the number of attached joysticks


    PrevHomeNext
    JoystickUpSDL_JoystickName
    \ No newline at end of file diff --git a/docs/html/sdlopenaudio.html b/docs/html/sdlopenaudio.html new file mode 100644 index 000000000..695caa2ce --- /dev/null +++ b/docs/html/sdlopenaudio.html @@ -0,0 +1,567 @@ +SDL_OpenAudio
    SDL Library Documentation
    PrevNext

    SDL_OpenAudio

    Name

    SDL_OpenAudio -- Opens the audio device with the desired parameters.

    Synopsis

    #include "SDL.h"

    int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);

    Description

    This function opens the audio device with the desired parameters, and +returns 0 if successful, placing the actual hardware parameters in the +structure pointed to by obtained. If obtained is NULL, the audio +data passed to the callback function will be guaranteed to be in the +requested format, and will be automatically converted to the hardware +audio format if necessary. This function returns -1 if it failed +to open the audio device, or couldn't set up the audio thread.

    To open the audio device a desired SDL_AudioSpec must be created. +

    SDL_AudioSpec *desired;
    +.
    +.
    +desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
    +You must then fill this structure with your desired audio specifications.

    desired->freq

    The desired audio frequency in samples-per-second.

    desired->format

    The desired audio format (see SDL_AudioSpec)

    desired->samples

    The desired size of the audio buffer in samples. This number should be a power of two, and may be adjusted by the audio driver to a value more suitable for the hardware. Good values seem to range between 512 and 8192 inclusive, depending on the application and CPU speed. Smaller values yield faster response time, but can lead to underflow if the application is doing heavy processing and cannot fill the audio buffer in time. A stereo sample consists of both right and left channels in LR ordering. Note that the number of samples is directly related to time by the following formula: ms = (samples*1000)/freq

    desired->callback

    This should be set to a function that will be called when the audio device is ready for more data. It is passed a pointer to the audio buffer, and the length in bytes of the audio buffer. This function usually runs in a separate thread, and so you should protect data structures that it accesses by calling SDL_LockAudio and SDL_UnlockAudio in your code. The callback prototype is: +

    void callback(void *userdata, Uint8 *stream, int len);
    +userdata is the pointer stored in userdata field of the SDL_AudioSpec. stream is a pointer to the audio buffer you want to fill with information and len is the length of the audio buffer in bytes.

    desired->userdata

    This pointer is passed as the first parameter to the callback function.

    SDL_OpenAudio reads these fields from the desired SDL_AudioSpec structure pass to the function and attempts to find an audio configuration matching your desired. As mentioned above, if the obtained parameter is NULL then SDL with convert from your desired audio settings to the hardware settings as it plays.

    If obtained is NULL then the desired SDL_AudioSpec is your working specification, otherwise the obtained SDL_AudioSpec becomes the working specification and the desirec specification can be deleted. The data in the working specification is used when building SDL_AudioCVT's for converting loaded data to the hardware format.

    SDL_OpenAudio calculates the size and silence fields for both the desired and obtained specifications. The size field stores the total size of the audio buffer in bytes, while the silence stores the value used to represent silence in the audio buffer

    The audio device starts out playing silence when it's opened, and should be enabled for playing by calling SDL_PauseAudio(0) when you are ready for your audio callback function to be called. Since the audio driver may modify the requested size of the audio buffer, you should allocate any local mixing buffers after you open the audio device.

    Examples

    /* Prototype of our callback function */
    +void my_audio_callback(void *userdata, Uint8 *stream, int len);
    +
    +/* Open the audio device */
    +SDL_AudioSpec *desired, *obtained;
    +SDL_AudioSpec *hardware_spec;
    +
    +/* Allocate a desired SDL_AudioSpec */
    +desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
    +
    +/* Allocate space for the obtained SDL_AudioSpec */
    +obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));
    +
    +/* 22050Hz - FM Radio quality */
    +desired->freq=22050;
    +
    +/* 16-bit signed audio */
    +desired->format=AUDIO_S16LSB;
    +
    +/* Large audio buffer reduces risk of dropouts but increases response time */
    +desired->samples=8192;
    +
    +/* Our callback function */
    +desired->callback=my_audio_callback;
    +
    +desired->userdata=NULL;
    +
    +/* Open the audio device */
    +if ( SDL_OpenAudio(desired, obtained) < 0 ){
    +  fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
    +  exit(-1);
    +}
    +/* desired spec is no longer needed */
    +free(desired);
    +hardware_spec=obtained;
    +.
    +.
    +/* Prepare callback for playing */
    +.
    +.
    +.
    +/* Start playing */
    +SDL_PauseAudio(0);

    PrevHomeNext
    SDL_AudioSpecUpSDL_PauseAudio
    \ No newline at end of file diff --git a/docs/html/sdloverlay.html b/docs/html/sdloverlay.html new file mode 100644 index 000000000..670dce700 --- /dev/null +++ b/docs/html/sdloverlay.html @@ -0,0 +1,354 @@ +SDL_Overlay
    SDL Library Documentation
    PrevNext

    SDL_Overlay

    Name

    SDL_Overlay -- YUV video overlay

    Structure Definition

    typedef struct{
    +  Uint32 format;
    +  int w, h;
    +  int planes;
    +  Uint16 *pitches;
    +  Uint8 **pixels;
    +  Uint32 hw_overlay:1;
    +} SDL_Overlay;

    Structure Data

    formatOverlay format (see below)
    w, hWidth and height of overlay
    planesNumber of planes in the overlay. Usually either 1 or 3
    pitchesAn array of pitches, one for each plane. Pitch is the length of a row in bytes.
    pixelsAn array of pointers to teh data of each plane. The overlay should be locked before these pointers are used.
    hw_overlayThis will be set to 1 if the overlay is hardware accelerated.

    Description

    A SDL_Overlay is similar to a SDL_Surface except it stores a YUV overlay. All the fields are read only, except for pixels which should be locked before use. The format field stores the format of the overlay which is one of the following: +

    #define SDL_YV12_OVERLAY  0x32315659  /* Planar mode: Y + V + U */
    +#define SDL_IYUV_OVERLAY  0x56555949  /* Planar mode: Y + U + V */
    +#define SDL_YUY2_OVERLAY  0x32595559  /* Packed mode: Y0+U0+Y1+V0 */
    +#define SDL_UYVY_OVERLAY  0x59565955  /* Packed mode: U0+Y0+V0+Y1 */
    +#define SDL_YVYU_OVERLAY  0x55595659  /* Packed mode: Y0+V0+Y1+U0 */
    +More information on YUV formats can be found at http://www.webartz.com/fourcc/indexyuv.htm.


    PrevHomeNext
    SDL_VideoInfoUpWindow Management
    \ No newline at end of file diff --git a/docs/html/sdlpalette.html b/docs/html/sdlpalette.html new file mode 100644 index 000000000..7af009988 --- /dev/null +++ b/docs/html/sdlpalette.html @@ -0,0 +1,293 @@ +SDL_Palette
    SDL Library Documentation
    PrevNext

    SDL_Palette

    Name

    SDL_Palette -- Color palette for 8-bit pixel formats

    Structure Definition

    typedef struct{
    +  int ncolors;
    +  SDL_Color *colors;
    +} SDL_Palette;

    Structure Data

    ncolorsNumber of colors used in this palette
    colorsPointer to SDL_Color structures that make up the palette.

    Description

    Each pixel in an 8-bit surface is an index into the colors field of the SDL_Palette structure store in SDL_PixelFormat. A SDL_Palette should never need to be created manually. It is automatically created when SDL allocates a SDL_PixelFormat for a surface. The colors values of a SDL_Surfaces palette can be set with the SDL_SetColors.


    PrevHomeNext
    SDL_ColorUpSDL_PixelFormat
    \ No newline at end of file diff --git a/docs/html/sdlpauseaudio.html b/docs/html/sdlpauseaudio.html new file mode 100644 index 000000000..d22e43ea5 --- /dev/null +++ b/docs/html/sdlpauseaudio.html @@ -0,0 +1,213 @@ +SDL_PauseAudio
    SDL Library Documentation
    PrevNext

    SDL_PauseAudio

    Name

    SDL_PauseAudio -- Pauses and unpauses the audio callback processing

    Synopsis

    #include "SDL.h"

    void SDL_PauseAudio(int pause_on);

    Description

    This function pauses and unpauses the audio callback processing. +It should be called with pause_on=0 after opening the audio +device to start playing sound. This is so you can safely initialize +data for your callback function after opening the audio device. +Silence will be written to the audio device during the pause.


    PrevHomeNext
    SDL_OpenAudioUpSDL_GetAudioStatus
    \ No newline at end of file diff --git a/docs/html/sdlpeepevents.html b/docs/html/sdlpeepevents.html new file mode 100644 index 000000000..49fdaa4ef --- /dev/null +++ b/docs/html/sdlpeepevents.html @@ -0,0 +1,296 @@ +SDL_PeepEvents
    SDL Library Documentation
    PrevNext

    SDL_PeepEvents

    Name

    SDL_PeepEvents -- Checks the event queue for messages and optionally returns them.

    Synopsis

    #include "SDL.h"

    int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 mask);

    Description

    Checks the event queue for messages and optionally returns them.

    If action is SDL_ADDEVENT, up to +numevents events will be added to the back of the event + queue.

    If action is SDL_PEEKEVENT, up to +numevents events at the front of the event queue, +matching mask, +will be returned and will not be removed from the queue.

    If action is SDL_GETEVENT, up to +numevents events at the front of the event queue, +matching mask, +will be returned and will be removed from the queue.

    This function is thread-safe.

    Return Value

    This function returns the number of events actually stored, or +-1 if there was an error.


    PrevHomeNext
    SDL_PumpEventsUpSDL_PollEvent
    \ No newline at end of file diff --git a/docs/html/sdlpixelformat.html b/docs/html/sdlpixelformat.html new file mode 100644 index 000000000..8608dda58 --- /dev/null +++ b/docs/html/sdlpixelformat.html @@ -0,0 +1,514 @@ +SDL_PixelFormat
    SDL Library Documentation
    PrevNext

    SDL_PixelFormat

    Name

    SDL_PixelFormat -- Stores surface format information

    Structure Definition

    typedef struct{
    +  SDL_Palette *palette;
    +  Uint8  BitsPerPixel;
    +  Uint8  BytesPerPixel;
    +  Uint32 Rmask, Gmask, Bmask, Amask;
    +  Uint8  Rshift, Gshift, Bshift, Ashift;
    +  Uint8  Rloss, Gloss, Bloss, Aloss;
    +  Uint32 colorkey;
    +  Uint8  alpha;
    +} SDL_PixelFormat;

    Structure Data

    palettePointer to the palette, or NULL if the BitsPerPixel>8
    BitsPerPixelThe number of bits used to represent each pixel in a surface. Usually 8, 16, 24 or 32.
    BytesPerPixelThe number of bytes used to represent each pixel in a surface. Usually one to four.
    [RGBA]maskBinary mask used to retrieve individual color values
    [RGBA]lossPrecision loss of each color component (2[RGBA]loss)
    [RGBA]shiftBinary left shift of each color component in the pixel value
    colorkeyPixel value of transparent pixels
    alphaOverall surface alpha value

    Description

    A SDL_PixelFormat describes the format of the pixel data stored at the pixels field of a SDL_Surface. Every surface stores a SDL_PixelFormat in the format field.

    If you wish to do pixel level modifications on a surface, then understanding how SDL stores its color information is essential.

    8-bit pixel formats are the easiest to understand. Since its an 8-bit format, we have 8 BitsPerPixel and 1 BytesPerPixel. Since BytesPerPixel is 1, all pixels are represented by a Uint8 which contains an index into palette->colors. So, to determine the color of a pixel in a 8-bit surface: we read the color index from surface->pixels and we use that index to read the SDL_Color structure from surface->format->palette->colors. Like so: +

    SDL_Surface *surface;
    +SDL_PixelFormat *fmt;
    +SDL_Color *color;
    +Uint8 index;
    +
    +.
    +.
    +
    +/* Create surface */
    +.
    +.
    +fmt=surface->format;
    +
    +/* Check the bitdepth of the surface */
    +if(fmt->BitsPerPixel!=8){
    +  fprintf(stderr, "Not an 8-bit surface.\n");
    +  return(-1);
    +}
    +
    +/* Lock the surface */
    +SDL_LockSurface(surface);
    +
    +/* Get the topleft pixel */
    +index=*(Uint8 *)surface->pixels;
    +color=fmt->palette->colors[index];
    +
    +/* Unlock the surface */
    +SDL_UnlockSurface(surface);
    +printf("Pixel Color-> Red: %d, Green: %d, Blue: %d. Index: %d\n",
    +          color->r, color->g, color->b, index);
    +.
    +.

    Pixel formats above 8-bit are an entirely different experience. They are considered to be "TrueColor" formats and the color information is stored in the pixels themselves, not in a palette (packed-pixel). The mask, shift and loss fields tell us how the color information is encoded. The mask fields allow us to isolate each color component, the shift fields tell us how far left we have to shift the masked value and the loss fields tell us for far right we have to shift the final value to convert it to a full 8-bit color component. +

    /* Extracting color components from a 32-bit color value */
    +SDL_PixelFormat *fmt;
    +SDL_Surface *surface;
    +Uint32 temp, pixel;
    +Uint8 red, green, blue, alpha;
    +.
    +.
    +.
    +fmt=surface->format;
    +SDL_LockSurface(surface);
    +pixel=(Uint32*)surface->pixels;
    +SDL_UnlockSurface(surface);
    +
    +/* Get Red component */
    +temp=pixel&fmt->Rmask; /* Isolate red component */
    +temp=temp>>fmt->Rshift;/* Shift it down to 8-bit */
    +temp=temp<<fmt->Rloss; /* Expand to a full 8-bit number */
    +red=(Uint8)temp;
    +
    +/* Get Green component */
    +temp=pixel&fmt->Gmask; /* Isolate green component */
    +temp=temp>>fmt->Gshift;/* Shift it down to 8-bit */
    +temp=temp<<fmt->Gloss; /* Expand to a full 8-bit number */
    +green=(Uint8)temp;
    +
    +/* Get Blue component */
    +temp=pixel&fmt->Bmask; /* Isolate blue component */
    +temp=temp>>fmt->Bshift;/* Shift it down to 8-bit */
    +temp=temp<<fmt->Bloss; /* Expand to a full 8-bit number */
    +blue=(Uint8)temp;
    +
    +/* Get Alpha component */
    +temp=pixel&fmt->Amask; /* Isolate alpha component */
    +temp=temp>>fmt->Ashift;/* Shift it down to 8-bit */
    +temp=temp<<fmt->Aloss; /* Expand to a full 8-bit number */
    +alpha=(Uint8)temp;
    +
    +printf("Pixel Color -> R: %d,  G: %d,  B: %d,  A: %d\n", red, green, blue, alpha);
    +.
    +.
    +.


    PrevHomeNext
    SDL_PaletteUpSDL_Surface
    \ No newline at end of file diff --git a/docs/html/sdlpollevent.html b/docs/html/sdlpollevent.html new file mode 100644 index 000000000..e775d28d5 --- /dev/null +++ b/docs/html/sdlpollevent.html @@ -0,0 +1,261 @@ +SDL_PollEvent
    SDL Library Documentation
    PrevNext

    SDL_PollEvent

    Name

    SDL_PollEvent -- Polls for currently pending events.

    Synopsis

    #include "SDL.h"

    int SDL_PollEvent(SDL_Event *event);

    Description

    Polls for currently pending events, and returns 1 +if there are any pending events, or 0 if there +are none available.

    If event is not NULL, the next +event is removed from the queue and stored in that area.

    Examples

    SDL_Event event; /* Event structure */
    +
    +.
    +.
    +.
    +/* Check for events */
    +while(SDL_PollEvent(&event)){  /* Loop until there are no events left on the queue */
    +  switch(event.type){  /* Process the appropiate event type */
    +    case SDL_KEYDOWN:  /* Handle a KEYDOWN event */         
    +      printf("Oh! Key press\n");
    +      break;
    +    case SDL_MOUSEMOTION:
    +      .
    +      .
    +      .
    +    default: /* Report an unhandled event */
    +      printf("I don't know what this event is!\n");
    +  }
    +}


    PrevHomeNext
    SDL_PeepEventsUpSDL_WaitEvent
    \ No newline at end of file diff --git a/docs/html/sdlpumpevents.html b/docs/html/sdlpumpevents.html new file mode 100644 index 000000000..9b8372448 --- /dev/null +++ b/docs/html/sdlpumpevents.html @@ -0,0 +1,236 @@ +SDL_PumpEvents
    SDL Library Documentation
    PrevNext

    SDL_PumpEvents

    Name

    SDL_PumpEvents -- Pumps the event loop, gathering events from the input devices.

    Synopsis

    #include "SDL.h"

    void SDL_PumpEvents(void);

    Description

    Pumps the event loop, gathering events from the input devices.

    SDL_PumpEvents gathers all the pending input information from devices and places it on the event queue. Without calls to SDL_PumpEvents no events would ever be placed on the queue. Often calls the need for SDL_PumpEvents is hidden from the user since SDL_PollEvent and SDL_WaitEvent implicitly call SDL_PumpEvents. However, if you are not polling or waiting for events (e.g. your filtering them), then you must call SDL_PumpEvents to force an event queue update.

    Note: You can only call this function in the thread that set the video mode.


    PrevHomeNext
    Event Functions.UpSDL_PeepEvents
    \ No newline at end of file diff --git a/docs/html/sdlpushevent.html b/docs/html/sdlpushevent.html new file mode 100644 index 000000000..efecc2f6f --- /dev/null +++ b/docs/html/sdlpushevent.html @@ -0,0 +1,258 @@ +SDL_PushEvent
    SDL Library Documentation
    PrevNext

    SDL_PushEvent

    Name

    SDL_PushEvent -- Pushes an event onto the event queue

    Synopsis

    #include "SDL.h"

    int SDL_PushEvent(SDL_Event *event);

    Description

    The event queue can actually be used as a two way communication channel. Not only can events be read from the queue, but the user can also push their own events onto it. event is a pointer to the event structure you wish to push onto the queue.

    Note: Pushing device input events onto the queue doesn't modify the state of the device within SDL.

    Return Value

    Returns 0 on success or -1 if the event couldn't be pushed.

    Examples

    See SDL_Event.


    PrevHomeNext
    SDL_WaitEventUpSDL_SetEventFilter
    \ No newline at end of file diff --git a/docs/html/sdlquit.html b/docs/html/sdlquit.html new file mode 100644 index 000000000..c4c76e06b --- /dev/null +++ b/docs/html/sdlquit.html @@ -0,0 +1,236 @@ +SDL_Quit
    SDL Library Documentation
    PrevNext

    SDL_Quit

    Name

    SDL_Quit -- Shut down SDL

    Synopsis

    #include "SDL.h"

    void SDL_Quit(void);

    Description

    SDL_Quit shuts down all SDL subsystems and frees the resources allocated to them. This should always be called before you exit. For the sake of simplicity you can set SDL_Quit as your atexit call, like: +

    SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO);
    +atexit(SDL_Quit);
    +.
    +.

    Note: While using atexit maybe be fine for small programs, more advanced users should shut down SDL in their own cleanup code. Plus, using atexit in a library is a sure way to crash dynamically loaded code


    PrevHomeNext
    SDL_QuitSubSystemUpSDL_WasInit
    \ No newline at end of file diff --git a/docs/html/sdlquitevent.html b/docs/html/sdlquitevent.html new file mode 100644 index 000000000..4fe364147 --- /dev/null +++ b/docs/html/sdlquitevent.html @@ -0,0 +1,255 @@ +SDL_QuitEvent
    SDL Library Documentation
    PrevNext

    SDL_QuitEvent

    Name

    SDL_QuitEvent -- Quit requested event

    Structure Definition

    typedef struct{
    +  Uint8 type
    +} SDL_QuitEvent;

    Structure Data

    typeSDL_QUIT

    Description

    SDL_QuitEvent is a member of the SDL_Event union and is used whan an event of type SDL_QUIT is reported.

    As can be seen, the SDL_QuitEvent structure serves no useful purpose. The event itself, on the other hand, is very important. If you filter out or ignore a quit event then it is impossible for the user to close the window. On the other hand, if you do accept a quit event then the application window will be closed, and screen updates will still report success event though the application will no longer be visible.

    Note: The macro SDL_QuitRequested will return non-zero if a quit event is pending


    PrevHomeNext
    SDL_UserEventUpSDL_keysym
    \ No newline at end of file diff --git a/docs/html/sdlquitsubsystem.html b/docs/html/sdlquitsubsystem.html new file mode 100644 index 000000000..fdc9cfb4a --- /dev/null +++ b/docs/html/sdlquitsubsystem.html @@ -0,0 +1,240 @@ +SDL_QuitSubSystem
    SDL Library Documentation
    PrevNext

    SDL_QuitSubSystem

    Name

    SDL_QuitSubSystem -- Shut down a subsystem

    Synopsis

    #include "SDL.h"

    void SDL_QuitSubSystem(Uint32 flags);

    Description

    SDL_QuitSubSystem allows you to shut down a subsystem that has been previously initialized by SDL_Init or SDL_InitSubSystem. The flags tells SDL_QuitSubSystem which subsystems to shut down, it uses the same values that are passed to SDL_Init.


    PrevHomeNext
    SDL_InitSubSystemUpSDL_Quit
    \ No newline at end of file diff --git a/docs/html/sdlrect.html b/docs/html/sdlrect.html new file mode 100644 index 000000000..1d66be110 --- /dev/null +++ b/docs/html/sdlrect.html @@ -0,0 +1,250 @@ +SDL_Rect
    SDL Library Documentation
    PrevNext

    SDL_Rect

    Name

    SDL_Rect -- Defines a rectangular area

    Structure Definition

    typedef struct{
    +  Sint16 x, y;
    +  Uint16 w, h;
    +} SDL_Rect;

    Structure Data

    x, yPosition of the upper-left corner of the rectangle
    w, hThe width and height of the rectangle

    Description

    A SDL_Rect defines a rectangular area of pixels. It is used by SDL_BlitSurface to define blitting regions and by several other video functions.


    PrevHomeNext
    SDL_GLattrUpSDL_Color
    \ No newline at end of file diff --git a/docs/html/sdlremovetimer.html b/docs/html/sdlremovetimer.html new file mode 100644 index 000000000..25526332f --- /dev/null +++ b/docs/html/sdlremovetimer.html @@ -0,0 +1,228 @@ +SDL_RemoveTimer
    SDL Library Documentation
    PrevNext

    SDL_RemoveTimer

    Name

    SDL_RemoveTimer -- Remove a timer which was added with +SDL_AddTimer.

    Synopsis

    #include "SDL.h"

    SDL_bool SDL_RemoveTimer(SDL_TimerID id);

    Description

    Removes a timer callback previously added with +SDL_AddTimer.

    Return Value

    Returns a boolean value indicating success.

    Examples

    SDL_RemoveTimer(my_timer_id);

    See Also

    SDL_AddTimer


    PrevHomeNext
    SDL_AddTimerUpSDL_SetTimer
    \ No newline at end of file diff --git a/docs/html/sdlresizeevent.html b/docs/html/sdlresizeevent.html new file mode 100644 index 000000000..937e8d28c --- /dev/null +++ b/docs/html/sdlresizeevent.html @@ -0,0 +1,299 @@ +SDL_ResizeEvent
    SDL Library Documentation
    PrevNext

    SDL_ResizeEvent

    Name

    SDL_ResizeEvent -- Window resize event structure

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  int w, h;
    +} SDL_ResizeEvent;

    Structure Data

    typeSDL_VIDEORESIZE
    w, hNew width and height of the window

    Description

    SDL_ResizeEvent is a member of the SDL_Event union and is used when an event of type SDL_VIDEORESIZE is reported.

    When SDL_RESIZABLE is passed as a flag to SDL_SetVideoMode the user is allowed to resize the applications window. When the window is resized an SDL_VIDEORESIZE is report, with the new window width and height values stored in w and h, respectively. When an SDL_VIDEORESIZE is recieved the window should be resized to the new dimensions using SDL_SetVideoMode.


    PrevHomeNext
    SDL_JoyBallEventUpSDL_SysWMEvent
    \ No newline at end of file diff --git a/docs/html/sdlsavebmp.html b/docs/html/sdlsavebmp.html new file mode 100644 index 000000000..f2a43df2b --- /dev/null +++ b/docs/html/sdlsavebmp.html @@ -0,0 +1,228 @@ +SDL_SaveBMP
    SDL Library Documentation
    PrevNext

    SDL_SaveBMP

    Name

    SDL_SaveBMP -- Save an SDL_Surface as a Windows BMP file.

    Synopsis

    #include "SDL.h"

    int SDL_SaveBMP(SDL_Surface *surface, const char *file);

    Description

    Saves the SDL_Surface surface as a Windows BMP file named file.

    Return Value

    Returns 0 if successful or +-1 +if there was an error.

    See Also

    SDL_LoadBMP


    PrevHomeNext
    SDL_LoadBMPUpSDL_SetColorKey
    \ No newline at end of file diff --git a/docs/html/sdlsempost.html b/docs/html/sdlsempost.html new file mode 100644 index 000000000..da6b38f2a --- /dev/null +++ b/docs/html/sdlsempost.html @@ -0,0 +1,291 @@ +SDL_SemPost
    SDL Library Documentation
    PrevNext

    SDL_SemPost

    Name

    SDL_SemPost -- Unlock a semaphore.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_SemPost(SDL_sem *sem);

    Description

    SDL_SemPost unlocks the semaphore pointed to by +sem and atomically increments the semaphores value. +Threads that were blocking on the semaphore may be scheduled after this call +succeeds.

    SDL_SemPost should be called after a semaphore is locked by a successful call to +SDL_SemWait, +SDL_SemTryWait or +SDL_SemWaitTimeout.

    Return Value

    Returns 0 if successful or +-1 if there was an error (leaving the semaphore unchanged).

    Examples

    SDL_SemPost(my_sem);


    PrevHomeNext
    SDL_SemWaitTimeoutUpSDL_SemValue
    \ No newline at end of file diff --git a/docs/html/sdlsemtrywait.html b/docs/html/sdlsemtrywait.html new file mode 100644 index 000000000..ab1a370e3 --- /dev/null +++ b/docs/html/sdlsemtrywait.html @@ -0,0 +1,311 @@ +SDL_SemTryWait
    SDL Library Documentation
    PrevNext

    SDL_SemTryWait

    Name

    SDL_SemTryWait -- Attempt to lock a semaphore but don't suspend the thread.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_SemTryWait(SDL_sem *sem);

    Description

    SDL_SemTryWait is a non-blocking varient of +SDL_SemWait. If the value of the semaphore +pointed to by sem is positive it will atomically +decrement the semaphore value and return 0, otherwise it will return +SDL_MUTEX_TIMEOUT instead of suspending the thread.

    After SDL_SemTryWait is successful, the semaphore +can be released and its count atomically incremented by a successful call to +SDL_SemPost.

    Return Value

    Returns 0 if the semaphore was successfully locked or +either SDL_MUTEX_TIMEOUT or -1 +if the thread would have suspended or there was an error, respectivly.

    If the semaphore was not successfully locked, the semaphore will be unchanged.

    Examples

    res = SDL_SemTryWait(my_sem);
    +
    +if (res == SDL_MUTEX_TIMEOUT) {
    +        return TRY_AGAIN;
    +}
    +if (res == -1) {
    +        return WAIT_ERROR;
    +}
    +
    +...
    +
    +SDL_SemPost(my_sem);


    PrevHomeNext
    SDL_SemWaitUpSDL_SemWaitTimeout
    \ No newline at end of file diff --git a/docs/html/sdlsemvalue.html b/docs/html/sdlsemvalue.html new file mode 100644 index 000000000..51fada4f3 --- /dev/null +++ b/docs/html/sdlsemvalue.html @@ -0,0 +1,265 @@ +SDL_SemValue
    SDL Library Documentation
    PrevNext

    SDL_SemValue

    Name

    SDL_SemValue -- Return the current value of a semaphore.

    Synopsis

    #include "SDL.h"
    +#include "SDL/SDL_thread.h"

    Uint32 SDL_SemValue(SDL_sem *sem);

    Description

    SDL_SemValue() returns the current semaphore value from +the semaphore pointed to by sem.

    Return Value

    Returns current value of the semaphore.

    Examples

      sem_value = SDL_SemValue(my_sem);


    PrevHomeNext
    SDL_SemPostUpSDL_CreateCond
    \ No newline at end of file diff --git a/docs/html/sdlsemwait.html b/docs/html/sdlsemwait.html new file mode 100644 index 000000000..a6fc2591f --- /dev/null +++ b/docs/html/sdlsemwait.html @@ -0,0 +1,290 @@ +SDL_SemWait
    SDL Library Documentation
    PrevNext

    SDL_SemWait

    Name

    SDL_SemWait -- Lock a semaphore and suspend the thread if the semaphore value is zero.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_SemWait(SDL_sem *sem);

    Description

    SDL_SemWait() suspends the calling thread until either +the semaphore pointed to by sem has a positive value, +the call is interrupted by a signal or error. If the call is successful it +will atomically decrement the semaphore value.

    After SDL_SemWait() is successful, the semaphore +can be released and its count atomically incremented by a successful call to +SDL_SemPost.

    Return Value

    Returns 0 if successful or +-1 if there was an error (leaving the semaphore unchanged).

    Examples

    if (SDL_SemWait(my_sem) == -1) {
    +        return WAIT_FAILED;
    +}
    +
    +...
    +
    +SDL_SemPost(my_sem);


    PrevHomeNext
    SDL_DestroySemaphoreUpSDL_SemTryWait
    \ No newline at end of file diff --git a/docs/html/sdlsemwaittimeout.html b/docs/html/sdlsemwaittimeout.html new file mode 100644 index 000000000..7d9486acf --- /dev/null +++ b/docs/html/sdlsemwaittimeout.html @@ -0,0 +1,314 @@ +SDL_SemWaitTimeout
    SDL Library Documentation
    PrevNext

    SDL_SemWaitTimeout

    Name

    SDL_SemWaitTimeout -- Lock a semaphore, but only wait up to a specified maximum time.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout);

    Description

    SDL_SemWaitTimeout() is a varient of +SDL_SemWait +with a maximum timeout value. +If the value of the semaphore pointed to by sem is +positive (greater than zero) it will atomically decrement the semaphore value +and return 0, otherwise it will wait up to timeout +milliseconds trying to lock the semaphore. This function is to be avoided if +possible since on some platforms it is implemented by polling the semaphore +every millisecond in a busy loop.

    After SDL_SemWaitTimeout() is successful, the semaphore +can be released and its count atomically incremented by a successful call to +SDL_SemPost.

    Return Value

    Returns 0 if the semaphore was successfully locked or +either SDL_MUTEX_TIMEOUT or -1 +if the timeout period was exceeded or there was an error, respectivly.

    If the semaphore was not successfully locked, the semaphore will be unchanged.

    Examples

    res = SDL_SemWaitTimeout(my_sem, WAIT_TIMEOUT_MILLISEC);
    +
    +if (res == SDL_MUTEX_TIMEOUT) {
    +        return TRY_AGAIN;
    +}
    +if (res == -1) {
    +        return WAIT_ERROR;
    +}
    +
    +...
    +
    +SDL_SemPost(my_sem);


    PrevHomeNext
    SDL_SemTryWaitUpSDL_SemPost
    \ No newline at end of file diff --git a/docs/html/sdlsetalpha.html b/docs/html/sdlsetalpha.html new file mode 100644 index 000000000..993bb0084 --- /dev/null +++ b/docs/html/sdlsetalpha.html @@ -0,0 +1,440 @@ +SDL_SetAlpha
    SDL Library Documentation
    PrevNext

    SDL_SetAlpha

    Name

    SDL_SetAlpha -- Adjust the alpha properties of a surface

    Synopsis

    #include "SDL.h"

    int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);

    Description

    Note: This function and the semantics of SDL alpha blending have changed since version 1.1.4. Up until version 1.1.5, an alpha value of 0 was considered opaque and a value of 255 was considered transparent. This has now been inverted: 0 (SDL_ALPHA_TRANSPARENT) is now considered transparent and 255 (SDL_ALPHA_OPAQUE) is now considered opaque.

    SDL_SetAlpha is used for setting the per-surface alpha and/or enabling and disabling per-pixel alpha blending.

    The surface parameter specifies which surface whose alpha attributes you wish to adjust. flags is used to specify whether alpha blending should be used (SDL_SRCALPHA) and whether the surface should use RLE acceleration for blitting (SDL_RLEACCEL). flags can be an OR'd combination of these two options, one of these options or 0. If SDL_SRCALPHA is not passed as a flag then all alpha information is ignored when blitting the surface. The alpha parameter is the per-surface alpha value, a surface need not have an alpha channel to use per-surface alpha and blitting can still be accelerated with SDL_RLEACCEL. Setting the per-surface alpha value to 0 disables per-surface alpha blending.

    Note: The per-surface alpha value of 128 is considered a special case and is optimised, so it's much faster than other per-surface values.

    Alpha effects surface blitting in the following ways:

    RGBA->RGB with SDL_SRCALPHA

    The source is alpha-blended with the destination, using the alpha channel. SDL_SRCCOLORKEY and the per-surface alpha are ignored.

    RGBA->RGB without SDL_SRCALPHA

    The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored.

    RGB->RGBA with SDL_SRCALPHA

    The source is alpha-blended with the destination using the per-surface alpha value. If SDL_SRCCOLORKEYliteral> is set, only the pixels not matching the colorkey value are copied.

    RGB->RGBA without SDL_SRCALPHA

    The RGB data is copied from the source and the destination alpha is zero to opaque. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.

    RGBA->RGBA with SDL_SRCALPHA

    The source is alpha-blended with the destination using the source alpha channel. The alpha channel in the destination surface is left untouched. SDL_SRCCOLORKEY is ignored.

    RGBA->RGBA without SDL_SRCALPHA

    The RGBA data is copied to the destination surface. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.

    RGB->RGB with SDL_SRCALPHA

    The source is alpha-blended with the destination using the per-surface alpha value. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.

    RGB->RGB without SDL_SRCALPHA

    The RGB data is copied from the source. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.


    PrevHomeNext
    SDL_SetColorKeyUpSDL_SetClipRect
    \ No newline at end of file diff --git a/docs/html/sdlsetcliprect.html b/docs/html/sdlsetcliprect.html new file mode 100644 index 000000000..edabdc65a --- /dev/null +++ b/docs/html/sdlsetcliprect.html @@ -0,0 +1,233 @@ +SDL_SetClipRect
    SDL Library Documentation
    PrevNext

    SDL_SetClipRect

    Name

    SDL_SetClipRect -- Sets the clipping rectangle for a surface.

    Synopsis

    #include "SDL.h"

    void SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect);

    Description

    Sets the clipping rectangle for a surface. When this surface is the +destination of a blit, only the area within the clip rectangle will be +drawn into.

    The rectangle pointed to by rect will be +clipped to the edges of the surface so that the clip rectangle for a +surface can never fall outside the edges of the surface.

    If rect is NULL the clipping +rectangle will be set to the full size of the surface.


    PrevHomeNext
    SDL_SetAlphaUpSDL_GetClipRect
    \ No newline at end of file diff --git a/docs/html/sdlsetcolorkey.html b/docs/html/sdlsetcolorkey.html new file mode 100644 index 000000000..d0241808c --- /dev/null +++ b/docs/html/sdlsetcolorkey.html @@ -0,0 +1,313 @@ +SDL_SetColorKey
    SDL Library Documentation
    PrevNext

    SDL_SetColorKey

    Name

    SDL_SetColorKey -- Sets the color key (transparent pixel) in a blittable surface and +RLE acceleration.

    Synopsis

    #include "SDL.h"

    int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key);

    Description

    Sets the color key (transparent pixel) in a blittable surface and enables or + disables RLE blit acceleration.

    RLE acceleration can substantially speed up blitting of images with large +horizontal runs of transparent pixels (i.e., pixels that match the +key value). The key must be of the same pixel format as the surface, SDL_MapRGB is often useful for obtaining an acceptable value.

    If flag is SDL_SRCCOLORKEY then +key is the transparent pixel value in the source image of a +blit.

    If flag is OR'd with +SDL_RLEACCEL then the surface will be draw using RLE +acceleration when drawn with +SDL_BlitSurface. The surface will +actually be encoded for RLE acceleration the first time +SDL_BlitSurface or +SDL_DisplayFormat is called on the +surface.

    If flag is 0, this function clears +any current color key.

    Return Value

    This function returns 0, or +-1 if there was an error.


    PrevHomeNext
    SDL_SaveBMPUpSDL_SetAlpha
    \ No newline at end of file diff --git a/docs/html/sdlsetcolors.html b/docs/html/sdlsetcolors.html new file mode 100644 index 000000000..92c037e47 --- /dev/null +++ b/docs/html/sdlsetcolors.html @@ -0,0 +1,350 @@ +SDL_SetColors
    SDL Library Documentation
    PrevNext

    SDL_SetColors

    Name

    SDL_SetColors -- Sets a portion of the colormap for the given 8-bit surface.

    Synopsis

    #include "SDL.h"

    int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors);

    Description

    Sets a portion of the colormap for the given 8-bit surface.

    When surface is the surface associated with the current +display, the display colormap will be updated with the requested colors. If +SDL_HWPALETTE was set in SDL_SetVideoMode flags, +SDL_SetColors will always return 1, +and the palette is guaranteed to be set the way you desire, even if the window +colormap has to be warped or run under emulation.

    The color components of a +SDL_Color +structure are 8-bits in size, giving you a total of 2563 +=16777216 colors.

    Palettized (8-bit) screen surfaces with the SDL_HWPALETTE +flag have two palettes, a logical palette that is used for mapping blits +to/from the surface and a physical palette (that determines how the +hardware will map the colors to the display). SDL_SetColors +modifies both palettes (if present), and is equivalent to calling +SDL_SetPalette with the +flags set to +(SDL_LOGPAL | SDL_PHYSPAL).

    Return Value

    If surface is not a palettized surface, this function +does nothing, returning 0. If all of the colors were set +as passed to SDL_SetColors, it will return +1. If not all the color entries were set exactly as +given, it will return 0, and you should look at the +surface palette to determine the actual color palette.

    Example

    /* Create a display surface with a grayscale palette */
    +SDL_Surface *screen;
    +SDL_Color colors[256];
    +int i;
    +.
    +.
    +.
    +/* Fill colors with color information */
    +for(i=0;i<256;i++){
    +  colors[i].r=i;
    +  colors[i].g=i;
    +  colors[i].b=i;
    +}
    +
    +/* Create display */
    +screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE);
    +if(!screen){
    +  printf("Couldn't set video mode: %s\n", SDL_GetError());
    +  exit(-1);
    +}
    +
    +/* Set palette */
    +SDL_SetColors(screen, colors, 0, 256);
    +.
    +.
    +.
    +.

    PrevHomeNext
    SDL_FlipUpSDL_SetPalette
    \ No newline at end of file diff --git a/docs/html/sdlsetcursor.html b/docs/html/sdlsetcursor.html new file mode 100644 index 000000000..f36ac4712 --- /dev/null +++ b/docs/html/sdlsetcursor.html @@ -0,0 +1,214 @@ +SDL_SetCursor
    SDL Library Documentation
    PrevNext

    SDL_SetCursor

    Name

    SDL_SetCursor -- Set the currently active mouse cursor.

    Synopsis

    #include "SDL.h"

    void *SDL_SetCursor(SDL_Cursor *cursor);

    Description

    Sets the currently active cursor to +the specified one. +If the cursor is currently visible, the change will be immediately +represented on the display.


    PrevHomeNext
    SDL_FreeCursorUpSDL_GetCursor
    \ No newline at end of file diff --git a/docs/html/sdlseteventfilter.html b/docs/html/sdlseteventfilter.html new file mode 100644 index 000000000..4b5fe0f21 --- /dev/null +++ b/docs/html/sdlseteventfilter.html @@ -0,0 +1,273 @@ +SDL_SetEventFilter
    SDL Library Documentation
    PrevNext

    SDL_SetEventFilter

    Name

    SDL_SetEventFilter -- Sets up a filter to process all events before they are posted +to the event queue.

    Synopsis

    #include "SDL.h"

    void SDL_SetEventFilter(SDL_EventFilter filter);

    Description

    This function sets up a filter to process all events before they are posted +to the event queue. This is a very powerful and flexible feature. The filter +is prototyped as: +

    typedef int (*SDL_EventFilter)(const SDL_Event *event);
    +If the filter returns 1, then the event will be +added to the internal queue. If it returns 0, +then the event will be dropped from the queue. This allows selective +filtering of dynamically.

    There is one caveat when dealing with the SDL_QUITEVENT event type. The +event filter is only called when the window manager desires to close the +application window. If the event filter returns 1, then the window will +be closed, otherwise the window will remain open if possible. +If the quit event is generated by an interrupt signal, it will bypass the +internal queue and be delivered to the application at the next event poll.

    Note: Events pushed onto the queue with SDL_PushEvent or SDL_PeepEvents do not get passed through the event filter.

    Note: Be Careful! The event filter function may run in a different thread so be careful what you do within it.


    PrevHomeNext
    SDL_PushEventUpSDL_GetEventFilter
    \ No newline at end of file diff --git a/docs/html/sdlsetgamma.html b/docs/html/sdlsetgamma.html new file mode 100644 index 000000000..b6c036725 --- /dev/null +++ b/docs/html/sdlsetgamma.html @@ -0,0 +1,223 @@ +SDL_SetGamma
    SDL Library Documentation
    PrevNext

    SDL_SetGamma

    Name

    SDL_SetGamma -- Sets the color gamma function for the display

    Synopsis

    #include "SDL.h"

    int SDL_SetGamma(float redgamma, float greengamma, float bluegamma);

    Description

    Sets the "gamma function" for the display of each color component. Gamma +controls the brightness/contrast of colors displayed on the screen. +A gamma value of 1.0 is identity (i.e., no adjustment +is made).

    This function adjusts the gamma based on the "gamma function" parameter, +you can directly specify lookup tables for gamma adjustment with +SDL_SetGammaRamp.

    Not all display hardware is able to change gamma.

    Return Value

    Returns -1 on error (or if gamma adjustment is not supported).


    PrevHomeNext
    SDL_SetPaletteUpSDL_GetGammaRamp
    \ No newline at end of file diff --git a/docs/html/sdlsetgammaramp.html b/docs/html/sdlsetgammaramp.html new file mode 100644 index 000000000..d29747fb6 --- /dev/null +++ b/docs/html/sdlsetgammaramp.html @@ -0,0 +1,222 @@ +SDL_SetGammaRamp
    SDL Library Documentation
    PrevNext

    SDL_SetGammaRamp

    Name

    SDL_SetGammaRamp -- Sets the color gamma lookup tables for the display

    Synopsis

    #include "SDL.h"

    int SDL_SetGammaRamp(Uint16 *redtable, Uint16 *greentable, Uint16 *bluetable);

    Description

    Sets the gamma lookup tables for the display for each color component. +Each table is an array of 256 Uint16 values, representing a mapping +between the input and output for that channel. The input is the index +into the array, and the output is the 16-bit gamma value at that index, +scaled to the output color precision. You may pass NULL to any of the +channels to leave them unchanged.

    This function adjusts the gamma based on lookup tables, you can also +have the gamma calculated based on a "gamma function" parameter with +SDL_SetGamma.

    Not all display hardware is able to change gamma.

    Return Value

    Returns -1 on error (or if gamma adjustment is not supported).


    PrevHomeNext
    SDL_GetGammaRampUpSDL_MapRGB
    \ No newline at end of file diff --git a/docs/html/sdlsetmodstate.html b/docs/html/sdlsetmodstate.html new file mode 100644 index 000000000..eef5c97cc --- /dev/null +++ b/docs/html/sdlsetmodstate.html @@ -0,0 +1,229 @@ +SDL_SetModState
    SDL Library Documentation
    PrevNext

    SDL_SetModState

    Name

    SDL_SetModState -- Set the current key modifier state

    Synopsis

    #include "SDL.h"

    void SDL_SetModState(SDLMod modstate);

    Description

    The inverse of SDL_GetModState, SDL_SetModState allows you to impose modifier key states on your application.

    Simply pass your desired modifier states into modstate. This value my be a logical OR'd combination of the following:

    typedef enum {
    +  KMOD_NONE  = 0x0000,
    +  KMOD_LSHIFT= 0x0001,
    +  KMOD_RSHIFT= 0x0002,
    +  KMOD_LCTRL = 0x0040,
    +  KMOD_RCTRL = 0x0080,
    +  KMOD_LALT  = 0x0100,
    +  KMOD_RALT  = 0x0200,
    +  KMOD_LMETA = 0x0400,
    +  KMOD_RMETA = 0x0800,
    +  KMOD_NUM   = 0x1000,
    +  KMOD_CAPS  = 0x2000,
    +  KMOD_MODE  = 0x4000,
    +} SDLMod;

    PrevHomeNext
    SDL_GetModStateUpSDL_GetKeyName
    \ No newline at end of file diff --git a/docs/html/sdlsetpalette.html b/docs/html/sdlsetpalette.html new file mode 100644 index 000000000..591af8f88 --- /dev/null +++ b/docs/html/sdlsetpalette.html @@ -0,0 +1,344 @@ +SDL_SetPalette
    SDL Library Documentation
    PrevNext

    SDL_SetPalette

    Name

    SDL_SetPalette -- Sets the colors in the palette of an 8-bit surface.

    Synopsis

    #include "SDL.h"

    int SDL_SetPalette(SDL_Surface *surface, int flags, int SDL_Color *colors, int firstcolor, int ncolors);

    Description

    Sets a portion of the palette for the given 8-bit surface.

    Palettized (8-bit) screen surfaces with the +SDL_HWPALETTE flag have two palettes, a logical +palette that is used for mapping blits to/from the surface and a +physical palette (that determines how the hardware will map the colors +to the display). SDL_BlitSurface +always uses the logical palette when blitting surfaces (if it has to +convert between surface pixel formats). Because of this, it is often +useful to modify only one or the other palette to achieve various +special color effects (e.g., screen fading, color flashes, screen dimming).

    This function can modify either the logical or physical palette by +specifing SDL_LOGPAL or +SDL_PHYSPALthe in the flags +parameter.

    When surface is the surface associated with the current +display, the display colormap will be updated with the requested colors. If +SDL_HWPALETTE was set in SDL_SetVideoMode flags, +SDL_SetPalette will always return 1, +and the palette is guaranteed to be set the way you desire, even if the window +colormap has to be warped or run under emulation.

    The color components of a +SDL_Color structure +are 8-bits in size, giving you a total of +2563=16777216 colors.

    Return Value

    If surface is not a palettized surface, this function +does nothing, returning 0. If all of the colors were set +as passed to SDL_SetPalette, it will return +1. If not all the color entries were set exactly as +given, it will return 0, and you should look at the +surface palette to determine the actual color palette.

    Example

            /* Create a display surface with a grayscale palette */
    +        SDL_Surface *screen;
    +        SDL_Color colors[256];
    +        int i;
    +        .
    +        .
    +        .
    +        /* Fill colors with color information */
    +        for(i=0;i<256;i++){
    +          colors[i].r=i;
    +          colors[i].g=i;
    +          colors[i].b=i;
    +        }
    +
    +        /* Create display */
    +        screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE);
    +        if(!screen){
    +          printf("Couldn't set video mode: %s\n", SDL_GetError());
    +          exit(-1);
    +        }
    +
    +        /* Set palette */
    +        SDL_SetPalette(screen, SDL_LOGPAL|SDL_PHYSPAL, colors, 0, 256);
    +        .
    +        .
    +        .
    +        .

    PrevHomeNext
    SDL_SetColorsUpSDL_SetGamma
    \ No newline at end of file diff --git a/docs/html/sdlsettimer.html b/docs/html/sdlsettimer.html new file mode 100644 index 000000000..05e6b3ddb --- /dev/null +++ b/docs/html/sdlsettimer.html @@ -0,0 +1,261 @@ +SDL_SetTimer
    SDL Library Documentation
    Prev 

    SDL_SetTimer

    Name

    SDL_SetTimer -- Set a callback to run after the specified number of milliseconds has +elapsed.

    Synopsis

    #include "SDL.h"

    int SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);

    Callback

    /* Function prototype for the timer callback function */ +typedef Uint32 (*SDL_TimerCallback)(Uint32 interval);

    Description

    Set a callback to run after the specified number of milliseconds has +elapsed. The callback function is passed the current timer interval +and returns the next timer interval. If the returned value is the +same as the one passed in, the periodic alarm continues, otherwise a +new alarm is scheduled.

    To cancel a currently running timer, call +SDL_SetTimer(0, NULL);

    The timer callback function may run in a different thread than your +main constant, and so shouldn't call any functions from within itself.

    The maximum resolution of this timer is 10 ms, which means that if +you request a 16 ms timer, your callback will run approximately 20 ms +later on an unloaded system. If you wanted to set a flag signaling +a frame update at 30 frames per second (every 33 ms), you might set a +timer for 30 ms (see example below).

    If you use this function, you need to pass SDL_INIT_TIMER +to SDL_Init().

    Note: This function is kept for compatibility but has been superceeded +by the new timer functions +SDL_AddTimer and +SDL_RemoveTimer which support +multiple timers.

    Examples

    SDL_SetTimer((33/10)*10, my_callback);

    See Also

    SDL_AddTimer


    PrevHome 
    SDL_RemoveTimerUp 
    \ No newline at end of file diff --git a/docs/html/sdlsetvideomode.html b/docs/html/sdlsetvideomode.html new file mode 100644 index 000000000..bf0a34ad3 --- /dev/null +++ b/docs/html/sdlsetvideomode.html @@ -0,0 +1,486 @@ +SDL_SetVideoMode
    SDL Library Documentation
    PrevNext

    SDL_SetVideoMode

    Name

    SDL_SetVideoMode -- Set up a video mode with the specified width, height and bits-per-pixel.

    Synopsis

    #include "SDL.h"

    SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);

    Description

    Set up a video mode with the specified width, height and bits-per-pixel.

    If bpp is 0, it is treated as the +current display bits per pixel.

    The flags parameter is the same as the flags field of the SDL_Surface structure. OR'd combinations of the following values are valid.

    SDL_SWSURFACECreate the video surface in system memory
    SDL_HWSURFACECreate the video surface in video memory
    SDL_ASYNCBLITEnables the use of asynchronous to the display surface. This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.
    SDL_ANYFORMATNormally, if a video surface of the requested depth (bpp) is not available, SDL will emulate one with a shadow surface. Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its depth.
    SDL_HWPALETTEGive SDL exclusive palette access. Without this flag you may not always get the the colors you request with SDL_SetColors.
    SDL_DOUBLEBUFEnable double buffering. Calling SDL_Flip will flip the buffers and update the screen. If double buffering could not be enabled then SDL_Flip will just perform a SDL_UpdateRect on the entire screen.
    SDL_FULLSCREENSDL will attempt to use a fullscreen mode
    SDL_OPENGLCreate an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL_GL_SetAttribute.
    SDL_OPENGLBLITCreate an OpenGL rendering context, like above, but allow normal blitting operations.
    SDL_RESIZABLECreate a resizable window. When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL_SetVideoMode can be called again with the new size.
    SDL_NOFRAMEIf possible, SDL_NOFRAME causes SDL to create a window with no title bar or frame decoration. Fullscreen modes automatically have this flag set.

    Note: Whatever flags SDL_SetVideoMode could satisfy are set in the flags member of the returned surface.

    Return Value

    The framebuffer surface, or NULL if it fails.


    PrevHomeNext
    SDL_VideoModeOKUpSDL_UpdateRect
    \ No newline at end of file diff --git a/docs/html/sdlshowcursor.html b/docs/html/sdlshowcursor.html new file mode 100644 index 000000000..d8912cbe5 --- /dev/null +++ b/docs/html/sdlshowcursor.html @@ -0,0 +1,231 @@ +SDL_ShowCursor
    SDL Library Documentation
    PrevNext

    SDL_ShowCursor

    Name

    SDL_ShowCursor -- Toggle whether or not the cursor is shown on the screen.

    Synopsis

    #include "SDL.h"

    int SDL_ShowCursor(int toggle);

    Description

    Toggle whether or not the cursor is shown on the screen. Passing SDL_ENABLE displays the cursor and passing SDL_DISABLE hides it. The current state of the mouse cursor can be queried by passing SDL_QUERY, either SDL_DISABLE or SDL_ENABLE will be returned.

    The cursor starts off displayed, but can be turned off.

    Return Value

    Returns the current state of the cursor.


    PrevHomeNext
    SDL_GetCursorUpSDL_GL_LoadLibrary
    \ No newline at end of file diff --git a/docs/html/sdlsurface.html b/docs/html/sdlsurface.html new file mode 100644 index 000000000..ac28a72a4 --- /dev/null +++ b/docs/html/sdlsurface.html @@ -0,0 +1,614 @@ +SDL_Surface
    SDL Library Documentation
    PrevNext

    SDL_Surface

    Name

    SDL_Surface -- Graphical Surface Structure

    Structure Definition

    typedef struct SDL_Surface {
    +        Uint32 flags;                           /* Read-only */
    +        SDL_PixelFormat *format;                /* Read-only */
    +        int w, h;                               /* Read-only */
    +        Uint16 pitch;                           /* Read-only */
    +        void *pixels;                           /* Read-write */
    +        int offset;                             /* Private */
    +
    +        /* Hardware-specific surface info */
    +        struct private_hwdata *hwdata;
    +
    +        /* clipping information */
    +        SDL_Rect clip_rect;                     /* Read-only */
    +        Uint32 unused1;                         /* for binary compatibility */
    +        Uint32 unused2;                         /* for binary compatibility */
    +
    +        /* info for fast blit mapping to other surfaces */
    +        struct SDL_BlitMap *map;                /* Private */
    +
    +        /* format version, bumped at every change to invalidate blit maps */
    +        unsigned int format_version;            /* Private */
    +
    +        /* Reference count -- used when freeing surface */
    +        int refcount;                           /* Read-mostly */
    +} SDL_Surface;

    Structure Data

    flagsSurface flags
    formatPixel format
    w, hWidth and height of the surface
    pitchLength of a surface scanline in bytes
    pixelsPointer to the actual pixel data
    clip_minx, clip_maxxX clip coords
    clip_rectsurface clip rectangle

    Description

    SDL_Surface's represent areas of "graphical" +memory, memory that can be drawn to. The video framebuffer is returned +as a SDL_Surface by +SDL_SetVideoMode +and SDL_GetVideoSurface. +Most of the fields should be pretty obvious. +w and h are the +width and height of the surface in pixels. +pixels is a pointer to the actual pixel data, +the surface should be locked +before accessing this field. The clip_rect field +is the clipping rectangle as set by +SDL_SetClipRect.

    The following are supported in the +flags field.

    SDL_SWSURFACESurface is stored in system memory
    SDL_HWSURFACESurface is stored in video memory
    SDL_ASYNCBLITSurface uses asynchronous blits if possible
    SDL_ANYFORMATAllows any pixel-format (Display surface)
    SDL_HWPALETTESurface has exclusive palette
    SDL_DOUBLEBUFSurface is double buffered (Display surface)
    SDL_FULLSCREENSurface is full screen (Display Surface)
    SDL_OPENGLSurface has an OpenGL context (Display Surface)
    SDL_OPENGLBLITSurface supports OpenGL blitting (Display Surface)
    SDL_RESIZABLESurface is resizable (Display Surface)
    SDL_HWACCELSurface blit uses hardware acceleration
    SDL_SRCOLORKEYSurface use colorkey blitting
    SDL_RLEACCELColorkey blitting is accelerated with RLE
    SDL_SRCALPHASurface blit uses alpha blending
    SDL_PREALLOCSurface uses preallocated memory


    PrevHomeNext
    SDL_PixelFormatUpSDL_VideoInfo
    \ No newline at end of file diff --git a/docs/html/sdlsyswmevent.html b/docs/html/sdlsyswmevent.html new file mode 100644 index 000000000..8ae83215d --- /dev/null +++ b/docs/html/sdlsyswmevent.html @@ -0,0 +1,224 @@ +SDL_SysWMEvent
    SDL Library Documentation
    PrevNext

    SDL_SysWMEvent

    Name

    SDL_SysWMEvent -- Platform-dependent window manager event.

    Description

    The system window manager event contains a pointer to system-specific +information about unknown window manager events. If you enable this event +using +SDL_EventState(), +it will be generated whenever unhandled events are received from the window +manager. This can be used, for example, to implement cut-and-paste in your +application. + +

    typedef struct {
    +         Uint8 type;   /* Always SDL_SysWM */
    + } SDL_SysWMEvent;
    + +If you want to obtain system-specific information about the window manager, +you can fill the version member of a SDL_SysWMinfo +structure (details can be found in SDL_syswm.h, which must be included) using the SDL_VERSION() macro found in +SDL_version.h, and pass it to the +function: +

    int SDL_GetWMInfo(SDL_SysWMinfo *info);


    PrevHomeNext
    SDL_ResizeEventUpSDL_UserEvent
    \ No newline at end of file diff --git a/docs/html/sdlthreadid.html b/docs/html/sdlthreadid.html new file mode 100644 index 000000000..41266fb22 --- /dev/null +++ b/docs/html/sdlthreadid.html @@ -0,0 +1,182 @@ +SDL_ThreadID
    SDL Library Documentation
    PrevNext

    SDL_ThreadID

    Name

    SDL_ThreadID -- Get the 32-bit thread identifier for the current thread.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    Uint32 SDL_ThreadID(void);

    Description

    Get the 32-bit thread identifier for the current thread.


    PrevHomeNext
    SDL_CreateThreadUpSDL_GetThreadID
    \ No newline at end of file diff --git a/docs/html/sdlunlockaudio.html b/docs/html/sdlunlockaudio.html new file mode 100644 index 000000000..106df8860 --- /dev/null +++ b/docs/html/sdlunlockaudio.html @@ -0,0 +1,203 @@ +SDL_UnlockAudio
    SDL Library Documentation
    PrevNext

    SDL_UnlockAudio

    Name

    SDL_UnlockAudio -- Unlock the callback function

    Synopsis

    #include "SDL.h"

    void SDL_UnlockAudio(void);

    Description

    Unlocks a previous SDL_LockAudio call.


    PrevHomeNext
    SDL_LockAudioUpSDL_CloseAudio
    \ No newline at end of file diff --git a/docs/html/sdlunlocksurface.html b/docs/html/sdlunlocksurface.html new file mode 100644 index 000000000..be2de60aa --- /dev/null +++ b/docs/html/sdlunlocksurface.html @@ -0,0 +1,211 @@ +SDL_UnlockSurface
    SDL Library Documentation
    PrevNext

    SDL_UnlockSurface

    Name

    SDL_UnlockSurface -- Unlocks a previously locked surface.

    Synopsis

    #include "SDL.h"

    void SDL_UnlockSurface(SDL_Surface *surface);

    Description

    Surfaces that were previously locked using SDL_LockSurface must be unlocked with SDL_UnlockSurface. Surfaces should be unlocked as soon as possible.

    It should be noted that since 1.1.8, surface locks are recursive. See SDL_LockSurface.


    PrevHomeNext
    SDL_LockSurfaceUpSDL_LoadBMP
    \ No newline at end of file diff --git a/docs/html/sdlunlockyuvoverlay.html b/docs/html/sdlunlockyuvoverlay.html new file mode 100644 index 000000000..5abe681ea --- /dev/null +++ b/docs/html/sdlunlockyuvoverlay.html @@ -0,0 +1,217 @@ +SDL_UnlockYUVOverlay
    SDL Library Documentation
    PrevNext

    SDL_UnlockYUVOverlay

    Name

    SDL_UnlockYUVOverlay -- Unlock an overlay

    Synopsis

    #include "SDL.h"

    void SDL_UnlockYUVOverlay(SDL_Overlay *overlay);

    Description

    The opposite to SDL_LockYUVOverlay. Unlocks a previously locked overlay. An overlay must be unlocked before it can be displayed.


    PrevHomeNext
    SDL_LockYUVOverlayUpSDL_DisplayYUVOverlay
    \ No newline at end of file diff --git a/docs/html/sdlupdaterect.html b/docs/html/sdlupdaterect.html new file mode 100644 index 000000000..1c8fe87e5 --- /dev/null +++ b/docs/html/sdlupdaterect.html @@ -0,0 +1,257 @@ +SDL_UpdateRect
    SDL Library Documentation
    PrevNext

    SDL_UpdateRect

    Name

    SDL_UpdateRect -- Makes sure the given area is updated on the given screen.

    Synopsis

    #include "SDL.h"

    void SDL_UpdateRect(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h);

    Description

    Makes sure the given area is updated on the given screen.

    If 'x', 'y', 'w' +and 'h' are all 0, +SDL_UpdateRect will update the +entire screen.

    This function should not be called while 'screen' is +locked.


    PrevHomeNext
    SDL_SetVideoModeUpSDL_UpdateRects
    \ No newline at end of file diff --git a/docs/html/sdlupdaterects.html b/docs/html/sdlupdaterects.html new file mode 100644 index 000000000..e89c92e38 --- /dev/null +++ b/docs/html/sdlupdaterects.html @@ -0,0 +1,229 @@ +SDL_UpdateRects
    SDL Library Documentation
    PrevNext

    SDL_UpdateRects

    Name

    SDL_UpdateRects -- Makes sure the given list of rectangles is updated on the given screen.

    Synopsis

    #include "SDL.h"

    void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);

    Description

    Makes sure the given list of rectangles is updated on the given screen.

    This function should not be called while screen is +locked.


    PrevHomeNext
    SDL_UpdateRectUpSDL_Flip
    \ No newline at end of file diff --git a/docs/html/sdluserevent.html b/docs/html/sdluserevent.html new file mode 100644 index 000000000..50e92c64f --- /dev/null +++ b/docs/html/sdluserevent.html @@ -0,0 +1,329 @@ +SDL_UserEvent
    SDL Library Documentation
    PrevNext

    SDL_UserEvent

    Name

    SDL_UserEvent -- A user-defined event type

    Structure Definition

    typedef struct{
    +  Uint8 type;
    +  int code;
    +  void *data1;
    +  void *data2;
    +} SDL_UserEvent;

    Structure Data

    typeSDL_USEREVENT through to SDL_NUMEVENTS-1
    codeUser defined event code
    data1User defined data pointer
    data2User defined data pointer

    Description

    SDL_UserEvent is in the user member of the structure SDL_Event. This event is unique, it is never created by SDL but only by the user. The event can be pushed onto the event queue using SDL_PushEvent. The contents of the structure members or completely up to the programmer, the only requirement is that type is a value from SDL_USEREVENT to SDL_NUMEVENTS-1 (inclusive).

    Examples

    SDL_Event event;
    +
    +event.type = SDL_USEREVENT;
    +event.user.code = my_event_code;
    +event.user.data1 = significant_data;
    +event.user.data2 = 0;
    +SDL_PushEvent(&event);


    PrevHomeNext
    SDL_SysWMEventUpSDL_QuitEvent
    \ No newline at end of file diff --git a/docs/html/sdlvideodrivername.html b/docs/html/sdlvideodrivername.html new file mode 100644 index 000000000..3ee57b2a5 --- /dev/null +++ b/docs/html/sdlvideodrivername.html @@ -0,0 +1,235 @@ +SDL_VideoDriverName
    SDL Library Documentation
    PrevNext

    SDL_VideoDriverName

    Name

    SDL_VideoDriverName -- Obtain the name of the video driver

    Synopsis

    #include "SDL.h"

    char *SDL_VideoDriverName(char *namebuf, int maxlen);

    Description

    The buffer pointed to by namebuf is filled up to a maximum of maxlen characters (include the NULL terminator) with the name of the initialised video driver. The driver name is a simple one word identifier like "x11" or "windib".

    Return Value

    Returns NULL if video has not been initialised with SDL_Init or a pointer to namebuf otherwise.


    PrevHomeNext
    SDL_GetVideoInfoUpSDL_ListModes
    \ No newline at end of file diff --git a/docs/html/sdlvideoinfo.html b/docs/html/sdlvideoinfo.html new file mode 100644 index 000000000..e19f03632 --- /dev/null +++ b/docs/html/sdlvideoinfo.html @@ -0,0 +1,400 @@ +SDL_VideoInfo
    SDL Library Documentation
    PrevNext

    SDL_VideoInfo

    Name

    SDL_VideoInfo -- Video Target information

    Structure Definition

    typedef struct{
    +  Uint32 hw_available:1;
    +  Uint32 wm_available:1;
    +  Uint32 blit_hw:1;
    +  Uint32 blit_hw_CC:1;
    +  Uint32 blit_hw_A:1;
    +  Uint32 blit_sw:1;
    +  Uint32 blit_sw_CC:1;
    +  Uint32 blit_sw_A:1;
    +  Uint32 blit_fill;
    +  Uint32 video_mem;
    +  SDL_PixelFormat *vfmt;
    +} SDL_VideoInfo;

    Structure Data

    hw_availableIs it possible to create hardware surfaces?
    wm_availableIs there a window manager available
    blit_hwAre hardware to hardware blits accelerated?
    blit_hw_CCAre hardware to hardware colorkey blits accelerated?
    blit_hw_AAre hardware to hardware alpha blits accelerated?
    blit_swAre software to hardware blits accelerated?
    blit_sw_CCAre software to hardware colorkey blits accelerated?
    blit_sw_AAre software to hardware alpha blits accelerated?
    blit_fillAre color fills accelerated?
    video_memTotal amount of video memory in Kilobytes
    vfmtPixel format of the video device

    Description

    This (read-only) structure is returned by SDL_GetVideoInfo. It contains information on either the 'best' available mode (if called before SDL_SetVideoMode) or the current video mode.


    PrevHomeNext
    SDL_SurfaceUpSDL_Overlay
    \ No newline at end of file diff --git a/docs/html/sdlvideomodeok.html b/docs/html/sdlvideomodeok.html new file mode 100644 index 000000000..8df940d08 --- /dev/null +++ b/docs/html/sdlvideomodeok.html @@ -0,0 +1,262 @@ +SDL_VideoModeOK
    SDL Library Documentation
    PrevNext

    SDL_VideoModeOK

    Name

    SDL_VideoModeOK -- Check to see if a particular video mode is supported.

    Synopsis

    #include "SDL.h"

    int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);

    Description

    SDL_VideoModeOK returns 0 +if the requested mode is not supported under any bit depth, or returns the +bits-per-pixel of the closest available mode with the given width, height and requested surface flags (see SDL_SetVideoMode).

    The bits-per-pixel value returned is only a suggested mode. You can usually request and bpp you want when setting the video mode and SDL will emulate that color depth with a shadow video surface.

    The arguments to SDL_VideoModeOK are the same ones you +would pass to SDL_SetVideoMode

    Example

    SDL_Surface *screen;
    +Uint32 bpp;
    +.
    +.
    +.
    +printf("Checking mode 640x480@16bpp.\n");
    +bpp=SDL_VideoModeOK(640, 480, 16, SDL_HWSURFACE);
    +
    +if(!bpp){
    +  printf("Mode not available.\n");
    +  exit(-1);
    +}
    +
    +printf("SDL Recommends 640x480@%dbpp.\n", bpp);
    +screen=SDL_SetVideoMode(640, 480, bpp, SDL_HWSURFACE);
    +.
    +.

    PrevHomeNext
    SDL_ListModesUpSDL_SetVideoMode
    \ No newline at end of file diff --git a/docs/html/sdlwaitevent.html b/docs/html/sdlwaitevent.html new file mode 100644 index 000000000..00fdc0f71 --- /dev/null +++ b/docs/html/sdlwaitevent.html @@ -0,0 +1,223 @@ +SDL_WaitEvent
    SDL Library Documentation
    PrevNext

    SDL_WaitEvent

    Name

    SDL_WaitEvent -- Waits indefinitely for the next available event.

    Synopsis

    #include "SDL.h"

    int SDL_WaitEvent(SDL_Event *event);

    Description

    Waits indefinitely for the next available event, returning +1, or 0 if there was +an error while waiting for events.

    If event is not NULL, the next +event is removed from the queue and stored in that area.


    PrevHomeNext
    SDL_PollEventUpSDL_PushEvent
    \ No newline at end of file diff --git a/docs/html/sdlwaitthread.html b/docs/html/sdlwaitthread.html new file mode 100644 index 000000000..1c1667b4d --- /dev/null +++ b/docs/html/sdlwaitthread.html @@ -0,0 +1,223 @@ +SDL_WaitThread
    SDL Library Documentation
    PrevNext

    SDL_WaitThread

    Name

    SDL_WaitThread -- Wait for a thread to finish.

    Synopsis

    #include "SDL.h"
    +#include "SDL_thread.h"

    void SDL_WaitThread(SDL_Thread *thread, int *status);

    Description

    Wait for a thread to finish (timeouts are not supported).

    Return Value

    The return code for the thread function is placed in the area pointed to by +status, if status is not +NULL.


    PrevHomeNext
    SDL_GetThreadIDUpSDL_KillThread
    \ No newline at end of file diff --git a/docs/html/sdlwarpmouse.html b/docs/html/sdlwarpmouse.html new file mode 100644 index 000000000..2349fe8bd --- /dev/null +++ b/docs/html/sdlwarpmouse.html @@ -0,0 +1,197 @@ +SDL_WarpMouse
    SDL Library Documentation
    PrevNext

    SDL_WarpMouse

    Name

    SDL_WarpMouse -- Set the position of the mouse cursor.

    Synopsis

    #include "SDL.h"

    void SDL_WarpMouse(Uint16 x, Uint16 y);

    Description

    Set the position of the mouse cursor (generates a mouse motion event).


    PrevHomeNext
    SDL_DisplayFormatAlphaUpSDL_CreateCursor
    \ No newline at end of file diff --git a/docs/html/sdlwasinit.html b/docs/html/sdlwasinit.html new file mode 100644 index 000000000..29a8cbca1 --- /dev/null +++ b/docs/html/sdlwasinit.html @@ -0,0 +1,276 @@ +SDL_WasInit
    SDL Library Documentation
    PrevNext

    SDL_WasInit

    Name

    SDL_WasInit -- Check which subsystems are initialized

    Synopsis

    #include "SDL.h"

    Uint32 SDL_WasInit(Uint32 flags);

    Description

    SDL_WasInit allows you to see which SDL subsytems have been initialized. flags is a bitwise OR'd combination of the subsystems you wish to check (see SDL_Init for a list of subsystem flags).

    Return Value

    SDL_WasInit returns a bitwised OR'd combination of the initialized subsystems.

    Examples

    
/* Here are several ways you can use SDL_WasInit() */
    +
    +/* Get init data on all the subsystems */
    +Uint32 subsystem_init;
    +
    +subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING);
    +
    +if(subsystem_init&SDL_INIT_VIDEO)
    +  printf("Video is initialized.\n");
    +else
    +  printf("Video is not initialized.\n");
    +
    +
    +
    +/* Just check for one specfic subsystem */
    +
    +if(SDL_WasInit(SDL_INIT_VIDEO)!=0)
    +  printf("Video is initialized.\n");
    +else
    +  printf("Video is not initialized.\n");
    +
    +
    +
    +
    +/* Check for two subsystems */
    +
    +Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO;
    +
    +if(SDL_WasInit(subsystem_mask)==subsystem_mask)
    +  printf("Video and Audio initialized.\n");
    +else
    +  printf("Video and Audio not initialized.\n");

    PrevHomeNext
    SDL_QuitUpVideo
    \ No newline at end of file diff --git a/docs/html/sdlwmgetcaption.html b/docs/html/sdlwmgetcaption.html new file mode 100644 index 000000000..2c1b36b8e --- /dev/null +++ b/docs/html/sdlwmgetcaption.html @@ -0,0 +1,214 @@ +SDL_WM_GetCaption
    SDL Library Documentation
    PrevNext

    SDL_WM_GetCaption

    Name

    SDL_WM_GetCaption -- Gets the window title and icon name.

    Synopsis

    #include "SDL.h"

    void SDL_WM_GetCaption(char **title, char **icon);

    Description

    Set pointers to the window title and icon name.


    PrevHomeNext
    SDL_WM_SetCaptionUpSDL_WM_SetIcon
    \ No newline at end of file diff --git a/docs/html/sdlwmgrabinput.html b/docs/html/sdlwmgrabinput.html new file mode 100644 index 000000000..9e1e41b42 --- /dev/null +++ b/docs/html/sdlwmgrabinput.html @@ -0,0 +1,216 @@ +SDL_WM_GrabInput
    SDL Library Documentation
    PrevNext

    SDL_WM_GrabInput

    Name

    SDL_WM_GrabInput -- Grabs mouse and keyboard input.

    Synopsis

    #include "SDL.h"

    SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);

    Description

    Grabbing means that the mouse is confined to the application window, +and nearly all keyboard input is passed directly to the application, +and not interpreted by a window manager, if any.

    When mode is SDL_GRAB_QUERY the grab mode is not changed, but the current grab mode is returned.

    typedef enum {
    +  SDL_GRAB_QUERY,
    +  SDL_GRAB_OFF,
    +  SDL_GRAB_ON
    +} SDL_GrabMode;
    +

    Return Value

    The current/new SDL_GrabMode.


    PrevHomeNext
    SDL_WM_ToggleFullScreenUpEvents
    \ No newline at end of file diff --git a/docs/html/sdlwmiconifywindow.html b/docs/html/sdlwmiconifywindow.html new file mode 100644 index 000000000..af24db21d --- /dev/null +++ b/docs/html/sdlwmiconifywindow.html @@ -0,0 +1,203 @@ +SDL_WM_IconifyWindow
    SDL Library Documentation
    PrevNext

    SDL_WM_IconifyWindow

    Name

    SDL_WM_IconifyWindow -- Iconify/Minimise the window

    Synopsis

    #include "SDL.h"

    int SDL_WM_IconifyWindow(void);

    Description

    If the application is running in a window managed environment SDL attempts to iconify/minimise it. If SDL_WM_IconifyWindow is successful, the application will receive a SDL_APPACTIVE loss event.

    Return Value

    Returns non-zero on success or 0 if iconification is not support or was refused by the window manager.


    PrevHomeNext
    SDL_WM_SetIconUpSDL_WM_ToggleFullScreen
    \ No newline at end of file diff --git a/docs/html/sdlwmsetcaption.html b/docs/html/sdlwmsetcaption.html new file mode 100644 index 000000000..0b7eeec08 --- /dev/null +++ b/docs/html/sdlwmsetcaption.html @@ -0,0 +1,204 @@ +SDL_WM_SetCaption
    SDL Library Documentation
    PrevNext

    SDL_WM_SetCaption

    Name

    SDL_WM_SetCaption -- Sets the window tile and icon name.

    Synopsis

    #include "SDL.h"

    void SDL_WM_SetCaption(const char *title, const char *icon);

    Description

    Sets the title-bar and icon name of the display window.


    PrevHomeNext
    Window ManagementUpSDL_WM_GetCaption
    \ No newline at end of file diff --git a/docs/html/sdlwmseticon.html b/docs/html/sdlwmseticon.html new file mode 100644 index 000000000..a6681be83 --- /dev/null +++ b/docs/html/sdlwmseticon.html @@ -0,0 +1,244 @@ +SDL_WM_SetIcon
    SDL Library Documentation
    PrevNext

    SDL_WM_SetIcon

    Name

    SDL_WM_SetIcon -- Sets the icon for the display window.

    Synopsis

    #include "SDL.h"

    void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);

    Description

    Sets the icon for the display window.

    This function must be called before the first call to +SDL_SetVideoMode.

    It takes an icon surface, and a mask in MSB format.

    If mask is NULL, the entire +icon surface will be used as the icon.

    Example

    SDL_WM_SetIcon(SDL_LoadBMP("icon.bmp"), NULL);

    PrevHomeNext
    SDL_WM_GetCaptionUpSDL_WM_IconifyWindow
    \ No newline at end of file diff --git a/docs/html/sdlwmtogglefullscreen.html b/docs/html/sdlwmtogglefullscreen.html new file mode 100644 index 000000000..44360bf94 --- /dev/null +++ b/docs/html/sdlwmtogglefullscreen.html @@ -0,0 +1,197 @@ +SDL_WM_ToggleFullScreen
    SDL Library Documentation
    PrevNext

    SDL_WM_ToggleFullScreen

    Name

    SDL_WM_ToggleFullScreen -- Toggles fullscreen mode

    Synopsis

    #include "SDL.h"

    int SDL_WM_ToggleFullScreen(SDL_Surface *surface);

    Description

    Toggles the application between windowed and fullscreen mode, if supported. (X11 is the only target currently supported, BeOS support is experimental).

    Return Value

    Returns 0 on failure or 1 on success.


    PrevHomeNext
    SDL_WM_IconifyWindowUpSDL_WM_GrabInput
    \ No newline at end of file diff --git a/docs/html/thread.html b/docs/html/thread.html new file mode 100644 index 000000000..1e8e43abf --- /dev/null +++ b/docs/html/thread.html @@ -0,0 +1,305 @@ +Multi-threaded Programming
    SDL Library Documentation
    PrevNext

    Chapter 12. Multi-threaded Programming

    Table of Contents
    SDL_CreateThread — Creates a new thread of execution that shares its parent's properties.
    SDL_ThreadID — Get the 32-bit thread identifier for the current thread.
    SDL_GetThreadID — Get the SDL thread ID of a SDL_Thread
    SDL_WaitThread — Wait for a thread to finish.
    SDL_KillThread — Gracelessly terminates the thread.
    SDL_CreateMutex — Create a mutex
    SDL_DestroyMutex — Destroy a mutex
    SDL_mutexP — Lock a mutex
    SDL_mutexV — Unlock a mutex
    SDL_CreateSemaphore — Creates a new semaphore and assigns an initial value to it.
    SDL_DestroySemaphore — Destroys a semaphore that was created by SDL_CreateSemaphore.
    SDL_SemWait — Lock a semaphore and suspend the thread if the semaphore value is zero.
    SDL_SemTryWait — Attempt to lock a semaphore but don't suspend the thread.
    SDL_SemWaitTimeout — Lock a semaphore, but only wait up to a specified maximum time.
    SDL_SemPost — Unlock a semaphore.
    SDL_SemValue — Return the current value of a semaphore.
    SDL_CreateCond — Create a condition variable
    SDL_DestroyCond — Destroy a condition variable
    SDL_CondSignal — Restart a thread wait on a condition variable
    SDL_CondBroadcast — Restart all threads waiting on a condition variable
    SDL_CondWait — Wait on a condition variable
    SDL_CondWaitTimeout — Wait on a condition variable, with timeout

    SDL provides functions for creating threads, mutexes, semphores and condition variables.

    In general, you must be very aware of concurrency and data integrity issues +when writing multi-threaded programs. Some good guidelines include: +

    • Don't call SDL video/event functions from separate threads

    • Don't use any library functions in separate threads

    • Don't perform any memory management in separate threads

    • Lock global variables which may be accessed by multiple threads

    • Never terminate threads, always set a flag and wait for them to quit

    • Think very carefully about all possible ways your code may interact

    Note: SDL's threading is not implemented on MacOS, due to that lack of preemptive thread support (eck!)


    PrevHomeNext
    SDL_CDtrackUpSDL_CreateThread
    \ No newline at end of file diff --git a/docs/html/time.html b/docs/html/time.html new file mode 100644 index 000000000..6fce72a00 --- /dev/null +++ b/docs/html/time.html @@ -0,0 +1,198 @@ +Time
    SDL Library Documentation
    PrevNext

    Chapter 13. Time

    Table of Contents
    SDL_GetTicks — Get the number of milliseconds since the SDL library initialization.
    SDL_Delay — Wait a specified number of milliseconds before returning.
    SDL_AddTimer — Add a timer which will call a callback after the specified number of milliseconds has +elapsed.
    SDL_RemoveTimer — Remove a timer which was added with +SDL_AddTimer.
    SDL_SetTimer — Set a callback to run after the specified number of milliseconds has +elapsed.

    SDL provides several cross-platform functions for dealing with time. +It provides a way to get the current time, a way to wait a little while, +and a simple timer mechanism. These functions give you two ways of moving an +object every x milliseconds: + +

    • Use a timer callback function. This may have the bad effect that it runs in a seperate thread or uses alarm signals, but it's easier to implement.

    • Or you can get the number of milliseconds passed, and move the object if, for example, 30 ms passed.


    PrevHomeNext
    SDL_CondWaitTimeoutUpSDL_GetTicks
    \ No newline at end of file diff --git a/docs/html/video.html b/docs/html/video.html new file mode 100644 index 000000000..358f48783 --- /dev/null +++ b/docs/html/video.html @@ -0,0 +1,499 @@ +Video
    SDL Library Documentation
    PrevNext

    Chapter 6. Video

    Table of Contents
    SDL_GetVideoSurface — returns a pointer to the current display surface
    SDL_GetVideoInfo — returns a pointer to information about the video hardware
    SDL_VideoDriverName — Obtain the name of the video driver
    SDL_ListModes — Returns a pointer to an array of available screen dimensions for +the given format and video flags
    SDL_VideoModeOK — Check to see if a particular video mode is supported.
    SDL_SetVideoMode — Set up a video mode with the specified width, height and bits-per-pixel.
    SDL_UpdateRect — Makes sure the given area is updated on the given screen.
    SDL_UpdateRects — Makes sure the given list of rectangles is updated on the given screen.
    SDL_Flip — Swaps screen buffers
    SDL_SetColors — Sets a portion of the colormap for the given 8-bit surface.
    SDL_SetPalette — Sets the colors in the palette of an 8-bit surface.
    SDL_SetGamma — Sets the color gamma function for the display
    SDL_GetGammaRamp — Gets the color gamma lookup tables for the display
    SDL_SetGammaRamp — Sets the color gamma lookup tables for the display
    SDL_MapRGB — Map a RGB color value to a pixel format.
    SDL_MapRGBA — Map a RGBA color value to a pixel format.
    SDL_GetRGB — Get RGB values from a pixel in the specified pixel format.
    SDL_GetRGBA — Get RGBA values from a pixel in the specified pixel format.
    SDL_CreateRGBSurface — Create an empty SDL_Surface
    SDL_CreateRGBSurfaceFrom — Create an SDL_Surface from pixel data
    SDL_FreeSurface — Frees (deletes) and SDL_Surface
    SDL_LockSurface — Lock a surface for directly access.
    SDL_UnlockSurface — Unlocks a previously locked surface.
    SDL_LoadBMP — Load a Windows BMP file into an SDL_Surface.
    SDL_SaveBMP — Save an SDL_Surface as a Windows BMP file.
    SDL_SetColorKey — Sets the color key (transparent pixel) in a blittable surface and +RLE acceleration.
    SDL_SetAlpha — Adjust the alpha properties of a surface
    SDL_SetClipRect — Sets the clipping rectangle for a surface.
    SDL_GetClipRect — Gets the clipping rectangle for a surface.
    SDL_ConvertSurface — Converts a surface to the same format as another surface.
    SDL_BlitSurface — This performs a fast blit from the source surface to the destination surface.
    SDL_FillRect — This function performs a fast fill of the given rectangle with some color
    SDL_DisplayFormat — Convert a surface to the display format
    SDL_DisplayFormatAlpha — Convert a surface to the display format
    SDL_WarpMouse — Set the position of the mouse cursor.
    SDL_CreateCursor — Creates a new mouse cursor.
    SDL_FreeCursor — Frees a cursor created with SDL_CreateCursor.
    SDL_SetCursor — Set the currently active mouse cursor.
    SDL_GetCursor — Get the currently active mouse cursor.
    SDL_ShowCursor — Toggle whether or not the cursor is shown on the screen.
    SDL_GL_LoadLibrary — Specify an OpenGL library
    SDL_GL_GetProcAddress — Get the address of a GL function
    SDL_GL_GetAttribute — Get the value of a special SDL/OpenGL attribute
    SDL_GL_SetAttribute — Set a special SDL/OpenGL attribute
    SDL_GL_SwapBuffers — Swap OpenGL framebuffers/Update Display
    SDL_CreateYUVOverlay — Create a YUV video overlay
    SDL_LockYUVOverlay — Lock an overlay
    SDL_UnlockYUVOverlay — Unlock an overlay
    SDL_DisplayYUVOverlay — Blit the overlay to the display
    SDL_FreeYUVOverlay — Free a YUV video overlay
    SDL_GLattr — SDL GL Attributes
    SDL_Rect — Defines a rectangular area
    SDL_Color — Format independent color description
    SDL_Palette — Color palette for 8-bit pixel formats
    SDL_PixelFormat — Stores surface format information
    SDL_Surface — Graphical Surface Structure
    SDL_VideoInfo — Video Target information
    SDL_Overlay — YUV video overlay

    SDL presents a very simple interface to the display framebuffer. The +framebuffer is represented as an offscreen surface to which you can write +directly. If you want the screen to show what you have written, call the update function which will +guarantee that the desired portion of the screen is updated.

    Before you call any of the SDL video functions, you must first call +SDL_Init(SDL_INIT_VIDEO), which initializes the video +and events in the SDL library. Check the return code, which should be +0, to see if there were any errors in starting up.

    If you use both sound and video in your application, you need to call +SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO) before opening the +sound device, otherwise under Win32 DirectX, you won't be able to set +full-screen display modes.

    After you have initialized the library, you can start up the video display in a +number of ways. The easiest way is to pick a common screen resolution and +depth and just initialize the video, checking for errors. You will probably +get what you want, but SDL may be emulating your requested mode and converting +the display on update. The best way is to +query, for the best +video mode closest to the desired one, and then +convert +your images to that pixel format.

    SDL currently supports any bit depth >= 8 bits per pixel. 8 bpp formats are +considered 8-bit palettized modes, while 12, 15, 16, 24, and 32 bits per pixel +are considered "packed pixel" modes, meaning each pixel contains the RGB color +components packed in the bits of the pixel.

    After you have initialized your video mode, you can take the surface that was +returned, and write to it like any other framebuffer, calling the update +routine as you go.

    When you have finished your video access and are ready to quit your +application, you should call "SDL_Quit()" to shutdown the +video and events.


    PrevHomeNext
    SDL_WasInitUpSDL_GetVideoSurface
    \ No newline at end of file diff --git a/docs/html/wm.html b/docs/html/wm.html new file mode 100644 index 000000000..ec9c599e4 --- /dev/null +++ b/docs/html/wm.html @@ -0,0 +1,180 @@ +Window Management
    SDL Library Documentation
    PrevNext

    Chapter 7. Window Management

    Table of Contents
    SDL_WM_SetCaption — Sets the window tile and icon name.
    SDL_WM_GetCaption — Gets the window title and icon name.
    SDL_WM_SetIcon — Sets the icon for the display window.
    SDL_WM_IconifyWindow — Iconify/Minimise the window
    SDL_WM_ToggleFullScreen — Toggles fullscreen mode
    SDL_WM_GrabInput — Grabs mouse and keyboard input.

    SDL provides a small set of window management functions which allow applications to change their title and toggle from windowed mode to fullscreen (if available)


    PrevHomeNext
    SDL_OverlayUpSDL_WM_SetCaption
    \ No newline at end of file diff --git a/docs/images/rainbow.gif b/docs/images/rainbow.gif new file mode 100644 index 0000000000000000000000000000000000000000..9b2864409f4cdf93d12d889c07bdbc8fb847977c GIT binary patch literal 1715 zcmeIxX;YJD6b9fZ%BF*ff*uu>r&`N{IvA>jxHSaXf_7pkNP`>11qiJ=L0O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`Oh;M9o8OzTLoa)_H4MGF olg)ulowO5C7F4)$lax>9@@A;DE&+-@Z_Jayd)?2A>boJpcdz literal 0 HcmV?d00001 diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..90d50ec41 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,121 @@ + +Introduction +
    +

    Introduction

    This library is designed to make it easy to write games that run on Linux, +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. This is a fairly low level API, but using this, completely +portable applications can be written with a great deal of flexibility.

    The library is loaded as a dynamically linked library on its native +platform, and is currently compiled natively for Linux, compiled for +Win32 using a Linux hosted GCC +cross-compilation +environment, and compiled using the EGCS C++ compiler under BeOS.

    An introduction to SDL can be found online at: +http://www.libsdl.org/intro/

    There are code examples on each of the main library pages, and there are +fully fleshed example C++ classes and programs in the examples archive, +available on the +SDL download page.

    For an introduction to basic multi-media programming concepts, you might try +some of the following links: +

    Enjoy!

        Sam Lantinga +<slouken@libsdl.org>

    +

    +


    +

    Table of Contents

    + +
    diff --git a/docs/man3/.cvsignore b/docs/man3/.cvsignore new file mode 100644 index 000000000..3dda72986 --- /dev/null +++ b/docs/man3/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/docs/man3/Makefile.am b/docs/man3/Makefile.am new file mode 100644 index 000000000..3eb1760f4 --- /dev/null +++ b/docs/man3/Makefile.am @@ -0,0 +1,174 @@ +man_MANS = \ + SDLKey.3 \ + SDL_ActiveEvent.3 \ + SDL_AddTimer.3 \ + SDL_AudioCVT.3 \ + SDL_AudioSpec.3 \ + SDL_BlitSurface.3 \ + SDL_BuildAudioCVT.3 \ + SDL_CD.3 \ + SDL_CDClose.3 \ + SDL_CDEject.3 \ + SDL_CDName.3 \ + SDL_CDNumDrives.3 \ + SDL_CDOpen.3 \ + SDL_CDPause.3 \ + SDL_CDPlay.3 \ + SDL_CDPlayTracks.3 \ + SDL_CDResume.3 \ + SDL_CDStatus.3 \ + SDL_CDStop.3 \ + SDL_CDtrack.3 \ + SDL_CloseAudio.3 \ + SDL_Color.3 \ + SDL_CondBroadcast.3 \ + SDL_CondSignal.3 \ + SDL_CondWait.3 \ + SDL_CondWaitTimeout.3 \ + SDL_ConvertAudio.3 \ + SDL_ConvertSurface.3 \ + SDL_CreateCond.3 \ + SDL_CreateCursor.3 \ + SDL_CreateMutex.3 \ + SDL_CreateRGBSurface.3 \ + SDL_CreateRGBSurfaceFrom.3 \ + SDL_CreateSemaphore.3 \ + SDL_CreateThread.3 \ + SDL_CreateYUVOverlay.3 \ + SDL_Delay.3 \ + SDL_DestroyCond.3 \ + SDL_DestroyMutex.3 \ + SDL_DestroySemaphore.3 \ + SDL_DisplayFormat.3 \ + SDL_DisplayFormatAlpha.3 \ + SDL_DisplayYUVOverlay.3 \ + SDL_EnableKeyRepeat.3 \ + SDL_EnableUNICODE.3 \ + SDL_Event.3 \ + SDL_EventState.3 \ + SDL_FillRect.3 \ + SDL_Flip.3 \ + SDL_FreeCursor.3 \ + SDL_FreeSurface.3 \ + SDL_FreeWAV.3 \ + SDL_FreeYUVOverlay.3 \ + SDL_GL_GetAttribute.3 \ + SDL_GL_GetProcAddress.3 \ + SDL_GL_LoadLibrary.3 \ + SDL_GL_SetAttribute.3 \ + SDL_GL_SwapBuffers.3 \ + SDL_GLattr.3 \ + SDL_GetAppState.3 \ + SDL_GetAudioStatus.3 \ + SDL_GetClipRect.3 \ + SDL_GetCursor.3 \ + SDL_GetEventFilter.3 \ + SDL_GetGamma.3 \ + SDL_GetGammaRamp.3 \ + SDL_GetKeyName.3 \ + SDL_GetKeyState.3 \ + SDL_GetModState.3 \ + SDL_GetMouseState.3 \ + SDL_GetRGB.3 \ + SDL_GetRGBA.3 \ + SDL_GetRelativeMouseState.3 \ + SDL_GetThreadID.3 \ + SDL_GetTicks.3 \ + SDL_GetVideoInfo.3 \ + SDL_GetVideoSurface.3 \ + SDL_Init.3 \ + SDL_InitSubSystem.3 \ + SDL_JoyAxisEvent.3 \ + SDL_JoyBallEvent.3 \ + SDL_JoyButtonEvent.3 \ + SDL_JoyHatEvent.3 \ + SDL_JoystickClose.3 \ + SDL_JoystickEventState.3 \ + SDL_JoystickGetAxis.3 \ + SDL_JoystickGetBall.3 \ + SDL_JoystickGetButton.3 \ + SDL_JoystickGetHat.3 \ + SDL_JoystickIndex.3 \ + SDL_JoystickName.3 \ + SDL_JoystickNumAxes.3 \ + SDL_JoystickNumBalls.3 \ + SDL_JoystickNumButtons.3 \ + SDL_JoystickNumHats.3 \ + SDL_JoystickOpen.3 \ + SDL_JoystickOpened.3 \ + SDL_JoystickUpdate.3 \ + SDL_KeyboardEvent.3 \ + SDL_KillThread.3 \ + SDL_ListModes.3 \ + SDL_LoadBMP.3 \ + SDL_LoadWAV.3 \ + SDL_LockAudio.3 \ + SDL_LockSurface.3 \ + SDL_LockYUVOverlay.3 \ + SDL_MapRGB.3 \ + SDL_MapRGBA.3 \ + SDL_MixAudio.3 \ + SDL_MouseButtonEvent.3 \ + SDL_MouseMotionEvent.3 \ + SDL_NumJoysticks.3 \ + SDL_OpenAudio.3 \ + SDL_Overlay.3 \ + SDL_Palette.3 \ + SDL_PauseAudio.3 \ + SDL_PeepEvents.3 \ + SDL_PixelFormat.3 \ + SDL_PollEvent.3 \ + SDL_PumpEvents.3 \ + SDL_PushEvent.3 \ + SDL_Quit.3 \ + SDL_QuitEvent.3 \ + SDL_QuitSubSystem.3 \ + SDL_RWFromFile.3 \ + SDL_Rect.3 \ + SDL_RemoveTimer.3 \ + SDL_ResizeEvent.3 \ + SDL_SaveBMP.3 \ + SDL_SemPost.3 \ + SDL_SemTryWait.3 \ + SDL_SemValue.3 \ + SDL_SemWait.3 \ + SDL_SemWaitTimeout.3 \ + SDL_SetAlpha.3 \ + SDL_SetClipRect.3 \ + SDL_SetColorKey.3 \ + SDL_SetColors.3 \ + SDL_SetCursor.3 \ + SDL_SetEventFilter.3 \ + SDL_SetGamma.3 \ + SDL_SetGammaRamp.3 \ + SDL_SetModState.3 \ + SDL_SetPalette.3 \ + SDL_SetTimer.3 \ + SDL_SetVideoMode.3 \ + SDL_ShowCursor.3 \ + SDL_Surface.3 \ + SDL_SysWMEvent.3 \ + SDL_ThreadID.3 \ + SDL_UnlockAudio.3 \ + SDL_UnlockSurface.3 \ + SDL_UnlockYUVOverlay.3 \ + SDL_UpdateRect.3 \ + SDL_UpdateRects.3 \ + SDL_UserEvent.3 \ + SDL_VideoDriverName.3 \ + SDL_VideoInfo.3 \ + SDL_VideoModeOK.3 \ + SDL_WM_GetCaption.3 \ + SDL_WM_GrabInput.3 \ + SDL_WM_IconifyWindow.3 \ + SDL_WM_SetCaption.3 \ + SDL_WM_SetIcon.3 \ + SDL_WM_ToggleFullScreen.3 \ + SDL_WaitEvent.3 \ + SDL_WaitThread.3 \ + SDL_WarpMouse.3 \ + SDL_WasInit.3 \ + SDL_keysym.3 \ + SDL_mutexP.3 \ + SDL_mutexV.3 +EXTRA_DIST = $(man_MANS) diff --git a/docs/man3/SDLKey.3 b/docs/man3/SDLKey.3 new file mode 100644 index 000000000..ac4e1f315 --- /dev/null +++ b/docs/man3/SDLKey.3 @@ -0,0 +1,161 @@ +.TH "SDLKey" "3" "Wed 11 Oct 2000, 22:28" "SDL" "SDL API Reference" +.SH "NAME" +SDLKey\- SDL Keysym Definitions +.SH "SDL Keysym definitions" +.PP +\fBSDLKey ASCII value Common Name\fR +.nf +\f(CWSDLK_BACKSPACE '\\b' backspace +SDLK_TAB '\\t' tab +SDLK_CLEAR clear +SDLK_RETURN '\\r' return +SDLK_PAUSE pause +SDLK_ESCAPE '^[' escape +SDLK_SPACE ' ' space +SDLK_EXCLAIM '!' exclaim +SDLK_QUOTEDBL '"' quotedbl +SDLK_HASH '#' hash +SDLK_DOLLAR '$' dollar +SDLK_AMPERSAND '&' ampersand +SDLK_QUOTE ''' quote +SDLK_LEFTPAREN '(' left parenthesis +SDLK_RIGHTPAREN ')' right parenthesis +SDLK_ASTERISK '*' asterisk +SDLK_PLUS '+' plus sign +SDLK_COMMA ',' comma +SDLK_MINUS '-' minus sign +SDLK_PERIOD '.' period +SDLK_SLASH '/' forward slash +SDLK_0 '0' 0 +SDLK_1 '1' 1 +SDLK_2 '2' 2 +SDLK_3 '3' 3 +SDLK_4 '4' 4 +SDLK_5 '5' 5 +SDLK_6 '6' 6 +SDLK_7 '7' 7 +SDLK_8 '8' 8 +SDLK_9 '9' 9 +SDLK_COLON ':' colon +SDLK_SEMICOLON ';' semicolon +SDLK_LESS '<' less-than sign +SDLK_EQUALS '=' equals sign +SDLK_GREATER '>' greater-than sign +SDLK_QUESTION '?' question mark +SDLK_AT '@' at +SDLK_LEFTBRACKET '[' left bracket +SDLK_BACKSLASH '\\' backslash +SDLK_RIGHTBRACKET ']' right bracket +SDLK_CARET '^' caret +SDLK_UNDERSCORE '_' underscore +SDLK_BACKQUOTE '`' grave +SDLK_a 'a' a +SDLK_b 'b' b +SDLK_c 'c' c +SDLK_d 'd' d +SDLK_e 'e' e +SDLK_f 'f' f +SDLK_g 'g' g +SDLK_h 'h' h +SDLK_i 'i' i +SDLK_j 'j' j +SDLK_k 'k' k +SDLK_l 'l' l +SDLK_m 'm' m +SDLK_n 'n' n +SDLK_o 'o' o +SDLK_p 'p' p +SDLK_q 'q' q +SDLK_r 'r' r +SDLK_s 's' s +SDLK_t 't' t +SDLK_u 'u' u +SDLK_v 'v' v +SDLK_w 'w' w +SDLK_x 'x' x +SDLK_y 'y' y +SDLK_z 'z' z +SDLK_DELETE '^?' delete +SDLK_KP0 keypad 0 +SDLK_KP1 keypad 1 +SDLK_KP2 keypad 2 +SDLK_KP3 keypad 3 +SDLK_KP4 keypad 4 +SDLK_KP5 keypad 5 +SDLK_KP6 keypad 6 +SDLK_KP7 keypad 7 +SDLK_KP8 keypad 8 +SDLK_KP9 keypad 9 +SDLK_KP_PERIOD '.' keypad period +SDLK_KP_DIVIDE '/' keypad divide +SDLK_KP_MULTIPLY '*' keypad multiply +SDLK_KP_MINUS '-' keypad minus +SDLK_KP_PLUS '+' keypad plus +SDLK_KP_ENTER '\\r' keypad enter +SDLK_KP_EQUALS '=' keypad equals +SDLK_UP up arrow +SDLK_DOWN down arrow +SDLK_RIGHT right arrow +SDLK_LEFT left arrow +SDLK_INSERT insert +SDLK_HOME home +SDLK_END end +SDLK_PAGEUP page up +SDLK_PAGEDOWN page down +SDLK_F1 F1 +SDLK_F2 F2 +SDLK_F3 F3 +SDLK_F4 F4 +SDLK_F5 F5 +SDLK_F6 F6 +SDLK_F7 F7 +SDLK_F8 F8 +SDLK_F9 F9 +SDLK_F10 F10 +SDLK_F11 F11 +SDLK_F12 F12 +SDLK_F13 F13 +SDLK_F14 F14 +SDLK_F15 F15 +SDLK_NUMLOCK numlock +SDLK_CAPSLOCK capslock +SDLK_SCROLLOCK scrollock +SDLK_RSHIFT right shift +SDLK_LSHIFT left shift +SDLK_RCTRL right ctrl +SDLK_LCTRL left ctrl +SDLK_RALT right alt +SDLK_LALT left alt +SDLK_RMETA right meta +SDLK_LMETA left meta +SDLK_LSUPER left windows key +SDLK_RSUPER right windows key +SDLK_MODE mode shift +SDLK_HELP help +SDLK_PRINT print-screen +SDLK_SYSREQ SysRq +SDLK_BREAK break +SDLK_MENU menu +SDLK_POWER power +SDLK_EURO euro\fR +.fi + + +.SH "SDL modifier definitions" +.PP +\fBSDL Modifier Meaning\fR +.nf +\f(CWKMOD_NONE No modifiers applicable +KMOD_NUM Numlock is down +KMOD_CAPS Capslock is down +KMOD_LCTRL Left Control is down +KMOD_RCTRL Right Control is down +KMOD_RSHIFT Right Shift is down +KMOD_LSHIFT Left Shift is down +KMOD_RALT Right Alt is down +KMOD_LALT Left Alt is down +KMOD_CTRL A Control key is down +KMOD_SHIFT A Shift key is down +KMOD_ALT An Alt key is down\fR +.fi + diff --git a/docs/man3/SDL_ActiveEvent.3 b/docs/man3/SDL_ActiveEvent.3 new file mode 100644 index 000000000..7e7f924c2 --- /dev/null +++ b/docs/man3/SDL_ActiveEvent.3 @@ -0,0 +1,38 @@ +.TH "SDL_ActiveEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ActiveEvent\- Application visibility event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 gain; + Uint8 state; +} SDL_ActiveEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_ACTIVEEVENT\&.\fP +.TP 20 +\fBgain\fR +0 if the event is a loss or 1 if it is a gain\&. +.TP 20 +\fBstate\fR +\fBSDL_APPMOUSEFOCUS\fP if mouse focus was gained or lost, \fBSDL_APPINPUTFOCUS\fP if input focus was gained or lost, or \fBSDL_APPACTIVE\fP if the application was iconified (\fBgain\fR=0) or restored(\fBgain\fR=1)\&. +.SH "DESCRIPTION" +.PP +\fBSDL_ActiveEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_ACTIVEEVENT\fP is reported\&. +.PP +When the mouse leaves or enters the window area a \fBSDL_APPMOUSEFOCUS\fP type activation event occurs, if the mouse entered the window then \fBgain\fR will be 1, otherwise \fBgain\fR will be 0\&. A \fBSDL_APPINPUTFOCUS\fP type activation event occurs when the application loses or gains keyboard focus\&. This usually occurs when another application is made active\&. Finally, a \fBSDL_APPACTIVE\fP type event occurs when the application is either minimised/iconified (\fBgain\fR=0) or restored\&. +.PP +.RS +\fBNote: +.PP +This event does not occur when an application window is first created\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_GetAppState\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_AddTimer.3 b/docs/man3/SDL_AddTimer.3 new file mode 100644 index 000000000..8a3b8beae --- /dev/null +++ b/docs/man3/SDL_AddTimer.3 @@ -0,0 +1,38 @@ +.TH "SDL_AddTimer" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_AddTimer\- Add a timer which will call a callback after the specified number of milliseconds has elapsed\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_TimerID \fBSDL_AddTimer\fP\fR(\fBUint32 interval, SDL_NewTimerCallback callback, void *param\fR); +.SH "CALLBACK" +.PP +.nf +\f(CW/* type definition for the "new" timer callback function */ +typedef Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param);\fR +.fi +.PP +.SH "DESCRIPTION" +.PP +Adds a callback function to be run after the specified number of milliseconds has elapsed\&. The callback function is passed the current timer interval and the user supplied parameter from the \fBSDL_AddTimer\fP call and returns the next timer interval\&. If the returned value from the callback is the same as the one passed in, the periodic alarm continues, otherwise a new alarm is scheduled\&. +.PP +To cancel a currently running timer call \fISDL_RemoveTimer\fR with the timer ID returned from \fBSDL_AddTimer\fP\&. +.PP +The timer callback function may run in a different thread than your main program, and so shouldn\&'t call any functions from within itself\&. +.PP +The maximum resolution of this timer is 10 ms, which means that if you request a 16 ms timer, your callback will run approximately 20 ms later on an unloaded system\&. If you wanted to set a flag signaling a frame update at 30 frames per second (every 33 ms), you might set a timer for 30 ms (see example below)\&. If you use this function, you need to pass \fBSDL_INIT_TIMER\fP to \fISDL_Init\fR\&. +.SH "RETURN VALUE" +.PP +Returns an ID value for the added timer or \fBNULL\fR if there was an error\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWmy_timer_id = SDL_AddTimer((33/10)*10, my_callbackfunc, my_callback_param);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_RemoveTimer\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_AudioCVT.3 b/docs/man3/SDL_AudioCVT.3 new file mode 100644 index 000000000..dff5aa168 --- /dev/null +++ b/docs/man3/SDL_AudioCVT.3 @@ -0,0 +1,68 @@ +.TH "SDL_AudioCVT" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_AudioCVT\- Audio Conversion Structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + int needed; + Uint16 src_format; + Uint16 dest_format; + double rate_incr; + Uint8 *buf; + int len; + int len_cvt; + int len_mult; + double len_ratio; + void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format); + int filter_index; +} SDL_AudioCVT;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBneeded\fR +Set to one if the conversion is possible +.TP 20 +\fBsrc_format\fR +Audio format of the source +.TP 20 +\fBdest_format\fR +Audio format of the destination +.TP 20 +\fBrate_incr\fR +Rate conversion increment +.TP 20 +\fBbuf\fR +Audio buffer +.TP 20 +\fBlen\fR +Length of the original audio buffer in bytes +.TP 20 +\fBlen_cvt\fR +Length of converted audio buffer in bytes (calculated) +.TP 20 +\fBlen_mult\fR +\fBbuf\fR must be \fBlen\fR*\fBlen_mult\fR bytes in size(calculated) +.TP 20 +\fBlen_ratio\fR +Final audio size is \fBlen\fR*\fBlen_ratio\fR +.TP 20 +\fBfilters[10](\&.\&.)\fR +Pointers to functions needed for this conversion +.TP 20 +\fBfilter_index\fR +Current conversion function +.SH "DESCRIPTION" +.PP +The \fBSDL_AudioCVT\fR is used to convert audio data between different formats\&. A \fBSDL_AudioCVT\fR structure is created with the \fI\fBSDL_BuildAudioCVT\fP\fR function, while the actual conversion is done by the \fI\fBSDL_ConvertAudio\fP\fR function\&. +.PP +Many of the fields in the \fBSDL_AudioCVT\fR structure should be considered private and their function will not be discussed here\&. +.IP "\fBUint8 *\fP\fBbuf\fR" 10This points to the audio data that will be used in the conversion\&. It is both the source and the destination, which means the converted audio data overwrites the original data\&. It also means that the converted data may be larger than the original data (if you were converting from 8-bit to 16-bit, for instance), so you must ensure \fBbuf\fR is large enough\&. See below\&. +.IP "\fBint\fP \fBlen\fR" 10This is the length of the original audio data in bytes\&. +.IP "\fBint\fP \fBlen_mult\fR" 10As explained above, the audio buffer needs to be big enough to store the converted data, which may be bigger than the original audio data\&. The length of \fBbuf\fR should be \fBlen\fR*\fBlen_mult\fR\&. +.IP "\fBdouble\fP \fBlen_ratio\fR" 10When you have finished converting your audio data, you need to know how much of your audio buffer is valid\&. \fBlen\fR*\fBlen_ratio\fR is the size of the converted audio data in bytes\&. This is very similar to \fBlen_mult\fR, however when the convert audio data is shorter than the original \fBlen_mult\fR would be 1\&. \fBlen_ratio\fR, on the other hand, would be a fractional number between 0 and 1\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_BuildAudioCVT\fP\fR, \fI\fBSDL_ConvertAudio\fP\fR, \fI\fBSDL_AudioSpec\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_AudioSpec.3 b/docs/man3/SDL_AudioSpec.3 new file mode 100644 index 000000000..2a27ca167 --- /dev/null +++ b/docs/man3/SDL_AudioSpec.3 @@ -0,0 +1,70 @@ +.TH "SDL_AudioSpec" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_AudioSpec\- Audio Specification Structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + int freq; + Uint16 format; + Uint8 channels; + Uint8 silence; + Uint16 samples; + Uint32 size; + void (*callback)(void *userdata, Uint8 *stream, int len); + void *userdata; +} SDL_AudioSpec;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBfreq\fR +Audio frequency in samples per second +.TP 20 +\fBformat\fR +Audio data format +.TP 20 +\fBchannels\fR +Number of channels: 1 mono, 2 stereo +.TP 20 +\fBsilence\fR +Audio buffer silence value (calculated) +.TP 20 +\fBsamples\fR +Audio buffer size in samples +.TP 20 +\fBsize\fR +Audio buffer size in bytes (calculated) +.TP 20 +\fBcallback(\&.\&.)\fR +Callback function for filling the audio buffer +.TP 20 +\fBuserdata\fR +Pointer the user data which is passed to the callback function +.SH "DESCRIPTION" +.PP +The \fBSDL_AudioSpec\fR structure is used to describe the format of some audio data\&. This structure is used by \fI\fBSDL_OpenAudio\fP\fR and \fI\fBSDL_LoadWAV\fP\fR\&. While all fields are used by \fBSDL_OpenAudio\fP only \fBfreq\fR, \fBformat\fR, \fBsamples\fR and \fBchannels\fR are used by \fBSDL_LoadWAV\fP\&. We will detail these common members here\&. +.TP 20 +\fBfreq\fR +The number of samples sent to the sound device every second\&. Common values are 11025, 22050 and 44100\&. The higher the better\&. +.TP 20 +\fBformat\fR +Specifies the size and type of each sample element +.IP "\fBAUDIO_U8\fP" 10Unsigned 8-bit samples +.IP "\fBAUDIO_S8\fP" 10Signed 8-bit samples +.IP "\fBAUDIO_U16\fP or \fBAUDIO_U16LSB\fP" 10Unsigned 16-bit little-endian samples +.IP "\fBAUDIO_S16\fP or \fBAUDIO_S16LSB\fP" 10Signed 16-bit little-endian samples +.IP "\fBAUDIO_U16MSB\fP" 10Unsigned 16-bit big-endian samples +.IP "\fBAUDIO_S16MSB\fP" 10Signed 16-bit big-endian samples +.IP "\fBAUDIO_U16SYS\fP" 10Either \fBAUDIO_U16LSB\fP or \fBAUDIO_U16MSB\fP depending on you systems endianness +.IP "\fBAUDIO_S16SYS\fP" 10Either \fBAUDIO_S16LSB\fP or \fBAUDIO_S16MSB\fP depending on you systems endianness +.TP 20 +\fBchannels\fR +The number of seperate sound channels\&. 1 is mono (single channel), 2 is stereo (dual channel)\&. +.TP 20 +\fBsamples\fR +When used with \fI\fBSDL_OpenAudio\fP\fR this refers to the size of the audio buffer in samples\&. A sample a chunk of audio data of the size specified in \fBformat\fR mulitplied by the number of channels\&. When the \fBSDL_AudioSpec\fR is used with \fI\fBSDL_LoadWAV\fP\fR \fBsamples\fR is set to 4096\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_OpenAudio\fP\fR, \fI\fBSDL_LoadWAV\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_BlitSurface.3 b/docs/man3/SDL_BlitSurface.3 new file mode 100644 index 000000000..f4de82e75 --- /dev/null +++ b/docs/man3/SDL_BlitSurface.3 @@ -0,0 +1,45 @@ +.TH "SDL_BlitSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_BlitSurface\- This performs a fast blit from the source surface to the destination surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_BlitSurface\fP\fR(\fBSDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect\fR); +.SH "DESCRIPTION" +.PP +This performs a fast blit from the source surface to the destination surface\&. +.PP +Only the position is used in the \fBdstrect\fR (the width and height are ignored)\&. +.PP +If either \fBsrcrect\fR or \fBdstrect\fR are \fBNULL\fP, the entire surface (\fBsrc\fR or \fBdst\fR) is copied\&. +.PP +The final blit rectangle is saved in \fBdstrect\fR after all clipping is performed (\fBsrcrect\fR is not modified)\&. +.PP +The blit function should not be called on a locked surface\&. +.PP +.RS +\fBNote: +.PP +The results of blitting operations vary greatly depending on whether \fBSDL_SRCAPLHA\fP is set or not\&. See \fISDL_SetAlpha\fR\&. +.RE +.SH "RETURN VALUE" +.PP +If the blit is successful, it returns \fB0\fR, otherwise it returns \fB-1\fR\&. +.PP +If either of the surfaces were in video memory, and the blit returns \fB-2\fR, the video memory was lost, so it should be reloaded with artwork and re-blitted: +.PP +.nf +\f(CW while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { + while ( SDL_LockSurface(image)) < 0 ) + Sleep(10); + -- Write image pixels to image->pixels -- + SDL_UnlockSurface(image); + }\fR +.fi +.PP + This happens under DirectX 5\&.0 when the system switches away from your fullscreen application\&. Locking the surface will also fail until you have access to the video memory again\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_LockSurface\fP\fR, \fI\fBSDL_FillRect\fP\fR, \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_Rect\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_BuildAudioCVT.3 b/docs/man3/SDL_BuildAudioCVT.3 new file mode 100644 index 000000000..25b01a19f --- /dev/null +++ b/docs/man3/SDL_BuildAudioCVT.3 @@ -0,0 +1,23 @@ +.TH "SDL_BuildAudioCVT" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_BuildAudioCVT\- Initializes a SDL_AudioCVT structure for conversion +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_BuildAudioCVT\fP\fR(\fBSDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int dst_rate\fR); +.SH "DESCRIPTION" +.PP +Before an \fI\fBSDL_AudioCVT\fR\fR structure can be used to convert audio data it must be initialized with source and destination information\&. +.PP +\fBsrc_format\fR and \fBdst_format\fR are the source and destination format of the conversion\&. (For information on audio formats see \fI\fB SDL_AudioSpec\fR\fR)\&. \fBsrc_channels\fR and \fBdst_channels\fR are the number of channels in the source and destination formats\&. Finally, \fBsrc_rate\fR and \fBdst_rate\fR are the frequency or samples-per-second of the source and destination formats\&. Once again, see \fI\fBSDL_AudioSpec\fR\fR\&. +.SH "RETURN VALUES" +.PP +Returns \fB-1\fR if the filter could not be built or 1 if it could\&. +.SH "EXAMPLES" +.PP +See \fI\fBSDL_ConvertAudio\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_ConvertAudio\fP\fR, \fI\fBSDL_AudioCVT\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CD.3 b/docs/man3/SDL_CD.3 new file mode 100644 index 000000000..088781803 --- /dev/null +++ b/docs/man3/SDL_CD.3 @@ -0,0 +1,57 @@ +.TH "SDL_CD" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CD\- CDROM Drive Information +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + int id; + CDstatus status; + int numtracks; + int cur_track; + int cur_frame; + SDL_CDtrack track[SDL_MAX_TRACKS+1]; +} SDL_CD;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBid\fR +Private drive identifier +.TP 20 +\fBstatus\fR +Drive \fIstatus\fR +.TP 20 +\fBnumtracks\fR +Number of tracks on the CD +.TP 20 +\fBcur_track\fR +Current track +.TP 20 +\fBcur_frame\fR +Current frame offset within the track +.TP 20 +\fBtrack\fR[SDL_MAX_TRACKS+1] +Array of track descriptions\&. (see \fI\fBSDL_CDtrack\fR\fR) +.SH "DESCRIPTION" +.PP +An \fBSDL_CD\fR structure is returned by \fI\fBSDL_CDOpen\fP\fR\&. It represents an opened CDROM device and stores information on the layout of the tracks on the disc\&. +.PP +A frame is the base data unit of a CD\&. \fBCD_FPS\fP frames is equal to 1 second of music\&. SDL provides two macros for converting between time and frames: \fBFRAMES_TO_MSF(f, M,S,F)\fP and \fBMSF_TO_FRAMES\fP\&. +.SH "EXAMPLES" +.PP +.nf +\f(CWint min, sec, frame; +int frame_offset; + +FRAMES_TO_MSF(cdrom->cur_frame, &min, &sec, &frame); +printf("Current Position: %d minutes, %d seconds, %d frames +", min, sec, frame); + +frame_offset=MSF_TO_FRAMES(min, sec, frame);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDOpen\fP\fR, \fI\fBSDL_CDtrack\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDClose.3 b/docs/man3/SDL_CDClose.3 new file mode 100644 index 000000000..bc60cb558 --- /dev/null +++ b/docs/man3/SDL_CDClose.3 @@ -0,0 +1,15 @@ +.TH "SDL_CDClose" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDClose\- Closes a SDL_CD handle +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_CDClose\fP\fR(\fBSDL_CD *cdrom\fR); +.SH "DESCRIPTION" +.PP +Closes the given \fBcdrom\fR handle\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDOpen\fP\fR, \fI\fBSDL_CD\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDEject.3 b/docs/man3/SDL_CDEject.3 new file mode 100644 index 000000000..f2848d8e9 --- /dev/null +++ b/docs/man3/SDL_CDEject.3 @@ -0,0 +1,18 @@ +.TH "SDL_CDEject" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDEject\- Ejects a CDROM +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDEject\fP\fR(\fBSDL_CD *cdrom\fR); +.SH "DESCRIPTION" +.PP +Ejects the given \fBcdrom\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CD\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDName.3 b/docs/man3/SDL_CDName.3 new file mode 100644 index 000000000..eb890798f --- /dev/null +++ b/docs/man3/SDL_CDName.3 @@ -0,0 +1,23 @@ +.TH "SDL_CDName" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDName\- Returns a human-readable, system-dependent identifier for the CD-ROM\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBconst char *\fBSDL_CDName\fP\fR(\fBint drive\fR); +.SH "DESCRIPTION" +.PP +Returns a human-readable, system-dependent identifier for the CD-ROM\&. \fBdrive\fR is the index of the drive\&. Drive indices start to 0 and end at \fBSDL_CDNumDrives()\fP-1\&. +.SH "EXAMPLES" +.PP +.IP " \(bu" 6 +"/dev/cdrom" +.IP " \(bu" 6 +"E:" +.IP " \(bu" 6 +"/dev/disk/ide/1/master" +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDNumDrives\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDNumDrives.3 b/docs/man3/SDL_CDNumDrives.3 new file mode 100644 index 000000000..ebcfd9be5 --- /dev/null +++ b/docs/man3/SDL_CDNumDrives.3 @@ -0,0 +1,15 @@ +.TH "SDL_CDNumDrives" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDNumDrives\- Returns the number of CD-ROM drives on the system\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDNumDrives\fP\fR(\fBvoid\fR) +.SH "DESCRIPTION" +.PP +Returns the number of CD-ROM drives on the system\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDOpen\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDOpen.3 b/docs/man3/SDL_CDOpen.3 new file mode 100644 index 000000000..fc424d776 --- /dev/null +++ b/docs/man3/SDL_CDOpen.3 @@ -0,0 +1,58 @@ +.TH "SDL_CDOpen" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDOpen\- Opens a CD-ROM drive for access\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_CD *\fBSDL_CDOpen\fP\fR(\fBint drive\fR); +.SH "DESCRIPTION" +.PP +Opens a CD-ROM drive for access\&. It returns a \fI\fBSDL_CD\fR\fR structure on success, or \fBNULL\fP if the drive was invalid or busy\&. This newly opened CD-ROM becomes the default CD used when other CD functions are passed a \fBNULL\fP CD-ROM handle\&. +.PP +Drives are numbered starting with 0\&. Drive 0 is the system default CD-ROM\&. +.SH "EXAMPLES" +.PP +.nf +\f(CWSDL_CD *cdrom; +int cur_track; +int min, sec, frame; +SDL_Init(SDL_INIT_CDROM); +atexit(SDL_Quit); + +/* Check for CD drives */ +if(!SDL_CDNumDrives()){ + /* None found */ + fprintf(stderr, "No CDROM devices available +"); + exit(-1); +} + +/* Open the default drive */ +cdrom=SDL_CDOpen(0); + +/* Did if open? Check if cdrom is NULL */ +if(!cdrom){ + fprintf(stderr, "Couldn\&'t open drive: %s +", SDL_GetError()); + exit(-1); +} + +/* Print Volume info */ +printf("Name: %s +", SDL_CDName(0)); +printf("Tracks: %d +", cdrom->numtracks); +for(cur_track=0;cur_track < cdrom->numtracks; cur_track++){ + FRAMES_TO_MSF(cdrom->track[cur_track]\&.length, &min, &sec, &frame); + printf(" Track %d: Length %d:%d +", cur_track, min, sec); +} + +SDL_CDClose(cdrom);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CD\fR\fR, \fI\fBSDL_CDtrack\fR\fR, \fI\fBSDL_CDClose\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDPause.3 b/docs/man3/SDL_CDPause.3 new file mode 100644 index 000000000..7eed27ff6 --- /dev/null +++ b/docs/man3/SDL_CDPause.3 @@ -0,0 +1,18 @@ +.TH "SDL_CDPause" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDPause\- Pauses a CDROM +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDPause\fP\fR(\fBSDL_CD *cdrom\fR); +.SH "DESCRIPTION" +.PP +Pauses play on the given \fBcdrom\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDPlay\fP\fR, \fI\fBSDL_CDResume\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDPlay.3 b/docs/man3/SDL_CDPlay.3 new file mode 100644 index 000000000..82a75670b --- /dev/null +++ b/docs/man3/SDL_CDPlay.3 @@ -0,0 +1,18 @@ +.TH "SDL_CDPlay" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDPlay\- Play a CD +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDPlay\fP\fR(\fBSDL_CD *cdrom, int start, int length\fR); +.SH "DESCRIPTION" +.PP +Plays the given \fBcdrom\fR, starting a frame \fBstart\fR for \fBlength\fR frames\&. +.SH "RETURN VALUES" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDPlayTracks\fP\fR, \fI\fBSDL_CDStop\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDPlayTracks.3 b/docs/man3/SDL_CDPlayTracks.3 new file mode 100644 index 000000000..83ad9a919 --- /dev/null +++ b/docs/man3/SDL_CDPlayTracks.3 @@ -0,0 +1,47 @@ +.TH "SDL_CDPlayTracks" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDPlayTracks\- Play the given CD track(s) +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDPlayTracks\fP\fR(\fBSDL_CD *cdrom, int start_track, int start_frame, int ntracks, int nframes)\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_CDPlayTracks\fP plays the given CD starting at track \fBstart_track\fR, for \fBntracks\fR tracks\&. +.PP +\fBstart_frame\fR is the frame offset, from the beginning of the \fBstart_track\fR, at which to start\&. \fBnframes\fR is the frame offset, from the beginning of the last track (\fBstart_track\fR+\fBntracks\fR), at which to end playing\&. +.PP +\fBSDL_CDPlayTracks\fP should only be called after calling \fI\fBSDL_CDStatus\fP\fR to get track information about the CD\&. +.PP +.RS +\fBNote: +.PP +Data tracks are ignored\&. +.RE +.SH "RETURN VALUE" +.PP +Returns \fB0\fR, or \fB-1\fR if there was an error\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CW/* assuming cdrom is a previously opened device */ +/* Play the entire CD */ +if(CD_INDRIVE(SDL_CDStatus(cdrom))) + SDL_CDPlayTracks(cdrom, 0, 0, 0, 0); + +/* Play the first track */ +if(CD_INDRIVE(SDL_CDStatus(cdrom))) + SDL_CDPlayTracks(cdrom, 0, 0, 1, 0); + +/* Play first 15 seconds of the 2nd track */ +if(CD_INDRIVE(SDL_CDStatus(cdrom))) + SDL_CDPlayTracks(cdrom, 1, 0, 0, CD_FPS*15);\fR +.fi +.PP + +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDPlay\fP\fR, \fI\fBSDL_CDStatus\fP\fR, \fI\fBSDL_CD\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_CDResume.3 b/docs/man3/SDL_CDResume.3 new file mode 100644 index 000000000..245b7925f --- /dev/null +++ b/docs/man3/SDL_CDResume.3 @@ -0,0 +1,18 @@ +.TH "SDL_CDResume" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDResume\- Resumes a CDROM +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDResume\fP\fR(\fBSDL_CD *cdrom\fR); +.SH "DESCRIPTION" +.PP +Resumes play on the given \fBcdrom\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDPlay\fP\fR, \fI\fBSDL_CDPause\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CDStatus.3 b/docs/man3/SDL_CDStatus.3 new file mode 100644 index 000000000..215303e93 --- /dev/null +++ b/docs/man3/SDL_CDStatus.3 @@ -0,0 +1,59 @@ +.TH "SDL_CDStatus" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDStatus\- Returns the current status of the given drive\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBCDstatus \fBSDL_CDStatus\fP\fR(\fBSDL_CD *cdrom\fR); +\fB/* Given a status, returns true if there\&'s a disk in the drive */ +#define CD_INDRIVE(status) ((int)status > 0) +.SH "DESCRIPTION" +.PP +This function returns the current status of the given drive\&. Status is described like so: +.PP +.nf +\f(CWtypedef enum { + CD_TRAYEMPTY, + CD_STOPPED, + CD_PLAYING, + CD_PAUSED, + CD_ERROR = -1 +} CDstatus;\fR +.fi +.PP +.PP +If the drive has a CD in it, the table of contents of the CD and current play position of the CD will be stored in the SDL_CD structure\&. +.PP +The macro \fBCD_INDRIVE\fP is provided for convenience, and given a status returns true if there\&'s a disk in the drive\&. +.PP +.RS +\fBNote: +.PP +\fBSDL_CDStatus\fP also updates the \fI\fBSDL_CD\fR\fR structure passed to it\&. +.RE +.SH "EXAMPLE" +.PP +.nf +\f(CWint playTrack(int track) +{ + int playing = 0; + + if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) { + /* clamp to the actual number of tracks on the CD */ + if (track >= cdrom->numtracks) { + track = cdrom->numtracks-1; + } + + if ( SDL_CDPlayTracks(cdrom, track, 0, 1, 0) == 0 ) { + playing = 1; + } + } + return playing; +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CD\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CDStop.3 b/docs/man3/SDL_CDStop.3 new file mode 100644 index 000000000..34c17b805 --- /dev/null +++ b/docs/man3/SDL_CDStop.3 @@ -0,0 +1,18 @@ +.TH "SDL_CDStop" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDStop\- Stops a CDROM +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_CDStop\fP\fR(\fBSDL_CD *cdrom\fR); +.SH "DESCRIPTION" +.PP +Stops play on the given \fBcdrom\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CDPlay\fP\fR, +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CDtrack.3 b/docs/man3/SDL_CDtrack.3 new file mode 100644 index 000000000..4217b93d2 --- /dev/null +++ b/docs/man3/SDL_CDtrack.3 @@ -0,0 +1,40 @@ +.TH "SDL_CDtrack" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CDtrack\- CD Track Information Structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 id; + Uint8 type; + Uint32 length; + Uint32 offset; +} SDL_CDtrack;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBid\fR +Track number (0-99) +.TP 20 +\fBtype\fR +\fBSDL_AUDIO_TRACK\fP or \fBSDL_DATA_TRACK\fP +.TP 20 +\fBlength\fR +Length, in frames, of this track +.TP 20 +\fBoffset\fR +Frame offset to the beginning of this track +.SH "DESCRIPTION" +.PP +\fBSDL_CDtrack\fR stores data on each track on a CD, its fields should be pretty self explainatory\&. It is a member a the \fI\fBSDL_CD\fR\fR structure\&. +.PP +.RS +\fBNote: +.PP +Frames can be converted to standard timings\&. There are \fBCD_FPS\fP frames per second, so \fBSDL_CDtrack\fR\&.\fBlength\fR/\fBCD_FPS\fP=length_in_seconds\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_CD\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CloseAudio.3 b/docs/man3/SDL_CloseAudio.3 new file mode 100644 index 000000000..789e9a987 --- /dev/null +++ b/docs/man3/SDL_CloseAudio.3 @@ -0,0 +1,15 @@ +.TH "SDL_CloseAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CloseAudio\- Shuts down audio processing and closes the audio device\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_CloseAudio\fP\fR(\fBvoid\fR) +.SH "DESCRIPTION" +.PP +This function shuts down audio processing and closes the audio device\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_OpenAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_Color.3 b/docs/man3/SDL_Color.3 new file mode 100644 index 000000000..d39c8f701 --- /dev/null +++ b/docs/man3/SDL_Color.3 @@ -0,0 +1,34 @@ +.TH "SDL_Color" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Color\- Format independent color description +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 r; + Uint8 g; + Uint8 b; + Uint8 unused; +} SDL_Color;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBr\fR +Red intensity +.TP 20 +\fBg\fR +Green intensity +.TP 20 +\fBb\fR +Blue intensity +.TP 20 +\fBunused\fR +Unused +.SH "DESCRIPTION" +.PP +\fBSDL_Color\fR describes a color in a format independent way\&. You can convert a \fBSDL_Color\fR to a pixel value for a certain pixel format using \fI\fBSDL_MapRGB\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_PixelFormat\fR\fR, \fI\fBSDL_SetColors\fP\fR, \fI\fBSDL_Palette\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_CondBroadcast.3 b/docs/man3/SDL_CondBroadcast.3 new file mode 100644 index 000000000..da91bd315 --- /dev/null +++ b/docs/man3/SDL_CondBroadcast.3 @@ -0,0 +1,16 @@ +.TH "SDL_CondBroadcast" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CondBroadcast\- Restart all threads waiting on a condition variable +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_CondBroadcast\fP\fR(\fBSDL_cond *cond\fR); +.SH "DESCRIPTION" +.PP +Restarts all threads that are waiting on the condition variable, \fBcond\fR\&. Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CondSignal\fP\fR, \fI\fBSDL_CondWait\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CondSignal.3 b/docs/man3/SDL_CondSignal.3 new file mode 100644 index 000000000..0a9fb7006 --- /dev/null +++ b/docs/man3/SDL_CondSignal.3 @@ -0,0 +1,16 @@ +.TH "SDL_CondSignal" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CondSignal\- Restart a thread wait on a condition variable +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_CondSignal\fP\fR(\fBSDL_cond *cond\fR); +.SH "DESCRIPTION" +.PP +Restart one of the threads that are waiting on the condition variable, \fBcond\fR\&. Returns \fB0\fR on success of \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CondWait\fP\fR, \fI\fBSDL_CondBroadcast\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CondWait.3 b/docs/man3/SDL_CondWait.3 new file mode 100644 index 000000000..1390c6fdc --- /dev/null +++ b/docs/man3/SDL_CondWait.3 @@ -0,0 +1,16 @@ +.TH "SDL_CondWait" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CondWait\- Wait on a condition variable +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_CondWait\fP\fR(\fBSDL_cond *cond, SDL_mutex *mut\fR); +.SH "DESCRIPTION" +.PP +Wait on the condition variable \fBcond\fR and unlock the provided mutex\&. The mutex must the locked before entering this function\&. Returns \fB0\fR when it is signalled, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CondWaitTimeout\fP\fR, \fI\fBSDL_CondSignal\fP\fR, \fI\fBSDL_mutexP\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CondWaitTimeout.3 b/docs/man3/SDL_CondWaitTimeout.3 new file mode 100644 index 000000000..e8a9acf4b --- /dev/null +++ b/docs/man3/SDL_CondWaitTimeout.3 @@ -0,0 +1,16 @@ +.TH "SDL_CondWaitTimeout" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CondWaitTimeout\- Wait on a condition variable, with timeout +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_CondWaitTimeout\fP\fR(\fBSDL_cond *cond, SDL_mutex *mutex, Uint32 ms\fR); +.SH "DESCRIPTION" +.PP +Wait on the condition variable \fBcond\fR for, at most, \fBms\fR milliseconds\&. \fBmut\fR is unlocked so it must be locked when the function is called\&. Returns \fBSDL_MUTEX_TIMEDOUT\fP if the condition is not signalled in the allotted time, \fB0\fR if it was signalled or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CondWait\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_ConvertAudio.3 b/docs/man3/SDL_ConvertAudio.3 new file mode 100644 index 000000000..0d185058c --- /dev/null +++ b/docs/man3/SDL_ConvertAudio.3 @@ -0,0 +1,95 @@ +.TH "SDL_ConvertAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ConvertAudio\- Convert audio data to a desired audio format\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_ConvertAudio\fP\fR(\fBSDL_AudioCVT *cvt\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_ConvertAudio\fP takes one parameter, \fBcvt\fR, which was previously initilized\&. Initilizing a \fI\fBSDL_AudioCVT\fR\fR is a two step process\&. First of all, the structure must be passed to \fI\fBSDL_BuildAudioCVT\fP\fR along with source and destination format parameters\&. Secondly, the \fBcvt\fR->\fBbuf\fR and \fBcvt\fR->\fBlen\fR fields must be setup\&. \fBcvt\fR->\fBbuf\fR should point to the audio data and \fBcvt\fR->\fBlen\fR should be set to the length of the audio data in bytes\&. Remember, the length of the buffer pointed to by \fBbuf\fR show be \fBlen\fR*\fBlen_mult\fR bytes in length\&. +.PP +Once the \fBSDL_AudioCVT\fRstructure is initilized then we can pass it to \fBSDL_ConvertAudio\fP, which will convert the audio data pointer to by \fBcvt\fR->\fBbuf\fR\&. If \fBSDL_ConvertAudio\fP returned \fB0\fR then the conversion was completed successfully, otherwise \fB-1\fR is returned\&. +.PP +If the conversion completed successfully then the converted audio data can be read from \fBcvt\fR->\fBbuf\fR\&. The amount of valid, converted, audio data in the buffer is equal to \fBcvt\fR->\fBlen\fR*\fBcvt\fR->\fBlen_ratio\fR\&. +.SH "EXAMPLES" +.PP +.nf +\f(CW/* Converting some WAV data to hardware format */ +void my_audio_callback(void *userdata, Uint8 *stream, int len); + +SDL_AudioSpec *desired, *obtained; +SDL_AudioSpec wav_spec; +SDL_AudioCVT wav_cvt; +Uint32 wav_len; +Uint8 *wav_buf; +int ret; + +/* Allocated audio specs */ +desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec)); +obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec)); + +/* Set desired format */ +desired->freq=22050; +desired->format=AUDIO_S16LSB; +desired->samples=8192; +desired->callback=my_audio_callback; +desired->userdata=NULL; + +/* Open the audio device */ +if ( SDL_OpenAudio(desired, obtained) < 0 ){ + fprintf(stderr, "Couldn\&'t open audio: %s +", SDL_GetError()); + exit(-1); +} + +free(desired); + +/* Load the test\&.wav */ +if( SDL_LoadWAV("test\&.wav", &wav_spec, &wav_buf, &wav_len) == NULL ){ + fprintf(stderr, "Could not open test\&.wav: %s +", SDL_GetError()); + SDL_CloseAudio(); + free(obtained); + exit(-1); +} + +/* Build AudioCVT */ +ret = SDL_BuildAudioCVT(&wav_cvt, + wav_spec\&.format, wav_spec\&.channels, wav_spec\&.freq, + obtained->format, obtained->channels, obtained->freq); + +/* Check that the convert was built */ +if(ret==-1){ + fprintf(stderr, "Couldn\&'t build converter! +"); + SDL_CloseAudio(); + free(obtained); + SDL_FreeWAV(wav_buf); +} + +/* Setup for conversion */ +wav_cvt\&.buf=(Uint8 *)malloc(wav_len*wav_cvt\&.len_mult); +wav_cvt\&.len=wav_len; +memcpy(wav_cvt\&.buf, wav_buf, wav_len); + +/* We can delete to original WAV data now */ +SDL_FreeWAV(wav_buf); + +/* And now we\&'re ready to convert */ +SDL_ConvertAudio(&wav_cvt); + +/* do whatever */ +\&. +\&. +\&. +\&. + +\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_BuildAudioCVT\fP\fR, \fI\fBSDL_AudioCVT\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_ConvertSurface.3 b/docs/man3/SDL_ConvertSurface.3 new file mode 100644 index 000000000..6984d2fe6 --- /dev/null +++ b/docs/man3/SDL_ConvertSurface.3 @@ -0,0 +1,22 @@ +.TH "SDL_ConvertSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ConvertSurface\- Converts a surface to the same format as another surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_ConvertSurface\fP\fR(\fBSDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags\fR); +.SH "DESCRIPTION" +.PP +Creates a new surface of the specified format, and then copies and maps the given surface to it\&. If this function fails, it returns \fBNULL\fP\&. +.PP +The \fBflags\fR parameter is passed to \fI\fBSDL_CreateRGBSurface\fP\fR and has those semantics\&. +.PP +This function is used internally by \fI\fBSDL_DisplayFormat\fP\fR\&. +.SH "RETURN VALUE" +.PP +Returns either a pointer to the new surface, or \fBNULL\fP on error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateRGBSurface\fP\fR, \fI\fBSDL_DisplayFormat\fP\fR, \fI\fBSDL_PixelFormat\fR\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_CreateCond.3 b/docs/man3/SDL_CreateCond.3 new file mode 100644 index 000000000..8d976e512 --- /dev/null +++ b/docs/man3/SDL_CreateCond.3 @@ -0,0 +1,31 @@ +.TH "SDL_CreateCond" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateCond\- Create a condition variable +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBSDL_cond *\fBSDL_CreateCond\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Creates a condition variable\&. +.SH "EXAMPLES" +.PP +.nf +\f(CWSDL_cond *cond; + +cond=SDL_CreateCond(); +\&. +\&. +/* Do stuff */ + +\&. +\&. +SDL_DestroyCond(cond);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_DestroyCond\fP\fR, \fI\fBSDL_CondWait\fP\fR, \fI\fBSDL_CondSignal\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CreateCursor.3 b/docs/man3/SDL_CreateCursor.3 new file mode 100644 index 000000000..aef17d417 --- /dev/null +++ b/docs/man3/SDL_CreateCursor.3 @@ -0,0 +1,120 @@ +.TH "SDL_CreateCursor" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateCursor\- Creates a new mouse cursor\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Cursor *\fBSDL_CreateCursor\fP\fR(\fBUint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y\fR); +.SH "DESCRIPTION" +.PP +Create a cursor using the specified \fBdata\fR and \fBmask\fR (in MSB format)\&. The cursor width must be a multiple of 8 bits\&. +.PP +The cursor is created in black and white according to the following: +.TP 20 +\fBData / Mask\fR +\fBResulting pixel on screen\fR +.TP 20 +0 / 1 +White +.TP 20 +1 / 1 +Black +.TP 20 +0 / 0 +Transparent +.TP 20 +1 / 0 +Inverted color if possible, black if not\&. +.PP +Cursors created with this function must be freed with \fISDL_FreeCursor\fR\&. +.SH "EXAMPLE" +.PP +.nf +\f(CW/* Stolen from the mailing list */ +/* Creates a new mouse cursor from an XPM */ + + +/* XPM */ +static const char *arrow[] = { + /* width height num_colors chars_per_pixel */ + " 32 32 3 1", + /* colors */ + "X c #000000", + "\&. c #ffffff", + " c None", + /* pixels */ + "X ", + "XX ", + "X\&.X ", + "X\&.\&.X ", + "X\&.\&.\&.X ", + "X\&.\&.\&.\&.X ", + "X\&.\&.\&.\&.\&.X ", + "X\&.\&.\&.\&.\&.\&.X ", + "X\&.\&.\&.\&.\&.\&.\&.X ", + "X\&.\&.\&.\&.\&.\&.\&.\&.X ", + "X\&.\&.\&.\&.\&.XXXXX ", + "X\&.\&.X\&.\&.X ", + "X\&.X X\&.\&.X ", + "XX X\&.\&.X ", + "X X\&.\&.X ", + " X\&.\&.X ", + " X\&.\&.X ", + " X\&.\&.X ", + " XX ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "0,0" +}; + +static SDL_Cursor *init_system_cursor(const char *image[]) +{ + int i, row, col; + Uint8 data[4*32]; + Uint8 mask[4*32]; + int hot_x, hot_y; + + i = -1; + for ( row=0; row<32; ++row ) { + for ( col=0; col<32; ++col ) { + if ( col % 8 ) { + data[i] <<= 1; + mask[i] <<= 1; + } else { + ++i; + data[i] = mask[i] = 0; + } + switch (image[4+row][col]) { + case \&'X\&': + data[i] |= 0x01; + k[i] |= 0x01; + break; + case \&'\&.\&': + mask[i] |= 0x01; + break; + case \&' \&': + break; + } + } + } + sscanf(image[4+row], "%d,%d", &hot_x, &hot_y); + return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y); +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_FreeCursor\fP\fR, \fI\fBSDL_SetCursor\fP\fR, \fI\fBSDL_ShowCursor\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_CreateMutex.3 b/docs/man3/SDL_CreateMutex.3 new file mode 100644 index 000000000..009e6098a --- /dev/null +++ b/docs/man3/SDL_CreateMutex.3 @@ -0,0 +1,43 @@ +.TH "SDL_CreateMutex" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateMutex\- Create a mutex +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBSDL_mutex *\fBSDL_CreateMutex\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Create a new, unlocked mutex\&. +.SH "EXAMPLES" +.PP +.nf +\f(CWSDL_mutex *mut; + +mut=SDL_CreateMutex(); +\&. +\&. +if(SDL_mutexP(mut)==-1){ + fprintf(stderr, "Couldn\&'t lock mutex +"); + exit(-1); +} +\&. +/* Do stuff while mutex is locked */ +\&. +\&. +if(SDL_mutexV(mut)==-1){ + fprintf(stderr, "Couldn\&'t unlock mutex +"); + exit(-1); +} + +SDL_DestroyMutex(mut); +\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_mutexP\fP\fR, \fI\fBSDL_mutexV\fP\fR, \fI\fBSDL_DestroyMutex\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CreateRGBSurface.3 b/docs/man3/SDL_CreateRGBSurface.3 new file mode 100644 index 000000000..38ab6117d --- /dev/null +++ b/docs/man3/SDL_CreateRGBSurface.3 @@ -0,0 +1,29 @@ +.TH "SDL_CreateRGBSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateRGBSurface\- Create an empty SDL_Surface +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_CreateRGBSurface\fP\fR(\fBUint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask\fR); +.SH "DESCRIPTION" +.PP +Allocate an empty surface (must be called after \fISDL_SetVideoMode\fR) +.PP +If \fBdepth\fR is 8 bits an empty palette is allocated for the surface, otherwise a \&'packed-pixel\&' \fI\fBSDL_PixelFormat\fR\fR is created using the \fB[RGBA]mask\fR\&'s provided (see \fI\fBSDL_PixelFormat\fR\fR)\&. The \fBflags\fR specifies the type of surface that should be created, it is an OR\&'d combination of the following possible values\&. +.TP 20 +\fBSDL_SWSURFACE\fP +SDL will create the surface in system memory\&. This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting\&. +.TP 20 +\fBSDL_HWSURFACE\fP +SDL will attempt to create the surface in video memory\&. This will allow SDL to take advantage of Video->Video blits (which are often accelerated)\&. +.TP 20 +\fBSDL_SRCCOLORKEY\fP +With this flag SDL will attempt to find the best location for this surface, either in system memory or video memory, to obtain hardware colorkey blitting support\&. +.TP 20 +\fBSDL_SRCALPHA\fP +With this flag SDL will attempt to find the best location for this surface, either in system memory or video memory, to obtain hardware alpha support +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateRGBSurfaceFrom\fP\fR, \fI\fBSDL_FreeSurface\fP\fR, \fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_LockSurface\fP\fR, \fI\fBSDL_PixelFormat\fR\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_CreateRGBSurfaceFrom.3 b/docs/man3/SDL_CreateRGBSurfaceFrom.3 new file mode 100644 index 000000000..34d66c241 --- /dev/null +++ b/docs/man3/SDL_CreateRGBSurfaceFrom.3 @@ -0,0 +1,19 @@ +.TH "SDL_CreateRGBSurfaceFrom" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateRGBSurfaceFrom\- Create an SDL_Surface from pixel data +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_CreateRGBSurfaceFrom\fP\fR(\fBvoid *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask\fR); +.SH "DESCRIPTION" +.PP +Creates an SDL_Surface from the provided pixel data\&. +.PP +The data stored in \fBpixels\fR is assumed to be of the \fBdepth\fR specified in the parameter list\&. The pixel data is not copied into the \fBSDL_Surface\fR structure so it should no be freed until the surface has been freed with a called to \fISDL_FreeSurface\fR\&. \fBpitch\fR is the length of each scanline in bytes\&. +.PP +See \fI\fBSDL_CreateRGBSurface\fP\fR for a more detailed description of the other parameters\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateRGBSurface\fP\fR, \fI\fBSDL_FreeSurface\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_CreateSemaphore.3 b/docs/man3/SDL_CreateSemaphore.3 new file mode 100644 index 000000000..553497dfe --- /dev/null +++ b/docs/man3/SDL_CreateSemaphore.3 @@ -0,0 +1,32 @@ +.TH "SDL_CreateSemaphore" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateSemaphore\- Creates a new semaphore and assigns an initial value to it\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBSDL_sem *\fBSDL_CreateSemaphore\fP\fR(\fBUint32 initial_value\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_CreateSemaphore()\fP creates a new semaphore and initializes it with the value \fBinitial_value\fR\&. Each locking operation on the semaphore by \fISDL_SemWait\fR, \fISDL_SemTryWait\fR or \fISDL_SemWaitTimeout\fR will atomically decrement the semaphore value\&. The locking operation will be blocked if the semaphore value is not positive (greater than zero)\&. Each unlock operation by \fISDL_SemPost\fR will atomically increment the semaphore value\&. +.SH "RETURN VALUE" +.PP +Returns a pointer to an initialized semaphore or \fBNULL\fR if there was an error\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSDL_sem *my_sem; + +my_sem = SDL_CreateSemaphore(INITIAL_SEM_VALUE); + +if (my_sem == NULL) { + return CREATE_SEM_FAILED; +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_DestroySemaphore\fP\fR, \fI\fBSDL_SemWait\fP\fR, \fI\fBSDL_SemTryWait\fP\fR, \fI\fBSDL_SemWaitTimeout\fP\fR, \fI\fBSDL_SemPost\fP\fR, \fI\fBSDL_SemValue\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CreateThread.3 b/docs/man3/SDL_CreateThread.3 new file mode 100644 index 000000000..db7b7d006 --- /dev/null +++ b/docs/man3/SDL_CreateThread.3 @@ -0,0 +1,16 @@ +.TH "SDL_CreateThread" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateThread\- Creates a new thread of execution that shares its parent\&'s properties\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBSDL_Thread *\fBSDL_CreateThread\fP\fR(\fBint (*fn)(void *), void *data\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_CreateThread\fP creates a new thread of execution that shares all of its parent\&'s global memory, signal handlers, file descriptors, etc, and runs the function \fBfn\fR passed the void pointer \fBdata\fR The thread quits when this function returns\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_KillThread\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_CreateYUVOverlay.3 b/docs/man3/SDL_CreateYUVOverlay.3 new file mode 100644 index 000000000..21991655e --- /dev/null +++ b/docs/man3/SDL_CreateYUVOverlay.3 @@ -0,0 +1,17 @@ +.TH "SDL_CreateYUVOverlay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_CreateYUVOverlay\- Create a YUV video overlay +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Overlay *\fBSDL_CreateYUVOverlay\fP\fR(\fBint width, int height, Uint32 format, SDL_Surface *display\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_CreateYUVOverlay\fP creates a YUV overlay of the specified \fBwidth\fR, \fBheight\fR and \fBformat\fR (see \fI\fBSDL_Overlay\fR\fR for a list of available formats), for the provided \fBdisplay\fR\&. A \fI\fBSDL_Overlay\fR\fR structure is returned\&. +.PP +The term \&'overlay\&' is a misnomer since, unless the overlay is created in hardware, the contents for the display surface underneath the area where the overlay is shown will be overwritten when the overlay is displayed\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Overlay\fR\fR, \fI\fBSDL_DisplayYUVOverlay\fP\fR, \fI\fBSDL_FreeYUVOverlay\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_Delay.3 b/docs/man3/SDL_Delay.3 new file mode 100644 index 000000000..cef12d0ea --- /dev/null +++ b/docs/man3/SDL_Delay.3 @@ -0,0 +1,15 @@ +.TH "SDL_Delay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Delay\- Wait a specified number of milliseconds before returning\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_Delay\fP\fR(\fBUint32 ms\fR); +.SH "DESCRIPTION" +.PP +Wait a specified number of milliseconds before returning\&. \fBSDL_Delay\fP will wait at \fIleast\fP the specified time, but possible longer due to OS scheduling\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_AddTimer\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_DestroyCond.3 b/docs/man3/SDL_DestroyCond.3 new file mode 100644 index 000000000..c1f6a92c6 --- /dev/null +++ b/docs/man3/SDL_DestroyCond.3 @@ -0,0 +1,16 @@ +.TH "SDL_DestroyCond" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_DestroyCond\- Destroy a condition variable +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBvoid \fBSDL_DestroyCond\fP\fR(\fBSDL_cond *cond\fR); +.SH "DESCRIPTION" +.PP +Destroys a condition variable\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateCond\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_DestroyMutex.3 b/docs/man3/SDL_DestroyMutex.3 new file mode 100644 index 000000000..6e52a7a09 --- /dev/null +++ b/docs/man3/SDL_DestroyMutex.3 @@ -0,0 +1,16 @@ +.TH "SDL_DestroyMutex" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_DestroyMutex\- Destroy a mutex +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBvoid \fBSDL_DestroyMutex\fP\fR(\fBSDL_mutex *mutex\fR); +.SH "DESCRIPTION" +.PP +Destroy a previously \fIcreated\fR mutex\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateMutex\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_DestroySemaphore.3 b/docs/man3/SDL_DestroySemaphore.3 new file mode 100644 index 000000000..abd194f7f --- /dev/null +++ b/docs/man3/SDL_DestroySemaphore.3 @@ -0,0 +1,26 @@ +.TH "SDL_DestroySemaphore" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_DestroySemaphore\- Destroys a semaphore that was created by \fISDL_CreateSemaphore\fR\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBvoid \fBSDL_DestroySemaphore\fP\fR(\fBSDL_sem *sem\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_DestroySemaphore\fP destroys the semaphore pointed to by \fBsem\fR that was created by \fI\fBSDL_CreateSemaphore\fP\fR\&. It is not safe to destroy a semaphore if there are threads currently blocked waiting on it\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWif (my_sem != NULL) { + SDL_DestroySemaphore(my_sem); + my_sem = NULL; +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateSemaphore\fP\fR, \fI\fBSDL_SemWait\fP\fR, \fI\fBSDL_SemTryWait\fP\fR, \fI\fBSDL_SemWaitTimeout\fP\fR, \fI\fBSDL_SemPost\fP\fR, \fI\fBSDL_SemValue\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_DisplayFormat.3 b/docs/man3/SDL_DisplayFormat.3 new file mode 100644 index 000000000..04f43bf3e --- /dev/null +++ b/docs/man3/SDL_DisplayFormat.3 @@ -0,0 +1,22 @@ +.TH "SDL_DisplayFormat" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_DisplayFormat\- Convert a surface to the display format +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_DisplayFormat\fP\fR(\fBSDL_Surface *surface\fR); +.SH "DESCRIPTION" +.PP +This function takes a surface and copies it to a new surface of the pixel format and colors of the video framebuffer, suitable for fast blitting onto the display surface\&. It calls \fISDL_ConvertSurface\fR +.PP +If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and alpha value before calling this function\&. +.PP +If you want an alpha channel, see \fISDL_DisplayFormatAlpha\fR\&. +.SH "RETURN VALUE" +.PP +If the conversion fails or runs out of memory, it returns \fBNULL\fR +.SH "SEE ALSO" +.PP +\fI\fBSDL_ConvertSurface\fP\fR, \fI\fBSDL_DisplayFormatAlpha\fP\fR \fI\fBSDL_SetAlpha\fP\fR, \fI\fBSDL_SetColorKey\fP\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_DisplayFormatAlpha.3 b/docs/man3/SDL_DisplayFormatAlpha.3 new file mode 100644 index 000000000..40f57a00b --- /dev/null +++ b/docs/man3/SDL_DisplayFormatAlpha.3 @@ -0,0 +1,20 @@ +.TH "SDL_DisplayFormatAlpha" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_DisplayFormatAlpha\- Convert a surface to the display format +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_DisplayFormatAlpha\fP\fR(\fBSDL_Surface *surface\fR); +.SH "DESCRIPTION" +.PP +This function takes a surface and copies it to a new surface of the pixel format and colors of the video framebuffer plus an alpha channel, suitable for fast blitting onto the display surface\&. It calls \fISDL_ConvertSurface\fR +.PP +If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and alpha value before calling this function\&. +.SH "RETURN VALUE" +.PP +If the conversion fails or runs out of memory, it returns \fBNULL\fR +.SH "SEE ALSO" +.PP +\fISDL_ConvertSurface\fR, \fISDL_SetAlpha\fR, \fISDL_SetColorKey\fR, \fISDL_DisplayFormat\fR, \fISDL_Surface\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_DisplayYUVOverlay.3 b/docs/man3/SDL_DisplayYUVOverlay.3 new file mode 100644 index 000000000..f3f4dd6f2 --- /dev/null +++ b/docs/man3/SDL_DisplayYUVOverlay.3 @@ -0,0 +1,15 @@ +.TH "SDL_DisplayYUVOverlay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_DisplayYUVOverlay\- Blit the overlay to the display +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_DisplayYUVOverlay\fP\fR(\fBSDL_Overlay *overlay, SDL_Rect *dstrect\fR); +.SH "DESCRIPTION" +.PP +Blit the \fBoverlay\fR to the surface specified when it was \fIcreated\fR\&. The \fI\fBSDL_Rect\fR\fR structure, \fBdstrect\fR, specifies the position and size of the destination\&. If the \fBdstrect\fR is a larger or smaller than the overlay then the overlay will be scaled, this is optimized for 2x scaling\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Overlay\fR\fR, \fI\fBSDL_CreateYUVOverlay\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_EnableKeyRepeat.3 b/docs/man3/SDL_EnableKeyRepeat.3 new file mode 100644 index 000000000..f3ba0899e --- /dev/null +++ b/docs/man3/SDL_EnableKeyRepeat.3 @@ -0,0 +1,17 @@ +.TH "SDL_EnableKeyRepeat" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_EnableKeyRepeat\- Set keyboard repeat rate\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_EnableKeyRepeat\fP\fR(\fBint delay, int interval\fR); +.SH "DESCRIPTION" +.PP +Enables or disables the keyboard repeat rate\&. \fBdelay\fR specifies how long the key must be pressed before it begins repeating, it then repeats at the speed specified by \fBinterval\fR\&. Both \fBdelay\fR and \fBinterval\fR are expressed in milliseconds\&. +.PP +Setting \fBdelay\fR to 0 disables key repeating completely\&. Good default values are \fBSDL_DEFAULT_REPEAT_DELAY\fP and \fISDL_DEFAULT_REPEAT_INTERVAL\fP\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success and \fB-1\fR on failure\&. +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_EnableUNICODE.3 b/docs/man3/SDL_EnableUNICODE.3 new file mode 100644 index 000000000..54e0f3881 --- /dev/null +++ b/docs/man3/SDL_EnableUNICODE.3 @@ -0,0 +1,20 @@ +.TH "SDL_EnableUNICODE" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_EnableUNICODE\- Enable UNICODE translation +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_EnableUNICODE\fP\fR(\fBint enable\fR); +.SH "DESCRIPTION" +.PP +Enables/Disables UNICODE keyboard translation\&. +.PP +If you wish to translate a keysym to it\&'s printable representation, you need to enable UNICODE translation using this function (\fBenable\fR=0) and then look in the \fBunicode\fR member of the \fI\fBSDL_keysym\fR\fR structure\&. This value will be zero for keysyms that do not have a printable representation\&. UNICODE translation is disabled by default as the conversion can cause a slight overhead\&. +.SH "RETURN VALUE" +.PP +Returns the previous translation mode\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_keysym\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_Event.3 b/docs/man3/SDL_Event.3 new file mode 100644 index 000000000..4eb738810 --- /dev/null +++ b/docs/man3/SDL_Event.3 @@ -0,0 +1,175 @@ +.TH "SDL_Event" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Event\- General event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef union{ + Uint8 type; + SDL_ActiveEvent active; + SDL_KeyboardEvent key; + SDL_MouseMotionEvent motion; + SDL_MouseButtonEvent button; + SDL_JoyAxisEvent jaxis; + SDL_JoyBallEvent jball; + SDL_JoyHatEvent jhat; + SDL_JoyButtonEvent jbutton; + SDL_ResizeEvent resize; + SDL_QuitEvent quit; + SDL_UserEvent user; + SDL_SywWMEvent syswm; +} SDL_Event;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +The type of event +.TP 20 +\fBactive\fR +\fIActivation event\fR +.TP 20 +\fBkey\fR +\fIKeyboard event\fR +.TP 20 +\fBmotion\fR +\fIMouse motion event\fR +.TP 20 +\fBbutton\fR +\fIMouse button event\fR +.TP 20 +\fBjaxis\fR +\fIJoystick axis motion event\fR +.TP 20 +\fBjball\fR +\fIJoystick trackball motion event\fR +.TP 20 +\fBjhat\fR +\fIJoystick hat motion event\fR +.TP 20 +\fBjbutton\fR +\fIJoystick button event\fR +.TP 20 +\fBresize\fR +\fIApplication window resize event\fR +.TP 20 +\fBquit\fR +\fIApplication quit request event\fR +.TP 20 +\fBuser\fR +\fIUser defined event\fR +.TP 20 +\fBsyswm\fR +\fIUndefined window manager event\fR +.SH "DESCRIPTION" +.PP +The \fBSDL_Event\fR union is the core to all event handling is SDL, its probably the most important structure after \fBSDL_Surface\fR\&. \fBSDL_Event\fR is a union of all event structures used in SDL, using it is a simple matter of knowing which union member relates to which event \fBtype\fR\&. +.PP +.TP 20 +\fBEvent \fBtype\fR\fR +\fBEvent Structure\fR +.TP 20 +\fBSDL_ACTIVEEVENT\fP +\fI\fBSDL_ActiveEvent\fR\fR +.TP 20 +\fBSDL_KEYDOWN/UP\fP +\fI\fBSDL_KeyboardEvent\fR\fR +.TP 20 +\fBSDL_MOUSEMOTION\fP +\fI\fBSDL_MouseMotionEvent\fR\fR +.TP 20 +\fBSDL_MOUSEBUTTONDOWN/UP\fP +\fI\fBSDL_MouseButtonEvent\fR\fR +.TP 20 +\fBSDL_JOYAXISMOTION\fP +\fI\fBSDL_JoyAxisEvent\fR\fR +.TP 20 +\fBSDL_JOYBALLMOTION\fP +\fI\fBSDL_JoyBallEvent\fR\fR +.TP 20 +\fBSDL_JOYHATMOTION\fP +\fI\fBSDL_JoyHatEvent\fR\fR +.TP 20 +\fBSDL_JOYBUTTONDOWN/UP\fP +\fI\fBSDL_JoyButtonEvent\fR\fR +.TP 20 +\fBSDL_QUIT\fP +\fI\fBSDL_QuitEvent\fR\fR +.TP 20 +\fBSDL_SYSWMEVENT\fP +\fI\fBSDL_SysWMEvent\fR\fR +.TP 20 +\fBSDL_VIDEORESIZE\fP +\fI\fBSDL_ResizeEvent\fR\fR +.TP 20 +\fBSDL_USEREVENT\fP +\fI\fBSDL_UserEvent\fR\fR +.SH "USE" +.PP +The \fBSDL_Event\fR structure has two uses +.IP " \(bu" 6 +Reading events on the event queue +.IP " \(bu" 6 +Placing events on the event queue +.PP +Reading events from the event queue is done with either \fI\fBSDL_PollEvent\fP\fR or \fI\fBSDL_PeepEvents\fP\fR\&. We\&'ll use \fBSDL_PollEvent\fP and step through an example\&. +.PP +First off, we create an empty \fBSDL_Event\fR structure\&. +.PP +.nf +\f(CWSDL_Event test_event;\fR +.fi +.PP + \fBSDL_PollEvent\fP removes the next event from the event queue, if there are no events on the queue it returns \fB0\fR otherwise it returns \fB1\fR\&. We use a \fBwhile\fP loop to process each event in turn\&. +.PP +.nf +\f(CWwhile(SDL_PollEvent(&test_event)) {\fR +.fi +.PP + The \fBSDL_PollEvent\fP function take a pointer to an \fBSDL_Event\fR structure that is to be filled with event information\&. We know that if \fBSDL_PollEvent\fP removes an event from the queue then the event information will be placed in our \fBtest_event\fR structure, but we also know that the \fItype\fP of event will be placed in the \fBtype\fR member of \fBtest_event\fR\&. So to handle each event \fBtype\fR seperately we use a \fBswitch\fP statement\&. +.PP +.nf +\f(CW switch(test_event\&.type) {\fR +.fi +.PP + We need to know what kind of events we\&'re looking for \fIand\fP the event \fBtype\fR\&'s of those events\&. So lets assume we want to detect where the user is moving the mouse pointer within our application\&. We look through our event types and notice that \fBSDL_MOUSEMOTION\fP is, more than likely, the event we\&'re looking for\&. A little \fImore\fR research tells use that \fBSDL_MOUSEMOTION\fP events are handled within the \fI\fBSDL_MouseMotionEvent\fR\fR structure which is the \fBmotion\fR member of \fBSDL_Event\fR\&. We can check for the \fBSDL_MOUSEMOTION\fP event \fBtype\fR within our \fBswitch\fP statement like so: +.PP +.nf +\f(CW case SDL_MOUSEMOTION:\fR +.fi +.PP + All we need do now is read the information out of the \fBmotion\fR member of \fBtest_event\fR\&. +.PP +.nf +\f(CW printf("We got a motion event\&. +"); + printf("Current mouse position is: (%d, %d) +", test_event\&.motion\&.x, test_event\&.motion\&.y); + break; + default: + printf("Unhandled Event! +"); + break; + } +} +printf("Event queue empty\&. +");\fR +.fi +.PP +.PP +It is also possible to push events onto the event queue and so use it as a two-way communication path\&. Both \fI\fBSDL_PushEvent\fP\fR and \fI\fBSDL_PeepEvents\fP\fR allow you to place events onto the event queue\&. This is usually used to place a \fBSDL_USEREVENT\fP on the event queue, however you could use it to post fake input events if you wished\&. Creating your own events is a simple matter of choosing the event type you want, setting the \fBtype\fR member and filling the appropriate member structure with information\&. +.PP +.nf +\f(CWSDL_Event user_event; + +user_event\&.type=SDL_USEREVENT; +user_event\&.user\&.code=2; +user_event\&.user\&.data1=NULL; +user_event\&.user\&.data2=NULL; +SDL_PushEvent(&user_event);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_PollEvent\fP\fR, \fI\fBSDL_PushEvent\fP\fR, \fI\fBSDL_PeepEvents\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_EventState.3 b/docs/man3/SDL_EventState.3 new file mode 100644 index 000000000..cef080e1f --- /dev/null +++ b/docs/man3/SDL_EventState.3 @@ -0,0 +1,23 @@ +.TH "SDL_EventState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_EventState\- This function allows you to set the state of processing certain events\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 \fBSDL_EventState\fP\fR(\fBUint8 type, int state\fR); +.SH "DESCRIPTION" +.PP +This function allows you to set the state of processing certain event \fBtype\fR\&'s\&. +.PP +If \fBstate\fR is set to \fBSDL_IGNORE\fP, that event \fBtype\fR will be automatically dropped from the event queue and will not be filtered\&. +.PP +If \fBstate\fR is set to \fBSDL_ENABLE\fP, that event \fBtype\fR will be processed normally\&. +.PP +If \fBstate\fR is set to \fBSDL_QUERY\fP, \fBSDL_EventState\fP will return the current processing state of the specified event \fBtype\fR\&. +.PP +A list of event \fBtype\fR\&'s can be found in the \fI\fBSDL_Event\fR\fR section\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_FillRect.3 b/docs/man3/SDL_FillRect.3 new file mode 100644 index 000000000..8e49e4a81 --- /dev/null +++ b/docs/man3/SDL_FillRect.3 @@ -0,0 +1,22 @@ +.TH "SDL_FillRect" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_FillRect\- This function performs a fast fill of the given rectangle with some color +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_FillRect\fP\fR(\fBSDL_Surface *dst, SDL_Rect *dstrect, Uint32 color\fR); +.SH "DESCRIPTION" +.PP +This function performs a fast fill of the given rectangle with \fBcolor\fR\&. If \fBdstrect\fR is \fBNULL\fP, the whole surface will be filled with \fBcolor\fR\&. +.PP +The color should be a pixel of the format used by the surface, and can be generated by the \fISDL_MapRGB\fR function\&. +.PP +If there is a clip rectangle set on the destination (set via \fISDL_SetClipRect\fR) then this function will clip based on the intersection of the clip rectangle and the \fBdstrect\fR rectangle\&. +.SH "RETURN VALUE" +.PP +This function returns \fB0\fR on success, or \fB-1\fR on error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_MapRGB\fP\fR, \fI\fBSDL_BlitSurface\fP\fR, \fI\fBSDL_Rect\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_Flip.3 b/docs/man3/SDL_Flip.3 new file mode 100644 index 000000000..1d09409b0 --- /dev/null +++ b/docs/man3/SDL_Flip.3 @@ -0,0 +1,20 @@ +.TH "SDL_Flip" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Flip\- Swaps screen buffers +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_Flip\fP\fR(\fBSDL_Surface *screen\fR); +.SH "DESCRIPTION" +.PP +On hardware that supports double-buffering, this function sets up a flip and returns\&. The hardware will wait for vertical retrace, and then swap video buffers before the next video surface blit or lock will return\&. On hardware that doesn\&'t support double-buffering, this is equivalent to calling \fISDL_UpdateRect\fR\fB(screen, 0, 0, 0, 0)\fR +.PP +The \fBSDL_DOUBLEBUF\fP flag must have been passed to \fISDL_SetVideoMode\fR, when setting the video mode for this function to perform hardware flipping\&. +.SH "RETURN VALUE" +.PP +This function returns \fB0\fR if successful, or \fB-1\fR if there was an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_UpdateRect\fP\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_FreeCursor.3 b/docs/man3/SDL_FreeCursor.3 new file mode 100644 index 000000000..4aa7fdea0 --- /dev/null +++ b/docs/man3/SDL_FreeCursor.3 @@ -0,0 +1,15 @@ +.TH "SDL_FreeCursor" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_FreeCursor\- Frees a cursor created with SDL_CreateCursor\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_FreeCursor\fP\fR(\fBSDL_Cursor *cursor\fR); +.SH "DESCRIPTION" +.PP +Frees a \fBSDL_Cursor\fR that was created using \fISDL_CreateCursor\fR\&. +.SH "SEE ALSO" +.PP +\fISDL_CreateCursor\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_FreeSurface.3 b/docs/man3/SDL_FreeSurface.3 new file mode 100644 index 000000000..b5811d3d5 --- /dev/null +++ b/docs/man3/SDL_FreeSurface.3 @@ -0,0 +1,15 @@ +.TH "SDL_FreeSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_FreeSurface\- Frees (deletes) and SDL_Surface +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_FreeSurface\fP\fR(\fBSDL_Surface *surface\fR); +.SH "DESCRIPTION" +.PP +Frees the resources used by a previously created \fBSDL_Surface\fR\&. If the surface was created using \fISDL_CreateRGBSurfaceFrom\fR then the pixel data is not freed\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateRGBSurface\fP\fR \fI\fBSDL_CreateRGBSurfaceFrom\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_FreeWAV.3 b/docs/man3/SDL_FreeWAV.3 new file mode 100644 index 000000000..3f0ea56e4 --- /dev/null +++ b/docs/man3/SDL_FreeWAV.3 @@ -0,0 +1,15 @@ +.TH "SDL_FreeWAV" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_FreeWAV\- Frees previously opened WAV data +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_FreeWAV\fP\fR(\fBUint8 *audio_buf\fR); +.SH "DESCRIPTION" +.PP +After a WAVE file has been opened with \fI\fBSDL_LoadWAV\fP\fR its data can eventually be freed with \fBSDL_FreeWAV\fP\&. \fBaudio_buf\fR is a pointer to the buffer created by \fBSDL_LoadWAV\fP\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_LoadWAV\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_FreeYUVOverlay.3 b/docs/man3/SDL_FreeYUVOverlay.3 new file mode 100644 index 000000000..e9bc8a6e3 --- /dev/null +++ b/docs/man3/SDL_FreeYUVOverlay.3 @@ -0,0 +1,15 @@ +.TH "SDL_FreeYUVOverlay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_FreeYUVOverlay\- Free a YUV video overlay +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_FreeYUVOverlay\fP\fR(\fBSDL_Overlay *overlay\fR); +.SH "DESCRIPTION" +.PP +Frees and \fI\fBoverlay\fR\fR created by \fI\fBSDL_CreateYUVOverlay\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Overlay\fR\fR, \fI\fBSDL_DisplayYUVOverlay\fP\fR, \fI\fBSDL_FreeYUVOverlay\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GL_GetAttribute.3 b/docs/man3/SDL_GL_GetAttribute.3 new file mode 100644 index 000000000..8ffe130fb --- /dev/null +++ b/docs/man3/SDL_GL_GetAttribute.3 @@ -0,0 +1,18 @@ +.TH "SDL_GL_GetAttribute" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GL_GetAttribute\- Get the value of a special SDL/OpenGL attribute +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_GL_GetAttribute\fP\fR(\fBSDLGLattr attr, int *value\fR); +.SH "DESCRIPTION" +.PP +Places the value of the SDL/OpenGL \fIattribute\fR \fBattr\fR into \fBvalue\fR\&. This is useful after a call to \fI\fBSDL_SetVideoMode\fP\fR to check whether your attributes have been \fIset\fR as you expected\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GL_SetAttribute\fP\fR, \fIGL Attributes\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GL_GetProcAddress.3 b/docs/man3/SDL_GL_GetProcAddress.3 new file mode 100644 index 000000000..59fd83174 --- /dev/null +++ b/docs/man3/SDL_GL_GetProcAddress.3 @@ -0,0 +1,48 @@ +.TH "SDL_GL_GetProcAddress" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GL_GetProcAddress\- Get the address of a GL function +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid *\fBSDL_GL_GetProcAddress\fP\fR(\fBconst char* proc\fR); +.SH "DESCRIPTION" +.PP +Returns the address of the GL function \fBproc\fR, or \fBNULL\fR if the function is not found\&. If the GL library is loaded at runtime, with \fI\fBSDL_GL_LoadLibrary\fP\fR, then \fIall\fP GL functions must be retrieved this way\&. Usually this is used to retrieve function pointers to OpenGL extensions\&. +.SH "EXAMPLE" +.PP +.nf +\f(CWtypedef void (*GL_ActiveTextureARB_Func)(unsigned int); +GL_ActiveTextureARB_Func glActiveTextureARB_ptr = 0; +int has_multitexture=1; +\&. +\&. +\&. +/* Get function pointer */ +glActiveTextureARB_ptr=(GL_ActiveTextureARB_Func) SDL_GL_GetProcAddress("glActiveTextureARB"); + +/* Check for a valid function ptr */ +if(!glActiveTextureARB_ptr){ + fprintf(stderr, "Multitexture Extensions not present\&. +"); + has_multitexture=0; +} +\&. +\&. +\&. +\&. +if(has_multitexture){ + glActiveTextureARB_ptr(GL_TEXTURE0_ARB); + \&. + \&. +} +else{ + \&. + \&. +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_GL_LoadLibrary\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GL_LoadLibrary.3 b/docs/man3/SDL_GL_LoadLibrary.3 new file mode 100644 index 000000000..4a8490a11 --- /dev/null +++ b/docs/man3/SDL_GL_LoadLibrary.3 @@ -0,0 +1,15 @@ +.TH "SDL_GL_LoadLibrary" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GL_LoadLibrary\- Specify an OpenGL library +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_GL_LoadLibrary\fP\fR(\fBconst char *path\fR); +.SH "DESCRIPTION" +.PP +If you wish, you may load the OpenGL library at runtime, this must be done before \fI\fBSDL_SetVideoMode\fP\fR is called\&. The \fBpath\fR of the GL library is passed to \fBSDL_GL_LoadLibrary\fP and it returns \fB0\fR on success, or \fB-1\fR on an error\&. You must then use \fI\fBSDL_GL_GetProcAddress\fP\fR to retrieve function pointers to GL functions\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GL_GetProcAddress\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GL_SetAttribute.3 b/docs/man3/SDL_GL_SetAttribute.3 new file mode 100644 index 000000000..accfc50ad --- /dev/null +++ b/docs/man3/SDL_GL_SetAttribute.3 @@ -0,0 +1,40 @@ +.TH "SDL_GL_SetAttribute" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GL_SetAttribute\- Set a special SDL/OpenGL attribute +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_GL_SetAttribute\fP\fR(\fBSDL_GLattr attr, int value\fR); +.SH "DESCRIPTION" +.PP +Sets the OpenGL \fIattribute\fR \fBattr\fR to \fBvalue\fR\&. The attributes you set don\&'t take effect until after a call to \fI\fBSDL_SetVideoMode\fP\fR\&. You should use \fI\fBSDL_GL_GetAttribute\fP\fR to check the values after a \fBSDL_SetVideoMode\fP call\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on error\&. +.SH "EXAMPLE" +.PP +.nf +\f(CWSDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 ); +SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); +SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 ); +SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 ); +SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); +if ( (screen=SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL )) == NULL ) { + fprintf(stderr, "Couldn\&'t set GL mode: %s +", SDL_GetError()); + SDL_Quit(); + return; +}\fR +.fi +.PP +.PP +.RS +\fBNote: +.PP +The \fBSDL_DOUBLEBUF\fP flag is not required to enable double buffering when setting an OpenGL video mode\&. Double buffering is enabled or disabled using the SDL_GL_DOUBLEBUFFER attribute\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_GL_GetAttribute\fP\fR, \fIGL Attributes\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GL_SwapBuffers.3 b/docs/man3/SDL_GL_SwapBuffers.3 new file mode 100644 index 000000000..0a699358e --- /dev/null +++ b/docs/man3/SDL_GL_SwapBuffers.3 @@ -0,0 +1,15 @@ +.TH "SDL_GL_SwapBuffers" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GL_SwapBuffers\- Swap OpenGL framebuffers/Update Display +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_GL_SwapBuffers\fP\fR(\fBvoid \fR); +.SH "DESCRIPTION" +.PP +Swap the OpenGL buffers, if double-buffering is supported\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_GL_SetAttribute\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GLattr.3 b/docs/man3/SDL_GLattr.3 new file mode 100644 index 000000000..4d6757c4a --- /dev/null +++ b/docs/man3/SDL_GLattr.3 @@ -0,0 +1,47 @@ +.TH "SDL_GLattr" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GLattr\- SDL GL Attributes +.SH "ATTRIBUTES" +.TP 20 +\fBSDL_GL_RED_SIZE\fP +Size of the framebuffer red component, in bits +.TP 20 +\fBSDL_GL_GREEN_SIZE\fP +Size of the framebuffer green component, in bits +.TP 20 +\fBSDL_GL_BLUE_SIZE\fP +Size of the framebuffer blue component, in bits +.TP 20 +\fBSDL_GL_ALPHA_SIZE\fP +Size of the framebuffer alpha component, in bits +.TP 20 +\fBSDL_GL_DOUBLEBUFFER\fP +0 or 1, enable or disable double buffering +.TP 20 +\fBSDL_GL_BUFFER_SIZE\fP +Size of the framebuffer, in bits +.TP 20 +\fBSDL_GL_DEPTH_SIZE\fP +Size of the depth buffer, in bits +.TP 20 +\fBSDL_GL_STENCIL_SIZE\fP +Size of the stencil buffer, in bits +.TP 20 +\fBSDL_GL_ACCUM_RED_SIZE\fP +Size of the accumulation buffer red component, in bits +.TP 20 +\fBSDL_GL_ACCUM_GREEN_SIZE\fP +Size of the accumulation buffer green component, in bits +.TP 20 +\fBSDL_GL_ACCUM_BLUE_SIZE\fP +Size of the accumulation buffer blue component, in bits +.TP 20 +\fBSDL_GL_ACCUM_ALPHA_SIZE\fP +Size of the accumulation buffer alpha component, in bits +.SH "DESCRIPTION" +.PP +While you can set most OpenGL attributes normally, the attributes list above must be known \fIbefore\fP SDL sets the video mode\&. These attributes a set and read with \fI\fBSDL_GL_SetAttribute\fP\fR and \fI\fBSDL_GL_GetAttribute\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GL_SetAttribute\fP\fR, \fI\fBSDL_GL_GetAttribute\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetAppState.3 b/docs/man3/SDL_GetAppState.3 new file mode 100644 index 000000000..b596971db --- /dev/null +++ b/docs/man3/SDL_GetAppState.3 @@ -0,0 +1,24 @@ +.TH "SDL_GetAppState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +\fBSDL_GetAppState\fP\- Get the state of the application +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 \fBSDL_GetAppState\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +This function returns the current state of the application\&. The value returned is a bitwise combination of: +.TP 20 +\fBSDL_APPMOUSEFOCUS\fP +The application has mouse focus\&. +.TP 20 +\fBSDL_APPINPUTFOCUS\fP +The application has keyboard focus +.TP 20 +\fBSDL_APPACTIVE\fP +The application is visible +.SH "SEE ALSO" +.PP +\fI\fBSDL_ActiveEvent\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetAudioStatus.3 b/docs/man3/SDL_GetAudioStatus.3 new file mode 100644 index 000000000..0ecb9eedd --- /dev/null +++ b/docs/man3/SDL_GetAudioStatus.3 @@ -0,0 +1,24 @@ +.TH "SDL_GetAudioStatus" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetAudioStatus\- Get the current audio state +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_audiostatus\fBSDL_GetAudioStatus\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +.nf +\f(CWtypedef enum{ + SDL_AUDIO_STOPPED, + SDL_AUDIO_PAUSED, + SDL_AUDIO_PLAYING +} SDL_audiostatus;\fR +.fi +.PP +.PP +Returns either \fBSDL_AUDIO_STOPPED\fP, \fBSDL_AUDIO_PAUSED\fP or \fBSDL_AUDIO_PLAYING\fP depending on the current audio state\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_PauseAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_GetClipRect.3 b/docs/man3/SDL_GetClipRect.3 new file mode 100644 index 000000000..1dee367ba --- /dev/null +++ b/docs/man3/SDL_GetClipRect.3 @@ -0,0 +1,17 @@ +.TH "SDL_GetClipRect" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetClipRect\- Gets the clipping rectangle for a surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_GetClipRect\fP\fR(\fBSDL_Surface *surface, SDL_Rect *rect\fR); +.SH "DESCRIPTION" +.PP +Gets the clipping rectangle for a surface\&. When this surface is the destination of a blit, only the area within the clip rectangle is drawn into\&. +.PP +The rectangle pointed to by \fBrect\fR will be filled with the clipping rectangle of the surface\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetClipRect\fP\fR, \fI\fBSDL_BlitSurface\fP\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetCursor.3 b/docs/man3/SDL_GetCursor.3 new file mode 100644 index 000000000..b225ba88e --- /dev/null +++ b/docs/man3/SDL_GetCursor.3 @@ -0,0 +1,15 @@ +.TH "SDL_GetCursor" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetCursor\- Get the currently active mouse cursor\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Cursor *\fBSDL_GetCursor\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Returns the currently active mouse cursor\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetCursor\fP\fR, \fI\fBSDL_CreateCursor\fP\fR, \fI\fBSDL_ShowCursor\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetEventFilter.3 b/docs/man3/SDL_GetEventFilter.3 new file mode 100644 index 000000000..e7f6ec60b --- /dev/null +++ b/docs/man3/SDL_GetEventFilter.3 @@ -0,0 +1,23 @@ +.TH "SDL_GetEventFilter" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetEventFilter\- Retrieves a pointer to he event filter +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_EventFilter \fBSDL_GetEventFilter\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +This function retrieces a pointer to the event filter that was previously set using \fI\fBSDL_SetEventFilter\fP\fR\&. An SDL_EventFilter function is defined as: +.PP +.nf +\f(CWtypedef int (*SDL_EventFilter)(const SDL_Event *event);\fR +.fi +.PP +.SH "RETURN VALUE" +.PP +Returns a pointer to the event filter or \fBNULL\fP if no filter has been set\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_SetEventFilter\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetGamma.3 b/docs/man3/SDL_GetGamma.3 new file mode 100644 index 000000000..e77f78d02 --- /dev/null +++ b/docs/man3/SDL_GetGamma.3 @@ -0,0 +1,21 @@ +.TH "SDL_GetGamma" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetGamma\- Gets the gamma of the display +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_GetGamma\fP\fR(\fBfloat *red, float *green, float *blue\fR); +.SH "DESCRIPTION" +.PP +Gets the color gamma of the display\&. The gamma value for each color component will be place in the parameters \fBred\fR, \fBgreen\fR and \fBblue\fR\&. The values can range from 0\&.1 to 10\&. +.PP +.RS +\fBNote: +.PP +This function currently only works on XFreee 4\&.0 and up\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetGamma\fP\fR, \fI\fBSDL_SetVideoMode\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetGammaRamp.3 b/docs/man3/SDL_GetGammaRamp.3 new file mode 100644 index 000000000..27476f2b2 --- /dev/null +++ b/docs/man3/SDL_GetGammaRamp.3 @@ -0,0 +1,20 @@ +.TH "SDL_GetGammaRamp" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetGammaRamp\- Gets the color gamma lookup tables for the display +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_GetGammaRamp\fP\fR(\fBUint16 *redtable, Uint16 *greentable, Uint16 *bluetable\fR); +.SH "DESCRIPTION" +.PP +Gets the gamma translation lookup tables currently used by the display\&. Each table is an array of 256 Uint16 values\&. +.PP +Not all display hardware is able to change gamma\&. +.SH "RETURN VALUE" +.PP +Returns -1 on error\&. +.SH "SEE ALSO" +.PP +\fISDL_SetGamma\fR \fISDL_SetGammaRamp\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetKeyName.3 b/docs/man3/SDL_GetKeyName.3 new file mode 100644 index 000000000..ab8e37e10 --- /dev/null +++ b/docs/man3/SDL_GetKeyName.3 @@ -0,0 +1,15 @@ +.TH "SDL_GetKeyName" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetKeyName\- Get the name of an SDL virtual keysym +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBchar *\fBSDL_GetKeyName\fP\fR(\fBSDLKey key\fR); +.SH "DESCRIPTION" +.PP +Returns the SDL-defined name of the \fI\fBSDLKey\fR\fR \fBkey\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDLKey\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetKeyState.3 b/docs/man3/SDL_GetKeyState.3 new file mode 100644 index 000000000..75d1602b7 --- /dev/null +++ b/docs/man3/SDL_GetKeyState.3 @@ -0,0 +1,30 @@ +.TH "SDL_GetKeyState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetKeyState\- Get a snapshot of the current keyboard state +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 *\fBSDL_GetKeyState\fP\fR(\fBint *numkeys\fR); +.SH "DESCRIPTION" +.PP +Gets a snapshot of the current keyboard state\&. The current state is return as a pointer to an array, the size of this array is stored in \fBnumkeys\fR\&. The array is indexed by the \fI\fBSDLK_*\fP\fR symbols\&. A value of 1 means the key is pressed and a value of 0 means its not\&. +.PP +.RS +\fBNote: +.PP +Use \fI\fBSDL_PumpEvents\fP\fR to update the state array\&. +.RE +.SH "EXAMPLE" +.PP +.PP +.nf +\f(CWUint8 *keystate = SDL_GetKeyState(NULL); +if ( keystate[SDLK_RETURN] ) printf("Return Key Pressed\&. +");\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL Key Symbols\fP\fR, \fI\fBSDL_PumpEvents\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetModState.3 b/docs/man3/SDL_GetModState.3 new file mode 100644 index 000000000..e399ec13e --- /dev/null +++ b/docs/man3/SDL_GetModState.3 @@ -0,0 +1,54 @@ +.TH "SDL_GetModState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetModState\- Get the state of modifier keys\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDLMod \fBSDL_GetModState\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Returns the current of the modifier keys (CTRL, ALT, etc\&.)\&. +.SH "RETURN VALUE" +.PP +The return value can be an OR\&'d combination of the SDLMod enum\&. +.PP +.PP +.RS +\fBSDLMod\fR +.PP +.PP +.nf +\f(CWtypedef enum { + KMOD_NONE = 0x0000, + KMOD_LSHIFT= 0x0001, + KMOD_RSHIFT= 0x0002, + KMOD_LCTRL = 0x0040, + KMOD_RCTRL = 0x0080, + KMOD_LALT = 0x0100, + KMOD_RALT = 0x0200, + KMOD_LMETA = 0x0400, + KMOD_RMETA = 0x0800, + KMOD_NUM = 0x1000, + KMOD_CAPS = 0x2000, + KMOD_MODE = 0x4000, +} SDLMod;\fR +.fi +.PP +.RE + SDL also defines the following symbols for convenience: +.PP +.RS +.PP +.nf +\f(CW#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) +#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) +#define KMOD_ALT (KMOD_LALT|KMOD_RALT) +#define KMOD_META (KMOD_LMETA|KMOD_RMETA)\fR +.fi +.PP +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetKeyState\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetMouseState.3 b/docs/man3/SDL_GetMouseState.3 new file mode 100644 index 000000000..65fde4fce --- /dev/null +++ b/docs/man3/SDL_GetMouseState.3 @@ -0,0 +1,24 @@ +.TH "SDL_GetMouseState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetMouseState\- Retrieve the current state of the mouse +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 \fBSDL_GetMouseState\fP\fR(\fBint *x, int *y\fR); +.SH "DESCRIPTION" +.PP +The current button state is returned as a button bitmask, which can be tested using the \fBSDL_BUTTON(X)\fP macros, and \fBx\fR and \fBy\fR are set to the current mouse cursor position\&. You can pass \fBNULL\fP for either \fBx\fR or \fBy\fR\&. +.SH "EXAMPLE" +.PP +.nf +\f(CWSDL_PumpEvents(); +if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1)) + printf("Mouse Button 1(left) is pressed\&. +");\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetRelativeMouseState\fP\fR, \fI\fBSDL_PumpEvents\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetRGB.3 b/docs/man3/SDL_GetRGB.3 new file mode 100644 index 000000000..2cb17bff4 --- /dev/null +++ b/docs/man3/SDL_GetRGB.3 @@ -0,0 +1,17 @@ +.TH "SDL_GetRGB" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetRGB\- Get RGB values from a pixel in the specified pixel format\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_GetRGB\fP\fR(\fBUint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b\fR); +.SH "DESCRIPTION" +.PP +Get RGB component values from a pixel stored in the specified pixel format\&. +.PP +This function uses the entire 8-bit [0\&.\&.255] range when converting color components from pixel formats with less than 8-bits per RGB component (e\&.g\&., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8])\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetRGBA\fP\fR, \fI\fBSDL_MapRGB\fP\fR, \fI\fBSDL_MapRGBA\fP\fR, \fI\fBSDL_PixelFormat\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetRGBA.3 b/docs/man3/SDL_GetRGBA.3 new file mode 100644 index 000000000..afcf25ba3 --- /dev/null +++ b/docs/man3/SDL_GetRGBA.3 @@ -0,0 +1,19 @@ +.TH "SDL_GetRGBA" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetRGBA\- Get RGBA values from a pixel in the specified pixel format\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_GetRGBA\fP\fR(\fBUint32 pixel, SDL_PixelFormat *fmt, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a\fR); +.SH "DESCRIPTION" +.PP +Get RGBA component values from a pixel stored in the specified pixel format\&. +.PP +This function uses the entire 8-bit [0\&.\&.255] range when converting color components from pixel formats with less than 8-bits per RGB component (e\&.g\&., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8])\&. +.PP +If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque)\&. +.SH "SEE ALSO" +.PP +\fISDL_GetRGB\fR, \fISDL_MapRGB\fR, \fISDL_MapRGBA\fR, \fISDL_PixelFormat\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetRelativeMouseState.3 b/docs/man3/SDL_GetRelativeMouseState.3 new file mode 100644 index 000000000..05e855da2 --- /dev/null +++ b/docs/man3/SDL_GetRelativeMouseState.3 @@ -0,0 +1,15 @@ +.TH "SDL_GetRelativeMouseState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetRelativeMouseState\- Retrieve the current state of the mouse +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 \fBSDL_GetRelativeMouseState\fP\fR(\fBint *x, int *y\fR); +.SH "DESCRIPTION" +.PP +The current button state is returned as a button bitmask, which can be tested using the \fBSDL_BUTTON(X)\fP macros, and \fBx\fR and \fBy\fR are set to the change in the mouse position since the last call to \fBSDL_GetRelativeMouseState\fP or since event initialization\&. You can pass \fBNULL\fP for either \fBx\fR or \fBy\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetMouseState\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_GetThreadID.3 b/docs/man3/SDL_GetThreadID.3 new file mode 100644 index 000000000..33aac31d0 --- /dev/null +++ b/docs/man3/SDL_GetThreadID.3 @@ -0,0 +1,16 @@ +.TH "SDL_GetThreadID" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetThreadID\- Get the SDL thread ID of a SDL_Thread +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBUint32 \fBSDL_GetThreadID\fP\fR(\fBSDL_Thread *thread\fR); +.SH "DESCRIPTION" +.PP +Returns the ID of a \fBSDL_Thread\fR created by \fISDL_CreateThread\fR\&. +.SH "SEE ALSO" +.PP +\fISDL_CreateThread\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetTicks.3 b/docs/man3/SDL_GetTicks.3 new file mode 100644 index 000000000..052e06b50 --- /dev/null +++ b/docs/man3/SDL_GetTicks.3 @@ -0,0 +1,15 @@ +.TH "SDL_GetTicks" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetTicks\- Get the number of milliseconds since the SDL library initialization\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint32 \fBSDL_GetTicks\fP\fR(\fBvoid\fR) +.SH "DESCRIPTION" +.PP +Get the number of milliseconds since the SDL library initialization\&. Note that this value wraps if the program runs for more than ~49 days\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Delay\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetVideoInfo.3 b/docs/man3/SDL_GetVideoInfo.3 new file mode 100644 index 000000000..40ff6f22c --- /dev/null +++ b/docs/man3/SDL_GetVideoInfo.3 @@ -0,0 +1,15 @@ +.TH "SDL_GetVideoInfo" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetVideoInfo\- returns a pointer to information about the video hardware +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_VideoInfo *\fBSDL_GetVideoInfo\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +This function returns a read-only pointer to \fIinformation\fR about the video hardware\&. If this is called before \fISDL_SetVideoMode\fR, the \fBvfmt\fR member of the returned structure will contain the pixel format of the "best" video mode\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_VideoInfo\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_GetVideoSurface.3 b/docs/man3/SDL_GetVideoSurface.3 new file mode 100644 index 000000000..92678c449 --- /dev/null +++ b/docs/man3/SDL_GetVideoSurface.3 @@ -0,0 +1,15 @@ +.TH "SDL_GetVideoSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_GetVideoSurface\- returns a pointer to the current display surface +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_GetVideoSurface\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +This function returns a pointer to the current display surface\&. If SDL is doing format conversion on the display surface, this function returns the publicly visible surface, not the real video surface\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_Init.3 b/docs/man3/SDL_Init.3 new file mode 100644 index 000000000..4baa3a75c --- /dev/null +++ b/docs/man3/SDL_Init.3 @@ -0,0 +1,41 @@ +.TH "SDL_Init" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Init\- Initializes SDL +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_Init\fP\fR(\fBUint32 flags\fR); +.SH "DESCRIPTION" +.PP +Initializes SDL\&. This should be called before all other SDL functions\&. The \fBflags\fR parameter specifies what part(s) of SDL to initialize\&. +.TP 20 +\fBSDL_INIT_TIMER\fP +Initializes the \fItimer\fR subsystem\&. +.TP 20 +\fBSDL_INIT_AUDIO\fP +Initializes the \fIaudio\fR subsystem\&. +.TP 20 +\fBSDL_INIT_VIDEO\fP +Initializes the \fIvideo\fR subsystem\&. +.TP 20 +\fBSDL_INIT_CDROM\fP +Initializes the \fIcdrom\fR subsystem\&. +.TP 20 +\fBSDL_INIT_JOYSTICK\fP +Initializes the \fIjoystick\fR subsystem\&. +.TP 20 +\fBSDL_INIT_EVERYTHING\fP +Initialize all of the above\&. +.TP 20 +\fBSDL_INIT_NOPARACHUTE\fP +Prevents SDL from catching fatal signals\&. +.TP 20 +\fBSDL_INIT_EVENTTHREAD\fP +.SH "RETURN VALUE" +.PP +Returns \fB-1\fR on an error or \fB0\fR on success\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Quit\fP\fR, \fI\fBSDL_InitSubSystem\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_InitSubSystem.3 b/docs/man3/SDL_InitSubSystem.3 new file mode 100644 index 000000000..8e17f6efd --- /dev/null +++ b/docs/man3/SDL_InitSubSystem.3 @@ -0,0 +1,41 @@ +.TH "SDL_InitSubSystem" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_InitSubSystem\- Initialize subsystems +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_InitSubSystem\fP\fR(\fBUint32 flags\fR); +.SH "DESCRIPTION" +.PP +After SDL has been initialized with \fI\fBSDL_Init\fP\fR you may initialize uninitialized subsystems with \fBSDL_InitSubSystem\fP\&. The \fBflags\fR parameter is the same as that used in \fI\fBSDL_Init\fP\fR\&. +.SH "EXAMPLES" +.PP +.nf +\f(CW/* Seperating Joystick and Video initialization\&. */ +SDL_Init(SDL_INIT_VIDEO); +\&. +\&. +SDL_SetVideoMode(640, 480, 16, SDL_DOUBLEBUF|SDL_FULLSCREEN); +\&. +/* Do Some Video stuff */ +\&. +\&. +/* Initialize the joystick subsystem */ +SDL_InitSubSystem(SDL_INIT_JOYSTICK); + +/* Do some stuff with video and joystick */ +\&. +\&. +\&. +/* Shut them both down */ +SDL_Quit();\fR +.fi +.PP +.SH "RETURN VALUE" +.PP +Returns \fB-1\fR on an error or \fB0\fR on success\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Init\fP\fR, \fI\fBSDL_Quit\fP\fR, \fI\fBSDL_QuitSubSystem\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoyAxisEvent.3 b/docs/man3/SDL_JoyAxisEvent.3 new file mode 100644 index 000000000..8bbb899d0 --- /dev/null +++ b/docs/man3/SDL_JoyAxisEvent.3 @@ -0,0 +1,36 @@ +.TH "SDL_JoyAxisEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoyAxisEvent\- Joystick axis motion event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 which; + Uint8 axis; + Sint16 value; +} SDL_JoyAxisEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_JOYAXISMOTION\fP +.TP 20 +\fBwhich\fR +Joystick device index +.TP 20 +\fBaxis\fR +Joystick axis index +.TP 20 +\fBvalue\fR +Axis value (range: -32768 to 32767) +.SH "DESCRIPTION" +.PP +\fBSDL_JoyAxisEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_JOYAXISMOTION\fP is reported\&. +.PP +A \fBSDL_JOYAXISMOTION\fP event occurs when ever a user moves an axis on the joystick\&. The field \fBwhich\fR is the index of the joystick that reported the event and \fBaxis\fR is the index of the axis (for a more detailed explaination see the \fIJoystick section\fR)\&. \fBvalue\fR is the current position of the axis\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fIJoystick Functions\fR, \fI\fBSDL_JoystickEventState\fP\fR, \fI\fBSDL_JoystickGetAxis\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoyBallEvent.3 b/docs/man3/SDL_JoyBallEvent.3 new file mode 100644 index 000000000..75357ba3a --- /dev/null +++ b/docs/man3/SDL_JoyBallEvent.3 @@ -0,0 +1,36 @@ +.TH "SDL_JoyBallEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoyBallEvent\- Joystick trackball motion event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 which; + Uint8 ball; + Sint16 xrel, yrel; +} SDL_JoyBallEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_JOYBALLMOTION\fP +.TP 20 +\fBwhich\fR +Joystick device index +.TP 20 +\fBball\fR +Joystick trackball index +.TP 20 +\fBxrel\fR, \fByrel\fR +The relative motion in the X/Y direction +.SH "DESCRIPTION" +.PP +\fBSDL_JoyBallEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_JOYBALLMOTION\fP is reported\&. +.PP +A \fBSDL_JOYBALLMOTION\fP event occurs when a user moves a trackball on the joystick\&. The field \fBwhich\fR is the index of the joystick that reported the event and \fBball\fR is the index of the trackball (for a more detailed explaination see the \fIJoystick section\fR)\&. Trackballs only return relative motion, this is the change in position on the ball since it was last polled (last cycle of the event loop) and it is stored in \fBxrel\fR and \fByrel\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fIJoystick Functions\fR, \fI\fBSDL_JoystickEventState\fP\fR, \fI\fBSDL_JoystickGetBall\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoyButtonEvent.3 b/docs/man3/SDL_JoyButtonEvent.3 new file mode 100644 index 000000000..942474383 --- /dev/null +++ b/docs/man3/SDL_JoyButtonEvent.3 @@ -0,0 +1,36 @@ +.TH "SDL_JoyButtonEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoyButtonEvent\- Joystick button event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 which; + Uint8 button; + Uint8 state; +} SDL_JoyButtonEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_JOYBUTTONDOWN\fP or \fBSDL_JOYBUTTONUP\fP +.TP 20 +\fBwhich\fR +Joystick device index +.TP 20 +\fBbutton\fR +Joystick button index +.TP 20 +\fBstate\fR +\fBSDL_PRESSED\fP or \fBSDL_RELEASED\fP +.SH "DESCRIPTION" +.PP +\fBSDL_JoyButtonEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_JOYBUTTONDOWN\fP or \fBSDL_JOYBUTTONUP\fP is reported\&. +.PP +A \fBSDL_JOYBUTTONDOWN\fP or \fBSDL_JOYBUTTONUP\fP event occurs when ever a user presses or releases a button on a joystick\&. The field \fBwhich\fR is the index of the joystick that reported the event and \fBbutton\fR is the index of the button (for a more detailed explaination see the \fIJoystick section\fR)\&. \fBstate\fR is the current state or the button which is either \fBSDL_PRESSED\fP or \fBSDL_RELEASED\fP\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fIJoystick Functions\fR, \fI\fBSDL_JoystickEventState\fP\fR, \fI\fBSDL_JoystickGetButton\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoyHatEvent.3 b/docs/man3/SDL_JoyHatEvent.3 new file mode 100644 index 000000000..188032484 --- /dev/null +++ b/docs/man3/SDL_JoyHatEvent.3 @@ -0,0 +1,56 @@ +.TH "SDL_JoyHatEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoyHatEvent\- Joystick hat position change event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 which; + Uint8 hat; + Uint8 value; +} SDL_JoyHatEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_JOY\fP +.TP 20 +\fBwhich\fR +Joystick device index +.TP 20 +\fBhat\fR +Joystick hat index +.TP 20 +\fBvalue\fR +Hat position +.SH "DESCRIPTION" +.PP +\fBSDL_JoyHatEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_JOYHATMOTION\fP is reported\&. +.PP +A \fBSDL_JOYHATMOTION\fP event occurs when ever a user moves a hat on the joystick\&. The field \fBwhich\fR is the index of the joystick that reported the event and \fBhat\fR is the index of the hat (for a more detailed exlaination see the \fIJoystick section\fR)\&. \fBvalue\fR is the current position of the hat\&. It is a logically OR\&'d combination of the following values (whose meanings should be pretty obvious:) : +.IP "" 10 +\fBSDL_HAT_CENTERED\fP +.IP "" 10 +\fBSDL_HAT_UP\fP +.IP "" 10 +\fBSDL_HAT_RIGHT\fP +.IP "" 10 +\fBSDL_HAT_DOWN\fP +.IP "" 10 +\fBSDL_HAT_LEFT\fP +.PP +The following defines are also provided: +.IP "" 10 +\fBSDL_HAT_RIGHTUP\fP +.IP "" 10 +\fBSDL_HAT_RIGHTDOWN\fP +.IP "" 10 +\fBSDL_HAT_LEFTUP\fP +.IP "" 10 +\fBSDL_HAT_LEFTDOWN\fP +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fIJoystick Functions\fR, \fI\fBSDL_JoystickEventState\fP\fR, \fI\fBSDL_JoystickGetHat\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickClose.3 b/docs/man3/SDL_JoystickClose.3 new file mode 100644 index 000000000..466d37b44 --- /dev/null +++ b/docs/man3/SDL_JoystickClose.3 @@ -0,0 +1,15 @@ +.TH "SDL_JoystickClose" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickClose\- Closes a previously opened joystick +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_JoystickClose\fP\fR(\fBSDL_Joystick *joystick\fR); +.SH "DESCRIPTION" +.PP +Close a \fBjoystick\fR that was previously opened with \fI\fBSDL_JoystickOpen\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickOpen\fP\fR, \fI\fBSDL_JoystickOpened\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickEventState.3 b/docs/man3/SDL_JoystickEventState.3 new file mode 100644 index 000000000..b0d6a7348 --- /dev/null +++ b/docs/man3/SDL_JoystickEventState.3 @@ -0,0 +1,24 @@ +.TH "SDL_JoystickEventState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickEventState\- Enable/disable joystick event polling +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_JoystickEventState\fP\fR(\fBint state\fR); +.SH "DESCRIPTION" +.PP +This function is used to enable or disable joystick event processing\&. With joystick event processing disabled you will have to update joystick states with \fI\fBSDL_JoystickUpdate\fP\fR and read the joystick information manually\&. \fBstate\fR is either \fBSDL_QUERY\fP, \fBSDL_ENABLE\fP or \fBSDL_IGNORE\fP\&. +.PP +.RS +\fBNote: +.PP +Joystick event handling is prefered +.RE +.SH "RETURN VALUE" +.PP +If \fBstate\fR is \fBSDL_QUERY\fP then the current state is returned, otherwise the new processing \fBstate\fR is returned\&. +.SH "SEE ALSO" +.PP +\fISDL Joystick Functions\fR, \fI\fBSDL_JoystickUpdate\fP\fR, \fI\fBSDL_JoyAxisEvent\fR\fR, \fI\fBSDL_JoyBallEvent\fR\fR, \fI\fBSDL_JoyButtonEvent\fR\fR, \fI\fBSDL_JoyHatEvent\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickGetAxis.3 b/docs/man3/SDL_JoystickGetAxis.3 new file mode 100644 index 000000000..e69645f22 --- /dev/null +++ b/docs/man3/SDL_JoystickGetAxis.3 @@ -0,0 +1,32 @@ +.TH "SDL_JoystickGetAxis" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickGetAxis\- Get the current state of an axis +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSint16 \fBSDL_JoystickGetAxis\fP\fR(\fBSDL_Joystick *joystick, int axis\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_JoystickGetAxis\fP returns the current state of the given \fBaxis\fR on the given \fBjoystick\fR\&. +.PP +On most modern joysticks the X axis is usually represented by \fBaxis\fR 0 and the Y axis by \fBaxis\fR 1\&. The value returned by \fBSDL_JoystickGetAxis\fP is a signed integer (-32768 to 32768) representing the current position of the \fBaxis\fR, it maybe necessary to impose certain tolerances on these values to account for jitter\&. It is worth noting that some joysticks use axes 2 and 3 for extra buttons\&. +.SH "RETURN VALUE" +.PP +Returns a 16-bit signed integer representing the current position of the \fBaxis\fR\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSint16 x_move, y_move; +SDL_Joystick *joy1; +\&. +\&. +x_move=SDL_JoystickGetAxis(joy1, 0); +y_move=SDL_JoystickGetAxis(joy1, 1);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickNumAxes\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickGetBall.3 b/docs/man3/SDL_JoystickGetBall.3 new file mode 100644 index 000000000..142ad30b1 --- /dev/null +++ b/docs/man3/SDL_JoystickGetBall.3 @@ -0,0 +1,37 @@ +.TH "SDL_JoystickGetBall" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickGetBall\- Get relative trackball motion +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_JoystickGetBall\fP\fR(\fBSDL_Joystick *joystick, int ball, int *dx, int *dy\fR); +.SH "DESCRIPTION" +.PP +Get the \fBball\fR axis change\&. +.PP +Trackballs can only return relative motion since the last call to \fBSDL_JoystickGetBall\fP, these motion deltas a placed into \fBdx\fR and \fBdy\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success or \fB-1\fR on failure +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWint delta_x, delta_y; +SDL_Joystick *joy; +\&. +\&. +\&. +SDL_JoystickUpdate(); +if(SDL_JoystickGetBall(joy, 0, &delta_x, &delta_y)==-1) + printf("TrackBall Read Error! +"); +printf("Trackball Delta- X:%d, Y:%d +", delta_x, delta_y);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickNumBalls\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickGetButton.3 b/docs/man3/SDL_JoystickGetButton.3 new file mode 100644 index 000000000..f4cd66466 --- /dev/null +++ b/docs/man3/SDL_JoystickGetButton.3 @@ -0,0 +1,18 @@ +.TH "SDL_JoystickGetButton" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickGetButton\- Get the current state of a given button on a given joystick +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 \fBSDL_JoystickGetButton\fP\fR(\fBSDL_Joystick *joystick, int button\fR); +.SH "DESCRIPTION" +.PP +SDL_JoystickGetButton returns the current state of the given \fBbutton\fR on the given \fBjoystick\fR\&. +.SH "RETURN VALUE" +.PP +\fB1\fR if the button is pressed\&. Otherwise, \fB0\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickNumButtons\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickGetHat.3 b/docs/man3/SDL_JoystickGetHat.3 new file mode 100644 index 000000000..440f3c433 --- /dev/null +++ b/docs/man3/SDL_JoystickGetHat.3 @@ -0,0 +1,36 @@ +.TH "SDL_JoystickGetHat" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickGetHat\- Get the current state of a joystick hat +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint8 \fBSDL_JoystickGetHat\fP\fR(\fBSDL_Joystick *joystick, int hat\fR); +.SH "DESCRIPTION" +.PP +SDL_JoystickGetHat returns the current state of the given \fBhat\fR on the given \fBjoystick\fR\&. +.SH "RETURN VALUE" +.PP +The current state is returned as a Uint8 which is defined as an OR\&'d combination of one or more of the following +.IP "" 10 +\fBSDL_HAT_CENTERED\fP +.IP "" 10 +\fBSDL_HAT_UP\fP +.IP "" 10 +\fBSDL_HAT_RIGHT\fP +.IP "" 10 +\fBSDL_HAT_DOWN\fP +.IP "" 10 +\fBSDL_HAT_LEFT\fP +.IP "" 10 +\fBSDL_HAT_RIGHTUP\fP +.IP "" 10 +\fBSDL_HAT_RIGHTDOWN\fP +.IP "" 10 +\fBSDL_HAT_LEFTUP\fP +.IP "" 10 +\fBSDL_HAT_LEFTDOWN\fP +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickNumHats\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickIndex.3 b/docs/man3/SDL_JoystickIndex.3 new file mode 100644 index 000000000..b581f4a6d --- /dev/null +++ b/docs/man3/SDL_JoystickIndex.3 @@ -0,0 +1,18 @@ +.TH "SDL_JoystickIndex" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickIndex\- Get the index of an SDL_Joystick\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_JoystickIndex\fP\fR(\fBSDL_Joystick *joystick\fR); +.SH "DESCRIPTION" +.PP +Returns the index of a given \fBSDL_Joystick\fR structure\&. +.SH "RETURN VALUE" +.PP +Index number of the joystick\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickOpen\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickName.3 b/docs/man3/SDL_JoystickName.3 new file mode 100644 index 000000000..5f82dec74 --- /dev/null +++ b/docs/man3/SDL_JoystickName.3 @@ -0,0 +1,32 @@ +.TH "SDL_JoystickName" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickName\- Get joystick name\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBconst char *\fBSDL_JoystickName\fP\fR(\fBint index\fR); +.SH "DESCRIPTION" +.PP +Get the implementation dependent name of joystick\&. The \fBindex\fR parameter refers to the N\&'th joystick on the system\&. +.SH "RETURN VALUE" +.PP +Returns a char pointer to the joystick name\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CW/* Print the names of all attached joysticks */ +int num_joy, i; +num_joy=SDL_NumJoysticks(); +printf("%d joysticks found +", num_joy); +for(i=0;i0){ + // Open joystick + joy=SDL_JoystickOpen(0); + + if(joy) + { + printf("Opened Joystick 0 +"); + printf("Name: %s +", SDL_JoystickName(0)); + printf("Number of Axes: %s +", SDL_JoystickNumAxes(joy)); + printf("Number of Buttons: %s +", SDL_JoystickNumButtons(joy)); + printf("Number of Balls: %s +", SDL_JoystickNumBalls(joy)); + } + else + printf("Couldn\&'t open Joystick 0 +"); + + // Close if opened + if(SDL_JoystickOpened(0)) + SDL_JoystickClose(joy); +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickClose\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickOpened.3 b/docs/man3/SDL_JoystickOpened.3 new file mode 100644 index 000000000..1c35fc90b --- /dev/null +++ b/docs/man3/SDL_JoystickOpened.3 @@ -0,0 +1,18 @@ +.TH "SDL_JoystickOpened" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickOpened\- Determine if a joystick has been opened +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_JoystickOpened\fP\fR(\fBint index\fR); +.SH "DESCRIPTION" +.PP +Determines whether a joystick has already been opened within the application\&. \fBindex\fR refers to the N\&'th joystick on the system\&. +.SH "RETURN VALUE" +.PP +Returns \fB1\fR if the joystick has been opened, or \fB0\fR if it has not\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickOpen\fP\fR, \fI\fBSDL_JoystickClose\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_JoystickUpdate.3 b/docs/man3/SDL_JoystickUpdate.3 new file mode 100644 index 000000000..8b05a6acc --- /dev/null +++ b/docs/man3/SDL_JoystickUpdate.3 @@ -0,0 +1,15 @@ +.TH "SDL_JoystickUpdate" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_JoystickUpdate\- Updates the state of all joysticks +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_JoystickUpdate\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Updates the state(position, buttons, etc\&.) of all open joysticks\&. If joystick events have been enabled with \fI\fBSDL_JoystickEventState\fP\fR then this is called automatically in the event loop\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickEventState\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_KeyboardEvent.3 b/docs/man3/SDL_KeyboardEvent.3 new file mode 100644 index 000000000..893101594 --- /dev/null +++ b/docs/man3/SDL_KeyboardEvent.3 @@ -0,0 +1,38 @@ +.TH "SDL_KeyboardEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_KeyboardEvent\- Keyboard event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 state; + SDL_keysym keysym; +} SDL_KeyboardEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_KEYDOWN\fP or \fBSDL_KEYUP\fP +.TP 20 +\fBstate\fR +\fBSDL_PRESSED\fP or \fBSDL_RELEASED\fP +.TP 20 +\fBkeysym\fR +Contains key press information +.SH "DESCRIPTION" +.PP +\fBSDL_KeyboardEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_KEYDOWN\fP or \fBSDL_KEYUP\fP is reported\&. +.PP +The \fBtype\fR and \fBstate\fR actually report the same information, they just use different values to do it! A keyboard event occurs when a key is released (\fBtype\fR=\fBSDK_KEYUP\fP or \fBstate\fR=\fBSDL_RELEASED\fP) and when a key is pressed (\fBtype\fR=\fBSDL_KEYDOWN\fP or \fBstate\fR=\fBSDL_PRESSED\fP)\&. The information on what key was pressed or released is in the \fI\fBkeysym\fR\fR structure\&. +.PP +.RS +\fBNote: +.PP +Repeating \fBSDL_KEYDOWN\fP events will occur if key repeat is enabled (see \fI\fBSDL_EnableKeyRepeat\fP\fR)\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_keysym\fR\fR, \fI\fBSDL_EnableKeyRepeat\fP\fR, \fI\fBSDL_EnableUNICODE\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_KillThread.3 b/docs/man3/SDL_KillThread.3 new file mode 100644 index 000000000..6f04a93ec --- /dev/null +++ b/docs/man3/SDL_KillThread.3 @@ -0,0 +1,16 @@ +.TH "SDL_KillThread" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_KillThread\- Gracelessly terminates the thread\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBvoid \fBSDL_KillThread\fP\fR(\fBSDL_Thread *thread\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_KillThread\fP gracelessly terminates the thread associated with \fBthread\fR\&. If possible, you should use some other form of IPC to signal the thread to quit\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateThread\fP\fR, \fI\fBSDL_WaitThread\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_ListModes.3 b/docs/man3/SDL_ListModes.3 new file mode 100644 index 000000000..240be987e --- /dev/null +++ b/docs/man3/SDL_ListModes.3 @@ -0,0 +1,53 @@ +.TH "SDL_ListModes" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ListModes\- Returns a pointer to an array of available screen dimensions for the given format and video flags +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Rect **\fBSDL_ListModes\fP\fR(\fBSDL_PixelFormat *format, Uint32 flags\fR); +.SH "DESCRIPTION" +.PP +Return a pointer to an array of available screen dimensions for the given format and video flags, sorted largest to smallest\&. Returns \fBNULL\fP if there are no dimensions available for a particular format, or \fB-1\fR if any dimension is okay for the given format\&. +.PP +If \fBformat\fR is \fBNULL\fP, the mode list will be for the format returned by \fISDL_GetVideoInfo()\fR->\fBvfmt\fR\&. The \fBflag\fR parameter is an OR\&'d combination of \fIsurface\fR flags\&. The flags are the same as those used \fI\fBSDL_SetVideoMode\fP\fR and they play a strong role in deciding what modes are valid\&. For instance, if you pass \fBSDL_HWSURFACE\fP as a flag only modes that support hardware video surfaces will be returned\&. +.SH "EXAMPLE" +.PP +.nf +\f(CWSDL_Rect **modes; +int i; +\&. +\&. +\&. + +/* Get available fullscreen/hardware modes */ +modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE); + +/* Check is there are any modes available */ +if(modes == (SDL_Rect **)0){ + printf("No modes available! +"); + exit(-1); +} + +/* Check if or resolution is restricted */ +if(modes == (SDL_Rect **)-1){ + printf("All resolutions available\&. +"); +} +else{ + /* Print valid modes */ + printf("Available Modes +"); + for(i=0;modes[i];++i) + printf(" %d x %d +", modes[i]->w, modes[i]->h); +} +\&. +\&.\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_GetVideoInfo\fP\fR, \fI\fBSDL_Rect\fR\fR, \fI\fBSDL_PixelFormat\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_LoadBMP.3 b/docs/man3/SDL_LoadBMP.3 new file mode 100644 index 000000000..eb2a0c562 --- /dev/null +++ b/docs/man3/SDL_LoadBMP.3 @@ -0,0 +1,18 @@ +.TH "SDL_LoadBMP" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_LoadBMP\- Load a Windows BMP file into an SDL_Surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_LoadBMP\fP\fR(\fBconst char *file\fR); +.SH "DESCRIPTION" +.PP +Loads a surface from a named Windows BMP file\&. +.SH "RETURN VALUE" +.PP +Returns the new surface, or \fBNULL\fP if there was an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_SaveBMP\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_LoadWAV.3 b/docs/man3/SDL_LoadWAV.3 new file mode 100644 index 000000000..0f0c9dd62 --- /dev/null +++ b/docs/man3/SDL_LoadWAV.3 @@ -0,0 +1,42 @@ +.TH "SDL_LoadWAV" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_LoadWAV\- Load a WAVE file +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_AudioSpec *\fBSDL_LoadWAV\fP\fR(\fBconst char *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_LoadWAV\fP This function loads a WAVE \fBfile\fR into memory\&. +.PP +If this function succeeds, it returns the given \fI\fBSDL_AudioSpec\fP\fR, filled with the audio data format of the wave data, and sets \fBaudio_buf\fR to a \fBmalloc\fP\&'d buffer containing the audio data, and sets \fBaudio_len\fR to the length of that audio buffer, in bytes\&. You need to free the audio buffer with \fI\fBSDL_FreeWAV\fP\fR when you are done with it\&. +.PP +This function returns \fBNULL\fP and sets the SDL error message if the wave file cannot be opened, uses an unknown data format, or is corrupt\&. Currently raw, MS-ADPCM and IMA-ADPCM WAVE files are supported\&. +.SH "EXAMPLE" +.PP +.nf +\f(CWSDL_AudioSpec wav_spec; +Uint32 wav_length; +Uint8 *wav_buffer; + +/* Load the WAV */ +if( SDL_LoadWAV("test\&.wav", &wav_spec, &wav_buffer, &wav_length) == NULL ){ + fprintf(stderr, "Could not open test\&.wav: %s +", SDL_GetError()); + exit(-1); +} +\&. +\&. +\&. +/* Do stuff with the WAV */ +\&. +\&. +/* Free It */ +SDL_FreeWAV(wav_buffer);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_AudioSpec\fR\fR, \fI\fBSDL_OpenAudio\fP\fR, \fI\fBSDL_FreeWAV\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_LockAudio.3 b/docs/man3/SDL_LockAudio.3 new file mode 100644 index 000000000..f8ecab40f --- /dev/null +++ b/docs/man3/SDL_LockAudio.3 @@ -0,0 +1,15 @@ +.TH "SDL_LockAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_LockAudio\- Lock out the callback function +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_LockAudio\fP\fR(\fBvoid\fR) +.SH "DESCRIPTION" +.PP +The lock manipulated by these functions protects the callback function\&. During a LockAudio period, you can be guaranteed that the callback function is not running\&. Do not call these from the callback function or you will cause deadlock\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_OpenAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_LockSurface.3 b/docs/man3/SDL_LockSurface.3 new file mode 100644 index 000000000..e1a03a37d --- /dev/null +++ b/docs/man3/SDL_LockSurface.3 @@ -0,0 +1,49 @@ +.TH "SDL_LockSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_LockSurface\- Lock a surface for directly access\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_LockSurface\fP\fR(\fBSDL_Surface *surface\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_LockSurface\fP sets up a surface for directly accessing the pixels\&. Between calls to \fBSDL_LockSurface\fP and \fBSDL_UnlockSurface\fP, you can write to and read from \fBsurface->\fBpixels\fR\fR, using the pixel format stored in \fBsurface->\fBformat\fR\fR\&. Once you are done accessing the surface, you should use \fBSDL_UnlockSurface\fP to release it\&. +.PP +Not all surfaces require locking\&. If \fBSDL_MUSTLOCK\fP(\fBsurface\fR) evaluates to \fB0\fR, then you can read and write to the surface at any time, and the pixel format of the surface will not change\&. +.PP +No operating system or library calls should be made between lock/unlock pairs, as critical system locks may be held during this time\&. +.PP +It should be noted, that since SDL 1\&.1\&.8 surface locks are recursive\&. This means that you can lock a surface multiple times, but each lock must have a match unlock\&. +.PP +.nf +\f(CW \&. + \&. + SDL_LockSurface( surface ); + \&. + /* Surface is locked */ + /* Direct pixel access on surface here */ + \&. + SDL_LockSurface( surface ); + \&. + /* More direct pixel access on surface */ + \&. + SDL_UnlockSurface( surface ); + /* Surface is still locked */ + /* Note: Is versions < 1\&.1\&.8, the surface would have been */ + /* no longer locked at this stage */ + \&. + SDL_UnlockSurface( surface ); + /* Surface is now unlocked */ + \&. + \&.\fR +.fi +.PP + +.SH "RETURN VALUE" +.PP +\fBSDL_LockSurface\fP returns \fB0\fR, or \fB-1\fR if the surface couldn\&'t be locked\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_UnlockSurface\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_LockYUVOverlay.3 b/docs/man3/SDL_LockYUVOverlay.3 new file mode 100644 index 000000000..42d477729 --- /dev/null +++ b/docs/man3/SDL_LockYUVOverlay.3 @@ -0,0 +1,18 @@ +.TH "SDL_LockYUVOverlay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_LockYUVOverlay\- Lock an overlay +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_LockYUVOverlay\fP\fR(\fBSDL_Overlay *overlay\fR); +.SH "DESCRIPTION" +.PP +Much the same as \fI\fBSDL_LockSurface\fP\fR, \fBSDL_LockYUVOverlay\fP locks the \fI\fBoverlay\fR\fR for direct access to pixel data\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_UnlockYUVOverlay\fP\fR, \fI\fBSDL_CreateYUVOverlay\fP\fR, \fI\fBSDL_Overlay\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_MapRGB.3 b/docs/man3/SDL_MapRGB.3 new file mode 100644 index 000000000..2416f3c8c --- /dev/null +++ b/docs/man3/SDL_MapRGB.3 @@ -0,0 +1,22 @@ +.TH "SDL_MapRGB" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_MapRGB\- Map a RGB color value to a pixel format\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint32 \fBSDL_MapRGB\fP\fR(\fBSDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b\fR); +.SH "DESCRIPTION" +.PP +Maps the RGB color value to the specified pixel format and returns the pixel value as a 32-bit int\&. +.PP +If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned\&. +.PP +If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque)\&. +.SH "RETURN VALUE" +.PP +A pixel value best approximating the given RGB color value for a given pixel format\&. If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e\&.g\&., with a 16-bpp format the return value can be assigned to a \fBUint16\fP, and similarly a \fBUint8\fP for an 8-bpp format)\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetRGB\fP\fR, \fI\fBSDL_GetRGBA\fP\fR, \fI\fBSDL_MapRGBA\fP\fR, \fI\fBSDL_PixelFormat\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_MapRGBA.3 b/docs/man3/SDL_MapRGBA.3 new file mode 100644 index 000000000..cc4da83d5 --- /dev/null +++ b/docs/man3/SDL_MapRGBA.3 @@ -0,0 +1,22 @@ +.TH "SDL_MapRGBA" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_MapRGBA\- Map a RGBA color value to a pixel format\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint32 \fBSDL_MapRGBA\fP\fR(\fBSDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b, Uint8 a\fR); +.SH "DESCRIPTION" +.PP +Maps the RGBA color value to the specified pixel format and returns the pixel value as a 32-bit int\&. +.PP +If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned\&. +.PP +If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette)\&. +.SH "RETURN VALUE" +.PP +A pixel value best approximating the given RGBA color value for a given pixel format\&. If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e\&.g\&., with a 16-bpp format the return value can be assigned to a \fBUint16\fP, and similarly a \fBUint8\fP for an 8-bpp format)\&. +.SH "SEE ALSO" +.PP +\fISDL_GetRGB\fR, \fISDL_GetRGBA\fR, \fISDL_MapRGB\fR, \fISDL_PixelFormat\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_MixAudio.3 b/docs/man3/SDL_MixAudio.3 new file mode 100644 index 000000000..23f422d31 --- /dev/null +++ b/docs/man3/SDL_MixAudio.3 @@ -0,0 +1,15 @@ +.TH "SDL_MixAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_MixAudio\- Mix audio data +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_MixAudio\fP\fR(\fBUint8 *dst, Uint8 *src, Uint32 len, int volume\fR); +.SH "DESCRIPTION" +.PP +This takes two audio buffers of the playing audio format and mixes them, performing addition, volume adjustment, and overflow clipping\&. The \fBvolume\fR ranges from 0 - 128, and should be set to \fBSDL_MIX_MAXVOLUME\fP for full audio volume\&. Note this does not change hardware volume\&. This is provided for convenience -- you can mix your own audio data\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_OpenAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_MouseButtonEvent.3 b/docs/man3/SDL_MouseButtonEvent.3 new file mode 100644 index 000000000..91436c1b3 --- /dev/null +++ b/docs/man3/SDL_MouseButtonEvent.3 @@ -0,0 +1,36 @@ +.TH "SDL_MouseButtonEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_MouseButtonEvent\- Mouse button event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 button; + Uint8 state; + Uint16 x, y; +} SDL_MouseButtonEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_MOUSEBUTTONDOWN\fP or \fBSDL_MOUSEBUTTONUP\fP +.TP 20 +\fBbutton\fR +The mouse button index (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT) +.TP 20 +\fBstate\fR +\fBSDL_PRESSED\fP or \fBSDL_RELEASED\fP +.TP 20 +\fBx\fR, \fBy\fR +The X/Y coordinates of the mouse at press/release time +.SH "DESCRIPTION" +.PP +\fBSDL_MouseButtonEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_MOUSEBUTTONDOWN\fP or \fBSDL_MOUSEBUTTONUP\fP is reported\&. +.PP +When a mouse button press or release is detected then number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into \fBbutton\fR, the position of the mouse when this event occured is stored in the \fBx\fR and the \fBy\fR fields\&. Like \fI\fBSDL_KeyboardEvent\fR\fR, information on whether the event was a press or a release event is stored in both the \fBtype\fR and \fBstate\fR fields, but this should be obvious\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_MouseMotionEvent\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_MouseMotionEvent.3 b/docs/man3/SDL_MouseMotionEvent.3 new file mode 100644 index 000000000..f3c234658 --- /dev/null +++ b/docs/man3/SDL_MouseMotionEvent.3 @@ -0,0 +1,38 @@ +.TH "SDL_MouseMotionEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_MouseMotionEvent\- Mouse motion event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + Uint8 state; + Uint16 x, y; + Sint16 xrel, yrel; +} SDL_MouseMotionEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_MOUSEMOTION\fP +.TP 20 +\fBstate\fR +The current button state +.TP 20 +\fBx\fR, \fBy\fR +The X/Y coordinates of the mouse +.TP 20 +\fBxrel\fR, \fByrel\fR +Relative motion in the X/Y direction +.SH "DESCRIPTION" +.PP +\fBSDL_MouseMotionEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_MOUSEMOTION\fP is reported\&. +.PP +Simply put, a \fBSDL_MOUSEMOTION\fP type event occurs when a user moves the mouse within the application window or when \fI\fBSDL_WarpMouse\fP\fR is called\&. Both the absolute (\fBx\fR and \fBy\fR) and relative (\fBxrel\fR and \fByrel\fR) coordinates are reported along with the current button states (\fBstate\fR)\&. The button state can be interpreted using the \fBSDL_BUTTON\fP macro (see \fI\fBSDL_GetMouseState\fP\fR)\&. +.PP +If the cursor is hidden (\fI\fBSDL_ShowCursor\fP(0)\fR) and the input is grabbed (\fI\fBSDL_WM_GrabInput\fP(SDL_GRAB_ON)\fR), then the mouse will give relative motion events even when the cursor reaches the edge fo the screen\&. This is currently only implemented on Windows and Linux/Unix-a-likes\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_MouseButtonEvent\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_NumJoysticks.3 b/docs/man3/SDL_NumJoysticks.3 new file mode 100644 index 000000000..e0730131d --- /dev/null +++ b/docs/man3/SDL_NumJoysticks.3 @@ -0,0 +1,18 @@ +.TH "SDL_NumJoysticks" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_NumJoysticks\- Count available joysticks\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_NumJoysticks\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Counts the number of joysticks attached to the system\&. +.SH "RETURN VALUE" +.PP +Returns the number of attached joysticks +.SH "SEE ALSO" +.PP +\fI\fBSDL_JoystickName\fP\fR, \fI\fBSDL_JoystickOpen\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_OpenAudio.3 b/docs/man3/SDL_OpenAudio.3 new file mode 100644 index 000000000..8d3777724 --- /dev/null +++ b/docs/man3/SDL_OpenAudio.3 @@ -0,0 +1,94 @@ +.TH "SDL_OpenAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_OpenAudio\- Opens the audio device with the desired parameters\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_OpenAudio\fP\fR(\fBSDL_AudioSpec *desired, SDL_AudioSpec *obtained\fR); +.SH "DESCRIPTION" +.PP +This function opens the audio device with the \fBdesired\fR parameters, and returns 0 if successful, placing the actual hardware parameters in the structure pointed to by \fBobtained\fR\&. If \fBobtained\fR is NULL, the audio data passed to the callback function will be guaranteed to be in the requested format, and will be automatically converted to the hardware audio format if necessary\&. This function returns -1 if it failed to open the audio device, or couldn\&'t set up the audio thread\&. +.PP +To open the audio device a \fBdesired\fR \fI\fBSDL_AudioSpec\fR\fR must be created\&. +.PP +.nf +\f(CWSDL_AudioSpec *desired; +\&. +\&. +desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));\fR +.fi +.PP + You must then fill this structure with your desired audio specifications\&. +.IP "\fBdesired\fR->\fBfreq\fR" 10The desired audio frequency in samples-per-second\&. +.IP "\fBdesired\fR->\fBformat\fR" 10The desired audio format (see \fI\fBSDL_AudioSpec\fR\fR) +.IP "\fBdesired\fR->\fBsamples\fR" 10The desired size of the audio buffer in samples\&. This number should be a power of two, and may be adjusted by the audio driver to a value more suitable for the hardware\&. Good values seem to range between 512 and 8192 inclusive, depending on the application and CPU speed\&. Smaller values yield faster response time, but can lead to underflow if the application is doing heavy processing and cannot fill the audio buffer in time\&. A stereo sample consists of both right and left channels in LR ordering\&. Note that the number of samples is directly related to time by the following formula: ms = (samples*1000)/freq +.IP "\fBdesired\fR->\fBcallback\fR" 10This should be set to a function that will be called when the audio device is ready for more data\&. It is passed a pointer to the audio buffer, and the length in bytes of the audio buffer\&. This function usually runs in a separate thread, and so you should protect data structures that it accesses by calling \fI\fBSDL_LockAudio\fP\fR and \fI\fBSDL_UnlockAudio\fP\fR in your code\&. The callback prototype is: +.PP +.nf +\f(CWvoid callback(void *userdata, Uint8 *stream, int len);\fR +.fi +.PP + \fBuserdata\fR is the pointer stored in \fBuserdata\fR field of the \fBSDL_AudioSpec\fR\&. \fBstream\fR is a pointer to the audio buffer you want to fill with information and \fBlen\fR is the length of the audio buffer in bytes\&. +.IP "\fBdesired\fR->\fBuserdata\fR" 10This pointer is passed as the first parameter to the \fBcallback\fP function\&. +.PP +\fBSDL_OpenAudio\fP reads these fields from the \fBdesired\fR \fBSDL_AudioSpec\fR structure pass to the function and attempts to find an audio configuration matching your \fBdesired\fR\&. As mentioned above, if the \fBobtained\fR parameter is \fBNULL\fP then SDL with convert from your \fBdesired\fR audio settings to the hardware settings as it plays\&. +.PP +If \fBobtained\fR is \fBNULL\fP then the \fBdesired\fR \fBSDL_AudioSpec\fR is your working specification, otherwise the \fBobtained\fR \fBSDL_AudioSpec\fR becomes the working specification and the \fBdesirec\fR specification can be deleted\&. The data in the working specification is used when building \fBSDL_AudioCVT\fR\&'s for converting loaded data to the hardware format\&. +.PP +\fBSDL_OpenAudio\fP calculates the \fBsize\fR and \fBsilence\fR fields for both the \fBdesired\fR and \fBobtained\fR specifications\&. The \fBsize\fR field stores the total size of the audio buffer in bytes, while the \fBsilence\fR stores the value used to represent silence in the audio buffer +.PP +The audio device starts out playing \fBsilence\fR when it\&'s opened, and should be enabled for playing by calling \fI\fBSDL_PauseAudio\fP(\fB0\fR)\fR when you are ready for your audio \fBcallback\fR function to be called\&. Since the audio driver may modify the requested \fBsize\fR of the audio buffer, you should allocate any local mixing buffers after you open the audio device\&. +.SH "EXAMPLES" +.PP +.nf +\f(CW/* Prototype of our callback function */ +void my_audio_callback(void *userdata, Uint8 *stream, int len); + +/* Open the audio device */ +SDL_AudioSpec *desired, *obtained; +SDL_AudioSpec *hardware_spec; + +/* Allocate a desired SDL_AudioSpec */ +desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec)); + +/* Allocate space for the obtained SDL_AudioSpec */ +obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec)); + +/* 22050Hz - FM Radio quality */ +desired->freq=22050; + +/* 16-bit signed audio */ +desired->format=AUDIO_S16LSB; + +/* Large audio buffer reduces risk of dropouts but increases response time */ +desired->samples=8192; + +/* Our callback function */ +desired->callback=my_audio_callback; + +desired->userdata=NULL; + +/* Open the audio device */ +if ( SDL_OpenAudio(desired, obtained) < 0 ){ + fprintf(stderr, "Couldn\&'t open audio: %s +", SDL_GetError()); + exit(-1); +} +/* desired spec is no longer needed */ +free(desired); +hardware_spec=obtained; +\&. +\&. +/* Prepare callback for playing */ +\&. +\&. +\&. +/* Start playing */ +SDL_PauseAudio(0);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_AudioSpec\fP\fR, \fI\fBSDL_LockAudio\fP\fR, \fI\fBSDL_UnlockAudio\fP\fR, \fI\fBSDL_PauseAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_Overlay.3 b/docs/man3/SDL_Overlay.3 new file mode 100644 index 000000000..dec707761 --- /dev/null +++ b/docs/man3/SDL_Overlay.3 @@ -0,0 +1,52 @@ +.TH "SDL_Overlay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Overlay\- YUV video overlay +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint32 format; + int w, h; + int planes; + Uint16 *pitches; + Uint8 **pixels; + Uint32 hw_overlay:1; +} SDL_Overlay;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBformat\fR +Overlay format (see below) +.TP 20 +\fBw, h\fR +Width and height of overlay +.TP 20 +\fBplanes\fR +Number of planes in the overlay\&. Usually either 1 or 3 +.TP 20 +\fBpitches\fR +An array of pitches, one for each plane\&. Pitch is the length of a row in bytes\&. +.TP 20 +\fBpixels\fR +An array of pointers to teh data of each plane\&. The overlay should be locked before these pointers are used\&. +.TP 20 +\fBhw_overlay\fR +This will be set to 1 if the overlay is hardware accelerated\&. +.SH "DESCRIPTION" +.PP +A \fBSDL_Overlay\fR is similar to a \fI\fBSDL_Surface\fR\fR except it stores a YUV overlay\&. All the fields are read only, except for \fBpixels\fR which should be \fIlocked\fR before use\&. The \fBformat\fR field stores the format of the overlay which is one of the following: +.PP +.nf +\f(CW#define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U */ +#define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V */ +#define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 */ +#define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 */ +#define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 */\fR +.fi +.PP + More information on YUV formats can be found at \fIhttp://www\&.webartz\&.com/fourcc/indexyuv\&.htm (link to URL http://www.webartz.com/fourcc/indexyuv.htm) \fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateYUVOverlay\fP\fR, \fI\fBSDL_LockYUVOverlay\fP\fR, \fI\fBSDL_UnlockYUVOverlay\fP\fR, \fI\fBSDL_FreeYUVOverlay\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_Palette.3 b/docs/man3/SDL_Palette.3 new file mode 100644 index 000000000..6cb40358a --- /dev/null +++ b/docs/man3/SDL_Palette.3 @@ -0,0 +1,26 @@ +.TH "SDL_Palette" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Palette\- Color palette for 8-bit pixel formats +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + int ncolors; + SDL_Color *colors; +} SDL_Palette;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBncolors\fR +Number of colors used in this palette +.TP 20 +\fBcolors\fR +Pointer to \fI\fBSDL_Color\fR\fR structures that make up the palette\&. +.SH "DESCRIPTION" +.PP +Each pixel in an 8-bit surface is an index into the \fBcolors\fR field of the \fBSDL_Palette\fR structure store in \fI\fBSDL_PixelFormat\fR\fR\&. A \fBSDL_Palette\fR should never need to be created manually\&. It is automatically created when SDL allocates a \fBSDL_PixelFormat\fR for a surface\&. The colors values of a \fI\fBSDL_Surface\fR\fRs palette can be set with the \fI\fBSDL_SetColors\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Color\fR\fR, \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_SetColors\fP\fR \fI\fBSDL_SetPalette\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_PauseAudio.3 b/docs/man3/SDL_PauseAudio.3 new file mode 100644 index 000000000..d16920d82 --- /dev/null +++ b/docs/man3/SDL_PauseAudio.3 @@ -0,0 +1,15 @@ +.TH "SDL_PauseAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_PauseAudio\- Pauses and unpauses the audio callback processing +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_PauseAudio\fP\fR(\fBint pause_on\fR); +.SH "DESCRIPTION" +.PP +This function pauses and unpauses the audio callback processing\&. It should be called with \fBpause_on\fR=0 after opening the audio device to start playing sound\&. This is so you can safely initialize data for your callback function after opening the audio device\&. Silence will be written to the audio device during the pause\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetAudioStatus\fP\fR, \fI\fBSDL_OpenAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_PeepEvents.3 b/docs/man3/SDL_PeepEvents.3 new file mode 100644 index 000000000..451a3061e --- /dev/null +++ b/docs/man3/SDL_PeepEvents.3 @@ -0,0 +1,26 @@ +.TH "SDL_PeepEvents" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_PeepEvents\- Checks the event queue for messages and optionally returns them\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_PeepEvents\fP\fR(\fBSDL_Event *events, int numevents, SDL_eventaction action, Uint32 mask\fR); +.SH "DESCRIPTION" +.PP +Checks the event queue for messages and optionally returns them\&. +.PP +If \fBaction\fR is \fBSDL_ADDEVENT\fP, up to \fBnumevents\fR events will be added to the back of the event queue\&. +.PP +If \fBaction\fR is \fBSDL_PEEKEVENT\fP, up to \fBnumevents\fR events at the front of the event queue, matching \fI\fBmask\fR\fR, will be returned and will not be removed from the queue\&. +.PP +If \fBaction\fR is \fBSDL_GETEVENT\fP, up to \fBnumevents\fR events at the front of the event queue, matching \fI\fBmask\fR\fR, will be returned and will be removed from the queue\&. +.PP +This function is thread-safe\&. +.SH "RETURN VALUE" +.PP +This function returns the number of events actually stored, or \fB-1\fR if there was an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_PollEvent\fP\fR, \fI\fBSDL_PushEvent\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_PixelFormat.3 b/docs/man3/SDL_PixelFormat.3 new file mode 100644 index 000000000..b9a3af760 --- /dev/null +++ b/docs/man3/SDL_PixelFormat.3 @@ -0,0 +1,140 @@ +.TH "SDL_PixelFormat" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_PixelFormat\- Stores surface format information +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + SDL_Palette *palette; + Uint8 BitsPerPixel; + Uint8 BytesPerPixel; + Uint32 Rmask, Gmask, Bmask, Amask; + Uint8 Rshift, Gshift, Bshift, Ashift; + Uint8 Rloss, Gloss, Bloss, Aloss; + Uint32 colorkey; + Uint8 alpha; +} SDL_PixelFormat;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBpalette\fR +Pointer to the \fIpalette\fR, or \fBNULL\fP if the \fBBitsPerPixel\fR>8 +.TP 20 +\fBBitsPerPixel\fR +The number of bits used to represent each pixel in a surface\&. Usually 8, 16, 24 or 32\&. +.TP 20 +\fBBytesPerPixel\fR +The number of bytes used to represent each pixel in a surface\&. Usually one to four\&. +.TP 20 +\fB[RGBA]mask\fR +Binary mask used to retrieve individual color values +.TP 20 +\fB[RGBA]loss\fR +Precision loss of each color component (2^[RGBA]loss) +.TP 20 +\fB[RGBA]shift\fR +Binary left shift of each color component in the pixel value +.TP 20 +\fBcolorkey\fR +Pixel value of transparent pixels +.TP 20 +\fBalpha\fR +Overall surface alpha value +.SH "DESCRIPTION" +.PP +A \fBSDL_PixelFormat\fR describes the format of the pixel data stored at the \fBpixels\fR field of a \fI\fBSDL_Surface\fR\fR\&. Every surface stores a \fBSDL_PixelFormat\fR in the \fBformat\fR field\&. +.PP +If you wish to do pixel level modifications on a surface, then understanding how SDL stores its color information is essential\&. +.PP +8-bit pixel formats are the easiest to understand\&. Since its an 8-bit format, we have 8 \fBBitsPerPixel\fR and 1 \fBBytesPerPixel\fR\&. Since \fBBytesPerPixel\fR is 1, all pixels are represented by a Uint8 which contains an index into \fBpalette\fR->\fBcolors\fR\&. So, to determine the color of a pixel in a 8-bit surface: we read the color index from \fBsurface\fR->\fBpixels\fR and we use that index to read the \fI\fBSDL_Color\fR\fR structure from \fBsurface\fR->\fBformat\fR->\fBpalette\fR->\fBcolors\fR\&. Like so: +.PP +.nf +\f(CWSDL_Surface *surface; +SDL_PixelFormat *fmt; +SDL_Color *color; +Uint8 index; + +\&. +\&. + +/* Create surface */ +\&. +\&. +fmt=surface->format; + +/* Check the bitdepth of the surface */ +if(fmt->BitsPerPixel!=8){ + fprintf(stderr, "Not an 8-bit surface\&. +"); + return(-1); +} + +/* Lock the surface */ +SDL_LockSurface(surface); + +/* Get the topleft pixel */ +index=*(Uint8 *)surface->pixels; +color=fmt->palette->colors[index]; + +/* Unlock the surface */ +SDL_UnlockSurface(surface); +printf("Pixel Color-> Red: %d, Green: %d, Blue: %d\&. Index: %d +", + color->r, color->g, color->b, index); +\&. +\&.\fR +.fi +.PP +.PP +Pixel formats above 8-bit are an entirely different experience\&. They are considered to be "TrueColor" formats and the color information is stored in the pixels themselves, not in a palette (packed-pixel)\&. The mask, shift and loss fields tell us how the color information is encoded\&. The mask fields allow us to isolate each color component, the shift fields tell us how far left we have to shift the masked value and the loss fields tell us for far right we have to shift the final value to convert it to a full 8-bit color component\&. +.PP +.nf +\f(CW/* Extracting color components from a 32-bit color value */ +SDL_PixelFormat *fmt; +SDL_Surface *surface; +Uint32 temp, pixel; +Uint8 red, green, blue, alpha; +\&. +\&. +\&. +fmt=surface->format; +SDL_LockSurface(surface); +pixel=(Uint32*)surface->pixels; +SDL_UnlockSurface(surface); + +/* Get Red component */ +temp=pixel&fmt->Rmask; /* Isolate red component */ +temp=temp>>fmt->Rshift;/* Shift it down to 8-bit */ +temp=temp<Rloss; /* Expand to a full 8-bit number */ +red=(Uint8)temp; + +/* Get Green component */ +temp=pixel&fmt->Gmask; /* Isolate green component */ +temp=temp>>fmt->Gshift;/* Shift it down to 8-bit */ +temp=temp<Gloss; /* Expand to a full 8-bit number */ +green=(Uint8)temp; + +/* Get Blue component */ +temp=pixel&fmt->Bmask; /* Isolate blue component */ +temp=temp>>fmt->Bshift;/* Shift it down to 8-bit */ +temp=temp<Bloss; /* Expand to a full 8-bit number */ +blue=(Uint8)temp; + +/* Get Alpha component */ +temp=pixel&fmt->Amask; /* Isolate alpha component */ +temp=temp>>fmt->Ashift;/* Shift it down to 8-bit */ +temp=temp<Aloss; /* Expand to a full 8-bit number */ +alpha=(Uint8)temp; + +printf("Pixel Color -> R: %d, G: %d, B: %d, A: %d +", red, green, blue, alpha); +\&. +\&. +\&.\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_Surface\fR\fR, \fI\fBSDL_MapRGB\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_PollEvent.3 b/docs/man3/SDL_PollEvent.3 new file mode 100644 index 000000000..b66b59699 --- /dev/null +++ b/docs/man3/SDL_PollEvent.3 @@ -0,0 +1,44 @@ +.TH "SDL_PollEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_PollEvent\- Polls for currently pending events\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_PollEvent\fP\fR(\fBSDL_Event *event\fR); +.SH "DESCRIPTION" +.PP +Polls for currently pending events, and returns \fB1\fR if there are any pending events, or \fB0\fR if there are none available\&. +.PP +If \fBevent\fR is not \fBNULL\fP, the next event is removed from the queue and stored in that area\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSDL_Event event; /* Event structure */ + +\&. +\&. +\&. +/* Check for events */ +while(SDL_PollEvent(&event)){ /* Loop until there are no events left on the queue */ + switch(event\&.type){ /* Process the appropiate event type */ + case SDL_KEYDOWN: /* Handle a KEYDOWN event */ + printf("Oh! Key press +"); + break; + case SDL_MOUSEMOTION: + \&. + \&. + \&. + default: /* Report an unhandled event */ + printf("I don\&'t know what this event is! +"); + } +}\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_WaitEvent\fP\fR, \fI\fBSDL_PeepEvents\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_PumpEvents.3 b/docs/man3/SDL_PumpEvents.3 new file mode 100644 index 000000000..9d63aa428 --- /dev/null +++ b/docs/man3/SDL_PumpEvents.3 @@ -0,0 +1,23 @@ +.TH "SDL_PumpEvents" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_PumpEvents\- Pumps the event loop, gathering events from the input devices\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_PumpEvents\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +Pumps the event loop, gathering events from the input devices\&. +.PP +\fBSDL_PumpEvents\fP gathers all the pending input information from devices and places it on the event queue\&. Without calls to \fBSDL_PumpEvents\fP no events would ever be placed on the queue\&. Often calls the need for \fBSDL_PumpEvents\fP is hidden from the user since \fI\fBSDL_PollEvent\fP\fR and \fI\fBSDL_WaitEvent\fP\fR implicitly call \fBSDL_PumpEvents\fP\&. However, if you are not polling or waiting for events (e\&.g\&. your filtering them), then you must call \fBSDL_PumpEvents\fP to force an event queue update\&. +.PP +.RS +\fBNote: +.PP +You can only call this function in the thread that set the video mode\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_PollEvent\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_PushEvent.3 b/docs/man3/SDL_PushEvent.3 new file mode 100644 index 000000000..0c68cca20 --- /dev/null +++ b/docs/man3/SDL_PushEvent.3 @@ -0,0 +1,27 @@ +.TH "SDL_PushEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_PushEvent\- Pushes an event onto the event queue +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_PushEvent\fP\fR(\fBSDL_Event *event\fR); +.SH "DESCRIPTION" +.PP +The event queue can actually be used as a two way communication channel\&. Not only can events be read from the queue, but the user can also push their own events onto it\&. \fBevent\fR is a pointer to the event structure you wish to push onto the queue\&. +.PP +.RS +\fBNote: +.PP +Pushing device input events onto the queue doesn\&'t modify the state of the device within SDL\&. +.RE +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on success or \fB-1\fR if the event couldn\&'t be pushed\&. +.SH "EXAMPLES" +.PP +See \fI\fBSDL_Event\fR\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_PollEvent\fP\fR, \fI\fBSDL_PeepEvents\fP\fR, \fI\fBSDL_Event\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_Quit.3 b/docs/man3/SDL_Quit.3 new file mode 100644 index 000000000..3f47ea3b5 --- /dev/null +++ b/docs/man3/SDL_Quit.3 @@ -0,0 +1,29 @@ +.TH "SDL_Quit" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Quit\- Shut down SDL +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_Quit\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_Quit\fP shuts down all SDL subsystems and frees the resources allocated to them\&. This should always be called before you exit\&. For the sake of simplicity you can set \fBSDL_Quit\fP as your \fBatexit\fP call, like: +.PP +.nf +\f(CWSDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); +atexit(SDL_Quit); +\&. +\&.\fR +.fi +.PP +.PP +.RS +\fBNote: +.PP +While using \fBatexit\fP maybe be fine for small programs, more advanced users should shut down SDL in their own cleanup code\&. Plus, using \fBatexit\fP in a library is a sure way to crash dynamically loaded code +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_QuitSubsystem\fP\fR, \fI\fBSDL_Init\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_QuitEvent.3 b/docs/man3/SDL_QuitEvent.3 new file mode 100644 index 000000000..910653c16 --- /dev/null +++ b/docs/man3/SDL_QuitEvent.3 @@ -0,0 +1,30 @@ +.TH "SDL_QuitEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_QuitEvent\- Quit requested event +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type +} SDL_QuitEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_QUIT\fP +.SH "DESCRIPTION" +.PP +\fBSDL_QuitEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used whan an event of type \fBSDL_QUIT\fP is reported\&. +.PP +As can be seen, the SDL_QuitEvent structure serves no useful purpose\&. The event itself, on the other hand, is very important\&. If you filter out or ignore a quit event then it is impossible for the user to close the window\&. On the other hand, if you do accept a quit event then the application window will be closed, and screen updates will still report success event though the application will no longer be visible\&. +.PP +.RS +\fBNote: +.PP +The macro \fBSDL_QuitRequested\fP will return non-zero if a quit event is pending +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_SetEventFilter\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_QuitSubSystem.3 b/docs/man3/SDL_QuitSubSystem.3 new file mode 100644 index 000000000..a2551a7aa --- /dev/null +++ b/docs/man3/SDL_QuitSubSystem.3 @@ -0,0 +1,15 @@ +.TH "SDL_QuitSubSystem" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_QuitSubSystem\- Shut down a subsystem +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_QuitSubSystem\fP\fR(\fBUint32 flags\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_QuitSubSystem\fP allows you to shut down a subsystem that has been previously initialized by \fI\fBSDL_Init\fP\fR or \fI\fBSDL_InitSubSystem\fP\fR\&. The \fBflags\fR tells \fBSDL_QuitSubSystem\fP which subsystems to shut down, it uses the same values that are passed to \fI\fBSDL_Init\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Quit\fP\fR, \fI\fBSDL_Init\fP\fR, \fI\fBSDL_InitSubSystem\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_RWFromFile.3 b/docs/man3/SDL_RWFromFile.3 new file mode 100644 index 000000000..55d2724de --- /dev/null +++ b/docs/man3/SDL_RWFromFile.3 @@ -0,0 +1,18 @@ +.TH "SDL_FunctionName" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_FunctionName\- Short description of function +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBreturn type\fBSDL_FunctionName\fP\fR(\fBparameter\fR); +.SH "DESCRIPTION" +.PP +Full description +.SH "EXAMPLES" +.PP +examples here +.SH "SEE ALSO" +.PP +\fISDL_AnotherFunction\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_Rect.3 b/docs/man3/SDL_Rect.3 new file mode 100644 index 000000000..fc5ee55f3 --- /dev/null +++ b/docs/man3/SDL_Rect.3 @@ -0,0 +1,26 @@ +.TH "SDL_Rect" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Rect\- Defines a rectangular area +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Sint16 x, y; + Uint16 w, h; +} SDL_Rect;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBx, y\fR +Position of the upper-left corner of the rectangle +.TP 20 +\fBw, h\fR +The width and height of the rectangle +.SH "DESCRIPTION" +.PP +A \fBSDL_Rect\fR defines a rectangular area of pixels\&. It is used by \fI\fBSDL_BlitSurface\fP\fR to define blitting regions and by several other video functions\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_BlitSurface\fP\fR, \fI\fBSDL_UpdateRect\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_RemoveTimer.3 b/docs/man3/SDL_RemoveTimer.3 new file mode 100644 index 000000000..7744b126f --- /dev/null +++ b/docs/man3/SDL_RemoveTimer.3 @@ -0,0 +1,25 @@ +.TH "SDL_RemoveTimer" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_RemoveTimer\- Remove a timer which was added with \fISDL_AddTimer\fR\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_bool \fBSDL_RemoveTimer\fP\fR(\fBSDL_TimerID id\fR); +.SH "DESCRIPTION" +.PP +Removes a timer callback previously added with \fISDL_AddTimer\fR\&. +.SH "RETURN VALUE" +.PP +Returns a boolean value indicating success\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSDL_RemoveTimer(my_timer_id);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_AddTimer\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_ResizeEvent.3 b/docs/man3/SDL_ResizeEvent.3 new file mode 100644 index 000000000..1a7c4357d --- /dev/null +++ b/docs/man3/SDL_ResizeEvent.3 @@ -0,0 +1,28 @@ +.TH "SDL_ResizeEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ResizeEvent\- Window resize event structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + int w, h; +} SDL_ResizeEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_VIDEORESIZE\fP +.TP 20 +\fBw\fR, \fBh\fR +New width and height of the window +.SH "DESCRIPTION" +.PP +\fBSDL_ResizeEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_VIDEORESIZE\fP is reported\&. +.PP +When \fBSDL_RESIZABLE\fP is passed as a \fBflag\fR to \fI\fBSDL_SetVideoMode\fP\fR the user is allowed to resize the applications window\&. When the window is resized an \fBSDL_VIDEORESIZE\fP is report, with the new window width and height values stored in \fBw\fR and \fBh\fR, respectively\&. When an \fBSDL_VIDEORESIZE\fP is recieved the window should be resized to the new dimensions using \fI\fBSDL_SetVideoMode\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_SetVideoMode\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_SaveBMP.3 b/docs/man3/SDL_SaveBMP.3 new file mode 100644 index 000000000..aff6e632a --- /dev/null +++ b/docs/man3/SDL_SaveBMP.3 @@ -0,0 +1,18 @@ +.TH "SDL_SaveBMP" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SaveBMP\- Save an SDL_Surface as a Windows BMP file\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SaveBMP\fP\fR(\fBSDL_Surface *surface, const char *file\fR); +.SH "DESCRIPTION" +.PP +Saves the \fBSDL_Surface\fR \fBsurface\fR as a Windows BMP file named \fBfile\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR if successful or \fB-1\fR if there was an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_LoadBMP\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SemPost.3 b/docs/man3/SDL_SemPost.3 new file mode 100644 index 000000000..00827ffb6 --- /dev/null +++ b/docs/man3/SDL_SemPost.3 @@ -0,0 +1,28 @@ +.TH "SDL_SemPost" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SemPost\- Unlock a semaphore\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_SemPost\fP\fR(\fBSDL_sem *sem\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_SemPost\fP unlocks the semaphore pointed to by \fBsem\fR and atomically increments the semaphores value\&. Threads that were blocking on the semaphore may be scheduled after this call succeeds\&. +.PP +\fBSDL_SemPost\fP should be called after a semaphore is locked by a successful call to \fISDL_SemWait\fR, \fISDL_SemTryWait\fR or \fISDL_SemWaitTimeout\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR if successful or \fB-1\fR if there was an error (leaving the semaphore unchanged)\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSDL_SemPost(my_sem);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateSemaphore\fP\fR, \fI\fBSDL_DestroySemaphore\fP\fR, \fI\fBSDL_SemWait\fP\fR, \fI\fBSDL_SemTryWait\fP\fR, \fI\fBSDL_SemWaitTimeout\fP\fR, \fI\fBSDL_SemValue\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SemTryWait.3 b/docs/man3/SDL_SemTryWait.3 new file mode 100644 index 000000000..24be3ba3d --- /dev/null +++ b/docs/man3/SDL_SemTryWait.3 @@ -0,0 +1,41 @@ +.TH "SDL_SemTryWait" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SemTryWait\- Attempt to lock a semaphore but don\&'t suspend the thread\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_SemTryWait\fP\fR(\fBSDL_sem *sem\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_SemTryWait\fP is a non-blocking varient of \fI\fBSDL_SemWait\fP\fR\&. If the value of the semaphore pointed to by \fBsem\fR is positive it will atomically decrement the semaphore value and return 0, otherwise it will return \fBSDL_MUTEX_TIMEOUT\fR instead of suspending the thread\&. +.PP +After \fBSDL_SemTryWait\fP is successful, the semaphore can be released and its count atomically incremented by a successful call to \fISDL_SemPost\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR if the semaphore was successfully locked or either \fBSDL_MUTEX_TIMEOUT\fR or \fB-1\fR if the thread would have suspended or there was an error, respectivly\&. +.PP +If the semaphore was not successfully locked, the semaphore will be unchanged\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWres = SDL_SemTryWait(my_sem); + +if (res == SDL_MUTEX_TIMEOUT) { + return TRY_AGAIN; +} +if (res == -1) { + return WAIT_ERROR; +} + +\&.\&.\&. + +SDL_SemPost(my_sem);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateSemaphore\fP\fR, \fI\fBSDL_DestroySemaphore\fP\fR, \fI\fBSDL_SemWait\fP\fR, \fI\fBSDL_SemWaitTimeout\fP\fR, \fI\fBSDL_SemPost\fP\fR, \fI\fBSDL_SemValue\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SemValue.3 b/docs/man3/SDL_SemValue.3 new file mode 100644 index 000000000..3b850d91b --- /dev/null +++ b/docs/man3/SDL_SemValue.3 @@ -0,0 +1,26 @@ +.TH "SDL_SemValue" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SemValue\- Return the current value of a semaphore\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL/SDL_thread\&.h" +.sp +\fBUint32 \fBSDL_SemValue\fP\fR(\fBSDL_sem *sem\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_SemValue()\fP returns the current semaphore value from the semaphore pointed to by \fBsem\fR\&. +.SH "RETURN VALUE" +.PP +Returns current value of the semaphore\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CW sem_value = SDL_SemValue(my_sem);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateSemaphore\fP\fR, \fI\fBSDL_DestroySemaphore\fP\fR, \fI\fBSDL_SemWait\fP\fR, \fI\fBSDL_SemTryWait\fP\fR, \fI\fBSDL_SemWaitTimeout\fP\fR, \fI\fBSDL_SemPost\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SemWait.3 b/docs/man3/SDL_SemWait.3 new file mode 100644 index 000000000..e37dcb284 --- /dev/null +++ b/docs/man3/SDL_SemWait.3 @@ -0,0 +1,34 @@ +.TH "SDL_SemWait" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SemWait\- Lock a semaphore and suspend the thread if the semaphore value is zero\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_SemWait\fP\fR(\fBSDL_sem *sem\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_SemWait()\fP suspends the calling thread until either the semaphore pointed to by \fBsem\fR has a positive value, the call is interrupted by a signal or error\&. If the call is successful it will atomically decrement the semaphore value\&. +.PP +After \fBSDL_SemWait()\fP is successful, the semaphore can be released and its count atomically incremented by a successful call to \fISDL_SemPost\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR if successful or \fB-1\fR if there was an error (leaving the semaphore unchanged)\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWif (SDL_SemWait(my_sem) == -1) { + return WAIT_FAILED; +} + +\&.\&.\&. + +SDL_SemPost(my_sem);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateSemaphore\fP\fR, \fI\fBSDL_DestroySemaphore\fP\fR, \fI\fBSDL_SemTryWait\fP\fR, \fI\fBSDL_SemWaitTimeout\fP\fR, \fI\fBSDL_SemPost\fP\fR, \fI\fBSDL_SemValue\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SemWaitTimeout.3 b/docs/man3/SDL_SemWaitTimeout.3 new file mode 100644 index 000000000..aa0f77888 --- /dev/null +++ b/docs/man3/SDL_SemWaitTimeout.3 @@ -0,0 +1,41 @@ +.TH "SDL_SemWaitTimeout" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SemWaitTimeout\- Lock a semaphore, but only wait up to a specified maximum time\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_SemWaitTimeout\fP\fR(\fBSDL_sem *sem, Uint32 timeout\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_SemWaitTimeout()\fP is a varient of \fISDL_SemWait\fR with a maximum timeout value\&. If the value of the semaphore pointed to by \fBsem\fR is positive (greater than zero) it will atomically decrement the semaphore value and return 0, otherwise it will wait up to \fBtimeout\fR milliseconds trying to lock the semaphore\&. This function is to be avoided if possible since on some platforms it is implemented by polling the semaphore every millisecond in a busy loop\&. +.PP +After \fBSDL_SemWaitTimeout()\fP is successful, the semaphore can be released and its count atomically incremented by a successful call to \fISDL_SemPost\fR\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR if the semaphore was successfully locked or either \fBSDL_MUTEX_TIMEOUT\fR or \fB-1\fR if the timeout period was exceeded or there was an error, respectivly\&. +.PP +If the semaphore was not successfully locked, the semaphore will be unchanged\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWres = SDL_SemWaitTimeout(my_sem, WAIT_TIMEOUT_MILLISEC); + +if (res == SDL_MUTEX_TIMEOUT) { + return TRY_AGAIN; +} +if (res == -1) { + return WAIT_ERROR; +} + +\&.\&.\&. + +SDL_SemPost(my_sem);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateSemaphore\fP\fR, \fI\fBSDL_DestroySemaphore\fP\fR, \fI\fBSDL_SemWait\fP\fR, \fI\fBSDL_SemTryWait\fP\fR, \fI\fBSDL_SemPost\fP\fR, \fI\fBSDL_SemValue\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetAlpha.3 b/docs/man3/SDL_SetAlpha.3 new file mode 100644 index 000000000..1e30ab980 --- /dev/null +++ b/docs/man3/SDL_SetAlpha.3 @@ -0,0 +1,55 @@ +.TH "SDL_SetAlpha" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetAlpha\- Adjust the alpha properties of a surface +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetAlpha\fP\fR(\fBSDL_Surface *surface, Uint32 flag, Uint8 alpha\fR); +.SH "DESCRIPTION" +.PP +.RS +\fBNote: +.PP +This function and the semantics of SDL alpha blending have changed since version 1\&.1\&.4\&. Up until version 1\&.1\&.5, an alpha value of 0 was considered opaque and a value of 255 was considered transparent\&. This has now been inverted: 0 (\fBSDL_ALPHA_TRANSPARENT\fP) is now considered transparent and 255 (\fBSDL_ALPHA_OPAQUE\fP) is now considered opaque\&. +.RE +.PP +\fBSDL_SetAlpha\fP is used for setting the per-surface alpha and/or enabling and disabling per-pixel alpha blending\&. +.PP +The \fBsurface\fR parameter specifies which surface whose alpha attributes you wish to adjust\&. \fBflags\fR is used to specify whether alpha blending should be used (\fBSDL_SRCALPHA\fP) and whether the surface should use RLE acceleration for blitting (\fBSDL_RLEACCEL\fP)\&. \fBflags\fR can be an OR\&'d combination of these two options, one of these options or 0\&. If \fBSDL_SRCALPHA\fP is not passed as a flag then all alpha information is ignored when blitting the surface\&. The \fBalpha\fR parameter is the per-surface alpha value, a surface need not have an alpha channel to use per-surface alpha and blitting can still be accelerated with \fBSDL_RLEACCEL\fP\&. Setting the per-surface alpha value to 0 disables per-surface alpha blending\&. +.PP +.RS +\fBNote: +.PP +The per-surface alpha value of 128 is considered a special case and is optimised, so it\&'s much faster than other per-surface values\&. +.RE +.PP +Alpha effects surface blitting in the following ways: +.TP 20 +RGBA->RGB with \fBSDL_SRCALPHA\fP +The source is alpha-blended with the destination, using the alpha channel\&. \fBSDL_SRCCOLORKEY\fP and the per-surface alpha are ignored\&. +.TP 20 +RGBA->RGB without \fBSDL_SRCALPHA\fP +The RGB data is copied from the source\&. The source alpha channel and the per-surface alpha value are ignored\&. +.TP 20 +RGB->RGBA with \fBSDL_SRCALPHA\fP +The source is alpha-blended with the destination using the per-surface alpha value\&. If \fBSDL_SRCCOLORKEY\fPliteral> is set, only the pixels not matching the colorkey value are copied\&. +.TP 20 +RGB->RGBA without \fBSDL_SRCALPHA\fP +The RGB data is copied from the source and the destination alpha is zero to opaque\&. If \fBSDL_SRCCOLORKEY\fP is set, only the pixels not matching the colorkey value are copied\&. +.TP 20 +RGBA->RGBA with \fBSDL_SRCALPHA\fP +The source is alpha-blended with the destination using the source alpha channel\&. The alpha channel in the destination surface is left untouched\&. \fBSDL_SRCCOLORKEY\fP is ignored\&. +.TP 20 +RGBA->RGBA without \fBSDL_SRCALPHA\fP +The RGBA data is copied to the destination surface\&. If \fBSDL_SRCCOLORKEY\fP is set, only the pixels not matching the colorkey value are copied\&. +.TP 20 +RGB->RGB with \fBSDL_SRCALPHA\fP +The source is alpha-blended with the destination using the per-surface alpha value\&. If \fBSDL_SRCCOLORKEY\fP is set, only the pixels not matching the colorkey value are copied\&. +.TP 20 +RGB->RGB without \fBSDL_SRCALPHA\fP +The RGB data is copied from the source\&. If \fBSDL_SRCCOLORKEY\fP is set, only the pixels not matching the colorkey value are copied\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_MapRGBA\fP\fR, \fI\fBSDL_GetRGBA\fP\fR, \fI\fBSDL_DisplayFormatAlpha\fP\fR, \fI\fBSDL_BlitSurface\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetClipRect.3 b/docs/man3/SDL_SetClipRect.3 new file mode 100644 index 000000000..40b238ab4 --- /dev/null +++ b/docs/man3/SDL_SetClipRect.3 @@ -0,0 +1,19 @@ +.TH "SDL_SetClipRect" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetClipRect\- Sets the clipping rectangle for a surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_SetClipRect\fP\fR(\fBSDL_Surface *surface, SDL_Rect *rect\fR); +.SH "DESCRIPTION" +.PP +Sets the clipping rectangle for a surface\&. When this surface is the destination of a blit, only the area within the clip rectangle will be drawn into\&. +.PP +The rectangle pointed to by \fBrect\fR will be clipped to the edges of the surface so that the clip rectangle for a surface can never fall outside the edges of the surface\&. +.PP +If \fBrect\fR is \fBNULL\fP the clipping rectangle will be set to the full size of the surface\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetClipRect\fP\fR, \fI\fBSDL_BlitSurface\fP\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetColorKey.3 b/docs/man3/SDL_SetColorKey.3 new file mode 100644 index 000000000..61f13f45f --- /dev/null +++ b/docs/man3/SDL_SetColorKey.3 @@ -0,0 +1,26 @@ +.TH "SDL_SetColorKey" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetColorKey\- Sets the color key (transparent pixel) in a blittable surface and RLE acceleration\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetColorKey\fP\fR(\fBSDL_Surface *surface, Uint32 flag, Uint32 key\fR); +.SH "DESCRIPTION" +.PP + Sets the color key (transparent pixel) in a blittable surface and enables or disables RLE blit acceleration\&. +.PP +RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i\&.e\&., pixels that match the \fBkey\fR value)\&. The \fBkey\fR must be of the same pixel format as the \fBsurface\fR, \fI\fBSDL_MapRGB\fP\fR is often useful for obtaining an acceptable value\&. +.PP +If \fBflag\fR is \fBSDL_SRCCOLORKEY\fP then \fBkey\fR is the transparent pixel value in the source image of a blit\&. +.PP +If \fBflag\fR is OR\&'d with \fBSDL_RLEACCEL\fP then the surface will be draw using RLE acceleration when drawn with \fISDL_BlitSurface\fR\&. The surface will actually be encoded for RLE acceleration the first time \fISDL_BlitSurface\fR or \fISDL_DisplayFormat\fR is called on the surface\&. +.PP +If \fBflag\fR is 0, this function clears any current color key\&. +.SH "RETURN VALUE" +.PP +This function returns \fB0\fR, or \fB-1\fR if there was an error\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_BlitSurface\fP\fR, \fI\fBSDL_DisplayFormat\fP\fR, \fI\fBSDL_MapRGB\fP\fR, \fI\fBSDL_SetAlpha\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetColors.3 b/docs/man3/SDL_SetColors.3 new file mode 100644 index 000000000..7ce5c96c9 --- /dev/null +++ b/docs/man3/SDL_SetColors.3 @@ -0,0 +1,57 @@ +.TH "SDL_SetColors" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetColors\- Sets a portion of the colormap for the given 8-bit surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetColors\fP\fR(\fBSDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors\fR); +.SH "DESCRIPTION" +.PP +Sets a portion of the colormap for the given 8-bit surface\&. +.PP +When \fBsurface\fR is the surface associated with the current display, the display colormap will be updated with the requested colors\&. If \fBSDL_HWPALETTE\fP was set in \fISDL_SetVideoMode\fR flags, \fBSDL_SetColors\fP will always return \fB1\fR, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation\&. +.PP +The color components of a \fI\fBSDL_Color\fR\fR structure are 8-bits in size, giving you a total of 256^3 =16777216 colors\&. +.PP +Palettized (8-bit) screen surfaces with the \fBSDL_HWPALETTE\fP flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display)\&. \fBSDL_SetColors\fP modifies both palettes (if present), and is equivalent to calling \fISDL_SetPalette\fR with the \fBflags\fR set to \fB(SDL_LOGPAL | SDL_PHYSPAL)\fP\&. +.SH "RETURN VALUE" +.PP +If \fBsurface\fR is not a palettized surface, this function does nothing, returning \fB0\fR\&. If all of the colors were set as passed to \fBSDL_SetColors\fP, it will return \fB1\fR\&. If not all the color entries were set exactly as given, it will return \fB0\fR, and you should look at the surface palette to determine the actual color palette\&. +.SH "EXAMPLE" +.PP +.nf +\f(CW/* Create a display surface with a grayscale palette */ +SDL_Surface *screen; +SDL_Color colors[256]; +int i; +\&. +\&. +\&. +/* Fill colors with color information */ +for(i=0;i<256;i++){ + colors[i]\&.r=i; + colors[i]\&.g=i; + colors[i]\&.b=i; +} + +/* Create display */ +screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE); +if(!screen){ + printf("Couldn\&'t set video mode: %s +", SDL_GetError()); + exit(-1); +} + +/* Set palette */ +SDL_SetColors(screen, colors, 0, 256); +\&. +\&. +\&. +\&.\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_Color\fR\fR \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_SetPalette\fP\fR, \fI\fBSDL_SetVideoMode\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetCursor.3 b/docs/man3/SDL_SetCursor.3 new file mode 100644 index 000000000..e10e1907c --- /dev/null +++ b/docs/man3/SDL_SetCursor.3 @@ -0,0 +1,15 @@ +.TH "SDL_SetCursor" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetCursor\- Set the currently active mouse cursor\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid *\fBSDL_SetCursor\fP\fR(\fBSDL_Cursor *cursor\fR); +.SH "DESCRIPTION" +.PP +Sets the currently active cursor to the specified one\&. If the cursor is currently visible, the change will be immediately represented on the display\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetCursor\fP\fR, \fI\fBSDL_CreateCursor\fP\fR, \fI\fBSDL_ShowCursor\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetEventFilter.3 b/docs/man3/SDL_SetEventFilter.3 new file mode 100644 index 000000000..675d87c22 --- /dev/null +++ b/docs/man3/SDL_SetEventFilter.3 @@ -0,0 +1,35 @@ +.TH "SDL_SetEventFilter" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetEventFilter\- Sets up a filter to process all events before they are posted to the event queue\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_SetEventFilter\fP\fR(\fBSDL_EventFilter filter\fR); +.SH "DESCRIPTION" +.PP +This function sets up a filter to process all events before they are posted to the event queue\&. This is a very powerful and flexible feature\&. The filter is prototyped as: +.PP +.nf +\f(CWtypedef int (*SDL_EventFilter)(const SDL_Event *event);\fR +.fi +.PP + If the filter returns \fB1\fR, then the event will be added to the internal queue\&. If it returns \fB0\fR, then the event will be dropped from the queue\&. This allows selective filtering of dynamically\&. +.PP +There is one caveat when dealing with the \fBSDL_QUITEVENT\fP event type\&. The event filter is only called when the window manager desires to close the application window\&. If the event filter returns 1, then the window will be closed, otherwise the window will remain open if possible\&. If the quit event is generated by an interrupt signal, it will bypass the internal queue and be delivered to the application at the next event poll\&. +.PP +.RS +\fBNote: +.PP +Events pushed onto the queue with \fI\fBSDL_PushEvent\fP\fR or \fI\fBSDL_PeepEvents\fP\fR do not get passed through the event filter\&. +.RE +.PP +.RS +\fBNote: +.PP +\fIBe Careful!\fP The event filter function may run in a different thread so be careful what you do within it\&. +.RE +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_GetEventFilter\fP\fR, \fI\fBSDL_PushEvent\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_SetGamma.3 b/docs/man3/SDL_SetGamma.3 new file mode 100644 index 000000000..8eca14ae2 --- /dev/null +++ b/docs/man3/SDL_SetGamma.3 @@ -0,0 +1,22 @@ +.TH "SDL_SetGamma" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetGamma\- Sets the color gamma function for the display +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetGamma\fP\fR(\fBfloat redgamma, float greengamma, float bluegamma\fR); +.SH "DESCRIPTION" +.PP +Sets the "gamma function" for the display of each color component\&. Gamma controls the brightness/contrast of colors displayed on the screen\&. A gamma value of 1\&.0 is identity (i\&.e\&., no adjustment is made)\&. +.PP +This function adjusts the gamma based on the "gamma function" parameter, you can directly specify lookup tables for gamma adjustment with \fISDL_SetGammaRamp\fR\&. +.PP +Not all display hardware is able to change gamma\&. +.SH "RETURN VALUE" +.PP +Returns -1 on error (or if gamma adjustment is not supported)\&. +.SH "SEE ALSO" +.PP +\fISDL_GetGammaRamp\fR \fISDL_SetGammaRamp\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetGammaRamp.3 b/docs/man3/SDL_SetGammaRamp.3 new file mode 100644 index 000000000..91431e650 --- /dev/null +++ b/docs/man3/SDL_SetGammaRamp.3 @@ -0,0 +1,22 @@ +.TH "SDL_SetGammaRamp" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetGammaRamp\- Sets the color gamma lookup tables for the display +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetGammaRamp\fP\fR(\fBUint16 *redtable, Uint16 *greentable, Uint16 *bluetable\fR); +.SH "DESCRIPTION" +.PP +Sets the gamma lookup tables for the display for each color component\&. Each table is an array of 256 Uint16 values, representing a mapping between the input and output for that channel\&. The input is the index into the array, and the output is the 16-bit gamma value at that index, scaled to the output color precision\&. You may pass NULL to any of the channels to leave them unchanged\&. +.PP +This function adjusts the gamma based on lookup tables, you can also have the gamma calculated based on a "gamma function" parameter with \fISDL_SetGamma\fR\&. +.PP +Not all display hardware is able to change gamma\&. +.SH "RETURN VALUE" +.PP +Returns -1 on error (or if gamma adjustment is not supported)\&. +.SH "SEE ALSO" +.PP +\fISDL_SetGamma\fR \fISDL_GetGammaRamp\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetModState.3 b/docs/man3/SDL_SetModState.3 new file mode 100644 index 000000000..ec0b84bcc --- /dev/null +++ b/docs/man3/SDL_SetModState.3 @@ -0,0 +1,35 @@ +.TH "SDL_SetModState" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetModState\- Set the current key modifier state +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_SetModState\fP\fR(\fBSDLMod modstate\fR); +.SH "DESCRIPTION" +.PP +The inverse of \fI\fBSDL_GetModState\fP\fR, \fBSDL_SetModState\fP allows you to impose modifier key states on your application\&. +.PP +Simply pass your desired modifier states into \fBmodstate\fR\&. This value my be a logical OR\&'d combination of the following: +.PP +.nf +\f(CWtypedef enum { + KMOD_NONE = 0x0000, + KMOD_LSHIFT= 0x0001, + KMOD_RSHIFT= 0x0002, + KMOD_LCTRL = 0x0040, + KMOD_RCTRL = 0x0080, + KMOD_LALT = 0x0100, + KMOD_RALT = 0x0200, + KMOD_LMETA = 0x0400, + KMOD_RMETA = 0x0800, + KMOD_NUM = 0x1000, + KMOD_CAPS = 0x2000, + KMOD_MODE = 0x4000, +} SDLMod;\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_GetModState\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_SetPalette.3 b/docs/man3/SDL_SetPalette.3 new file mode 100644 index 000000000..1ecd20d7f --- /dev/null +++ b/docs/man3/SDL_SetPalette.3 @@ -0,0 +1,59 @@ +.TH "SDL_SetPalette" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetPalette\- Sets the colors in the palette of an 8-bit surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetPalette\fP\fR(\fBSDL_Surface *surface, int flags, int SDL_Color *colors, int firstcolor, int ncolors\fR); +.SH "DESCRIPTION" +.PP +Sets a portion of the palette for the given 8-bit surface\&. +.PP +Palettized (8-bit) screen surfaces with the \fBSDL_HWPALETTE\fP flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display)\&. \fISDL_BlitSurface\fR always uses the logical palette when blitting surfaces (if it has to convert between surface pixel formats)\&. Because of this, it is often useful to modify only one or the other palette to achieve various special color effects (e\&.g\&., screen fading, color flashes, screen dimming)\&. +.PP +This function can modify either the logical or physical palette by specifing \fBSDL_LOGPAL\fP or \fBSDL_PHYSPAL\fPthe in the \fBflags\fR parameter\&. +.PP +When \fBsurface\fR is the surface associated with the current display, the display colormap will be updated with the requested colors\&. If \fBSDL_HWPALETTE\fP was set in \fISDL_SetVideoMode\fR flags, \fBSDL_SetPalette\fP will always return \fB1\fR, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation\&. +.PP +The color components of a \fI\fBSDL_Color\fR\fR structure are 8-bits in size, giving you a total of 256^3=16777216 colors\&. +.SH "RETURN VALUE" +.PP +If \fBsurface\fR is not a palettized surface, this function does nothing, returning \fB0\fR\&. If all of the colors were set as passed to \fBSDL_SetPalette\fP, it will return \fB1\fR\&. If not all the color entries were set exactly as given, it will return \fB0\fR, and you should look at the surface palette to determine the actual color palette\&. +.SH "EXAMPLE" +.PP +.nf +\f(CW /* Create a display surface with a grayscale palette */ + SDL_Surface *screen; + SDL_Color colors[256]; + int i; + \&. + \&. + \&. + /* Fill colors with color information */ + for(i=0;i<256;i++){ + colors[i]\&.r=i; + colors[i]\&.g=i; + colors[i]\&.b=i; + } + + /* Create display */ + screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE); + if(!screen){ + printf("Couldn\&'t set video mode: %s +", SDL_GetError()); + exit(-1); + } + + /* Set palette */ + SDL_SetPalette(screen, SDL_LOGPAL|SDL_PHYSPAL, colors, 0, 256); + \&. + \&. + \&. + \&.\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fISDL_SetColors\fR, \fISDL_SetVideoMode\fR, \fISDL_Surface\fR, \fISDL_Color\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetTimer.3 b/docs/man3/SDL_SetTimer.3 new file mode 100644 index 000000000..2c12cfcb3 --- /dev/null +++ b/docs/man3/SDL_SetTimer.3 @@ -0,0 +1,39 @@ +.TH "SDL_SetTimer" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetTimer\- Set a callback to run after the specified number of milliseconds has elapsed\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_SetTimer\fP\fR(\fBUint32 interval, SDL_TimerCallback callback\fR); +.SH "CALLBACK" +.PP +/* Function prototype for the timer callback function */ typedef Uint32 (*SDL_TimerCallback)(Uint32 interval); +.SH "DESCRIPTION" +.PP +Set a callback to run after the specified number of milliseconds has elapsed\&. The callback function is passed the current timer interval and returns the next timer interval\&. If the returned value is the same as the one passed in, the periodic alarm continues, otherwise a new alarm is scheduled\&. +.PP +To cancel a currently running timer, call \fBSDL_SetTimer(0, NULL);\fP +.PP +The timer callback function may run in a different thread than your main constant, and so shouldn\&'t call any functions from within itself\&. +.PP +The maximum resolution of this timer is 10 ms, which means that if you request a 16 ms timer, your callback will run approximately 20 ms later on an unloaded system\&. If you wanted to set a flag signaling a frame update at 30 frames per second (every 33 ms), you might set a timer for 30 ms (see example below)\&. +.PP +If you use this function, you need to pass \fBSDL_INIT_TIMER\fP to \fBSDL_Init()\fP\&. +.PP +.RS +\fBNote: +.PP +This function is kept for compatibility but has been superceeded by the new timer functions \fISDL_AddTimer\fR and \fISDL_RemoveTimer\fR which support multiple timers\&. +.RE +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSDL_SetTimer((33/10)*10, my_callback);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_AddTimer\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SetVideoMode.3 b/docs/man3/SDL_SetVideoMode.3 new file mode 100644 index 000000000..a770d28b0 --- /dev/null +++ b/docs/man3/SDL_SetVideoMode.3 @@ -0,0 +1,61 @@ +.TH "SDL_SetVideoMode" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SetVideoMode\- Set up a video mode with the specified width, height and bits-per-pixel\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_Surface *\fBSDL_SetVideoMode\fP\fR(\fBint width, int height, int bpp, Uint32 flags\fR); +.SH "DESCRIPTION" +.PP +Set up a video mode with the specified width, height and bits-per-pixel\&. +.PP +If \fBbpp\fR is 0, it is treated as the current display bits per pixel\&. +.PP +The \fBflags\fR parameter is the same as the \fBflags\fR field of the \fI\fBSDL_Surface\fR\fR structure\&. OR\&'d combinations of the following values are valid\&. +.TP 20 +\fBSDL_SWSURFACE\fP +Create the video surface in system memory +.TP 20 +\fBSDL_HWSURFACE\fP +Create the video surface in video memory +.TP 20 +\fBSDL_ASYNCBLIT\fP +Enables the use of asynchronous to the display surface\&. This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems\&. +.TP 20 +\fBSDL_ANYFORMAT\fP +Normally, if a video surface of the requested depth (\fBbpp\fR) is not available, SDL will emulate one with a shadow surface\&. Passing \fBSDL_ANYFORMAT\fP prevents this and causes SDL to use the video surface, regardless of its depth\&. +.TP 20 +\fBSDL_HWPALETTE\fP +Give SDL exclusive palette access\&. Without this flag you may not always get the the colors you request with \fI\fBSDL_SetColors\fP\fR\&. +.TP 20 +\fBSDL_DOUBLEBUF\fP +Enable double buffering\&. Calling \fI\fBSDL_Flip\fP\fR will flip the buffers and update the screen\&. If double buffering could not be enabled then \fBSDL_Flip\fP will just perform a \fI\fBSDL_UpdateRect\fP\fR on the entire screen\&. +.TP 20 +\fBSDL_FULLSCREEN\fP +SDL will attempt to use a fullscreen mode +.TP 20 +\fBSDL_OPENGL\fP +Create an OpenGL rendering context\&. You should have previously set OpenGL video attributes with \fI\fBSDL_GL_SetAttribute\fP\fR\&. +.TP 20 +\fBSDL_OPENGLBLIT\fP +Create an OpenGL rendering context, like above, but allow normal blitting operations\&. +.TP 20 +\fBSDL_RESIZABLE\fP +Create a resizable window\&. When the window is resized by the user a \fI\fBSDL_VIDEORESIZE\fP\fR event is generated and \fBSDL_SetVideoMode\fP can be called again with the new size\&. +.TP 20 +\fBSDL_NOFRAME\fP +If possible, \fBSDL_NOFRAME\fP causes SDL to create a window with no title bar or frame decoration\&. Fullscreen modes automatically have this flag set\&. +.PP +.RS +\fBNote: +.PP +Whatever \fBflags\fR \fBSDL_SetVideoMode\fP could satisfy are set in the \fBflags\fR member of the returned surface\&. +.RE +.SH "RETURN VALUE" +.PP +The framebuffer surface, or \fBNULL\fR if it fails\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_LockSurface\fP\fR, \fI\fBSDL_SetColors\fP\fR, \fI\fBSDL_Flip\fP\fR, \fI\fBSDL_Surface\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_ShowCursor.3 b/docs/man3/SDL_ShowCursor.3 new file mode 100644 index 000000000..c6de668e3 --- /dev/null +++ b/docs/man3/SDL_ShowCursor.3 @@ -0,0 +1,20 @@ +.TH "SDL_ShowCursor" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ShowCursor\- Toggle whether or not the cursor is shown on the screen\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_ShowCursor\fP\fR(\fBint toggle\fR); +.SH "DESCRIPTION" +.PP +Toggle whether or not the cursor is shown on the screen\&. Passing \fBSDL_ENABLE\fP displays the cursor and passing \fBSDL_DISABLE\fP hides it\&. The current state of the mouse cursor can be queried by passing \fBSDL_QUERY\fP, either \fBSDL_DISABLE\fP or \fBSDL_ENABLE\fP will be returned\&. +.PP +The cursor starts off displayed, but can be turned off\&. +.SH "RETURN VALUE" +.PP +Returns the current state of the cursor\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateCursor\fP\fR, \fI\fBSDL_SetCursor\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_Surface.3 b/docs/man3/SDL_Surface.3 new file mode 100644 index 000000000..b1ca38d19 --- /dev/null +++ b/docs/man3/SDL_Surface.3 @@ -0,0 +1,109 @@ +.TH "SDL_Surface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_Surface\- Graphical Surface Structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct SDL_Surface { + Uint32 flags; /* Read-only */ + SDL_PixelFormat *format; /* Read-only */ + int w, h; /* Read-only */ + Uint16 pitch; /* Read-only */ + void *pixels; /* Read-write */ + int offset; /* Private */ + + /* Hardware-specific surface info */ + struct private_hwdata *hwdata; + + /* clipping information */ + SDL_Rect clip_rect; /* Read-only */ + Uint32 unused1; /* for binary compatibility */ + Uint32 unused2; /* for binary compatibility */ + + /* info for fast blit mapping to other surfaces */ + struct SDL_BlitMap *map; /* Private */ + + /* format version, bumped at every change to invalidate blit maps */ + unsigned int format_version; /* Private */ + + /* Reference count -- used when freeing surface */ + int refcount; /* Read-mostly */ +} SDL_Surface;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBflags\fR +Surface flags +.TP 20 +\fBformat\fR +Pixel \fIformat\fR +.TP 20 +\fBw, h\fR +Width and height of the surface +.TP 20 +\fBpitch\fR +Length of a surface scanline in bytes +.TP 20 +\fBpixels\fR +Pointer to the actual pixel data +.TP 20 +\fBclip_minx, clip_maxx\fR +X clip coords +.TP 20 +\fBclip_rect\fR +surface clip \fIrectangle\fR +.SH "DESCRIPTION" +.PP +\fBSDL_Surface\fR\&'s represent areas of "graphical" memory, memory that can be drawn to\&. The video framebuffer is returned as a \fBSDL_Surface\fR by \fI\fBSDL_SetVideoMode\fP\fR and \fI\fBSDL_GetVideoSurface\fP\fR\&. Most of the fields should be pretty obvious\&. \fBw\fR and \fBh\fR are the width and height of the surface in pixels\&. \fBpixels\fR is a pointer to the actual pixel data, the surface should be \fIlocked\fR before accessing this field\&. The \fBclip_rect\fR field is the clipping rectangle as set by \fI\fBSDL_SetClipRect\fP\fR\&. +.PP +The following are supported in the \fBflags\fR field\&. +.TP 20 +\fBSDL_SWSURFACE\fP +Surface is stored in system memory +.TP 20 +\fBSDL_HWSURFACE\fP +Surface is stored in video memory +.TP 20 +\fBSDL_ASYNCBLIT\fP +Surface uses asynchronous blits if possible +.TP 20 +\fBSDL_ANYFORMAT\fP +Allows any pixel-format (Display surface) +.TP 20 +\fBSDL_HWPALETTE\fP +Surface has exclusive palette +.TP 20 +\fBSDL_DOUBLEBUF\fP +Surface is double buffered (Display surface) +.TP 20 +\fBSDL_FULLSCREEN\fP +Surface is full screen (Display Surface) +.TP 20 +\fBSDL_OPENGL\fP +Surface has an OpenGL context (Display Surface) +.TP 20 +\fBSDL_OPENGLBLIT\fP +Surface supports OpenGL blitting (Display Surface) +.TP 20 +\fBSDL_RESIZABLE\fP +Surface is resizable (Display Surface) +.TP 20 +\fBSDL_HWACCEL\fP +Surface blit uses hardware acceleration +.TP 20 +\fBSDL_SRCOLORKEY\fP +Surface use colorkey blitting +.TP 20 +\fBSDL_RLEACCEL\fP +Colorkey blitting is accelerated with RLE +.TP 20 +\fBSDL_SRCALPHA\fP +Surface blit uses alpha blending +.TP 20 +\fBSDL_PREALLOC\fP +Surface uses preallocated memory +.SH "SEE ALSO" +.PP +\fI\fBSDL_PixelFormat\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_SysWMEvent.3 b/docs/man3/SDL_SysWMEvent.3 new file mode 100644 index 000000000..97d60c118 --- /dev/null +++ b/docs/man3/SDL_SysWMEvent.3 @@ -0,0 +1,21 @@ +.TH "SDL_SysWMEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_SysWMEvent\- Platform-dependent window manager event\&. +.SH "DESCRIPTION" +.PP +The system window manager event contains a pointer to system-specific information about unknown window manager events\&. If you enable this event using \fI\fBSDL_EventState()\fP\fR, it will be generated whenever unhandled events are received from the window manager\&. This can be used, for example, to implement cut-and-paste in your application\&. +.PP +.nf +\f(CWtypedef struct { + Uint8 type; /* Always SDL_SysWM */ + } SDL_SysWMEvent;\fR +.fi +.PP + If you want to obtain system-specific information about the window manager, you can fill the version member of a \fBSDL_SysWMinfo\fR structure (details can be found in \fBSDL_syswm\&.h\fP, which must be included) using the \fBSDL_VERSION()\fP macro found in \fBSDL_version\&.h\fP, and pass it to the function: +.PP +.sp +\fBint \fBSDL_GetWMInfo\fP\fR(\fBSDL_SysWMinfo *info\fR); +.SH "SEE ALSO" +.PP +\fI\fBSDL_EventState\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_ThreadID.3 b/docs/man3/SDL_ThreadID.3 new file mode 100644 index 000000000..f247c1193 --- /dev/null +++ b/docs/man3/SDL_ThreadID.3 @@ -0,0 +1,13 @@ +.TH "SDL_ThreadID" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_ThreadID\- Get the 32-bit thread identifier for the current thread\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBUint32 \fBSDL_ThreadID\fP\fR(\fBvoid\fR) +.SH "DESCRIPTION" +.PP +Get the 32-bit thread identifier for the current thread\&. +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_UnlockAudio.3 b/docs/man3/SDL_UnlockAudio.3 new file mode 100644 index 000000000..5f317c309 --- /dev/null +++ b/docs/man3/SDL_UnlockAudio.3 @@ -0,0 +1,15 @@ +.TH "SDL_UnlockAudio" "3" "Mon 12 Mar 2001, 01:02" "SDL" "SDL API Reference" +.SH "NAME" +SDL_UnlockAudio\- Unlock the callback function +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_UnlockAudio\fP\fR(\fBvoid\fR) +.SH "DESCRIPTION" +.PP +Unlocks a previous \fI\fBSDL_LockAudio\fP\fR call\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_OpenAudio\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:02 diff --git a/docs/man3/SDL_UnlockSurface.3 b/docs/man3/SDL_UnlockSurface.3 new file mode 100644 index 000000000..e645d9e18 --- /dev/null +++ b/docs/man3/SDL_UnlockSurface.3 @@ -0,0 +1,17 @@ +.TH "SDL_UnlockSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_UnlockSurface\- Unlocks a previously locked surface\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_UnlockSurface\fP\fR(\fBSDL_Surface *surface\fR); +.SH "DESCRIPTION" +.PP +Surfaces that were previously locked using \fBSDL_LockSurface\fP must be unlocked with \fBSDL_UnlockSurface\fP\&. Surfaces should be unlocked as soon as possible\&. +.PP +It should be noted that since 1\&.1\&.8, surface locks are recursive\&. See \fI\fBSDL_LockSurface\fP\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_LockSurface\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_UnlockYUVOverlay.3 b/docs/man3/SDL_UnlockYUVOverlay.3 new file mode 100644 index 000000000..61bc97de1 --- /dev/null +++ b/docs/man3/SDL_UnlockYUVOverlay.3 @@ -0,0 +1,15 @@ +.TH "SDL_UnlockYUVOverlay" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_UnlockYUVOverlay\- Unlock an overlay +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_UnlockYUVOverlay\fP\fR(\fBSDL_Overlay *overlay\fR); +.SH "DESCRIPTION" +.PP +The opposite to \fI\fBSDL_LockYUVOverlay\fP\fR\&. Unlocks a previously locked overlay\&. An overlay must be unlocked before it can be displayed\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_UnlockYUVOverlay\fP\fR, \fI\fBSDL_CreateYUVOverlay\fP\fR, \fI\fBSDL_Overlay\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_UpdateRect.3 b/docs/man3/SDL_UpdateRect.3 new file mode 100644 index 000000000..3fcec9b27 --- /dev/null +++ b/docs/man3/SDL_UpdateRect.3 @@ -0,0 +1,19 @@ +.TH "SDL_UpdateRect" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_UpdateRect\- Makes sure the given area is updated on the given screen\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_UpdateRect\fP\fR(\fBSDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h\fR); +.SH "DESCRIPTION" +.PP +Makes sure the given area is updated on the given screen\&. +.PP +If \&'\fBx\fR\&', \&'\fBy\fR\&', \&'\fBw\fR\&' and \&'\fBh\fR\&' are all 0, \fBSDL_UpdateRect\fP will update the entire screen\&. +.PP +This function should not be called while \&'\fBscreen\fR\&' is \fIlocked\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_UpdateRects\fP\fR, \fI\fBSDL_Rect\fR\fR, \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_LockSurface\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_UpdateRects.3 b/docs/man3/SDL_UpdateRects.3 new file mode 100644 index 000000000..f56a6200e --- /dev/null +++ b/docs/man3/SDL_UpdateRects.3 @@ -0,0 +1,17 @@ +.TH "SDL_UpdateRects" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_UpdateRects\- Makes sure the given list of rectangles is updated on the given screen\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_UpdateRects\fP\fR(\fBSDL_Surface *screen, int numrects, SDL_Rect *rects\fR); +.SH "DESCRIPTION" +.PP +Makes sure the given list of rectangles is updated on the given screen\&. +.PP +This function should not be called while \fBscreen\fR is \fIlocked\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_UpdateRect\fP\fR, \fI\fBSDL_Rect\fR\fR, \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_LockSurface\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_UserEvent.3 b/docs/man3/SDL_UserEvent.3 new file mode 100644 index 000000000..21d70f2a1 --- /dev/null +++ b/docs/man3/SDL_UserEvent.3 @@ -0,0 +1,47 @@ +.TH "SDL_UserEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_UserEvent\- A user-defined event type +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 type; + int code; + void *data1; + void *data2; +} SDL_UserEvent;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBtype\fR +\fBSDL_USEREVENT\fP through to \fBSDL_NUMEVENTS-1\fP +.TP 20 +\fBcode\fR +User defined event code +.TP 20 +\fBdata1\fR +User defined data pointer +.TP 20 +\fBdata2\fR +User defined data pointer +.SH "DESCRIPTION" +.PP +\fBSDL_UserEvent\fR is in the \fBuser\fR member of the structure \fI\fBSDL_Event\fR\fR\&. This event is unique, it is never created by SDL but only by the user\&. The event can be pushed onto the event queue using \fI\fBSDL_PushEvent\fP\fR\&. The contents of the structure members or completely up to the programmer, the only requirement is that \fBtype\fR is a value from \fBSDL_USEREVENT\fP to \fBSDL_NUMEVENTS-1\fP (inclusive)\&. +.SH "EXAMPLES" +.PP +.PP +.nf +\f(CWSDL_Event event; + +event\&.type = SDL_USEREVENT; +event\&.user\&.code = my_event_code; +event\&.user\&.data1 = significant_data; +event\&.user\&.data2 = 0; +SDL_PushEvent(&event);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_PushEvent\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_VideoDriverName.3 b/docs/man3/SDL_VideoDriverName.3 new file mode 100644 index 000000000..575501af4 --- /dev/null +++ b/docs/man3/SDL_VideoDriverName.3 @@ -0,0 +1,18 @@ +.TH "SDL_VideoDriverName" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_VideoDriverName\- Obtain the name of the video driver +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBchar *\fBSDL_VideoDriverName\fP\fR(\fBchar *namebuf, int maxlen\fR); +.SH "DESCRIPTION" +.PP +The buffer pointed to by \fBnamebuf\fR is filled up to a maximum of \fBmaxlen\fR characters (include the NULL terminator) with the name of the initialised video driver\&. The driver name is a simple one word identifier like "x11" or "windib"\&. +.SH "RETURN VALUE" +.PP +Returns \fBNULL\fP if video has not been initialised with \fBSDL_Init\fP or a pointer to \fBnamebuf\fR otherwise\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Init\fP\fR \fI\fBSDL_InitSubSystem\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_VideoInfo.3 b/docs/man3/SDL_VideoInfo.3 new file mode 100644 index 000000000..e55f97a0b --- /dev/null +++ b/docs/man3/SDL_VideoInfo.3 @@ -0,0 +1,62 @@ +.TH "SDL_VideoInfo" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_VideoInfo\- Video Target information +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint32 hw_available:1; + Uint32 wm_available:1; + Uint32 blit_hw:1; + Uint32 blit_hw_CC:1; + Uint32 blit_hw_A:1; + Uint32 blit_sw:1; + Uint32 blit_sw_CC:1; + Uint32 blit_sw_A:1; + Uint32 blit_fill; + Uint32 video_mem; + SDL_PixelFormat *vfmt; +} SDL_VideoInfo;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBhw_available\fR +Is it possible to create hardware surfaces? +.TP 20 +\fBwm_available\fR +Is there a window manager available +.TP 20 +\fBblit_hw\fR +Are hardware to hardware blits accelerated? +.TP 20 +\fBblit_hw_CC\fR +Are hardware to hardware colorkey blits accelerated? +.TP 20 +\fBblit_hw_A\fR +Are hardware to hardware alpha blits accelerated? +.TP 20 +\fBblit_sw\fR +Are software to hardware blits accelerated? +.TP 20 +\fBblit_sw_CC\fR +Are software to hardware colorkey blits accelerated? +.TP 20 +\fBblit_sw_A\fR +Are software to hardware alpha blits accelerated? +.TP 20 +\fBblit_fill\fR +Are color fills accelerated? +.TP 20 +\fBvideo_mem\fR +Total amount of video memory in Kilobytes +.TP 20 +\fBvfmt\fR +\fIPixel format\fR of the video device +.SH "DESCRIPTION" +.PP +This (read-only) structure is returned by \fI\fBSDL_GetVideoInfo\fP\fR\&. It contains information on either the \&'best\&' available mode (if called before \fI\fBSDL_SetVideoMode\fP\fR) or the current video mode\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_PixelFormat\fR\fR, \fI\fBSDL_GetVideoInfo\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_VideoModeOK.3 b/docs/man3/SDL_VideoModeOK.3 new file mode 100644 index 000000000..2e2c50c8a --- /dev/null +++ b/docs/man3/SDL_VideoModeOK.3 @@ -0,0 +1,44 @@ +.TH "SDL_VideoModeOK" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_VideoModeOK\- Check to see if a particular video mode is supported\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_VideoModeOK\fP\fR(\fBint width, int height, int bpp, Uint32 flags\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_VideoModeOK\fP returns \fB0\fR if the requested mode is not supported under any bit depth, or returns the bits-per-pixel of the closest available mode with the given width, height and requested \fIsurface\fR flags (see \fI\fBSDL_SetVideoMode\fP\fR)\&. +.PP +The bits-per-pixel value returned is only a suggested mode\&. You can usually request and bpp you want when \fIsetting\fR the video mode and SDL will emulate that color depth with a shadow video surface\&. +.PP +The arguments to \fBSDL_VideoModeOK\fP are the same ones you would pass to \fISDL_SetVideoMode\fR +.SH "EXAMPLE" +.PP +.nf +\f(CWSDL_Surface *screen; +Uint32 bpp; +\&. +\&. +\&. +printf("Checking mode 640x480@16bpp\&. +"); +bpp=SDL_VideoModeOK(640, 480, 16, SDL_HWSURFACE); + +if(!bpp){ + printf("Mode not available\&. +"); + exit(-1); +} + +printf("SDL Recommends 640x480@%dbpp\&. +", bpp); +screen=SDL_SetVideoMode(640, 480, bpp, SDL_HWSURFACE); +\&. +\&.\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_GetVideoInfo\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WM_GetCaption.3 b/docs/man3/SDL_WM_GetCaption.3 new file mode 100644 index 000000000..829dd1968 --- /dev/null +++ b/docs/man3/SDL_WM_GetCaption.3 @@ -0,0 +1,15 @@ +.TH "SDL_WM_GetCaption" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WM_GetCaption\- Gets the window title and icon name\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_WM_GetCaption\fP\fR(\fBchar **title, char **icon\fR); +.SH "DESCRIPTION" +.PP +Set pointers to the window \fBtitle\fR and \fBicon\fR name\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_WM_SetCaption\fP\fR, \fI\fBSDL_WM_SetIcon\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WM_GrabInput.3 b/docs/man3/SDL_WM_GrabInput.3 new file mode 100644 index 000000000..4f07769d5 --- /dev/null +++ b/docs/man3/SDL_WM_GrabInput.3 @@ -0,0 +1,28 @@ +.TH "SDL_WM_GrabInput" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WM_GrabInput\- Grabs mouse and keyboard input\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBSDL_GrabMode \fBSDL_WM_GrabInput\fP\fR(\fBSDL_GrabMode mode\fR); +.SH "DESCRIPTION" +.PP +Grabbing means that the mouse is confined to the application window, and nearly all keyboard input is passed directly to the application, and not interpreted by a window manager, if any\&. +.PP +When \fBmode\fR is \fBSDL_GRAB_QUERY\fP the grab mode is not changed, but the current grab mode is returned\&. +.PP +.PP +.nf +\f(CWtypedef enum { + SDL_GRAB_QUERY, + SDL_GRAB_OFF, + SDL_GRAB_ON +} SDL_GrabMode;\fR +.fi +.PP + +.SH "RETURN VALUE" +.PP +The current/new \fBSDL_GrabMode\fR\&. +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WM_IconifyWindow.3 b/docs/man3/SDL_WM_IconifyWindow.3 new file mode 100644 index 000000000..f35020430 --- /dev/null +++ b/docs/man3/SDL_WM_IconifyWindow.3 @@ -0,0 +1,15 @@ +.TH "SDL_WM_IconifyWindow" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WM_IconifyWindow\- Iconify/Minimise the window +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_WM_IconifyWindow\fP\fR(\fBvoid\fR); +.SH "DESCRIPTION" +.PP +If the application is running in a window managed environment SDL attempts to iconify/minimise it\&. If \fBSDL_WM_IconifyWindow\fP is successful, the application will receive a \fI\fBSDL_APPACTIVE\fP\fR loss event\&. +.SH "RETURN VALUE" +.PP +Returns non-zero on success or \fB0\fR if iconification is not support or was refused by the window manager\&. +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WM_SetCaption.3 b/docs/man3/SDL_WM_SetCaption.3 new file mode 100644 index 000000000..758c9bc2d --- /dev/null +++ b/docs/man3/SDL_WM_SetCaption.3 @@ -0,0 +1,15 @@ +.TH "SDL_WM_SetCaption" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WM_SetCaption\- Sets the window tile and icon name\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_WM_SetCaption\fP\fR(\fBconst char *title, const char *icon\fR); +.SH "DESCRIPTION" +.PP +Sets the title-bar and icon name of the display window\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_WM_GetCaption\fP\fR, \fI\fBSDL_WM_SetIcon\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WM_SetIcon.3 b/docs/man3/SDL_WM_SetIcon.3 new file mode 100644 index 000000000..d7f9c743d --- /dev/null +++ b/docs/man3/SDL_WM_SetIcon.3 @@ -0,0 +1,27 @@ +.TH "SDL_WM_SetIcon" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WM_SetIcon\- Sets the icon for the display window\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_WM_SetIcon\fP\fR(\fBSDL_Surface *icon, Uint8 *mask\fR); +.SH "DESCRIPTION" +.PP +Sets the icon for the display window\&. +.PP +This function must be called before the first call to \fISDL_SetVideoMode\fR\&. +.PP +It takes an \fBicon\fR surface, and a \fBmask\fR in MSB format\&. +.PP +If \fBmask\fR is \fBNULL\fP, the entire icon surface will be used as the icon\&. +.SH "EXAMPLE" +.PP +.nf +\f(CWSDL_WM_SetIcon(SDL_LoadBMP("icon\&.bmp"), NULL);\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_SetVideoMode\fP\fR, \fI\fBSDL_WM_SetCaption\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WM_ToggleFullScreen.3 b/docs/man3/SDL_WM_ToggleFullScreen.3 new file mode 100644 index 000000000..0d1c557b3 --- /dev/null +++ b/docs/man3/SDL_WM_ToggleFullScreen.3 @@ -0,0 +1,15 @@ +.TH "SDL_WM_ToggleFullScreen" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WM_ToggleFullScreen\- Toggles fullscreen mode +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_WM_ToggleFullScreen\fP\fR(\fBSDL_Surface *surface\fR); +.SH "DESCRIPTION" +.PP +Toggles the application between windowed and fullscreen mode, if supported\&. (X11 is the only target currently supported, BeOS support is experimental)\&. +.SH "RETURN VALUE" +.PP +Returns \fB0\fR on failure or \fB1\fR on success\&. +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WaitEvent.3 b/docs/man3/SDL_WaitEvent.3 new file mode 100644 index 000000000..013f670fd --- /dev/null +++ b/docs/man3/SDL_WaitEvent.3 @@ -0,0 +1,17 @@ +.TH "SDL_WaitEvent" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WaitEvent\- Waits indefinitely for the next available event\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBint \fBSDL_WaitEvent\fP\fR(\fBSDL_Event *event\fR); +.SH "DESCRIPTION" +.PP +Waits indefinitely for the next available event, returning \fB1\fR, or \fB0\fR if there was an error while waiting for events\&. +.PP +If \fBevent\fR is not \fBNULL\fP, the next event is removed from the queue and stored in that area\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_Event\fR\fR, \fI\fBSDL_PollEvent\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_WaitThread.3 b/docs/man3/SDL_WaitThread.3 new file mode 100644 index 000000000..93e297b91 --- /dev/null +++ b/docs/man3/SDL_WaitThread.3 @@ -0,0 +1,19 @@ +.TH "SDL_WaitThread" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WaitThread\- Wait for a thread to finish\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBvoid \fBSDL_WaitThread\fP\fR(\fBSDL_Thread *thread, int *status\fR); +.SH "DESCRIPTION" +.PP +Wait for a thread to finish (timeouts are not supported)\&. +.SH "RETURN VALUE" +.PP +The return code for the thread function is placed in the area pointed to by \fBstatus\fR, if \fBstatus\fR is not \fBNULL\fR\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateThread\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_WarpMouse.3 b/docs/man3/SDL_WarpMouse.3 new file mode 100644 index 000000000..2892d714d --- /dev/null +++ b/docs/man3/SDL_WarpMouse.3 @@ -0,0 +1,15 @@ +.TH "SDL_WarpMouse" "3" "Mon 12 Mar 2001, 01:05" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WarpMouse\- Set the position of the mouse cursor\&. +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBvoid \fBSDL_WarpMouse\fP\fR(\fBUint16 x, Uint16 y\fR); +.SH "DESCRIPTION" +.PP +Set the position of the mouse cursor (generates a mouse motion event)\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_MouseMotionEvent\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:05 diff --git a/docs/man3/SDL_WasInit.3 b/docs/man3/SDL_WasInit.3 new file mode 100644 index 000000000..b3b300e54 --- /dev/null +++ b/docs/man3/SDL_WasInit.3 @@ -0,0 +1,63 @@ +.TH "SDL_WasInit" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_WasInit\- Check which subsystems are initialized +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +.sp +\fBUint32 \fBSDL_WasInit\fP\fR(\fBUint32 flags\fR); +.SH "DESCRIPTION" +.PP +\fBSDL_WasInit\fP allows you to see which SDL subsytems have been \fIinitialized\fR\&. \fBflags\fR is a bitwise OR\&'d combination of the subsystems you wish to check (see \fI\fBSDL_Init\fP\fR for a list of subsystem flags)\&. +.SH "RETURN VALUE" +.PP +\fBSDL_WasInit\fP returns a bitwised OR\&'d combination of the initialized subsystems\&. +.SH "EXAMPLES" +.PP +.nf +\f(CW +/* Here are several ways you can use SDL_WasInit() */ + +/* Get init data on all the subsystems */ +Uint32 subsystem_init; + +subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING); + +if(subsystem_init&SDL_INIT_VIDEO) + printf("Video is initialized\&. +"); +else + printf("Video is not initialized\&. +"); + + + +/* Just check for one specfic subsystem */ + +if(SDL_WasInit(SDL_INIT_VIDEO)!=0) + printf("Video is initialized\&. +"); +else + printf("Video is not initialized\&. +"); + + + + +/* Check for two subsystems */ + +Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO; + +if(SDL_WasInit(subsystem_mask)==subsystem_mask) + printf("Video and Audio initialized\&. +"); +else + printf("Video and Audio not initialized\&. +"); +\fR +.fi +.PP +.SH "SEE ALSO" +.PP +\fI\fBSDL_Init\fP\fR, \fI\fBSDL_Subsystem\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_keysym.3 b/docs/man3/SDL_keysym.3 new file mode 100644 index 000000000..5b918aac7 --- /dev/null +++ b/docs/man3/SDL_keysym.3 @@ -0,0 +1,69 @@ +.TH "SDL_keysym" "3" "Mon 12 Mar 2001, 01:03" "SDL" "SDL API Reference" +.SH "NAME" +SDL_keysym\- Keysym structure +.SH "STRUCTURE DEFINITION" +.PP +.nf +\f(CWtypedef struct{ + Uint8 scancode; + SDLKey sym; + SDLMod mod; + Uint16 unicode; +} SDL_keysym;\fR +.fi +.PP +.SH "STRUCTURE DATA" +.TP 20 +\fBscancode\fR +Hardware specific scancode +.TP 20 +\fBsym\fR +SDL virtual keysym +.TP 20 +\fBmod\fR +Current key modifiers +.TP 20 +\fBunicode\fR +Translated character +.SH "DESCRIPTION" +.PP +The \fBSDL_keysym\fR structure is used by reporting key presses and releases since it is a part of the \fI\fBSDL_KeyboardEvent\fR\fR\&. +.PP +The \fBscancode\fR field should generally be left alone, it is the hardware dependent scancode returned by the keyboard\&. The \fBsym\fR field is extremely useful\&. It is the SDL-defined value of the key (see \fISDL Key Syms\fR\&. This field is very useful when you are checking for certain key presses, like so: +.PP +.nf +\f(CW\&. +\&. +while(SDL_PollEvent(&event)){ + switch(event\&.type){ + case SDL_KEYDOWN: + if(event\&.key\&.keysym\&.sym==SDLK_LEFT) + move_left(); + break; + \&. + \&. + \&. + } +} +\&. +\&.\fR +.fi +.PP + \fBmod\fR stores the current state of the keyboard modifiers as explained in \fI\fBSDL_GetModState\fP\fR\&. The \fBunicode\fR is only used when UNICODE translation is enabled with \fI\fBSDL_EnableUNICODE\fP\fR\&. If \fBunicode\fR is non-zero then this a the UNICODE character corresponding to the keypress\&. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character: +.PP +.nf +\f(CWchar ch; +if ( (keysym\&.unicode & 0xFF80) == 0 ) { + ch = keysym\&.unicode & 0x7F; +} +else { + printf("An International Character\&. +"); +}\fR +.fi +.PP + UNICODE translation does have a slight overhead so don\&'t enable it unless its needed\&. +.SH "SEE ALSO" +.PP +\fI\fBSDLKey\fR\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:03 diff --git a/docs/man3/SDL_mutexP.3 b/docs/man3/SDL_mutexP.3 new file mode 100644 index 000000000..b08355178 --- /dev/null +++ b/docs/man3/SDL_mutexP.3 @@ -0,0 +1,18 @@ +.TH "SDL_mutexP" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_mutexP\- Lock a mutex +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_mutexP\fP\fR(\fBSDL_mutex *mutex\fR); +.SH "DESCRIPTION" +.PP +Locks the \fBmutex\fR, which was previously created with \fI\fBSDL_CreateMutex\fP\fR\&. If the mutex is already locked then \fBSDL_mutexP\fP will not return until it is \fIunlocked\fR\&. Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.PP +SDL also defines a macro \fB#define SDL_LockMutex(m) SDL_mutexP(m)\fP\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateMutex\fP\fR, \fI\fBSDL_mutexV\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/docs/man3/SDL_mutexV.3 b/docs/man3/SDL_mutexV.3 new file mode 100644 index 000000000..5fc67ded3 --- /dev/null +++ b/docs/man3/SDL_mutexV.3 @@ -0,0 +1,18 @@ +.TH "SDL_mutexV" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" +.SH "NAME" +SDL_mutexV\- Unlock a mutex +.SH "SYNOPSIS" +.PP +\fB#include "SDL\&.h" +#include "SDL_thread\&.h" +.sp +\fBint \fBSDL_mutexV\fP\fR(\fBSDL_mutex *mutex\fR); +.SH "DESCRIPTION" +.PP +Unlocks the \fBmutex\fR, which was previously created with \fI\fBSDL_CreateMutex\fP\fR\&. Returns \fB0\fR on success, or \fB-1\fR on an error\&. +.PP +SDL also defines a macro \fB#define SDL_UnlockMutex(m) SDL_mutexV(m)\fP\&. +.SH "SEE ALSO" +.PP +\fI\fBSDL_CreateMutex\fP\fR, \fI\fBSDL_mutexP\fP\fR +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 diff --git a/include/.cvsignore b/include/.cvsignore new file mode 100644 index 000000000..3dda72986 --- /dev/null +++ b/include/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 000000000..53ff901b5 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,33 @@ +# The input Makefile for SDL header files + +# The directory where the include files will be installed +libSDLincludedir = $(includedir)/SDL + +# Which header files to install +libSDLinclude_HEADERS = \ + SDL.h \ + SDL_active.h \ + SDL_audio.h \ + SDL_byteorder.h \ + SDL_cdrom.h \ + SDL_copying.h \ + SDL_endian.h \ + SDL_error.h \ + SDL_events.h \ + SDL_getenv.h \ + SDL_joystick.h \ + SDL_keyboard.h \ + SDL_keysym.h \ + SDL_main.h \ + SDL_mouse.h \ + SDL_mutex.h \ + SDL_quit.h \ + SDL_rwops.h \ + SDL_syswm.h \ + SDL_thread.h \ + SDL_timer.h \ + SDL_types.h \ + SDL_version.h \ + SDL_video.h \ + begin_code.h \ + close_code.h diff --git a/include/SDL.h b/include/SDL.h new file mode 100644 index 000000000..17fc35d93 --- /dev/null +++ b/include/SDL.h @@ -0,0 +1,97 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Main include header for the SDL library */ + +#ifndef _SDL_H +#define _SDL_H + +#include "SDL_main.h" +#include "SDL_types.h" +#include "SDL_getenv.h" +#include "SDL_error.h" +#include "SDL_rwops.h" +#include "SDL_timer.h" +#include "SDL_audio.h" +#include "SDL_cdrom.h" +#include "SDL_joystick.h" +#include "SDL_events.h" +#include "SDL_video.h" +#include "SDL_byteorder.h" +#include "SDL_version.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* As of version 0.5, SDL is loaded dynamically into the application */ + +/* These are the flags which may be passed to SDL_Init() -- you should + specify the subsystems which you will be using in your application. +*/ +#define SDL_INIT_TIMER 0x00000001 +#define SDL_INIT_AUDIO 0x00000010 +#define SDL_INIT_VIDEO 0x00000020 +#define SDL_INIT_CDROM 0x00000100 +#define SDL_INIT_JOYSTICK 0x00000200 +#define SDL_INIT_NOPARACHUTE 0x00100000 /* Don't catch fatal signals */ +#define SDL_INIT_EVENTTHREAD 0x01000000 /* Not supported on all OS's */ +#define SDL_INIT_EVERYTHING 0x0000FFFF + +/* This function loads the SDL dynamically linked library and initializes + * the subsystems specified by 'flags' (and those satisfying dependencies) + * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup + * signal handlers for some commonly ignored fatal signals (like SIGSEGV) + */ +extern DECLSPEC int SDL_Init(Uint32 flags); + +/* This function initializes specific SDL subsystems */ +extern DECLSPEC int SDL_InitSubSystem(Uint32 flags); + +/* This function cleans up specific SDL subsystems */ +extern DECLSPEC void SDL_QuitSubSystem(Uint32 flags); + +/* This function returns mask of the specified subsystems which have + been initialized. + If 'flags' is 0, it returns a mask of all initialized subsystems. +*/ +extern DECLSPEC Uint32 SDL_WasInit(Uint32 flags); + +/* This function cleans up all initialized subsystems and unloads the + * dynamically linked library. You should call it upon all exit conditions. + */ +extern DECLSPEC void SDL_Quit(void); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_H */ diff --git a/include/SDL_active.h b/include/SDL_active.h new file mode 100644 index 000000000..bc91a7099 --- /dev/null +++ b/include/SDL_active.h @@ -0,0 +1,60 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL application focus event handling */ + +#ifndef _SDL_active_h +#define _SDL_active_h + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* The available application states */ +#define SDL_APPMOUSEFOCUS 0x01 /* The app has mouse coverage */ +#define SDL_APPINPUTFOCUS 0x02 /* The app has input focus */ +#define SDL_APPACTIVE 0x04 /* The application is active */ + +/* Function prototypes */ +/* + * This function returns the current state of the application, which is a + * bitwise combination of SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS, and + * SDL_APPACTIVE. If SDL_APPACTIVE is set, then the user is able to + * see your application, otherwise it has been iconified or disabled. + */ +extern DECLSPEC Uint8 SDL_GetAppState(void); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_active_h */ diff --git a/include/SDL_audio.h b/include/SDL_audio.h new file mode 100644 index 000000000..1bdaf048c --- /dev/null +++ b/include/SDL_audio.h @@ -0,0 +1,260 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Access to the raw audio mixing buffer for the SDL library */ + +#ifndef _SDL_audio_h +#define _SDL_audio_h + +#include + +#include "SDL_main.h" +#include "SDL_types.h" +#include "SDL_error.h" +#include "SDL_rwops.h" +#include "SDL_byteorder.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* The calculated values in this structure are calculated by SDL_OpenAudio() */ +typedef struct { + int freq; /* DSP frequency -- samples per second */ + Uint16 format; /* Audio data format */ + Uint8 channels; /* Number of channels: 1 mono, 2 stereo */ + Uint8 silence; /* Audio buffer silence value (calculated) */ + Uint16 samples; /* Audio buffer size in samples */ + Uint16 padding; /* Necessary for some compile environments */ + Uint32 size; /* Audio buffer size in bytes (calculated) */ + /* This function is called when the audio device needs more data. + 'stream' is a pointer to the audio data buffer + 'len' is the length of that buffer in bytes. + Once the callback returns, the buffer will no longer be valid. + Stereo samples are stored in a LRLRLR ordering. + */ + void (*callback)(void *userdata, Uint8 *stream, int len); + void *userdata; +} SDL_AudioSpec; + +/* Audio format flags (defaults to LSB byte order) */ +#define AUDIO_U8 0x0008 /* Unsigned 8-bit samples */ +#define AUDIO_S8 0x8008 /* Signed 8-bit samples */ +#define AUDIO_U16LSB 0x0010 /* Unsigned 16-bit samples */ +#define AUDIO_S16LSB 0x8010 /* Signed 16-bit samples */ +#define AUDIO_U16MSB 0x1010 /* As above, but big-endian byte order */ +#define AUDIO_S16MSB 0x9010 /* As above, but big-endian byte order */ +#define AUDIO_U16 AUDIO_U16LSB +#define AUDIO_S16 AUDIO_S16LSB + +/* Native audio byte ordering */ +#if SDL_BYTEORDER == SDL_LIL_ENDIAN +#define AUDIO_U16SYS AUDIO_U16LSB +#define AUDIO_S16SYS AUDIO_S16LSB +#else +#define AUDIO_U16SYS AUDIO_U16MSB +#define AUDIO_S16SYS AUDIO_S16MSB +#endif + + +/* A structure to hold a set of audio conversion filters and buffers */ +typedef struct SDL_AudioCVT { + int needed; /* Set to 1 if conversion possible */ + Uint16 src_format; /* Source audio format */ + Uint16 dst_format; /* Target audio format */ + double rate_incr; /* Rate conversion increment */ + Uint8 *buf; /* Buffer to hold entire audio data */ + int len; /* Length of original audio buffer */ + int len_cvt; /* Length of converted audio buffer */ + int len_mult; /* buffer must be len*len_mult big */ + double len_ratio; /* Given len, final size is len*len_ratio */ + void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format); + int filter_index; /* Current audio conversion function */ +} SDL_AudioCVT; + + +/* Function prototypes */ + +/* These functions are used internally, and should not be used unless you + * have a specific need to specify the audio driver you want to use. + * You should normally use SDL_Init() or SDL_InitSubSystem(). + */ +extern DECLSPEC int SDL_AudioInit(const char *driver_name); +extern DECLSPEC void SDL_AudioQuit(void); + +/* This function fills the given character buffer with the name of the + * current audio driver, and returns a pointer to it if the audio driver has + * been initialized. It returns NULL if no driver has been initialized. + */ +extern DECLSPEC char *SDL_AudioDriverName(char *namebuf, int maxlen); + +/* + * This function opens the audio device with the desired parameters, and + * returns 0 if successful, placing the actual hardware parameters in the + * structure pointed to by 'obtained'. If 'obtained' is NULL, the audio + * data passed to the callback function will be guaranteed to be in the + * requested format, and will be automatically converted to the hardware + * audio format if necessary. This function returns -1 if it failed + * to open the audio device, or couldn't set up the audio thread. + * + * When filling in the desired audio spec structure, + * 'desired->freq' should be the desired audio frequency in samples-per-second. + * 'desired->format' should be the desired audio format. + * 'desired->samples' is the desired size of the audio buffer, in samples. + * This number should be a power of two, and may be adjusted by the audio + * driver to a value more suitable for the hardware. Good values seem to + * range between 512 and 8096 inclusive, depending on the application and + * CPU speed. Smaller values yield faster response time, but can lead + * to underflow if the application is doing heavy processing and cannot + * fill the audio buffer in time. A stereo sample consists of both right + * and left channels in LR ordering. + * Note that the number of samples is directly related to time by the + * following formula: ms = (samples*1000)/freq + * 'desired->size' is the size in bytes of the audio buffer, and is + * calculated by SDL_OpenAudio(). + * 'desired->silence' is the value used to set the buffer to silence, + * and is calculated by SDL_OpenAudio(). + * 'desired->callback' should be set to a function that will be called + * when the audio device is ready for more data. It is passed a pointer + * to the audio buffer, and the length in bytes of the audio buffer. + * This function usually runs in a separate thread, and so you should + * protect data structures that it accesses by calling SDL_LockAudio() + * and SDL_UnlockAudio() in your code. + * 'desired->userdata' is passed as the first parameter to your callback + * function. + * + * The audio device starts out playing silence when it's opened, and should + * be enabled for playing by calling SDL_PauseAudio(0) when you are ready + * for your audio callback function to be called. Since the audio driver + * may modify the requested size of the audio buffer, you should allocate + * any local mixing buffers after you open the audio device. + */ +extern DECLSPEC int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained); + +/* + * Get the current audio state: + */ +typedef enum { + SDL_AUDIO_STOPPED = 0, + SDL_AUDIO_PLAYING, + SDL_AUDIO_PAUSED +} SDL_audiostatus; +extern DECLSPEC SDL_audiostatus SDL_GetAudioStatus(void); + +/* + * This function pauses and unpauses the audio callback processing. + * It should be called with a parameter of 0 after opening the audio + * device to start playing sound. This is so you can safely initialize + * data for your callback function after opening the audio device. + * Silence will be written to the audio device during the pause. + */ +extern DECLSPEC void SDL_PauseAudio(int pause_on); + +/* + * This function loads a WAVE from the data source, automatically freeing + * that source if 'freesrc' is non-zero. For example, to load a WAVE file, + * you could do: + * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); + * + * If this function succeeds, it returns the given SDL_AudioSpec, + * filled with the audio data format of the wave data, and sets + * 'audio_buf' to a malloc()'d buffer containing the audio data, + * and sets 'audio_len' to the length of that audio buffer, in bytes. + * You need to free the audio buffer with SDL_FreeWAV() when you are + * done with it. + * + * This function returns NULL and sets the SDL error message if the + * wave file cannot be opened, uses an unknown data format, or is + * corrupt. Currently raw and MS-ADPCM WAVE files are supported. + */ +extern DECLSPEC SDL_AudioSpec *SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, + SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len); + +/* Compatibility convenience function -- loads a WAV from a file */ +#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \ + SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len) + +/* + * This function frees data previously allocated with SDL_LoadWAV_RW() + */ +extern DECLSPEC void SDL_FreeWAV(Uint8 *audio_buf); + +/* + * This function takes a source format and rate and a destination format + * and rate, and initializes the 'cvt' structure with information needed + * by SDL_ConvertAudio() to convert a buffer of audio data from one format + * to the other. + * This function returns 0, or -1 if there was an error. + */ +extern DECLSPEC int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, + Uint16 src_format, Uint8 src_channels, int src_rate, + Uint16 dst_format, Uint8 dst_channels, int dst_rate); + +/* Once you have initialized the 'cvt' structure using SDL_BuildAudioCVT(), + * created an audio buffer cvt->buf, and filled it with cvt->len bytes of + * audio data in the source format, this function will convert it in-place + * to the desired format. + * The data conversion may expand the size of the audio data, so the buffer + * cvt->buf should be allocated after the cvt structure is initialized by + * SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long. + */ +extern DECLSPEC int SDL_ConvertAudio(SDL_AudioCVT *cvt); + +/* + * This takes two audio buffers of the playing audio format and mixes + * them, performing addition, volume adjustment, and overflow clipping. + * The volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME + * for full audio volume. Note this does not change hardware volume. + * This is provided for convenience -- you can mix your own audio data. + */ +#define SDL_MIX_MAXVOLUME 128 +extern DECLSPEC void SDL_MixAudio(Uint8 *dst, Uint8 *src, Uint32 len, int volume); + +/* + * The lock manipulated by these functions protects the callback function. + * During a LockAudio/UnlockAudio pair, you can be guaranteed that the + * callback function is not running. Do not call these from the callback + * function or you will cause deadlock. + */ +extern DECLSPEC void SDL_LockAudio(void); +extern DECLSPEC void SDL_UnlockAudio(void); + +/* + * This function shuts down audio processing and closes the audio device. + */ +extern DECLSPEC void SDL_CloseAudio(void); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_audio_h */ diff --git a/include/SDL_byteorder.h b/include/SDL_byteorder.h new file mode 100644 index 000000000..fb6e48bf7 --- /dev/null +++ b/include/SDL_byteorder.h @@ -0,0 +1,51 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Macros for determining the byte-order of this platform */ + +#ifndef _SDL_byteorder_h +#define _SDL_byteorder_h + +/* The two types of endianness */ +#define SDL_LIL_ENDIAN 1234 +#define SDL_BIG_ENDIAN 4321 + +/* Pardon the mess, I'm trying to determine the endianness of this host. + I'm doing it by preprocessor defines rather than some sort of configure + script so that application code can use this too. The "right" way would + be to dynamically generate this file on install, but that's a lot of work. + */ +#if defined(__i386__) || defined(WIN32) || \ + (defined(__alpha__) || defined(__alpha)) || \ + defined(__arm__) || \ + (defined(__mips__) && defined(__MIPSEL__)) +#define SDL_BYTEORDER SDL_LIL_ENDIAN +#else +#define SDL_BYTEORDER SDL_BIG_ENDIAN +#endif + +#endif /* _SDL_byteorder_h */ diff --git a/include/SDL_cdrom.h b/include/SDL_cdrom.h new file mode 100644 index 000000000..cc14aab98 --- /dev/null +++ b/include/SDL_cdrom.h @@ -0,0 +1,175 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* This is the CD-audio control API for Simple DirectMedia Layer */ + +#ifndef _SDL_cdrom_h +#define _SDL_cdrom_h + +#include "SDL_types.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* In order to use these functions, SDL_Init() must have been called + with the SDL_INIT_CDROM flag. This causes SDL to scan the system + for CD-ROM drives, and load appropriate drivers. +*/ + +/* The maximum number of CD-ROM tracks on a disk */ +#define SDL_MAX_TRACKS 99 + +/* The types of CD-ROM track possible */ +#define SDL_AUDIO_TRACK 0x00 +#define SDL_DATA_TRACK 0x04 + +/* The possible states which a CD-ROM drive can be in. */ +typedef enum { + CD_TRAYEMPTY, + CD_STOPPED, + CD_PLAYING, + CD_PAUSED, + CD_ERROR = -1 +} CDstatus; + +/* Given a status, returns true if there's a disk in the drive */ +#define CD_INDRIVE(status) ((int)status > 0) + +typedef struct { + Uint8 id; /* Track number */ + Uint8 type; /* Data or audio track */ + Uint16 unused; + Uint32 length; /* Length, in frames, of this track */ + Uint32 offset; /* Offset, in frames, from start of disk */ +} SDL_CDtrack; + +/* This structure is only current as of the last call to SDL_CDStatus() */ +typedef struct SDL_CD { + int id; /* Private drive identifier */ + CDstatus status; /* Current drive status */ + + /* The rest of this structure is only valid if there's a CD in drive */ + int numtracks; /* Number of tracks on disk */ + int cur_track; /* Current track position */ + int cur_frame; /* Current frame offset within current track */ + SDL_CDtrack track[SDL_MAX_TRACKS+1]; +} SDL_CD; + +/* Conversion functions from frames to Minute/Second/Frames and vice versa */ +#define CD_FPS 75 +#define FRAMES_TO_MSF(f, M,S,F) { \ + int value = f; \ + *(F) = value%CD_FPS; \ + value /= CD_FPS; \ + *(S) = value%60; \ + value /= 60; \ + *(M) = value; \ +} +#define MSF_TO_FRAMES(M, S, F) ((M)*60*CD_FPS+(S)*CD_FPS+(F)) + +/* CD-audio API functions: */ + +/* Returns the number of CD-ROM drives on the system, or -1 if + SDL_Init() has not been called with the SDL_INIT_CDROM flag. + */ +extern DECLSPEC int SDL_CDNumDrives(void); + +/* Returns a human-readable, system-dependent identifier for the CD-ROM. + Example: + "/dev/cdrom" + "E:" + "/dev/disk/ide/1/master" +*/ +extern DECLSPEC const char * SDL_CDName(int drive); + +/* Opens a CD-ROM drive for access. It returns a drive handle on success, + or NULL if the drive was invalid or busy. This newly opened CD-ROM + becomes the default CD used when other CD functions are passed a NULL + CD-ROM handle. + Drives are numbered starting with 0. Drive 0 is the system default CD-ROM. +*/ +extern DECLSPEC SDL_CD * SDL_CDOpen(int drive); + +/* This function returns the current status of the given drive. + If the drive has a CD in it, the table of contents of the CD and current + play position of the CD will be stored in the SDL_CD structure. +*/ +extern DECLSPEC CDstatus SDL_CDStatus(SDL_CD *cdrom); + +/* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks' + tracks and 'nframes' frames. If both 'ntrack' and 'nframe' are 0, play + until the end of the CD. This function will skip data tracks. + This function should only be called after calling SDL_CDStatus() to + get track information about the CD. + For example: + // Play entire CD: + if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) + SDL_CDPlayTracks(cdrom, 0, 0, 0, 0); + // Play last track: + if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) { + SDL_CDPlayTracks(cdrom, cdrom->numtracks-1, 0, 0, 0); + } + // Play first and second track and 10 seconds of third track: + if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) + SDL_CDPlayTracks(cdrom, 0, 0, 2, 10); + + This function returns 0, or -1 if there was an error. +*/ +extern DECLSPEC int SDL_CDPlayTracks(SDL_CD *cdrom, + int start_track, int start_frame, int ntracks, int nframes); + +/* Play the given CD starting at 'start' frame for 'length' frames. + It returns 0, or -1 if there was an error. +*/ +extern DECLSPEC int SDL_CDPlay(SDL_CD *cdrom, int start, int length); + +/* Pause play -- returns 0, or -1 on error */ +extern DECLSPEC int SDL_CDPause(SDL_CD *cdrom); + +/* Resume play -- returns 0, or -1 on error */ +extern DECLSPEC int SDL_CDResume(SDL_CD *cdrom); + +/* Stop play -- returns 0, or -1 on error */ +extern DECLSPEC int SDL_CDStop(SDL_CD *cdrom); + +/* Eject CD-ROM -- returns 0, or -1 on error */ +extern DECLSPEC int SDL_CDEject(SDL_CD *cdrom); + +/* Closes the handle for the CD-ROM drive */ +extern DECLSPEC void SDL_CDClose(SDL_CD *cdrom); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_video_h */ diff --git a/include/SDL_copying.h b/include/SDL_copying.h new file mode 100644 index 000000000..16ab5de7d --- /dev/null +++ b/include/SDL_copying.h @@ -0,0 +1,27 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + diff --git a/include/SDL_endian.h b/include/SDL_endian.h new file mode 100644 index 000000000..9a80fd1bf --- /dev/null +++ b/include/SDL_endian.h @@ -0,0 +1,149 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Functions for reading and writing endian-specific values */ + +#ifndef _SDL_endian_h +#define _SDL_endian_h + +/* These functions read and write data of the specified endianness, + dynamically translating to the host machine endianness. + + e.g.: If you want to read a 16 bit value on big-endian machine from + an open file containing little endian values, you would use: + value = SDL_ReadLE16(rp); + Note that the read/write functions use SDL_RWops pointers + instead of FILE pointers. This allows you to read and write + endian values from large chunks of memory as well as files + and other data sources. +*/ + +#include + +#include "SDL_types.h" +#include "SDL_rwops.h" +#include "SDL_byteorder.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* The macros used to swap values */ +/* Try to use superfast macros on systems that support them */ +#ifdef linux +#include +#ifdef __arch__swab16 +#define SDL_Swap16 __arch__swab16 +#endif +#ifdef __arch__swab32 +#define SDL_Swap32 __arch__swab32 +#endif +#endif /* linux */ +/* Use inline functions for compilers that support them, and static + functions for those that do not. Because these functions become + static for compilers that do not support inline functions, this + header should only be included in files that actually use them. +*/ +#ifndef SDL_Swap16 +static __inline__ Uint16 SDL_Swap16(Uint16 D) { + return((D<<8)|(D>>8)); +} +#endif +#ifndef SDL_Swap32 +static __inline__ Uint32 SDL_Swap32(Uint32 D) { + return((D<<24)|((D<<8)&0x00FF0000)|((D>>8)&0x0000FF00)|(D>>24)); +} +#endif +#ifdef SDL_HAS_64BIT_TYPE +#ifndef SDL_Swap64 +static __inline__ Uint64 SDL_Swap64(Uint64 val) { + Uint32 hi, lo; + + /* Separate into high and low 32-bit values and swap them */ + lo = (Uint32)(val&0xFFFFFFFF); + val >>= 32; + hi = (Uint32)(val&0xFFFFFFFF); + val = SDL_Swap32(lo); + val <<= 32; + val |= SDL_Swap32(hi); + return(val); +} +#endif +#else +#ifndef SDL_Swap64 +/* This is mainly to keep compilers from complaining in SDL code. + If there is no real 64-bit datatype, then compilers will complain about + the fake 64-bit datatype that SDL provides when it compiles user code. +*/ +#define SDL_Swap64(X) (X) +#endif +#endif /* SDL_HAS_64BIT_TYPE */ + + +/* Byteswap item from the specified endianness to the native endianness */ +#if SDL_BYTEORDER == SDL_LIL_ENDIAN +#define SDL_SwapLE16(X) (X) +#define SDL_SwapLE32(X) (X) +#define SDL_SwapLE64(X) (X) +#define SDL_SwapBE16(X) SDL_Swap16(X) +#define SDL_SwapBE32(X) SDL_Swap32(X) +#define SDL_SwapBE64(X) SDL_Swap64(X) +#else +#define SDL_SwapLE16(X) SDL_Swap16(X) +#define SDL_SwapLE32(X) SDL_Swap32(X) +#define SDL_SwapLE64(X) SDL_Swap64(X) +#define SDL_SwapBE16(X) (X) +#define SDL_SwapBE32(X) (X) +#define SDL_SwapBE64(X) (X) +#endif + +/* Read an item of the specified endianness and return in native format */ +extern DECLSPEC Uint16 SDL_ReadLE16(SDL_RWops *src); +extern DECLSPEC Uint16 SDL_ReadBE16(SDL_RWops *src); +extern DECLSPEC Uint32 SDL_ReadLE32(SDL_RWops *src); +extern DECLSPEC Uint32 SDL_ReadBE32(SDL_RWops *src); +extern DECLSPEC Uint64 SDL_ReadLE64(SDL_RWops *src); +extern DECLSPEC Uint64 SDL_ReadBE64(SDL_RWops *src); + +/* Write an item of native format to the specified endianness */ +extern DECLSPEC int SDL_WriteLE16(SDL_RWops *dst, Uint16 value); +extern DECLSPEC int SDL_WriteBE16(SDL_RWops *dst, Uint16 value); +extern DECLSPEC int SDL_WriteLE32(SDL_RWops *dst, Uint32 value); +extern DECLSPEC int SDL_WriteBE32(SDL_RWops *dst, Uint32 value); +extern DECLSPEC int SDL_WriteLE64(SDL_RWops *dst, Uint64 value); +extern DECLSPEC int SDL_WriteBE64(SDL_RWops *dst, Uint64 value); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_endian_h */ diff --git a/include/SDL_error.h b/include/SDL_error.h new file mode 100644 index 000000000..8fca0536f --- /dev/null +++ b/include/SDL_error.h @@ -0,0 +1,62 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Simple error message routines for SDL */ + +#ifndef _SDL_error_h +#define _SDL_error_h + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Public functions */ +extern DECLSPEC void SDL_SetError(const char *fmt, ...); +extern DECLSPEC char * SDL_GetError(void); +extern DECLSPEC void SDL_ClearError(void); + +/* Private error message function - used internally */ +#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) +typedef enum { + SDL_ENOMEM, + SDL_EFREAD, + SDL_EFWRITE, + SDL_EFSEEK, + SDL_LASTERROR +} SDL_errorcode; +extern void SDL_Error(SDL_errorcode code); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_error_h */ diff --git a/include/SDL_events.h b/include/SDL_events.h new file mode 100644 index 000000000..aaa8fd65c --- /dev/null +++ b/include/SDL_events.h @@ -0,0 +1,334 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL event handling */ + +#ifndef _SDL_events_h +#define _SDL_events_h + +#include "SDL_types.h" +#include "SDL_active.h" +#include "SDL_keyboard.h" +#include "SDL_mouse.h" +#include "SDL_joystick.h" +#include "SDL_quit.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Event enumerations */ +enum { SDL_NOEVENT = 0, /* Unused (do not remove) */ + SDL_ACTIVEEVENT, /* Application loses/gains visibility */ + SDL_KEYDOWN, /* Keys pressed */ + SDL_KEYUP, /* Keys released */ + SDL_MOUSEMOTION, /* Mouse moved */ + SDL_MOUSEBUTTONDOWN, /* Mouse button pressed */ + SDL_MOUSEBUTTONUP, /* Mouse button released */ + SDL_JOYAXISMOTION, /* Joystick axis motion */ + SDL_JOYBALLMOTION, /* Joystick trackball motion */ + SDL_JOYHATMOTION, /* Joystick hat position change */ + SDL_JOYBUTTONDOWN, /* Joystick button pressed */ + SDL_JOYBUTTONUP, /* Joystick button released */ + SDL_QUIT, /* User-requested quit */ + SDL_SYSWMEVENT, /* System specific event */ + SDL_EVENT_RESERVEDA, /* Reserved for future use.. */ + SDL_EVENT_RESERVEDB, /* Reserved for future use.. */ + SDL_VIDEORESIZE, /* User resized video mode */ + SDL_VIDEOEXPOSE, /* Screen needs to be redrawn */ + SDL_EVENT_RESERVED2, /* Reserved for future use.. */ + SDL_EVENT_RESERVED3, /* Reserved for future use.. */ + SDL_EVENT_RESERVED4, /* Reserved for future use.. */ + SDL_EVENT_RESERVED5, /* Reserved for future use.. */ + SDL_EVENT_RESERVED6, /* Reserved for future use.. */ + SDL_EVENT_RESERVED7, /* Reserved for future use.. */ + /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */ + SDL_USEREVENT = 24, + /* This last event is only for bounding internal arrays + It is the number of bits in the event mask datatype -- Uint32 + */ + SDL_NUMEVENTS = 32 +}; + +/* Predefined event masks */ +#define SDL_EVENTMASK(X) (1<<(X)) +enum { + SDL_ACTIVEEVENTMASK = SDL_EVENTMASK(SDL_ACTIVEEVENT), + SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN), + SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP), + SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION), + SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN), + SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP), + SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION)| + SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN)| + SDL_EVENTMASK(SDL_MOUSEBUTTONUP), + SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION), + SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION), + SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION), + SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN), + SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP), + SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION)| + SDL_EVENTMASK(SDL_JOYBALLMOTION)| + SDL_EVENTMASK(SDL_JOYHATMOTION)| + SDL_EVENTMASK(SDL_JOYBUTTONDOWN)| + SDL_EVENTMASK(SDL_JOYBUTTONUP), + SDL_VIDEORESIZEMASK = SDL_EVENTMASK(SDL_VIDEORESIZE), + SDL_VIDEOEXPOSEMASK = SDL_EVENTMASK(SDL_VIDEOEXPOSE), + SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), + SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT) +}; +#define SDL_ALLEVENTS 0xFFFFFFFF + +/* Application visibility event structure */ +typedef struct { + Uint8 type; /* SDL_ACTIVEEVENT */ + Uint8 gain; /* Whether given states were gained or lost (1/0) */ + Uint8 state; /* A mask of the focus states */ +} SDL_ActiveEvent; + +/* Keyboard event structure */ +typedef struct { + Uint8 type; /* SDL_KEYDOWN or SDL_KEYUP */ + Uint8 which; /* The keyboard device index */ + Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ + SDL_keysym keysym; +} SDL_KeyboardEvent; + +/* Mouse motion event structure */ +typedef struct { + Uint8 type; /* SDL_MOUSEMOTION */ + Uint8 which; /* The mouse device index */ + Uint8 state; /* The current button state */ + Uint16 x, y; /* The X/Y coordinates of the mouse */ + Sint16 xrel; /* The relative motion in the X direction */ + Sint16 yrel; /* The relative motion in the Y direction */ +} SDL_MouseMotionEvent; + +/* Mouse button event structure */ +typedef struct { + Uint8 type; /* SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */ + Uint8 which; /* The mouse device index */ + Uint8 button; /* The mouse button index */ + Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ + Uint16 x, y; /* The X/Y coordinates of the mouse at press time */ +} SDL_MouseButtonEvent; + +/* Joystick axis motion event structure */ +typedef struct { + Uint8 type; /* SDL_JOYAXISMOTION */ + Uint8 which; /* The joystick device index */ + Uint8 axis; /* The joystick axis index */ + Sint16 value; /* The axis value (range: -32768 to 32767) */ +} SDL_JoyAxisEvent; + +/* Joystick trackball motion event structure */ +typedef struct { + Uint8 type; /* SDL_JOYBALLMOTION */ + Uint8 which; /* The joystick device index */ + Uint8 ball; /* The joystick trackball index */ + Sint16 xrel; /* The relative motion in the X direction */ + Sint16 yrel; /* The relative motion in the Y direction */ +} SDL_JoyBallEvent; + +/* Joystick hat position change event structure */ +typedef struct { + Uint8 type; /* SDL_JOYHATMOTION */ + Uint8 which; /* The joystick device index */ + Uint8 hat; /* The joystick hat index */ + Uint8 value; /* The hat position value: + 8 1 2 + 7 0 3 + 6 5 4 + Note that zero means the POV is centered. + */ +} SDL_JoyHatEvent; + +/* Joystick button event structure */ +typedef struct { + Uint8 type; /* SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */ + Uint8 which; /* The joystick device index */ + Uint8 button; /* The joystick button index */ + Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ +} SDL_JoyButtonEvent; + +/* The "window resized" event + When you get this event, you are responsible for setting a new video + mode with the new width and height. + */ +typedef struct { + Uint8 type; /* SDL_VIDEORESIZE */ + int w; /* New width */ + int h; /* New height */ +} SDL_ResizeEvent; + +/* The "screen redraw" event */ +typedef struct { + Uint8 type; /* SDL_VIDEOEXPOSE */ +} SDL_ExposeEvent; + +/* The "quit requested" event */ +typedef struct { + Uint8 type; /* SDL_QUIT */ +} SDL_QuitEvent; + +/* A user-defined event type */ +typedef struct { + Uint8 type; /* SDL_USEREVENT through SDL_NUMEVENTS-1 */ + int code; /* User defined event code */ + void *data1; /* User defined data pointer */ + void *data2; /* User defined data pointer */ +} SDL_UserEvent; + +/* If you want to use this event, you should include SDL_syswm.h */ +struct SDL_SysWMmsg; +typedef struct SDL_SysWMmsg SDL_SysWMmsg; +typedef struct { + Uint8 type; + SDL_SysWMmsg *msg; +} SDL_SysWMEvent; + +/* General event structure */ +typedef union { + Uint8 type; + SDL_ActiveEvent active; + SDL_KeyboardEvent key; + SDL_MouseMotionEvent motion; + SDL_MouseButtonEvent button; + SDL_JoyAxisEvent jaxis; + SDL_JoyBallEvent jball; + SDL_JoyHatEvent jhat; + SDL_JoyButtonEvent jbutton; + SDL_ResizeEvent resize; + SDL_ExposeEvent expose; + SDL_QuitEvent quit; + SDL_UserEvent user; + SDL_SysWMEvent syswm; +} SDL_Event; + + +/* Function prototypes */ + +/* Pumps the event loop, gathering events from the input devices. + This function updates the event queue and internal input device state. + This should only be run in the thread that sets the video mode. +*/ +extern DECLSPEC void SDL_PumpEvents(void); + +/* Checks the event queue for messages and optionally returns them. + If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to + the back of the event queue. + If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front + of the event queue, matching 'mask', will be returned and will not + be removed from the queue. + If 'action' is SDL_GETEVENT, up to 'numevents' events at the front + of the event queue, matching 'mask', will be returned and will be + removed from the queue. + This function returns the number of events actually stored, or -1 + if there was an error. This function is thread-safe. +*/ +typedef enum { + SDL_ADDEVENT, + SDL_PEEKEVENT, + SDL_GETEVENT +} SDL_eventaction; +/* */ +extern DECLSPEC int SDL_PeepEvents(SDL_Event *events, int numevents, + SDL_eventaction action, Uint32 mask); + +/* Polls for currently pending events, and returns 1 if there are any pending + events, or 0 if there are none available. If 'event' is not NULL, the next + event is removed from the queue and stored in that area. + */ +extern DECLSPEC int SDL_PollEvent(SDL_Event *event); + +/* Waits indefinitely for the next available event, returning 1, or 0 if there + was an error while waiting for events. If 'event' is not NULL, the next + event is removed from the queue and stored in that area. + */ +extern DECLSPEC int SDL_WaitEvent(SDL_Event *event); + +/* Add an event to the event queue. + This function returns 0, or -1 if the event couldn't be added to + the event queue. If the event queue is full, this function fails. + */ +extern DECLSPEC int SDL_PushEvent(SDL_Event *event); + +/* + This function sets up a filter to process all events before they + change internal state and are posted to the internal event queue. + + The filter is protypted as: +*/ +typedef int (*SDL_EventFilter)(const SDL_Event *event); +/* + If the filter returns 1, then the event will be added to the internal queue. + If it returns 0, then the event will be dropped from the queue, but the + internal state will still be updated. This allows selective filtering of + dynamically arriving events. + + WARNING: Be very careful of what you do in the event filter function, as + it may run in a different thread! + + There is one caveat when dealing with the SDL_QUITEVENT event type. The + event filter is only called when the window manager desires to close the + application window. If the event filter returns 1, then the window will + be closed, otherwise the window will remain open if possible. + If the quit event is generated by an interrupt signal, it will bypass the + internal queue and be delivered to the application at the next event poll. +*/ +extern DECLSPEC void SDL_SetEventFilter(SDL_EventFilter filter); + +/* + Return the current event filter - can be used to "chain" filters. + If there is no event filter set, this function returns NULL. +*/ +extern DECLSPEC SDL_EventFilter SDL_GetEventFilter(void); + +/* + This function allows you to set the state of processing certain events. + If 'state' is set to SDL_IGNORE, that event will be automatically dropped + from the event queue and will not event be filtered. + If 'state' is set to SDL_ENABLE, that event will be processed normally. + If 'state' is set to SDL_QUERY, SDL_EventState() will return the + current processing state of the specified event. +*/ +#define SDL_QUERY -1 +#define SDL_IGNORE 0 +#define SDL_DISABLE 0 +#define SDL_ENABLE 1 +extern DECLSPEC Uint8 SDL_EventState(Uint8 type, int state); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_events_h */ diff --git a/include/SDL_getenv.h b/include/SDL_getenv.h new file mode 100644 index 000000000..9d96f7654 --- /dev/null +++ b/include/SDL_getenv.h @@ -0,0 +1,30 @@ + +/* Not all environments have a working getenv()/putenv() */ + +#if defined(macintosh) || defined(_WIN32_WCE) +#define NEED_SDL_GETENV +#endif + +#ifdef NEED_SDL_GETENV + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Put a variable of the form "name=value" into the environment */ +extern DECLSPEC int SDL_putenv(const char *variable); +#define putenv(X) SDL_putenv(X) + +/* Retrieve a variable named "name" from the environment */ +extern DECLSPEC char *SDL_getenv(const char *name); +#define getenv(X) SDL_getenv(X) + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* NEED_GETENV */ diff --git a/include/SDL_joystick.h b/include/SDL_joystick.h new file mode 100644 index 000000000..03a2c9219 --- /dev/null +++ b/include/SDL_joystick.h @@ -0,0 +1,171 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL joystick event handling */ + +#ifndef _SDL_joystick_h +#define _SDL_joystick_h + +#include "SDL_types.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* In order to use these functions, SDL_Init() must have been called + with the SDL_INIT_JOYSTICK flag. This causes SDL to scan the system + for joysticks, and load appropriate drivers. +*/ + +/* The joystick structure used to identify an SDL joystick */ +struct _SDL_Joystick; +typedef struct _SDL_Joystick SDL_Joystick; + + +/* Function prototypes */ +/* + * Count the number of joysticks attached to the system + */ +extern DECLSPEC int SDL_NumJoysticks(void); + +/* + * Get the implementation dependent name of a joystick. + * This can be called before any joysticks are opened. + * If no name can be found, this function returns NULL. + */ +extern DECLSPEC const char *SDL_JoystickName(int device_index); + +/* + * Open a joystick for use - the index passed as an argument refers to + * the N'th joystick on the system. This index is the value which will + * identify this joystick in future joystick events. + * + * This function returns a joystick identifier, or NULL if an error occurred. + */ +extern DECLSPEC SDL_Joystick *SDL_JoystickOpen(int device_index); + +/* + * Returns 1 if the joystick has been opened, or 0 if it has not. + */ +extern DECLSPEC int SDL_JoystickOpened(int device_index); + +/* + * Get the device index of an opened joystick. + */ +extern DECLSPEC int SDL_JoystickIndex(SDL_Joystick *joystick); + +/* + * Get the number of general axis controls on a joystick + */ +extern DECLSPEC int SDL_JoystickNumAxes(SDL_Joystick *joystick); + +/* + * Get the number of trackballs on a joystick + * Joystick trackballs have only relative motion events associated + * with them and their state cannot be polled. + */ +extern DECLSPEC int SDL_JoystickNumBalls(SDL_Joystick *joystick); + +/* + * Get the number of POV hats on a joystick + */ +extern DECLSPEC int SDL_JoystickNumHats(SDL_Joystick *joystick); + +/* + * Get the number of buttons on a joystick + */ +extern DECLSPEC int SDL_JoystickNumButtons(SDL_Joystick *joystick); + +/* + * Update the current state of the open joysticks. + * This is called automatically by the event loop if any joystick + * events are enabled. + */ +extern DECLSPEC void SDL_JoystickUpdate(void); + +/* + * Enable/disable joystick event polling. + * If joystick events are disabled, you must call SDL_JoystickUpdate() + * yourself and check the state of the joystick when you want joystick + * information. + * The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE. + */ +extern DECLSPEC int SDL_JoystickEventState(int state); + +/* + * Get the current state of an axis control on a joystick + * The state is a value ranging from -32768 to 32767. + * The axis indices start at index 0. + */ +extern DECLSPEC Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis); + +/* + * Get the current state of a POV hat on a joystick + * The return value is one of the following positions: + */ +#define SDL_HAT_CENTERED 0x00 +#define SDL_HAT_UP 0x01 +#define SDL_HAT_RIGHT 0x02 +#define SDL_HAT_DOWN 0x04 +#define SDL_HAT_LEFT 0x08 +#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) +#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) +#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) +#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) +/* + * The hat indices start at index 0. + */ +extern DECLSPEC Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat); + +/* + * Get the ball axis change since the last poll + * This returns 0, or -1 if you passed it invalid parameters. + * The ball indices start at index 0. + */ +extern DECLSPEC int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy); + +/* + * Get the current state of a button on a joystick + * The button indices start at index 0. + */ +extern DECLSPEC Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button); + +/* + * Close a joystick previously opened with SDL_JoystickOpen() + */ +extern DECLSPEC void SDL_JoystickClose(SDL_Joystick *joystick); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_joystick_h */ diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h new file mode 100644 index 000000000..0d369ba74 --- /dev/null +++ b/include/SDL_keyboard.h @@ -0,0 +1,124 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL keyboard event handling */ + +#ifndef _SDL_keyboard_h +#define _SDL_keyboard_h + +#include "SDL_types.h" +#include "SDL_keysym.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Keysym structure + - The scancode is hardware dependent, and should not be used by general + applications. If no hardware scancode is available, it will be 0. + + - The 'unicode' translated character is only available when character + translation is enabled by the SDL_EnableUNICODE() API. If non-zero, + this is a UNICODE character corresponding to the keypress. If the + high 9 bits of the character are 0, then this maps to the equivalent + ASCII character: + char ch; + if ( (keysym.unicode & 0xFF80) == 0 ) { + ch = keysym.unicode & 0x7F; + } else { + An international character.. + } + */ +typedef struct { + Uint8 scancode; /* hardware specific scancode */ + SDLKey sym; /* SDL virtual keysym */ + SDLMod mod; /* current key modifiers */ + Uint16 unicode; /* translated character */ +} SDL_keysym; + +/* This is the mask which refers to all hotkey bindings */ +#define SDL_ALL_HOTKEYS 0xFFFFFFFF + +/* Function prototypes */ +/* + * Enable/Disable UNICODE translation of keyboard input. + * This translation has some overhead, so translation defaults off. + * If 'enable' is 1, translation is enabled. + * If 'enable' is 0, translation is disabled. + * If 'enable' is -1, the translation state is not changed. + * It returns the previous state of keyboard translation. + */ +extern DECLSPEC int SDL_EnableUNICODE(int enable); + +/* + * Enable/Disable keyboard repeat. Keyboard repeat defaults to off. + * 'delay' is the initial delay in ms between the time when a key is + * pressed, and keyboard repeat begins. + * 'interval' is the time in ms between keyboard repeat events. + */ +#define SDL_DEFAULT_REPEAT_DELAY 500 +#define SDL_DEFAULT_REPEAT_INTERVAL 30 +/* + * If 'delay' is set to 0, keyboard repeat is disabled. + */ +extern DECLSPEC int SDL_EnableKeyRepeat(int delay, int interval); + +/* + * Get a snapshot of the current state of the keyboard. + * Returns an array of keystates, indexed by the SDLK_* syms. + * Used: + * Uint8 *keystate = SDL_GetKeyState(NULL); + * if ( keystate[SDLK_RETURN] ) ... is pressed. + */ +extern DECLSPEC Uint8 * SDL_GetKeyState(int *numkeys); + +/* + * Get the current key modifier state + */ +extern DECLSPEC SDLMod SDL_GetModState(void); + +/* + * Set the current key modifier state + * This does not change the keyboard state, only the key modifier flags. + */ +extern DECLSPEC void SDL_SetModState(SDLMod modstate); + +/* + * Get the name of an SDL virtual keysym + */ +extern DECLSPEC char * SDL_GetKeyName(SDLKey key); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_keyboard_h */ diff --git a/include/SDL_keysym.h b/include/SDL_keysym.h new file mode 100644 index 000000000..ad9be2177 --- /dev/null +++ b/include/SDL_keysym.h @@ -0,0 +1,315 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_keysym_h +#define _SDL_keysym_h + +/* What we really want is a mapping of every raw key on the keyboard. + To support international keyboards, we use the range 0xA1 - 0xFF + as international virtual keycodes. We'll follow in the footsteps of X11... + The names of the keys + */ + +typedef enum { + /* The keyboard syms have been cleverly chosen to map to ASCII */ + SDLK_UNKNOWN = 0, + SDLK_FIRST = 0, + SDLK_BACKSPACE = 8, + SDLK_TAB = 9, + SDLK_CLEAR = 12, + SDLK_RETURN = 13, + SDLK_PAUSE = 19, + SDLK_ESCAPE = 27, + SDLK_SPACE = 32, + SDLK_EXCLAIM = 33, + SDLK_QUOTEDBL = 34, + SDLK_HASH = 35, + SDLK_DOLLAR = 36, + SDLK_AMPERSAND = 38, + SDLK_QUOTE = 39, + SDLK_LEFTPAREN = 40, + SDLK_RIGHTPAREN = 41, + SDLK_ASTERISK = 42, + SDLK_PLUS = 43, + SDLK_COMMA = 44, + SDLK_MINUS = 45, + SDLK_PERIOD = 46, + SDLK_SLASH = 47, + SDLK_0 = 48, + SDLK_1 = 49, + SDLK_2 = 50, + SDLK_3 = 51, + SDLK_4 = 52, + SDLK_5 = 53, + SDLK_6 = 54, + SDLK_7 = 55, + SDLK_8 = 56, + SDLK_9 = 57, + SDLK_COLON = 58, + SDLK_SEMICOLON = 59, + SDLK_LESS = 60, + SDLK_EQUALS = 61, + SDLK_GREATER = 62, + SDLK_QUESTION = 63, + SDLK_AT = 64, + /* + Skip uppercase letters + */ + SDLK_LEFTBRACKET = 91, + SDLK_BACKSLASH = 92, + SDLK_RIGHTBRACKET = 93, + SDLK_CARET = 94, + SDLK_UNDERSCORE = 95, + SDLK_BACKQUOTE = 96, + SDLK_a = 97, + SDLK_b = 98, + SDLK_c = 99, + SDLK_d = 100, + SDLK_e = 101, + SDLK_f = 102, + SDLK_g = 103, + SDLK_h = 104, + SDLK_i = 105, + SDLK_j = 106, + SDLK_k = 107, + SDLK_l = 108, + SDLK_m = 109, + SDLK_n = 110, + SDLK_o = 111, + SDLK_p = 112, + SDLK_q = 113, + SDLK_r = 114, + SDLK_s = 115, + SDLK_t = 116, + SDLK_u = 117, + SDLK_v = 118, + SDLK_w = 119, + SDLK_x = 120, + SDLK_y = 121, + SDLK_z = 122, + SDLK_DELETE = 127, + /* End of ASCII mapped keysyms */ + + /* International keyboard syms */ + SDLK_WORLD_0 = 160, /* 0xA0 */ + SDLK_WORLD_1 = 161, + SDLK_WORLD_2 = 162, + SDLK_WORLD_3 = 163, + SDLK_WORLD_4 = 164, + SDLK_WORLD_5 = 165, + SDLK_WORLD_6 = 166, + SDLK_WORLD_7 = 167, + SDLK_WORLD_8 = 168, + SDLK_WORLD_9 = 169, + SDLK_WORLD_10 = 170, + SDLK_WORLD_11 = 171, + SDLK_WORLD_12 = 172, + SDLK_WORLD_13 = 173, + SDLK_WORLD_14 = 174, + SDLK_WORLD_15 = 175, + SDLK_WORLD_16 = 176, + SDLK_WORLD_17 = 177, + SDLK_WORLD_18 = 178, + SDLK_WORLD_19 = 179, + SDLK_WORLD_20 = 180, + SDLK_WORLD_21 = 181, + SDLK_WORLD_22 = 182, + SDLK_WORLD_23 = 183, + SDLK_WORLD_24 = 184, + SDLK_WORLD_25 = 185, + SDLK_WORLD_26 = 186, + SDLK_WORLD_27 = 187, + SDLK_WORLD_28 = 188, + SDLK_WORLD_29 = 189, + SDLK_WORLD_30 = 190, + SDLK_WORLD_31 = 191, + SDLK_WORLD_32 = 192, + SDLK_WORLD_33 = 193, + SDLK_WORLD_34 = 194, + SDLK_WORLD_35 = 195, + SDLK_WORLD_36 = 196, + SDLK_WORLD_37 = 197, + SDLK_WORLD_38 = 198, + SDLK_WORLD_39 = 199, + SDLK_WORLD_40 = 200, + SDLK_WORLD_41 = 201, + SDLK_WORLD_42 = 202, + SDLK_WORLD_43 = 203, + SDLK_WORLD_44 = 204, + SDLK_WORLD_45 = 205, + SDLK_WORLD_46 = 206, + SDLK_WORLD_47 = 207, + SDLK_WORLD_48 = 208, + SDLK_WORLD_49 = 209, + SDLK_WORLD_50 = 210, + SDLK_WORLD_51 = 211, + SDLK_WORLD_52 = 212, + SDLK_WORLD_53 = 213, + SDLK_WORLD_54 = 214, + SDLK_WORLD_55 = 215, + SDLK_WORLD_56 = 216, + SDLK_WORLD_57 = 217, + SDLK_WORLD_58 = 218, + SDLK_WORLD_59 = 219, + SDLK_WORLD_60 = 220, + SDLK_WORLD_61 = 221, + SDLK_WORLD_62 = 222, + SDLK_WORLD_63 = 223, + SDLK_WORLD_64 = 224, + SDLK_WORLD_65 = 225, + SDLK_WORLD_66 = 226, + SDLK_WORLD_67 = 227, + SDLK_WORLD_68 = 228, + SDLK_WORLD_69 = 229, + SDLK_WORLD_70 = 230, + SDLK_WORLD_71 = 231, + SDLK_WORLD_72 = 232, + SDLK_WORLD_73 = 233, + SDLK_WORLD_74 = 234, + SDLK_WORLD_75 = 235, + SDLK_WORLD_76 = 236, + SDLK_WORLD_77 = 237, + SDLK_WORLD_78 = 238, + SDLK_WORLD_79 = 239, + SDLK_WORLD_80 = 240, + SDLK_WORLD_81 = 241, + SDLK_WORLD_82 = 242, + SDLK_WORLD_83 = 243, + SDLK_WORLD_84 = 244, + SDLK_WORLD_85 = 245, + SDLK_WORLD_86 = 246, + SDLK_WORLD_87 = 247, + SDLK_WORLD_88 = 248, + SDLK_WORLD_89 = 249, + SDLK_WORLD_90 = 250, + SDLK_WORLD_91 = 251, + SDLK_WORLD_92 = 252, + SDLK_WORLD_93 = 253, + SDLK_WORLD_94 = 254, + SDLK_WORLD_95 = 255, /* 0xFF */ + + /* Numeric keypad */ + SDLK_KP0 = 256, + SDLK_KP1 = 257, + SDLK_KP2 = 258, + SDLK_KP3 = 259, + SDLK_KP4 = 260, + SDLK_KP5 = 261, + SDLK_KP6 = 262, + SDLK_KP7 = 263, + SDLK_KP8 = 264, + SDLK_KP9 = 265, + SDLK_KP_PERIOD = 266, + SDLK_KP_DIVIDE = 267, + SDLK_KP_MULTIPLY = 268, + SDLK_KP_MINUS = 269, + SDLK_KP_PLUS = 270, + SDLK_KP_ENTER = 271, + SDLK_KP_EQUALS = 272, + + /* Arrows + Home/End pad */ + SDLK_UP = 273, + SDLK_DOWN = 274, + SDLK_RIGHT = 275, + SDLK_LEFT = 276, + SDLK_INSERT = 277, + SDLK_HOME = 278, + SDLK_END = 279, + SDLK_PAGEUP = 280, + SDLK_PAGEDOWN = 281, + + /* Function keys */ + SDLK_F1 = 282, + SDLK_F2 = 283, + SDLK_F3 = 284, + SDLK_F4 = 285, + SDLK_F5 = 286, + SDLK_F6 = 287, + SDLK_F7 = 288, + SDLK_F8 = 289, + SDLK_F9 = 290, + SDLK_F10 = 291, + SDLK_F11 = 292, + SDLK_F12 = 293, + SDLK_F13 = 294, + SDLK_F14 = 295, + SDLK_F15 = 296, + + /* Key state modifier keys */ + SDLK_NUMLOCK = 300, + SDLK_CAPSLOCK = 301, + SDLK_SCROLLOCK = 302, + SDLK_RSHIFT = 303, + SDLK_LSHIFT = 304, + SDLK_RCTRL = 305, + SDLK_LCTRL = 306, + SDLK_RALT = 307, + SDLK_LALT = 308, + SDLK_RMETA = 309, + SDLK_LMETA = 310, + SDLK_LSUPER = 311, /* Left "Windows" key */ + SDLK_RSUPER = 312, /* Right "Windows" key */ + SDLK_MODE = 313, /* "Alt Gr" key */ + SDLK_COMPOSE = 314, /* Multi-key compose key */ + + /* Miscellaneous function keys */ + SDLK_HELP = 315, + SDLK_PRINT = 316, + SDLK_SYSREQ = 317, + SDLK_BREAK = 318, + SDLK_MENU = 319, + SDLK_POWER = 320, /* Power Macintosh power key */ + SDLK_EURO = 321, /* Some european keyboards */ + + /* Add any other keys here */ + + SDLK_LAST +} SDLKey; + +/* Enumeration of valid key mods (possibly OR'd together) */ +typedef enum { + KMOD_NONE = 0x0000, + KMOD_LSHIFT= 0x0001, + KMOD_RSHIFT= 0x0002, + KMOD_LCTRL = 0x0040, + KMOD_RCTRL = 0x0080, + KMOD_LALT = 0x0100, + KMOD_RALT = 0x0200, + KMOD_LMETA = 0x0400, + KMOD_RMETA = 0x0800, + KMOD_NUM = 0x1000, + KMOD_CAPS = 0x2000, + KMOD_MODE = 0x4000, + KMOD_RESERVED = 0x8000 +} SDLMod; + +#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) +#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) +#define KMOD_ALT (KMOD_LALT|KMOD_RALT) +#define KMOD_META (KMOD_LMETA|KMOD_RMETA) + +#endif /* _SDL_keysym_h */ diff --git a/include/SDL_main.h b/include/SDL_main.h new file mode 100644 index 000000000..26d0d9c14 --- /dev/null +++ b/include/SDL_main.h @@ -0,0 +1,97 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_main_h +#define _SDL_main_h + +/* Redefine main() on Win32 and MacOS so that it is called by winmain.c */ + +#if defined(WIN32) || (defined(__MWERKS__) && !defined(__BEOS__)) || \ + defined(macintosh) + +#ifdef __cplusplus +#define C_LINKAGE "C" +#else +#define C_LINKAGE +#endif /* __cplusplus */ + +/* The application's main() function must be called with C linkage, + and should be declared like this: +#ifdef __cplusplus +extern "C" +#endif + int main(int argc, char *argv[]) + { + } + */ +#define main SDL_main + +/* The prototype for the application's main() function */ +extern C_LINKAGE int SDL_main(int argc, char *argv[]); + + +/* From the SDL library code -- needed for registering the app on Win32 */ +#if defined(WIN32) +#include "SDL_types.h" +#include "begin_code.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* This should be called from your WinMain() function, if any */ +extern DECLSPEC int SDL_RegisterApp(char *name, Uint32 style, void *hInst); + +#ifdef __cplusplus +} +#endif +#include "close_code.h" +#endif + +/* From the SDL library code -- needed for registering QuickDraw on MacOS */ +#if defined(macintosh) +#include "begin_code.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declaration so we don't need to include QuickDraw.h */ +struct QDGlobals; + +/* This should be called from your main() function, if any */ +extern DECLSPEC void SDL_InitQuickDraw(struct QDGlobals *the_qd); + +#ifdef __cplusplus +} +#endif +#include "close_code.h" +#endif + +#endif /* Need to redefine main()? */ + +#endif /* _SDL_main_h */ diff --git a/include/SDL_mouse.h b/include/SDL_mouse.h new file mode 100644 index 000000000..b694b5ba1 --- /dev/null +++ b/include/SDL_mouse.h @@ -0,0 +1,136 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL mouse event handling */ + +#ifndef _SDL_mouse_h +#define _SDL_mouse_h + +#include "SDL_types.h" +#include "SDL_video.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct WMcursor WMcursor; /* Implementation dependent */ +typedef struct { + SDL_Rect area; /* The area of the mouse cursor */ + Sint16 hot_x, hot_y; /* The "tip" of the cursor */ + Uint8 *data; /* B/W cursor data */ + Uint8 *mask; /* B/W cursor mask */ + Uint8 *save[2]; /* Place to save cursor area */ + WMcursor *wm_cursor; /* Window-manager cursor */ +} SDL_Cursor; + +/* Function prototypes */ +/* + * Retrieve the current state of the mouse. + * The current button state is returned as a button bitmask, which can + * be tested using the SDL_BUTTON(X) macros, and x and y are set to the + * current mouse cursor position. You can pass NULL for either x or y. + */ +extern DECLSPEC Uint8 SDL_GetMouseState(int *x, int *y); + +/* + * Retrieve the current state of the mouse. + * The current button state is returned as a button bitmask, which can + * be tested using the SDL_BUTTON(X) macros, and x and y are set to the + * mouse deltas since the last call to SDL_GetRelativeMouseState(). + */ +extern DECLSPEC Uint8 SDL_GetRelativeMouseState(int *x, int *y); + +/* + * Set the position of the mouse cursor (generates a mouse motion event) + */ +extern DECLSPEC void SDL_WarpMouse(Uint16 x, Uint16 y); + +/* + * Create a cursor using the specified data and mask (in MSB format). + * The cursor width must be a multiple of 8 bits. + * + * The cursor is created in black and white according to the following: + * data mask resulting pixel on screen + * 0 1 White + * 1 1 Black + * 0 0 Transparent + * 1 0 Inverted color if possible, black if not. + * + * Cursors created with this function must be freed with SDL_FreeCursor(). + */ +extern DECLSPEC SDL_Cursor *SDL_CreateCursor + (Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y); + +/* + * Set the currently active cursor to the specified one. + * If the cursor is currently visible, the change will be immediately + * represented on the display. + */ +extern DECLSPEC void SDL_SetCursor(SDL_Cursor *cursor); + +/* + * Returns the currently active cursor. + */ +extern DECLSPEC SDL_Cursor * SDL_GetCursor(void); + +/* + * Deallocates a cursor created with SDL_CreateCursor(). + */ +extern DECLSPEC void SDL_FreeCursor(SDL_Cursor *cursor); + +/* + * Toggle whether or not the cursor is shown on the screen. + * The cursor start off displayed, but can be turned off. + * SDL_ShowCursor() returns 1 if the cursor was being displayed + * before the call, or 0 if it was not. You can query the current + * state by passing a 'toggle' value of -1. + */ +extern DECLSPEC int SDL_ShowCursor(int toggle); + +/* Used as a mask when testing buttons in buttonstate + Button 1: Left mouse button + Button 2: Middle mouse button + Button 3: Right mouse button + */ +#define SDL_BUTTON(X) (SDL_PRESSED<<(X-1)) +#define SDL_BUTTON_LEFT 1 +#define SDL_BUTTON_MIDDLE 2 +#define SDL_BUTTON_RIGHT 3 +#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT) +#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE) +#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT) + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_mouse_h */ diff --git a/include/SDL_mutex.h b/include/SDL_mutex.h new file mode 100644 index 000000000..b6f330d73 --- /dev/null +++ b/include/SDL_mutex.h @@ -0,0 +1,163 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_mutex_h +#define _SDL_mutex_h + +/* Functions to provide thread synchronization primitives + + These are independent of the other SDL routines. +*/ + +#include "SDL_main.h" +#include "SDL_types.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Synchronization functions which can time out return this value + if they time out. +*/ +#define SDL_MUTEX_TIMEDOUT 1 + +/* This is the timeout value which corresponds to never time out */ +#define SDL_MUTEX_MAXWAIT (~(Uint32)0) + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* Mutex functions */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* The SDL mutex structure, defined in SDL_mutex.c */ +struct SDL_mutex; +typedef struct SDL_mutex SDL_mutex; + +/* Create a mutex, initialized unlocked */ +extern DECLSPEC SDL_mutex * SDL_CreateMutex(void); + +/* Lock the mutex (Returns 0, or -1 on error) */ +#define SDL_LockMutex(m) SDL_mutexP(m) +extern DECLSPEC int SDL_mutexP(SDL_mutex *mutex); + +/* Unlock the mutex (Returns 0, or -1 on error) */ +#define SDL_UnlockMutex(m) SDL_mutexV(m) +extern DECLSPEC int SDL_mutexV(SDL_mutex *mutex); + +/* Destroy a mutex */ +extern DECLSPEC void SDL_DestroyMutex(SDL_mutex *mutex); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* Semaphore functions */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* The SDL semaphore structure, defined in SDL_sem.c */ +struct SDL_semaphore; +typedef struct SDL_semaphore SDL_sem; + +/* Create a semaphore, initialized with value, returns NULL on failure. */ +extern DECLSPEC SDL_sem * SDL_CreateSemaphore(Uint32 initial_value); + +/* Destroy a semaphore */ +extern DECLSPEC void SDL_DestroySemaphore(SDL_sem *sem); + +/* This function suspends the calling thread until the semaphore pointed + * to by sem has a positive count. It then atomically decreases the semaphore + * count. + */ +extern DECLSPEC int SDL_SemWait(SDL_sem *sem); + +/* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds, + SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error. +*/ +extern DECLSPEC int SDL_SemTryWait(SDL_sem *sem); + +/* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if + the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in + the allotted time, and -1 on error. + On some platforms this function is implemented by looping with a delay + of 1 ms, and so should be avoided if possible. +*/ +extern DECLSPEC int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms); + +/* Atomically increases the semaphore's count (not blocking), returns 0, + or -1 on error. + */ +extern DECLSPEC int SDL_SemPost(SDL_sem *sem); + +/* Returns the current count of the semaphore */ +extern DECLSPEC Uint32 SDL_SemValue(SDL_sem *sem); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* Condition variable functions */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* The SDL condition variable structure, defined in SDL_cond.c */ +struct SDL_cond; +typedef struct SDL_cond SDL_cond; + +/* Create a condition variable */ +extern DECLSPEC SDL_cond * SDL_CreateCond(void); + +/* Destroy a condition variable */ +extern DECLSPEC void SDL_DestroyCond(SDL_cond *cond); + +/* Restart one of the threads that are waiting on the condition variable, + returns 0 or -1 on error. + */ +extern DECLSPEC int SDL_CondSignal(SDL_cond *cond); + +/* Restart all threads that are waiting on the condition variable, + returns 0 or -1 on error. + */ +extern DECLSPEC int SDL_CondBroadcast(SDL_cond *cond); + +/* Wait on the condition variable, unlocking the provided mutex. + The mutex must be locked before entering this function! + Returns 0 when it is signaled, or -1 on error. + */ +extern DECLSPEC int SDL_CondWait(SDL_cond *cond, SDL_mutex *mut); + +/* Waits for at most 'ms' milliseconds, and returns 0 if the condition + variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not + signaled in the allotted time, and -1 on error. + On some platforms this function is implemented by looping with a delay + of 1 ms, and so should be avoided if possible. +*/ +extern DECLSPEC int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_mutex_h */ diff --git a/include/SDL_quit.h b/include/SDL_quit.h new file mode 100644 index 000000000..ab012c252 --- /dev/null +++ b/include/SDL_quit.h @@ -0,0 +1,52 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL quit event handling */ + +#ifndef _SDL_quit_h +#define _SDL_quit_h + +/* + An SDL_QUITEVENT is generated when the user tries to close the application + window. If it is ignored or filtered out, the window will remain open. + If it is not ignored or filtered, it is queued normally and the window + is allowed to close. When the window is closed, screen updates will + complete, but have no effect. + + SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) + and SIGTERM (system termination request), if handlers do not already + exist, that generate SDL_QUITEVENT events as well. There is no way + to determine the cause of an SDL_QUITEVENT, but setting a signal + handler in your application will override the default generation of + quit events for that signal. +*/ + +/* There are no functions directly affecting the quit event */ +#define SDL_QuitRequested() \ + (SDL_PumpEvents(), SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUITMASK)) + +#endif /* _SDL_quit_h */ diff --git a/include/SDL_rwops.h b/include/SDL_rwops.h new file mode 100644 index 000000000..0e085a1ba --- /dev/null +++ b/include/SDL_rwops.h @@ -0,0 +1,113 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* This file provides a general interface for SDL to read and write + data sources. It can easily be extended to files, memory, etc. +*/ + +#ifndef _SDL_RWops_h +#define _SDL_RWops_h + +#include + +#include "SDL_types.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* This is the read/write operation structure -- very basic */ + +typedef struct SDL_RWops { + /* Seek to 'offset' relative to whence, one of stdio's whence values: + SEEK_SET, SEEK_CUR, SEEK_END + Returns the final offset in the data source. + */ + int (*seek)(struct SDL_RWops *context, int offset, int whence); + + /* Read up to 'num' objects each of size 'objsize' from the data + source to the area pointed at by 'ptr'. + Returns the number of objects read, or -1 if the read failed. + */ + int (*read)(struct SDL_RWops *context, void *ptr, int size, int maxnum); + + /* Write exactly 'num' objects each of size 'objsize' from the area + pointed at by 'ptr' to data source. + Returns 'num', or -1 if the write failed. + */ + int (*write)(struct SDL_RWops *context, const void *ptr, int size, int num); + + /* Close and free an allocated SDL_FSops structure */ + int (*close)(struct SDL_RWops *context); + + Uint32 type; + union { + struct { + int autoclose; + FILE *fp; + } stdio; + struct { + Uint8 *base; + Uint8 *here; + Uint8 *stop; + } mem; + struct { + void *data1; + } unknown; + } hidden; + +} SDL_RWops; + + +/* Functions to create SDL_RWops structures from various data sources */ + +extern DECLSPEC SDL_RWops * SDL_RWFromFile(const char *file, const char *mode); + +extern DECLSPEC SDL_RWops * SDL_RWFromFP(FILE *fp, int autoclose); + +extern DECLSPEC SDL_RWops * SDL_RWFromMem(void *mem, int size); + +extern DECLSPEC SDL_RWops * SDL_AllocRW(void); +extern DECLSPEC void SDL_FreeRW(SDL_RWops *area); + +/* Macros to easily read and write from an SDL_RWops structure */ +#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) +#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, SEEK_CUR) +#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) +#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) +#define SDL_RWclose(ctx) (ctx)->close(ctx) + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_RWops_h */ diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h new file mode 100644 index 000000000..a7c1c527e --- /dev/null +++ b/include/SDL_syswm.h @@ -0,0 +1,150 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Include file for SDL custom system window manager hooks */ + +#ifndef _SDL_syswm_h +#define _SDL_syswm_h + +#include "SDL_version.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Your application has access to a special type of event 'SDL_SYSWMEVENT', + which contains window-manager specific information and arrives whenever + an unhandled window event occurs. This event is ignored by default, but + you can enable it with SDL_EventState() +*/ +#ifdef SDL_PROTOTYPES_ONLY +struct SDL_SysWMinfo; +typedef struct SDL_SysWMinfo SDL_SysWMinfo; +#else + +/* This is the structure for custom window manager events */ +#if (defined(unix) || defined(__unix__) || defined(_AIX)) && \ + (!defined(DISABLE_X11) && !defined(__CYGWIN32__)) + /* AIX is unix, of course, but the native compiler CSet doesn't define unix */ +#include +#include + +/* These are the various supported subsystems under UNIX */ +typedef enum { + SDL_SYSWM_X11 +} SDL_SYSWM_TYPE; + +/* The UNIX custom event structure */ +struct SDL_SysWMmsg { + SDL_version version; + SDL_SYSWM_TYPE subsystem; + union { + XEvent xevent; + } event; +}; + +/* The UNIX custom window manager information structure. + When this structure is returned, it holds information about which + low level system it is using, and will be one of SDL_SYSWM_TYPE. + */ +typedef struct { + SDL_version version; + SDL_SYSWM_TYPE subsystem; + union { + struct { + Display *display; /* The X11 display */ + Window window; /* The X11 display window */ + /* These locking functions should be called around + any X11 functions using the display variable. + They lock the event thread, so should not be + called around event functions or from event filters. + */ + void (*lock_func)(void); + void (*unlock_func)(void); + + /* Introduced in SDL 1.0.2 */ + Window fswindow; /* The X11 fullscreen window */ + Window wmwindow; /* The X11 managed input window */ + } x11; + } info; +} SDL_SysWMinfo; + +#elif defined(WIN32) +#include + +/* The windows custom event structure */ +struct SDL_SysWMmsg { + SDL_version version; + HWND hwnd; /* The window for the message */ + UINT msg; /* The type of message */ + WPARAM wParam; /* WORD message parameter */ + LPARAM lParam; /* LONG message parameter */ +}; + +/* The windows custom window manager information structure */ +typedef struct { + SDL_version version; + HWND window; /* The Win32 display window */ +} SDL_SysWMinfo; + +#else + +/* The generic custom event structure */ +struct SDL_SysWMmsg { + SDL_version version; + int data; +}; + +/* The generic custom window manager information structure */ +typedef struct { + SDL_version version; + int data; +} SDL_SysWMinfo; + +#endif /* OS type */ + +#endif /* SDL_PROTOTYPES_ONLY */ + +/* Function prototypes */ +/* + * This function gives you custom hooks into the window manager information. + * It fills the structure pointed to by 'info' with custom information and + * returns 1 if the function is implemented. If it's not implemented, or + * the version member of the 'info' structure is invalid, it returns 0. + */ +extern DECLSPEC int SDL_GetWMInfo(SDL_SysWMinfo *info); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_syswm_h */ diff --git a/include/SDL_thread.h b/include/SDL_thread.h new file mode 100644 index 000000000..7f4643209 --- /dev/null +++ b/include/SDL_thread.h @@ -0,0 +1,79 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_thread_h +#define _SDL_thread_h + +/* Header for the SDL thread management routines + + These are independent of the other SDL routines. +*/ + +#include "SDL_main.h" +#include "SDL_types.h" + +/* Thread synchronization primitives */ +#include "SDL_mutex.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* The SDL thread structure, defined in SDL_thread.c */ +struct SDL_Thread; +typedef struct SDL_Thread SDL_Thread; + +/* Create a thread */ +extern DECLSPEC SDL_Thread * SDL_CreateThread(int (*fn)(void *), void *data); + +/* Get the 32-bit thread identifier for the current thread */ +extern DECLSPEC Uint32 SDL_ThreadID(void); + +/* Get the 32-bit thread identifier for the specified thread, + equivalent to SDL_ThreadID() if the specified thread is NULL. + */ +extern DECLSPEC Uint32 SDL_GetThreadID(SDL_Thread *thread); + +/* Wait for a thread to finish. + The return code for the thread function is placed in the area + pointed to by 'status', if 'status' is not NULL. + */ +extern DECLSPEC void SDL_WaitThread(SDL_Thread *thread, int *status); + +/* Forcefully kill a thread without worrying about its state */ +extern DECLSPEC void SDL_KillThread(SDL_Thread *thread); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_thread_h */ diff --git a/include/SDL_timer.h b/include/SDL_timer.h new file mode 100644 index 000000000..400edc26e --- /dev/null +++ b/include/SDL_timer.h @@ -0,0 +1,118 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_timer_h +#define _SDL_timer_h + +/* Header for the SDL time management routines */ + +#include "SDL_main.h" +#include "SDL_types.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* This is the OS scheduler timeslice, in milliseconds */ +#define SDL_TIMESLICE 10 + +/* This is the maximum resolution of the SDL timer on all platforms */ +#define TIMER_RESOLUTION 10 /* Experimentally determined */ + +/* Get the number of milliseconds since the SDL library initialization. + * Note that this value wraps if the program runs for more than ~49 days. + */ +extern DECLSPEC Uint32 SDL_GetTicks(void); + +/* Wait a specified number of milliseconds before returning */ +extern DECLSPEC void SDL_Delay(Uint32 ms); + +/* Function prototype for the timer callback function */ +typedef Uint32 (*SDL_TimerCallback)(Uint32 interval); + +/* Set a callback to run after the specified number of milliseconds has + * elapsed. The callback function is passed the current timer interval + * and returns the next timer interval. If the returned value is the + * same as the one passed in, the periodic alarm continues, otherwise a + * new alarm is scheduled. If the callback returns 0, the periodic alarm + * is cancelled. + * + * To cancel a currently running timer, call SDL_SetTimer(0, NULL); + * + * The timer callback function may run in a different thread than your + * main code, and so shouldn't call any functions from within itself. + * + * The maximum resolution of this timer is 10 ms, which means that if + * you request a 16 ms timer, your callback will run approximately 20 ms + * later on an unloaded system. If you wanted to set a flag signaling + * a frame update at 30 frames per second (every 33 ms), you might set a + * timer for 30 ms: + * SDL_SetTimer((33/10)*10, flag_update); + * + * If you use this function, you need to pass SDL_INIT_TIMER to SDL_Init(). + * + * Under UNIX, you should not use raise or use SIGALRM and this function + * in the same program, as it is implemented using setitimer(). You also + * should not use this function in multi-threaded applications as signals + * to multi-threaded apps have undefined behavior in some implementations. + */ +extern DECLSPEC int SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback); + +/* New timer API, supports multiple timers + * Written by Stephane Peter + */ + +/* Function prototype for the new timer callback function. + * The callback function is passed the current timer interval and returns + * the next timer interval. If the returned value is the same as the one + * passed in, the periodic alarm continues, otherwise a new alarm is + * scheduled. If the callback returns 0, the periodic alarm is cancelled. + */ +typedef Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param); + +/* Definition of the timer ID type */ +typedef struct _SDL_TimerID *SDL_TimerID; + +/* Add a new timer to the pool of timers already running. + Returns a timer ID, or NULL when an error occurs. + */ +extern DECLSPEC SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param); + +/* Remove one of the multiple timers knowing its ID. + * Returns a boolean value indicating success. + */ +extern DECLSPEC SDL_bool SDL_RemoveTimer(SDL_TimerID t); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_timer_h */ diff --git a/include/SDL_types.h b/include/SDL_types.h new file mode 100644 index 000000000..af0483a81 --- /dev/null +++ b/include/SDL_types.h @@ -0,0 +1,87 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* General data types used by the SDL library */ + +#ifndef _SDL_types_h +#define _SDL_types_h + +/* The number of elements in a table */ +#define SDL_TABLESIZE(table) (sizeof(table)/sizeof(table[0])) + +/* Basic data types */ +typedef enum { + SDL_FALSE = 0, + SDL_TRUE = 1 +} SDL_bool; +typedef unsigned char Uint8; +typedef signed char Sint8; +typedef unsigned short Uint16; +typedef signed short Sint16; +typedef unsigned int Uint32; +typedef signed int Sint32; + +/* Figure out how to support 64-bit datatypes */ +#if !defined(__STRICT_ANSI__) +#if defined(__GNUC__) || defined(__MWERKS__) /* MJS */ +#define SDL_HAS_64BIT_TYPE long long +#elif defined(_MSC_VER) /* VC++ */ +#define SDL_HAS_64BIT_TYPE __int64 +#endif +#endif /* !__STRICT_ANSI__ */ + +/* The 64-bit datatype isn't supported on all platforms */ +#ifdef SDL_HAS_64BIT_TYPE +typedef unsigned SDL_HAS_64BIT_TYPE Uint64; +typedef SDL_HAS_64BIT_TYPE Sint64; +#else +/* This is really just a hack to prevent the compiler from complaining */ +typedef struct { + Uint32 hi; + Uint32 lo; +} Uint64, Sint64; +#endif + +/* Make sure the types really have the right sizes */ +#define SDL_COMPILE_TIME_ASSERT(name, x) \ + typedef int SDL_dummy_ ## name[(x) * 2 - 1] + +SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); +SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); +SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); +SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); +SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); +SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); +SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); +SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); + +#undef SDL_COMPILE_TIME_ASSERT + +/* General keyboard/mouse state definitions */ +enum { SDL_PRESSED = 0x01, SDL_RELEASED = 0x00 }; + +#endif diff --git a/include/SDL_version.h b/include/SDL_version.h new file mode 100644 index 000000000..ce3ddcf14 --- /dev/null +++ b/include/SDL_version.h @@ -0,0 +1,90 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* This header defines the current SDL version */ + +#ifndef _SDL_version_h +#define _SDL_version_h + +#include "SDL_types.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL +*/ +#define SDL_MAJOR_VERSION 1 +#define SDL_MINOR_VERSION 2 +#define SDL_PATCHLEVEL 0 + +typedef struct { + Uint8 major; + Uint8 minor; + Uint8 patch; +} SDL_version; + +/* This macro can be used to fill a version structure with the compile-time + * version of the SDL library. + */ +#define SDL_VERSION(X) \ +{ \ + (X)->major = SDL_MAJOR_VERSION; \ + (X)->minor = SDL_MINOR_VERSION; \ + (X)->patch = SDL_PATCHLEVEL; \ +} + +/* This macro turns the version numbers into a numeric value: + (1,2,3) -> (1203) + This assumes that there will never be more than 100 patchlevels +*/ +#define SDL_VERSIONNUM(X, Y, Z) \ + (X)*1000 + (Y)*100 + (Z) + +/* This is the version number macro for the current SDL version */ +#define SDL_COMPILEDVERSION \ + SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) + +/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ +#define SDL_VERSION_ATLEAST(X, Y, Z) \ + (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) + +/* This function gets the version of the dynamically linked SDL library. + it should NOT be used to fill a version structure, instead you should + use the SDL_Version() macro. + */ +extern DECLSPEC const SDL_version * SDL_Linked_Version(void); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_version_h */ diff --git a/include/SDL_video.h b/include/SDL_video.h new file mode 100644 index 000000000..70cf4b6c1 --- /dev/null +++ b/include/SDL_video.h @@ -0,0 +1,887 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Header file for access to the SDL raw framebuffer window */ + +#ifndef _SDL_video_h +#define _SDL_video_h + +#include + +#include "SDL_types.h" +#include "SDL_mutex.h" +#include "SDL_rwops.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Transparency definitions: These define alpha as the opacity of a surface */ +#define SDL_ALPHA_OPAQUE 255 +#define SDL_ALPHA_TRANSPARENT 0 + +/* Useful data types */ +typedef struct { + Sint16 x, y; + Uint16 w, h; +} SDL_Rect; + +typedef struct { + Uint8 r; + Uint8 g; + Uint8 b; + Uint8 unused; +} SDL_Color; + +typedef struct { + int ncolors; + SDL_Color *colors; +} SDL_Palette; + +/* Everything in the pixel format structure is read-only */ +typedef struct SDL_PixelFormat { + SDL_Palette *palette; + Uint8 BitsPerPixel; + Uint8 BytesPerPixel; + Uint8 Rloss; + Uint8 Gloss; + Uint8 Bloss; + Uint8 Aloss; + Uint8 Rshift; + Uint8 Gshift; + Uint8 Bshift; + Uint8 Ashift; + Uint32 Rmask; + Uint32 Gmask; + Uint32 Bmask; + Uint32 Amask; + + /* RGB color key information */ + Uint32 colorkey; + /* Alpha value information (per-surface alpha) */ + Uint8 alpha; +} SDL_PixelFormat; + +/* typedef for private surface blitting functions */ +struct SDL_Surface; +typedef int (*SDL_blit)(struct SDL_Surface *src, SDL_Rect *srcrect, + struct SDL_Surface *dst, SDL_Rect *dstrect); + +/* This structure should be treated as read-only, except for 'pixels', + which, if not NULL, contains the raw pixel data for the surface. +*/ +typedef struct SDL_Surface { + Uint32 flags; /* Read-only */ + SDL_PixelFormat *format; /* Read-only */ + int w, h; /* Read-only */ + Uint16 pitch; /* Read-only */ + void *pixels; /* Read-write */ + int offset; /* Private */ + + /* Hardware-specific surface info */ + struct private_hwdata *hwdata; + + /* clipping information */ + SDL_Rect clip_rect; /* Read-only */ + Uint32 unused1; /* for binary compatibility */ + + /* Allow recursive locks */ + Uint32 locked; /* Private */ + + /* info for fast blit mapping to other surfaces */ + struct SDL_BlitMap *map; /* Private */ + + /* format version, bumped at every change to invalidate blit maps */ + unsigned int format_version; /* Private */ + + /* Reference count -- used when freeing surface */ + int refcount; /* Read-mostly */ +} SDL_Surface; + +/* These are the currently supported flags for the SDL_surface */ +/* Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() */ +#define SDL_SWSURFACE 0x00000000 /* Surface is in system memory */ +#define SDL_HWSURFACE 0x00000001 /* Surface is in video memory */ +#define SDL_ASYNCBLIT 0x00000004 /* Use asynchronous blits if possible */ +/* Available for SDL_SetVideoMode() */ +#define SDL_ANYFORMAT 0x10000000 /* Allow any video depth/pixel-format */ +#define SDL_HWPALETTE 0x20000000 /* Surface has exclusive palette */ +#define SDL_DOUBLEBUF 0x40000000 /* Set up double-buffered video mode */ +#define SDL_FULLSCREEN 0x80000000 /* Surface is a full screen display */ +#define SDL_OPENGL 0x00000002 /* Create an OpenGL rendering context */ +#define SDL_OPENGLBLIT 0x0000000A /* Create an OpenGL rendering context and use it for blitting */ +#define SDL_RESIZABLE 0x00000010 /* This video mode may be resized */ +#define SDL_NOFRAME 0x00000020 /* No window caption or edge frame */ +/* Used internally (read-only) */ +#define SDL_HWACCEL 0x00000100 /* Blit uses hardware acceleration */ +#define SDL_SRCCOLORKEY 0x00001000 /* Blit uses a source color key */ +#define SDL_RLEACCELOK 0x00002000 /* Private flag */ +#define SDL_RLEACCEL 0x00004000 /* Surface is RLE encoded */ +#define SDL_SRCALPHA 0x00010000 /* Blit uses source alpha blending */ +#define SDL_PREALLOC 0x01000000 /* Surface uses preallocated memory */ + +/* Evaluates to true if the surface needs to be locked before access */ +#define SDL_MUSTLOCK(surface) \ + (surface->offset || \ + ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0)) + + +/* Useful for determining the video hardware capabilities */ +typedef struct { + Uint32 hw_available :1; /* Flag: Can you create hardware surfaces? */ + Uint32 wm_available :1; /* Flag: Can you talk to a window manager? */ + Uint32 UnusedBits1 :6; + Uint32 UnusedBits2 :1; + Uint32 blit_hw :1; /* Flag: Accelerated blits HW --> HW */ + Uint32 blit_hw_CC :1; /* Flag: Accelerated blits with Colorkey */ + Uint32 blit_hw_A :1; /* Flag: Accelerated blits with Alpha */ + Uint32 blit_sw :1; /* Flag: Accelerated blits SW --> HW */ + Uint32 blit_sw_CC :1; /* Flag: Accelerated blits with Colorkey */ + Uint32 blit_sw_A :1; /* Flag: Accelerated blits with Alpha */ + Uint32 blit_fill :1; /* Flag: Accelerated color fill */ + Uint32 UnusedBits3 :16; + Uint32 video_mem; /* The total amount of video memory (in K) */ + SDL_PixelFormat *vfmt; /* Value: The format of the video surface */ +} SDL_VideoInfo; + + +/* The most common video overlay formats. + For an explanation of these pixel formats, see: + http://www.webartz.com/fourcc/indexyuv.htm + + For information on the relationship between color spaces, see: + http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html + */ +#define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */ +#define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */ +#define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */ +#define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */ +#define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */ + +/* The YUV hardware video overlay */ +typedef struct SDL_Overlay { + Uint32 format; /* Read-only */ + int w, h; /* Read-only */ + int planes; /* Read-only */ + Uint16 *pitches; /* Read-only */ + Uint8 **pixels; /* Read-write */ + + /* Hardware-specific surface info */ + struct private_yuvhwfuncs *hwfuncs; + struct private_yuvhwdata *hwdata; + + /* Special flags */ + Uint32 hw_overlay :1; /* Flag: This overlay hardware accelerated? */ + Uint32 UnusedBits :31; +} SDL_Overlay; + + +/* Public enumeration for setting the OpenGL window attributes. */ +typedef enum { + SDL_GL_RED_SIZE, + SDL_GL_GREEN_SIZE, + SDL_GL_BLUE_SIZE, + SDL_GL_ALPHA_SIZE, + SDL_GL_BUFFER_SIZE, + SDL_GL_DOUBLEBUFFER, + SDL_GL_DEPTH_SIZE, + SDL_GL_STENCIL_SIZE, + SDL_GL_ACCUM_RED_SIZE, + SDL_GL_ACCUM_GREEN_SIZE, + SDL_GL_ACCUM_BLUE_SIZE, + SDL_GL_ACCUM_ALPHA_SIZE +} SDL_GLattr; + +/* flags for SDL_SetPalette() */ +#define SDL_LOGPAL 0x01 +#define SDL_PHYSPAL 0x02 + +/* Function prototypes */ + +/* These functions are used internally, and should not be used unless you + * have a specific need to specify the video driver you want to use. + * You should normally use SDL_Init() or SDL_InitSubSystem(). + * + * SDL_VideoInit() initializes the video subsystem -- sets up a connection + * to the window manager, etc, and determines the current video mode and + * pixel format, but does not initialize a window or graphics mode. + * Note that event handling is activated by this routine. + * + * If you use both sound and video in your application, you need to call + * SDL_Init() before opening the sound device, otherwise under Win32 DirectX, + * you won't be able to set full-screen display modes. + */ +extern DECLSPEC int SDL_VideoInit(const char *driver_name, Uint32 flags); +extern DECLSPEC void SDL_VideoQuit(void); + +/* This function fills the given character buffer with the name of the + * video driver, and returns a pointer to it if the video driver has + * been initialized. It returns NULL if no driver has been initialized. + */ +extern DECLSPEC char *SDL_VideoDriverName(char *namebuf, int maxlen); + +/* + * This function returns a pointer to the current display surface. + * If SDL is doing format conversion on the display surface, this + * function returns the publicly visible surface, not the real video + * surface. + */ +extern DECLSPEC SDL_Surface * SDL_GetVideoSurface(void); + +/* + * This function returns a read-only pointer to information about the + * video hardware. If this is called before SDL_SetVideoMode(), the 'vfmt' + * member of the returned structure will contain the pixel format of the + * "best" video mode. + */ +extern DECLSPEC const SDL_VideoInfo * SDL_GetVideoInfo(void); + +/* + * Check to see if a particular video mode is supported. + * It returns 0 if the requested mode is not supported under any bit depth, + * or returns the bits-per-pixel of the closest available mode with the + * given width and height. If this bits-per-pixel is different from the + * one used when setting the video mode, SDL_SetVideoMode() will succeed, + * but will emulate the requested bits-per-pixel with a shadow surface. + * + * The arguments to SDL_VideoModeOK() are the same ones you would pass to + * SDL_SetVideoMode() + */ +extern DECLSPEC int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags); + +/* + * Return a pointer to an array of available screen dimensions for the + * given format and video flags, sorted largest to smallest. Returns + * NULL if there are no dimensions available for a particular format, + * or (SDL_Rect **)-1 if any dimension is okay for the given format. + * + * If 'format' is NULL, the mode list will be for the format given + * by SDL_GetVideoInfo()->vfmt + */ +extern DECLSPEC SDL_Rect ** SDL_ListModes(SDL_PixelFormat *format, Uint32 flags); + +/* + * Set up a video mode with the specified width, height and bits-per-pixel. + * + * If 'bpp' is 0, it is treated as the current display bits per pixel. + * + * If SDL_ANYFORMAT is set in 'flags', the SDL library will try to set the + * requested bits-per-pixel, but will return whatever video pixel format is + * available. The default is to emulate the requested pixel format if it + * is not natively available. + * + * If SDL_HWSURFACE is set in 'flags', the video surface will be placed in + * video memory, if possible, and you may have to call SDL_LockSurface() + * in order to access the raw framebuffer. Otherwise, the video surface + * will be created in system memory. + * + * If SDL_ASYNCBLIT is set in 'flags', SDL will try to perform rectangle + * updates asynchronously, but you must always lock before accessing pixels. + * SDL will wait for updates to complete before returning from the lock. + * + * If SDL_HWPALETTE is set in 'flags', the SDL library will guarantee + * that the colors set by SDL_SetColors() will be the colors you get. + * Otherwise, in 8-bit mode, SDL_SetColors() may not be able to set all + * of the colors exactly the way they are requested, and you should look + * at the video surface structure to determine the actual palette. + * If SDL cannot guarantee that the colors you request can be set, + * i.e. if the colormap is shared, then the video surface may be created + * under emulation in system memory, overriding the SDL_HWSURFACE flag. + * + * If SDL_FULLSCREEN is set in 'flags', the SDL library will try to set + * a fullscreen video mode. The default is to create a windowed mode + * if the current graphics system has a window manager. + * If the SDL library is able to set a fullscreen video mode, this flag + * will be set in the surface that is returned. + * + * If SDL_DOUBLEBUF is set in 'flags', the SDL library will try to set up + * two surfaces in video memory and swap between them when you call + * SDL_Flip(). This is usually slower than the normal single-buffering + * scheme, but prevents "tearing" artifacts caused by modifying video + * memory while the monitor is refreshing. It should only be used by + * applications that redraw the entire screen on every update. + * + * If SDL_RESIZABLE is set in 'flags', the SDL library will allow the + * window manager, if any, to resize the window at runtime. When this + * occurs, SDL will send a SDL_VIDEORESIZE event to you application, + * and you must respond to the event by re-calling SDL_SetVideoMode() + * with the requested size (or another size that suits the application). + * + * If SDL_NOFRAME is set in 'flags', the SDL library will create a window + * without any title bar or frame decoration. Fullscreen video modes have + * this flag set automatically. + * + * This function returns the video framebuffer surface, or NULL if it fails. + * + * If you rely on functionality provided by certain video flags, check the + * flags of the returned surface to make sure that functionality is available. + * SDL will fall back to reduced functionality if the exact flags you wanted + * are not available. + */ +extern DECLSPEC SDL_Surface *SDL_SetVideoMode + (int width, int height, int bpp, Uint32 flags); + +/* + * Makes sure the given list of rectangles is updated on the given screen. + * If 'x', 'y', 'w' and 'h' are all 0, SDL_UpdateRect will update the entire + * screen. + * These functions should not be called while 'screen' is locked. + */ +extern DECLSPEC void SDL_UpdateRects + (SDL_Surface *screen, int numrects, SDL_Rect *rects); +extern DECLSPEC void SDL_UpdateRect + (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h); + +/* + * On hardware that supports double-buffering, this function sets up a flip + * and returns. The hardware will wait for vertical retrace, and then swap + * video buffers before the next video surface blit or lock will return. + * On hardware that doesn not support double-buffering, this is equivalent + * to calling SDL_UpdateRect(screen, 0, 0, 0, 0); + * The SDL_DOUBLEBUF flag must have been passed to SDL_SetVideoMode() when + * setting the video mode for this function to perform hardware flipping. + * This function returns 0 if successful, or -1 if there was an error. + */ +extern DECLSPEC int SDL_Flip(SDL_Surface *screen); + +/* + * Set the gamma correction for each of the color channels. + * The gamma values range (approximately) between 0.1 and 10.0 + * + * If this function isn't supported directly by the hardware, it will + * be emulated using gamma ramps, if available. If successful, this + * function returns 0, otherwise it returns -1. + */ +extern DECLSPEC int SDL_SetGamma(float red, float green, float blue); + +/* + * Set the gamma translation table for the red, green, and blue channels + * of the video hardware. Each table is an array of 256 16-bit quantities, + * representing a mapping between the input and output for that channel. + * The input is the index into the array, and the output is the 16-bit + * gamma value at that index, scaled to the output color precision. + * + * You may pass NULL for any of the channels to leave it unchanged. + * If the call succeeds, it will return 0. If the display driver or + * hardware does not support gamma translation, or otherwise fails, + * this function will return -1. + */ +extern DECLSPEC int SDL_SetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue); + +/* + * Retrieve the current values of the gamma translation tables. + * + * You must pass in valid pointers to arrays of 256 16-bit quantities. + * Any of the pointers may be NULL to ignore that channel. + * If the call succeeds, it will return 0. If the display driver or + * hardware does not support gamma translation, or otherwise fails, + * this function will return -1. + */ +extern DECLSPEC int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue); + +/* + * Sets a portion of the colormap for the given 8-bit surface. If 'surface' + * is not a palettized surface, this function does nothing, returning 0. + * If all of the colors were set as passed to SDL_SetColors(), it will + * return 1. If not all the color entries were set exactly as given, + * it will return 0, and you should look at the surface palette to + * determine the actual color palette. + * + * When 'surface' is the surface associated with the current display, the + * display colormap will be updated with the requested colors. If + * SDL_HWPALETTE was set in SDL_SetVideoMode() flags, SDL_SetColors() + * will always return 1, and the palette is guaranteed to be set the way + * you desire, even if the window colormap has to be warped or run under + * emulation. + */ +extern DECLSPEC int SDL_SetColors(SDL_Surface *surface, + SDL_Color *colors, int firstcolor, int ncolors); + +/* + * Sets a portion of the colormap for a given 8-bit surface. + * 'flags' is one or both of: + * SDL_LOGPAL -- set logical palette, which controls how blits are mapped + * to/from the surface, + * SDL_PHYSPAL -- set physical palette, which controls how pixels look on + * the screen + * Only screens have physical palettes. Separate change of physical/logical + * palettes is only possible if the screen has SDL_HWPALETTE set. + * + * The return value is 1 if all colours could be set as requested, and 0 + * otherwise. + * + * SDL_SetColors() is equivalent to calling this function with + * flags = (SDL_LOGPAL|SDL_PHYSPAL). + */ +extern DECLSPEC int SDL_SetPalette(SDL_Surface *surface, int flags, + SDL_Color *colors, int firstcolor, + int ncolors); + +/* + * Maps an RGB triple to an opaque pixel value for a given pixel format + */ +extern DECLSPEC Uint32 SDL_MapRGB + (SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b); + +/* + * Maps an RGBA quadruple to a pixel value for a given pixel format + */ +extern DECLSPEC Uint32 SDL_MapRGBA(SDL_PixelFormat *format, + Uint8 r, Uint8 g, Uint8 b, Uint8 a); + +/* + * Maps a pixel value into the RGB components for a given pixel format + */ +extern DECLSPEC void SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt, + Uint8 *r, Uint8 *g, Uint8 *b); + +/* + * Maps a pixel value into the RGBA components for a given pixel format + */ +extern DECLSPEC void SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt, + Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a); + +/* + * Allocate and free an RGB surface (must be called after SDL_SetVideoMode) + * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. + * If the depth is greater than 8 bits, the pixel format is set using the + * flags '[RGB]mask'. + * If the function runs out of memory, it will return NULL. + * + * The 'flags' tell what kind of surface to create. + * SDL_SWSURFACE means that the surface should be created in system memory. + * SDL_HWSURFACE means that the surface should be created in video memory, + * with the same format as the display surface. This is useful for surfaces + * that will not change much, to take advantage of hardware acceleration + * when being blitted to the display surface. + * SDL_ASYNCBLIT means that SDL will try to perform asynchronous blits with + * this surface, but you must always lock it before accessing the pixels. + * SDL will wait for current blits to finish before returning from the lock. + * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits. + * If the hardware supports acceleration of colorkey blits between + * two surfaces in video memory, SDL will try to place the surface in + * video memory. If this isn't possible or if there is no hardware + * acceleration available, the surface will be placed in system memory. + * SDL_SRCALPHA means that the surface will be used for alpha blits and + * if the hardware supports hardware acceleration of alpha blits between + * two surfaces in video memory, to place the surface in video memory + * if possible, otherwise it will be placed in system memory. + * If the surface is created in video memory, blits will be _much_ faster, + * but the surface format must be identical to the video surface format, + * and the only way to access the pixels member of the surface is to use + * the SDL_LockSurface() and SDL_UnlockSurface() calls. + * If the requested surface actually resides in video memory, SDL_HWSURFACE + * will be set in the flags member of the returned surface. If for some + * reason the surface could not be placed in video memory, it will not have + * the SDL_HWSURFACE flag set, and will be created in system memory instead. + */ +#define SDL_AllocSurface SDL_CreateRGBSurface +extern DECLSPEC SDL_Surface *SDL_CreateRGBSurface + (Uint32 flags, int width, int height, int depth, + Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); +extern DECLSPEC SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, + int width, int height, int depth, int pitch, + Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); +extern DECLSPEC void SDL_FreeSurface(SDL_Surface *surface); + +/* + * SDL_LockSurface() sets up a surface for directly accessing the pixels. + * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write + * to and read from 'surface->pixels', using the pixel format stored in + * 'surface->format'. Once you are done accessing the surface, you should + * use SDL_UnlockSurface() to release it. + * + * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates + * to 0, then you can read and write to the surface at any time, and the + * pixel format of the surface will not change. In particular, if the + * SDL_HWSURFACE flag is not given when calling SDL_SetVideoMode(), you + * will not need to lock the display surface before accessing it. + * + * No operating system or library calls should be made between lock/unlock + * pairs, as critical system locks may be held during this time. + * + * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. + */ +extern DECLSPEC int SDL_LockSurface(SDL_Surface *surface); +extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface); + +/* + * Load a surface from a seekable SDL data source (memory or file.) + * If 'freesrc' is non-zero, the source will be closed after being read. + * Returns the new surface, or NULL if there was an error. + * The new surface should be freed with SDL_FreeSurface(). + */ +extern DECLSPEC SDL_Surface * SDL_LoadBMP_RW(SDL_RWops *src, int freesrc); + +/* Convenience macro -- load a surface from a file */ +#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) + +/* + * Save a surface to a seekable SDL data source (memory or file.) + * If 'freedst' is non-zero, the source will be closed after being written. + * Returns 0 if successful or -1 if there was an error. + */ +extern DECLSPEC int SDL_SaveBMP_RW + (SDL_Surface *surface, SDL_RWops *dst, int freedst); + +/* Convenience macro -- save a surface to a file */ +#define SDL_SaveBMP(surface, file) \ + SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) + +/* + * Sets the color key (transparent pixel) in a blittable surface. + * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL), + * 'key' will be the transparent pixel in the source image of a blit. + * SDL_RLEACCEL requests RLE acceleration for the surface if present, + * and removes RLE acceleration if absent. + * If 'flag' is 0, this function clears any current color key. + * This function returns 0, or -1 if there was an error. + */ +extern DECLSPEC int SDL_SetColorKey + (SDL_Surface *surface, Uint32 flag, Uint32 key); + +/* + * This function sets the alpha value for the entire surface, as opposed to + * using the alpha component of each pixel. This value measures the range + * of transparency of the surface, 0 being completely transparent to 255 + * being completely opaque. An 'alpha' value of 255 causes blits to be + * opaque, the source pixels copied to the destination (the default). Note + * that per-surface alpha can be combined with colorkey transparency. + * + * If 'flag' is 0, alpha blending is disabled for the surface. + * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface. + * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the + * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed. + */ +extern DECLSPEC int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha); + +/* + * Sets the clipping rectangle for the destination surface in a blit. + * + * If the clip rectangle is NULL, clipping will be disabled. + * If the clip rectangle doesn't intersect the surface, the function will + * return SDL_FALSE and blits will be completely clipped. Otherwise the + * function returns SDL_TRUE and blits to the surface will be clipped to + * the intersection of the surface area and the clipping rectangle. + * + * Note that blits are automatically clipped to the edges of the source + * and destination surfaces. + */ +extern DECLSPEC SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect); + +/* + * Gets the clipping rectangle for the destination surface in a blit. + * 'rect' must be a pointer to a valid rectangle which will be filled + * with the correct values. + */ +extern DECLSPEC void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect); + +/* + * Creates a new surface of the specified format, and then copies and maps + * the given surface to it so the blit of the converted surface will be as + * fast as possible. If this function fails, it returns NULL. + * + * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those + * semantics. You can also pass SDL_RLEACCEL in the flags parameter and + * SDL will try to RLE accelerate colorkey and alpha blits in the resulting + * surface. + * + * This function is used internally by SDL_DisplayFormat(). + */ +extern DECLSPEC SDL_Surface *SDL_ConvertSurface + (SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags); + +/* + * This performs a fast blit from the source surface to the destination + * surface. It assumes that the source and destination rectangles are + * the same size. If either 'srcrect' or 'dstrect' are NULL, the entire + * surface (src or dst) is copied. The final blit rectangles are saved + * in 'srcrect' and 'dstrect' after all clipping is performed. + * If the blit is successful, it returns 0, otherwise it returns -1. + * + * The blit function should not be called on a locked surface. + * + * The blit semantics for surfaces with and without alpha and colorkey + * are defined as follows: + * + * RGBA->RGB: + * SDL_SRCALPHA set: + * alpha-blend (using alpha-channel). + * SDL_SRCCOLORKEY ignored. + * SDL_SRCALPHA not set: + * copy RGB. + * if SDL_SRCCOLORKEY set, only copy the pixels matching the + * RGB values of the source colour key, ignoring alpha in the + * comparison. + * + * RGB->RGBA: + * SDL_SRCALPHA set: + * alpha-blend (using the source per-surface alpha value); + * set destination alpha to opaque. + * SDL_SRCALPHA not set: + * copy RGB, set destination alpha to opaque. + * both: + * if SDL_SRCCOLORKEY set, only copy the pixels matching the + * source colour key. + * + * RGBA->RGBA: + * SDL_SRCALPHA set: + * alpha-blend (using the source alpha channel) the RGB values; + * leave destination alpha untouched. [Note: is this correct?] + * SDL_SRCCOLORKEY ignored. + * SDL_SRCALPHA not set: + * copy all of RGBA to the destination. + * if SDL_SRCCOLORKEY set, only copy the pixels matching the + * RGB values of the source colour key, ignoring alpha in the + * comparison. + * + * RGB->RGB: + * SDL_SRCALPHA set: + * alpha-blend (using the source per-surface alpha value). + * SDL_SRCALPHA not set: + * copy RGB. + * both: + * if SDL_SRCCOLORKEY set, only copy the pixels matching the + * source colour key. + * + * If either of the surfaces were in video memory, and the blit returns -2, + * the video memory was lost, so it should be reloaded with artwork and + * re-blitted: + while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { + while ( SDL_LockSurface(image) < 0 ) + Sleep(10); + -- Write image pixels to image->pixels -- + SDL_UnlockSurface(image); + } + * This happens under DirectX 5.0 when the system switches away from your + * fullscreen application. The lock will also fail until you have access + * to the video memory again. + */ +/* You should call SDL_BlitSurface() unless you know exactly how SDL + blitting works internally and how to use the other blit functions. +*/ +#define SDL_BlitSurface SDL_UpperBlit + +/* This is the public blit function, SDL_BlitSurface(), and it performs + rectangle validation and clipping before passing it to SDL_LowerBlit() +*/ +extern DECLSPEC int SDL_UpperBlit + (SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect); +/* This is a semi-private blit function and it performs low-level surface + blitting only. +*/ +extern DECLSPEC int SDL_LowerBlit + (SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect); + +/* + * This function performs a fast fill of the given rectangle with 'color' + * The given rectangle is clipped to the destination surface clip area + * and the final fill rectangle is saved in the passed in pointer. + * If 'dstrect' is NULL, the whole surface will be filled with 'color' + * The color should be a pixel of the format used by the surface, and + * can be generated by the SDL_MapRGB() function. + * This function returns 0 on success, or -1 on error. + */ +extern DECLSPEC int SDL_FillRect + (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color); + +/* + * This function takes a surface and copies it to a new surface of the + * pixel format and colors of the video framebuffer, suitable for fast + * blitting onto the display surface. It calls SDL_ConvertSurface() + * + * If you want to take advantage of hardware colorkey or alpha blit + * acceleration, you should set the colorkey and alpha value before + * calling this function. + * + * If the conversion fails or runs out of memory, it returns NULL + */ +extern DECLSPEC SDL_Surface * SDL_DisplayFormat(SDL_Surface *surface); + +/* + * This function takes a surface and copies it to a new surface of the + * pixel format and colors of the video framebuffer (if possible), + * suitable for fast alpha blitting onto the display surface. + * The new surface will always have an alpha channel. + * + * If you want to take advantage of hardware colorkey or alpha blit + * acceleration, you should set the colorkey and alpha value before + * calling this function. + * + * If the conversion fails or runs out of memory, it returns NULL + */ +extern DECLSPEC SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *surface); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* YUV video surface overlay functions */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* This function creates a video output overlay + Calling the returned surface an overlay is something of a misnomer because + the contents of the display surface underneath the area where the overlay + is shown is undefined - it may be overwritten with the converted YUV data. +*/ +extern DECLSPEC SDL_Overlay *SDL_CreateYUVOverlay(int width, int height, + Uint32 format, SDL_Surface *display); + +/* Lock an overlay for direct access, and unlock it when you are done */ +extern DECLSPEC int SDL_LockYUVOverlay(SDL_Overlay *overlay); +extern DECLSPEC void SDL_UnlockYUVOverlay(SDL_Overlay *overlay); + +/* Blit a video overlay to the display surface. + The contents of the video surface underneath the blit destination are + not defined. + The width and height of the destination rectangle may be different from + that of the overlay, but currently only 2x scaling is supported. +*/ +extern DECLSPEC int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect); + +/* Free a video overlay */ +extern DECLSPEC void SDL_FreeYUVOverlay(SDL_Overlay *overlay); + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* OpenGL support functions. */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Dynamically load a GL driver, if SDL is built with dynamic GL. + * + * SDL links normally with the OpenGL library on your system by default, + * but you can compile it to dynamically load the GL driver at runtime. + * If you do this, you need to retrieve all of the GL functions used in + * your program from the dynamic library using SDL_GL_GetProcAddress(). + * + * This is disabled in default builds of SDL. + */ +extern DECLSPEC int SDL_GL_LoadLibrary(const char *path); + +/* + * Get the address of a GL function (for extension functions) + */ +extern DECLSPEC void *SDL_GL_GetProcAddress(const char* proc); + +/* + * Set an attribute of the OpenGL subsystem before intialization. + */ +extern DECLSPEC int SDL_GL_SetAttribute(SDL_GLattr attr, int value); + +/* + * Get an attribute of the OpenGL subsystem from the windowing + * interface, such as glX. This is of course different from getting + * the values from SDL's internal OpenGL subsystem, which only + * stores the values you request before initialization. + * + * Developers should track the values they pass into SDL_GL_SetAttribute + * themselves if they want to retrieve these values. + */ +extern DECLSPEC int SDL_GL_GetAttribute(SDL_GLattr attr, int* value); + +/* + * Swap the OpenGL buffers, if double-buffering is supported. + */ +extern DECLSPEC void SDL_GL_SwapBuffers(void); + +/* + * Internal functions that should not be called unless you have read + * and understood the source code for these functions. + */ +extern DECLSPEC void SDL_GL_UpdateRects(int numrects, SDL_Rect* rects); +extern DECLSPEC void SDL_GL_Lock(void); +extern DECLSPEC void SDL_GL_Unlock(void); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* These functions allow interaction with the window manager, if any. */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Sets/Gets the title and icon text of the display window + */ +extern DECLSPEC void SDL_WM_SetCaption(const char *title, const char *icon); +extern DECLSPEC void SDL_WM_GetCaption(char **title, char **icon); + +/* + * Sets the icon for the display window. + * This function must be called before the first call to SDL_SetVideoMode(). + * It takes an icon surface, and a mask in MSB format. + * If 'mask' is NULL, the entire icon surface will be used as the icon. + */ +extern DECLSPEC void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask); + +/* + * This function iconifies the window, and returns 1 if it succeeded. + * If the function succeeds, it generates an SDL_APPACTIVE loss event. + * This function is a noop and returns 0 in non-windowed environments. + */ +extern DECLSPEC int SDL_WM_IconifyWindow(void); + +/* + * Toggle fullscreen mode without changing the contents of the screen. + * If the display surface does not require locking before accessing + * the pixel information, then the memory pointers will not change. + * + * If this function was able to toggle fullscreen mode (change from + * running in a window to fullscreen, or vice-versa), it will return 1. + * If it is not implemented, or fails, it returns 0. + * + * The next call to SDL_SetVideoMode() will set the mode fullscreen + * attribute based on the flags parameter - if SDL_FULLSCREEN is not + * set, then the display will be windowed by default where supported. + * + * This is currently only implemented in the X11 video driver. + */ +extern DECLSPEC int SDL_WM_ToggleFullScreen(SDL_Surface *surface); + +/* + * This function allows you to set and query the input grab state of + * the application. It returns the new input grab state. + */ +typedef enum { + SDL_GRAB_QUERY = -1, + SDL_GRAB_OFF = 0, + SDL_GRAB_ON = 1, + SDL_GRAB_FULLSCREEN /* Used internally */ +} SDL_GrabMode; +/* + * Grabbing means that the mouse is confined to the application window, + * and nearly all keyboard input is passed directly to the application, + * and not interpreted by a window manager, if any. + */ +extern DECLSPEC SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_video_h */ diff --git a/include/begin_code.h b/include/begin_code.h new file mode 100644 index 000000000..307ce73d3 --- /dev/null +++ b/include/begin_code.h @@ -0,0 +1,86 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +/* This file sets things up for C dynamic library function definitions, + static inlined functions, and structures aligned at 4-byte alignment. + If you don't like ugly C preprocessor code, don't look at this file. :) +*/ + +/* This shouldn't be nested -- included it around code only. */ +#ifdef _begin_code_h +#error Nested inclusion of begin_code.h +#endif +#define _begin_code_h + +/* Some compilers use a special export keyword */ +#ifndef DECLSPEC +# ifdef __BEOS__ +# if defined(__GNUC__) +# define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC __declspec(export) +# endif +# else +# ifdef WIN32 +# define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC +# endif +# endif +#endif + +/* Force structure packing at 4 byte alignment. + This is necessary if the header is included in code which has structure + packing set to an alternate value, say for loading structures from disk. + The packing is reset to the previous value in close_code.h + */ +#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) +#ifdef _MSC_VER +#pragma warning(disable: 4103) +#endif +#ifdef __BORLANDC__ +#pragma nopackwarning +#endif +#pragma pack(push,4) +#endif /* Compiler needs structure packing set */ + +/* Set up compiler-specific options for inlining functions */ +#ifndef SDL_INLINE_OKAY +#ifdef __GNUC__ +#define SDL_INLINE_OKAY +#else +/* Add any special compiler-specific cases here */ +#if !defined(_MSC_VER) && !defined(__MRC__) && !defined(_SGI_SOURCE) +#define __inline__ inline +#define SDL_INLINE_OKAY +#endif /* Not a funky compiler */ +#endif /* GNU C */ +#endif /* SDL_INLINE_OKAY */ + +/* If inlining isn't supported, remove "__inline__", turning static + inlined functions into static functions (resulting in code bloat + in all files which include the offending header files) +*/ +#ifndef SDL_INLINE_OKAY +#define __inline__ +#endif + diff --git a/include/close_code.h b/include/close_code.h new file mode 100644 index 000000000..0a3044f00 --- /dev/null +++ b/include/close_code.h @@ -0,0 +1,36 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +/* This file reverses the effects of begin_code.h and should be included + after you finish any function and structure declarations in your headers +*/ + +#undef _begin_code_h + +/* Reset structure packing at previous byte alignment */ +#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) +#ifdef __BORLANDC__ +#pragma nopackwarning +#endif +#pragma pack(pop) +#endif /* Compiler needs structure packing set */ + diff --git a/install-sh b/install-sh new file mode 100755 index 000000000..e9de23842 --- /dev/null +++ b/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/ltconfig b/ltconfig new file mode 100755 index 000000000..3d69db82e --- /dev/null +++ b/ltconfig @@ -0,0 +1,3123 @@ +#! /bin/sh + +# ltconfig - Create a system-specific libtool. +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A lot of this script is taken from autoconf-2.10. + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} +echo=echo +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec "$SHELL" "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null`} + case X$UNAME in + *-DOS) PATH_SEPARATOR=';' ;; + *) PATH_SEPARATOR=':' ;; + esac +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string="`eval $cmd`") 2>/dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || + test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for dir in $PATH /usr/ucb; do + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running ltconfig again with it. + ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf "%s\n"' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + # Cool, printf works + : + elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && + test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && + test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# The name of this program. +progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` + +# Constants: +PROGRAM=ltconfig +PACKAGE=libtool +VERSION=1.3.5 +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +rm="rm -f" + +help="Try \`$progname --help' for more information." + +# Global variables: +default_ofile=libtool +can_build_shared=yes +enable_shared=yes +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +enable_static=yes +enable_fast_install=yes +enable_dlopen=unknown +enable_win32_dll=no +ltmain= +silent= +srcdir= +ac_config_guess= +ac_config_sub= +host= +nonopt= +ofile="$default_ofile" +verify_host=yes +with_gcc=no +with_gnu_ld=no +need_locks=yes +ac_ext=c +objext=o +libext=a +exeext= +cache_file= + +old_AR="$AR" +old_CC="$CC" +old_CFLAGS="$CFLAGS" +old_CPPFLAGS="$CPPFLAGS" +old_LDFLAGS="$LDFLAGS" +old_LD="$LD" +old_LN_S="$LN_S" +old_LIBS="$LIBS" +old_NM="$NM" +old_RANLIB="$RANLIB" +old_DLLTOOL="$DLLTOOL" +old_OBJDUMP="$OBJDUMP" +old_AS="$AS" + +# Parse the command line options. +args= +prev= +for option +do + case "$option" in + -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + eval "$prev=\$option" + prev= + continue + fi + + case "$option" in + --help) cat <&2 + echo "$help" 1>&2 + exit 1 + ;; + + *) + if test -z "$ltmain"; then + ltmain="$option" + elif test -z "$host"; then +# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 +# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then +# echo "$progname: warning \`$option' is not a valid host type" 1>&2 +# fi + host="$option" + else + echo "$progname: too many arguments" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac +done + +if test -z "$ltmain"; then + echo "$progname: you must specify a LTMAIN file" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +if test ! -f "$ltmain"; then + echo "$progname: \`$ltmain' does not exist" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +# Quote any args containing shell metacharacters. +ltconfig_args= +for arg +do + case "$arg" in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ltconfig_args="$ltconfig_args '$arg'" ;; + *) ltconfig_args="$ltconfig_args $arg" ;; + esac +done + +# A relevant subset of AC_INIT. + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 5 compiler messages saved in config.log +# 6 checking for... messages and results +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>>./config.log + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi + +if test -n "$cache_file" && test -r "$cache_file"; then + echo "loading cache $cache_file within ltconfig" + . $cache_file +fi + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + +if test -z "$srcdir"; then + # Assume the source directory is the same one as the path to LTMAIN. + srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` + test "$srcdir" = "$ltmain" && srcdir=. +fi + +trap "$rm conftest*; exit 1" 1 2 15 +if test "$verify_host" = yes; then + # Check for config.guess and config.sub. + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/config.guess; then + ac_aux_dir=$ac_dir + break + fi + done + if test -z "$ac_aux_dir"; then + echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 + echo "$help" 1>&2 + exit 1 + fi + ac_config_guess=$ac_aux_dir/config.guess + ac_config_sub=$ac_aux_dir/config.sub + + # Make sure we can run config.sub. + if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : + else + echo "$progname: cannot run $ac_config_sub" 1>&2 + echo "$help" 1>&2 + exit 1 + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 + + host_alias=$host + case "$host_alias" in + "") + if host_alias=`$SHELL $ac_config_guess`; then : + else + echo "$progname: cannot guess host type; you must specify one" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac + host=`$SHELL $ac_config_sub $host_alias` + echo "$ac_t$host" 1>&6 + + # Make sure the host verified. + test -z "$host" && exit 1 + +elif test -z "$host"; then + echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 + echo "$help" 1>&2 + exit 1 +else + host_alias=$host +fi + +# Transform linux* to *-*-linux-gnu*, to support old configure scripts. +case "$host_os" in +linux-gnu*) ;; +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` +esac + +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +case "$host_os" in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR cru $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +# Set a sane default for `AR'. +test -z "$AR" && AR=ar + +# Set a sane default for `OBJDUMP'. +test -z "$OBJDUMP" && OBJDUMP=objdump + +# If RANLIB is not set, then run the test. +if test "${RANLIB+set}" != "set"; then + result=no + + echo $ac_n "checking for ranlib... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then + RANLIB="ranlib" + result="ranlib" + break + fi + done + IFS="$save_ifs" + + echo "$ac_t$result" 1>&6 +fi + +if test -n "$RANLIB"; then + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" +fi + +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$AS" && AS=as + +# Check to see if we are using GCC. +if test "$with_gcc" != yes || test -z "$CC"; then + # If CC is not set, then try to find GCC or a usable CC. + if test -z "$CC"; then + echo $ac_n "checking for gcc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then + CC="gcc" + break + fi + done + IFS="$save_ifs" + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + fi + + # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". + if test -z "$CC"; then + echo $ac_n "checking for cc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + cc_rejected=no + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/cc || test -f $dir/cc$ac_exeext; then + if test "$dir/cc" = "/usr/ucb/cc"; then + cc_rejected=yes + continue + fi + CC="cc" + break + fi + done + IFS="$save_ifs" + if test $cc_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same name, so the bogon will be chosen + # first if we set CC to just the name; use the full file name. + shift + set dummy "$dir/cc" "$@" + shift + CC="$@" + fi + fi + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$CC"; then + echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 + exit 1 + fi + fi + + # Now see if the compiler is really GCC. + with_gcc=no + echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 + echo "$progname:581: checking whether we are using GNU C" >&5 + + $rm conftest.c + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + with_gcc=yes + fi + $rm conftest.c + echo "$ac_t$with_gcc" 1>&6 +fi + +# Allow CC to be a program name with arguments. +set dummy $CC +compiler="$2" + +echo $ac_n "checking for object suffix... $ac_c" 1>&6 +$rm conftest* +echo 'int i = 1;' > conftest.c +echo "$progname:603: checking for object suffix" >& 5 +if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 +fi +$rm conftest* +echo "$ac_t$objext" 1>&6 + +echo $ac_n "checking for executable suffix... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_exeext="no" + $rm conftest* + echo 'main () { return 0; }' > conftest.c + echo "$progname:629: checking for executable suffix" >& 5 + if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c | *.err | *.$objext ) ;; + *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; + esac + done + else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* +fi +if test "X$ac_cv_exeext" = Xno; then + exeext="" +else + exeext="$ac_cv_exeext" +fi +echo "$ac_t$ac_cv_exeext" 1>&6 + +echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 +pic_flag= +special_shlib_compile_flags= +wl= +link_static_flag= +no_builtin_flag= + +if test "$with_gcc" = yes; then + wl='-Wl,' + link_static_flag='-static' + + case "$host_os" in + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + aix*) + # Below there is a dirty hack to force normal static linking with -ldl + # The problem is because libdl dynamically linked with both libc and + # libC (AIX C++ library), which obviously doesn't included in libraries + # list by gcc. This cause undefined symbols with -static flags. + # This hack allows C programs to be linked with "-static -ldl", but + # we not sure about C++ programs. + link_static_flag="$link_static_flag ${wl}-lC" + ;; + cygwin* | mingw* | os2*) + # We can build DLLs from non-PIC. + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + pic_flag='-m68020 -resident32 -malways-restore-a4' + ;; + sysv4*MP*) + if test -d /usr/nec; then + pic_flag=-Kconform_pic + fi + ;; + *) + pic_flag='-fPIC' + ;; + esac +else + # PORTME Check for PIC flags for the system compiler. + case "$host_os" in + aix3* | aix4*) + # All AIX code is PIC. + link_static_flag='-bnso -bI:/lib/syscalls.exp' + ;; + + hpux9* | hpux10* | hpux11*) + # Is there a better link_static_flag that works with the bundled CC? + wl='-Wl,' + link_static_flag="${wl}-a ${wl}archive" + pic_flag='+Z' + ;; + + irix5* | irix6*) + wl='-Wl,' + link_static_flag='-non_shared' + # PIC (with -KPIC) is the default. + ;; + + cygwin* | mingw* | os2*) + # We can build DLLs from non-PIC. + ;; + + osf3* | osf4* | osf5*) + # All OSF/1 code is PIC. + wl='-Wl,' + link_static_flag='-non_shared' + ;; + + sco3.2v5*) + pic_flag='-Kpic' + link_static_flag='-dn' + special_shlib_compile_flags='-belf' + ;; + + solaris*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + sunos4*) + pic_flag='-PIC' + link_static_flag='-Bstatic' + wl='-Qoption ld ' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + uts4*) + pic_flag='-pic' + link_static_flag='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec ;then + pic_flag='-Kconform_pic' + link_static_flag='-Bstatic' + fi + ;; + *) + can_build_shared=no + ;; + esac +fi + +if test -n "$pic_flag"; then + echo "$ac_t$pic_flag" 1>&6 + + # Check to make sure the pic_flag actually works. + echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pic_flag -DPIC" + echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 + if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + case "$host_os" in + hpux9* | hpux10* | hpux11*) + # On HP-UX, both CC and GCC only warn that PIC is supported... then they + # create non-PIC objects. So, if there were any warnings, we assume that + # PIC is not supported. + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + can_build_shared=no + pic_flag= + else + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + fi + ;; + *) + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + ;; + esac + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + can_build_shared=no + pic_flag= + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + echo "$ac_t"none 1>&6 +fi + +# Check to see if options -o and -c are simultaneously supported by compiler +echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 +$rm -r conftest 2>/dev/null +mkdir conftest +cd conftest +$rm conftest* +echo "int some_variable = 0;" > conftest.c +mkdir out +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers +# that will create temporary files in the current directory regardless of +# the output directory. Thus, making CWD read-only will cause this test +# to fail, enabling locking or at least warning the user not to do parallel +# builds. +chmod -w . +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -o out/conftest2.o" +echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 +if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then + echo "$ac_t"no 1>&6 + compiler_c_o=no + else + echo "$ac_t"yes 1>&6 + compiler_c_o=yes + fi +else + # Append any errors to the config.log. + cat out/conftest.err 1>&5 + compiler_c_o=no + echo "$ac_t"no 1>&6 +fi +CFLAGS="$save_CFLAGS" +chmod u+w . +$rm conftest* out/* +rmdir out +cd .. +rmdir conftest +$rm -r conftest 2>/dev/null + +if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 +if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_o_lo=no + else + echo "$ac_t"yes 1>&6 + compiler_o_lo=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_o_lo=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + compiler_o_lo=no +fi + +# Check to see if we can do hard links to lock some files if needed +hard_links="nottested" +if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$ac_t$hard_links" 1>&6 + $rm conftest* + if test "$hard_links" = no; then + echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 + need_locks=warn + fi +else + need_locks=no +fi + +if test "$with_gcc" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" + echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_rtti_exceptions=no + else + echo "$ac_t"yes 1>&6 + compiler_rtti_exceptions=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_rtti_exceptions=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi + +fi + +# Check for any special shared library compilation flags. +if test -n "$special_shlib_compile_flags"; then + echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 + if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : + else + echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 + can_build_shared=no + fi +fi + +echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 +$rm conftest* +echo 'main(){return(0);}' > conftest.c +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $link_static_flag" +echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 +if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + echo "$ac_t$link_static_flag" 1>&6 +else + echo "$ac_t"none 1>&6 + link_static_flag= +fi +LDFLAGS="$save_LDFLAGS" +$rm conftest* + +if test -z "$LN_S"; then + # Check to see if we can use ln -s, or we need hard links. + echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 + $rm conftest.dat + if ln -s X conftest.dat 2>/dev/null; then + $rm conftest.dat + LN_S="ln -s" + else + LN_S=ln + fi + if test "$LN_S" = "ln -s"; then + echo "$ac_t"yes 1>&6 + else + echo "$ac_t"no 1>&6 + fi +fi + +# Make sure LD is an absolute path. +if test -z "$LD"; then + ac_prog=ld + if test "$with_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 + echo "$progname:991: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we are not using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld... $ac_c" 1>&6 + echo "$progname:1015: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 + echo "$progname:1018: checking for non-GNU ld" >&5 + fi + + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" + fi + + if test -n "$LD"; then + echo "$ac_t$LD" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$LD"; then + echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 + exit 1 + fi +fi + +# Check to see if it really is or is not GNU ld. +echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 +# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + with_gnu_ld=yes +else + with_gnu_ld=no +fi +echo "$ac_t$with_gnu_ld" 1>&6 + +# See if the linker supports building shared libraries. +echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 + +allow_undefined_flag= +no_undefined_flag= +need_lib_prefix=unknown +need_version=unknown +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +archive_cmds= +archive_expsym_cmds= +old_archive_from_new_cmds= +export_dynamic_flag_spec= +whole_archive_flag_spec= +thread_safe_flag_spec= +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no +hardcode_shlibpath_var=unsupported +runpath_var= +always_export_symbols=no +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' +# include_expsyms should be a list of space-separated symbols to be *always* +# included in the symbol list +include_expsyms= +# exclude_expsyms can be an egrep regular expression of symbols to exclude +# it will be wrapped by ` (' and `)$', so one must not match beginning or +# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', +# as well as any symbol that contains `d'. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out +# platforms (ab)use it in PIC code, but their linkers get confused if +# the symbol is explicitly referenced. Since portable code cannot +# rely on this symbol name, it's probably fine to never include it in +# preloaded symbol tables. + +case "$host_os" in +cygwin* | mingw*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$with_gcc" != yes; then + with_gnu_ld=no + fi + ;; + +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case "$host_os" in + aix3* | aix4*) + # On AIX, the GNU linker is very broken + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + #allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +# allow_undefined_flag=unsupported + always_export_symbols=yes + + # Extract the symbol export list from an `--export-all' def file, + # then regenerate the def file from the symbol export list, so that + # the compiled dll only exports the symbol export list. + # Be careful not to strip the DATA tag left by newer dlltools. + export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ + $DLLTOOL --exclude-symbols _DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' + + # If DATA tags from a recent dlltool are present, honour them! + archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \$# in + 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done~ + test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ + $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,_DllMain@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols _DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,_DllMain@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols _DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,_DllMain@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + : strip_is_broken_with_dlls_on_win95B - strip $lib' + + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' + # can we support soname and/or expsyms with a.out? -oliva + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + case $host_os in + cygwin* | mingw*) + # dlltool doesn't understand --whole-archive et. al. + whole_archive_flag_spec= + ;; + *) + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + ;; + esac + fi +else + # PORTME fill in a description of your system's linker (not GNU ld) + case "$host_os" in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$with_gcc" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4*) + hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' + hardcode_libdir_separator=':' + if test "$with_gcc" = yes; then + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + shared_flag='-shared' + else + shared_flag='${wl}-bM:SRE' + hardcode_direct=yes + fi + allow_undefined_flag=' ${wl}-berok' + archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' + archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' + case "$host_os" in aix4.[01]|aix4.[01].*) + # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on + always_export_symbols=yes ;; + esac + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + cygwin* | mingw*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' +# allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs' + fix_srcfile_path='`cygpath -w $srcfile`' + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9* | hpux10* | hpux11*) + case "$host_os" in + hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; + esac + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_minus_L=yes # Not in the search PATH, but as the default + # location of the library. + export_dynamic_flag_spec='${wl}-E' + ;; + + irix5* | irix6*) + if test "$with_gcc" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF + fi + hardcode_libdir_flag_spec='${wl}-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + openbsd*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' + ;; + + osf3*) + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # As osf3* with the addition of the -msym flag + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + rhapsody*) + archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flags_spec='-L$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case "$host_os" in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' + else + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $rpath/$soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + unixware7*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac +fi +echo "$ac_t$ld_shlibs" 1>&6 +test "$ld_shlibs" = no && can_build_shared=no + +if test -z "$NM"; then + echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 + case "$NM" in + [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -p" + break + else + NM=${NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$NM" && NM=nm + ;; + esac + echo "$ac_t$NM" 1>&6 +fi + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" + +# Define system-specific variables. +case "$host_os" in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" + ;; +irix*) + symcode='[BCDEGRST]' + ;; +solaris*) + symcode='[BDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + symcode='[ABCDGISTW]' +fi + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + $rm conftest* + cat > conftest.c <&5 + if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + # Now try to grab the symbols. + nlist=conftest.nm + if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.c +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' + + cat <> conftest.c +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c + cat <<\EOF >> conftest.c + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$objext conftstm.$objext + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$objext" + CFLAGS="$CFLAGS$no_builtin_flag" + if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + LIBS="$save_LIBS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + global_symbol_pipe= + fi +done +if test "$pipe_works" = yes; then + echo "${ac_t}ok" 1>&6 +else + echo "${ac_t}failed" 1>&6 +fi + +if test -z "$global_symbol_pipe"; then + global_symbol_to_cdecl= +fi + +# Check hardcoding attributes. +echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$hardcode_shlibpath_var" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$ac_t$hardcode_action" 1>&6 + + +reload_flag= +reload_cmds='$LD$reload_flag -o $output$reload_objs' +echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 +# PORTME Some linkers may need a different reload flag. +reload_flag='-r' +echo "$ac_t$reload_flag" 1>&6 +test -n "$reload_flag" && reload_flag=" $reload_flag" + +# PORTME Fill in your ld.so characteristics +library_names_spec= +libname_spec='lib$name' +soname_spec= +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +file_magic_cmd= +file_magic_test_file= +deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. +echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 +case "$host_os" in +aix3*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}.so$major' + ;; + +aix4*) + version_type=linux + # AIX has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + # We preserve .a as extension for shared libraries though AIX4.2 + # and later linker supports .so + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' + shlibpath_var=LIBPATH + deplibs_check_method=pass_all + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}.so' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + deplibs_check_method=pass_all + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + export_dynamic_flag_spec=-rdynamic + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw*) + version_type=windows + need_version=no + need_lib_prefix=no + if test "$with_gcc" = yes; then + library_names_spec='`echo ${libname} | sed -e 's/^lib//g'`.dll $libname.a' + else + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' + fi + dynamic_linker='Win32 ld.exe' + deplibs_check_method='file_magic file format pe-i386(.*architecture: i386)?' + file_magic_cmd='${OBJDUMP} -f' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + if test "$with_gcc" = yes; then + # See where the system libraries really are - /usr/lib won't cut it + libuser32=`$CC --print-file-name=libuser32.a` + win32libs=`expr $libuser32 : '\(.*\)/.*'` + sys_lib_search_path_spec="$sys_lib_search_path $win32libs" + fi + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case "$version_type" in + freebsd-elf*) + deplibs_check_method='pass_all' + + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + deplibs_check_method=unknown + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case "$host_os" in + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + dynamic_linker="$host_os dld.sl" + version_type=sunos + need_lib_prefix=no + need_version=no + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' + soname_spec='${libname}${release}.sl$major' + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + case "$host_os" in + hpux10.20*) + # TODO: Does this work for hpux-11 too? + # deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + deplibs_check_method="unknown" + file_magic_cmd=/usr/bin/file + file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6*) + version_type=irix + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}.so.$major' + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' + case "$host_os" in + irix5*) + libsuff= shlibsuff= + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in # libtool.m4 will add one of these switches to LD + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /lib${libsuff}/libc.so*` + deplibs_check_method='pass_all' + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + deplibs_check_method=pass_all + + if test -f /lib/ld.so.1; then + dynamic_linker='GNU ld.so' + else + # Only the GNU ld.so supports shared libraries on MkLinux. + case "$host_cpu" in + powerpc*) dynamic_linker=no ;; + *) dynamic_linker='Linux ld.so' ;; + esac + fi + ;; + +netbsd*) + version_type=sunos + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' + soname_spec='${libname}${release}.so$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + ;; + +openbsd*) + version_type=sunos + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + need_version=no + fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +os2*) + libname_spec='$name' + need_lib_prefix=no + library_names_spec='$libname.dll $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_version=no + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + shlibpath_var=LD_LIBRARY_PATH + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method='file_magic COFF format alpha shared library' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + deplibs_check_method='pass_all' + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rhapsody*) + version_type=sunos + library_names_spec='${libname}.so' + soname_spec='${libname}.so' + shlibpath_var=DYLD_LIBRARY_PATH + deplibs_check_method=pass_all + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" + file_magic_cmd=/usr/bin/file + file_magic_test_file=/lib/libc.so + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + case "$host_vendor" in + sequent) + file_magic_cmd='/bin/file' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + ncr) + deplibs_check_method='pass_all' + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' + soname_spec='$libname.so.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$ac_t$dynamic_linker" 1>&6 +test "$dynamic_linker" = no && can_build_shared=no + +# Report the final consequences. +echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 + +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in +# configure.in, otherwise build static only libraries. +case "$host_os" in +cygwin* | mingw* | os2*) + if test x$can_build_shared = xyes; then + test x$enable_win32_dll = xno && can_build_shared=no + echo "checking if package supports dlls... $can_build_shared" 1>&6 + fi +;; +esac + +if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac +fi + +echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + test "$enable_shared" = yes && enable_static=no + ;; +esac + +echo "$ac_t$enable_shared" 1>&6 + +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes + +echo "checking whether to build static libraries... $enable_static" 1>&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +echo $ac_n "checking for objdir... $ac_c" 1>&6 +rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs +fi +rmdir .libs 2>/dev/null +echo "$ac_t$objdir" 1>&6 + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else +if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then + lt_cv_dlopen=no lt_cv_dlopen_libs= +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "$progname:2248: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +echo "$progname:2288: checking for dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +echo "$progname:2335: checking for dld_link in -ldld" >&5 +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +echo "$progname:2375: checking for shl_load" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +shl_load(); +#endif + +; return 0; } +EOF +if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +echo "$progname:2423: checking for shl_load in -ldld" >&5 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + +fi + + +fi + +fi + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + fi + + case "$lt_cv_dlopen" in + dlopen) +for ac_hdr in dlfcn.h; do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "$progname:2488: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int fnord = 0; +EOF +ac_try="$ac_compile >/dev/null 2>conftest.out" +{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +done + + if test "x$ac_cv_header_dlfcn_h" = xyes; then + CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + fi + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +echo "$progname:2526: checking whether a program can dlopen itself" >&5 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self=cross + else + cat > conftest.c < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LTDL_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LTDL_GLOBAL DL_GLOBAL +# else +# define LTDL_GLOBAL 0 +# endif +#endif + +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LTDL_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LTDL_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LTDL_LAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LTDL_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LTDL_LAZY_OR_NOW DL_NOW +# else +# define LTDL_LAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +fnord() { int i=42;} +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + +EOF +if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + lt_cv_dlopen_self=yes +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 + + if test "$lt_cv_dlopen_self" = yes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self_static=cross + else + cat > conftest.c < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LTDL_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LTDL_GLOBAL DL_GLOBAL +# else +# define LTDL_GLOBAL 0 +# endif +#endif + +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LTDL_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LTDL_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LTDL_LAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LTDL_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LTDL_LAZY_OR_NOW DL_NOW +# else +# define LTDL_LAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +fnord() { int i=42;} +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + +EOF +if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + lt_cv_dlopen_self_static=yes +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self_static=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 +fi + ;; + esac + + case "$lt_cv_dlopen_self" in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case "$lt_cv_dlopen_self_static" in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + +# Copy echo and quote the copy, instead of the original, because it is +# used later. +ltecho="$echo" +if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ltecho="$CONFIG_SHELL \$0 --fallback-echo" +fi +LTSHELL="$SHELL" + +LTCONFIG_VERSION="$VERSION" + +# Only quote variables if we're using ltmain.sh. +case "$ltmain" in +*.sh) + # Now quote all the things that may contain metacharacters. + for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ + old_LD old_LDFLAGS old_LIBS \ + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ + AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ + reload_flag reload_cmds wl \ + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ + library_names_spec soname_spec \ + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ + file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ + hardcode_libdir_flag_spec hardcode_libdir_separator \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do + + case "$var" in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case "$ltecho" in + *'\$0 --fallback-echo"') + ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + + trap "$rm \"$ofile\"; exit 1" 1 2 15 + echo "creating $ofile" + $rm "$ofile" + cat < "$ofile" +#! $SHELL + +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. +# +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="sed -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +### BEGIN LIBTOOL CONFIG +EOF + cfgfile="$ofile" + ;; + +*) + # Double-quote the variables that need it (for aesthetics). + for var in old_CC old_CFLAGS old_CPPFLAGS \ + old_LD old_LDFLAGS old_LIBS \ + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do + eval "$var=\\\"\$var\\\"" + done + + # Just create a config file. + cfgfile="$ofile.cfg" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + echo "creating $cfgfile" + $rm "$cfgfile" + cat < "$cfgfile" +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +EOF + ;; +esac + +cat <> "$cfgfile" +# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ +# $0$ltconfig_args +# +# Compiler and other test output produced by $progname, useful for +# debugging $progname, is in ./config.log if it exists. + +# The version of $progname that generated this script. +LTCONFIG_VERSION=$LTCONFIG_VERSION + +# Shell to use when invoking shell scripts. +SHELL=$LTSHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$ltecho + +# The archiver. +AR=$AR + +# The default C compiler. +CC=$CC + +# The linker used to build libraries. +LD=$LD + +# Whether we need hard or soft links. +LN_S=$LN_S + +# A BSD-compatible nm program. +NM=$NM + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$reload_flag +reload_cmds=$reload_cmds + +# How to pass a linker flag through the compiler. +wl=$wl + +# Object file suffix (normally "o"). +objext="$objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$pic_flag + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$compiler_c_o + +# Can we write directly to a .lo ? +compiler_o_lo=$compiler_o_lo + +# Must we lock files when doing compilation ? +need_locks=$need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$link_static_flag + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$RANLIB +old_archive_cmds=$old_archive_cmds +old_postinstall_cmds=$old_postinstall_cmds +old_postuninstall_cmds=$old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$old_archive_from_new_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$archive_cmds +archive_expsym_cmds=$archive_expsym_cmds +postinstall_cmds=$postinstall_cmds +postuninstall_cmds=$postuninstall_cmds + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$global_symbol_to_cdecl + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$hardcode_libdir_separator + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$include_expsyms + +EOF + +case "$ltmain" in +*.sh) + echo '### END LIBTOOL CONFIG' >> "$ofile" + echo >> "$ofile" + case "$host_os" in + aix3*) + cat <<\EOF >> "$ofile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # Append the ltmain.sh script. + sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + + chmod +x "$ofile" + ;; + +*) + # Compile the libtool program. + echo "FIXME: would compile $ltmain" + ;; +esac + +test -n "$cache_file" || exit 0 + +# AC_CACHE_SAVE +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/ltmain.sh b/ltmain.sh new file mode 100644 index 000000000..e573215b7 --- /dev/null +++ b/ltmain.sh @@ -0,0 +1,4024 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun ltconfig. +# +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + echo "$modename: not configured to build any kind of library" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +# Parse our command line options once, thoroughly. +while test $# -gt 0 +do + arg="$1" + shift + + case "$arg" in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + execute_dlfiles) + eval "$prev=\"\$$prev \$arg\"" + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case "$arg" in + --help) + show_help=yes + ;; + + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + exit 0 + ;; + + --config) + sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 + exit 0 + ;; + + --debug) + echo "$progname: enabling shell trace mode" + set -x + ;; + + --dry-run | -n) + run=: + ;; + + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 +fi + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + case "$nonopt" in + *cc | *++ | gcc* | *-gcc*) + mode=link + for arg + do + case "$arg" in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case "$mode" in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + lastarg= + srcfile="$nonopt" + suppress_output= + + user_target=no + for arg + do + # Accept any command-line options. + case "$arg" in + -o) + if test "$user_target" != "no"; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit 1 + fi + user_target=next + ;; + + -static) + build_old_libs=yes + continue + ;; + esac + + case "$user_target" in + next) + # The next one is the -o target name + user_target=yes + continue + ;; + yes) + # We got the output file + user_target=set + libobj="$arg" + continue + ;; + esac + + # Accept the current argument as the source file. + lastarg="$srcfile" + srcfile="$arg" + + # Aesthetically quote the previous argument. + + # Backslashify any backslashes, double quotes, and dollar signs. + # These are the only characters that are still specially + # interpreted inside of double-quoted scrings. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly in scan + # sets, so we specify it separately. + case "$lastarg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + lastarg="\"$lastarg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + done + + case "$user_target" in + set) + ;; + no) + # Get the name of the library object. + libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + *) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit 1 + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSfmso]' + case "$libobj" in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case "$libobj" in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit 1 + ;; + esac + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $libobj" + else + removelist="$libobj" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit 1" 1 2 15 + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit 1" 1 2 15 + else + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until ln "$0" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + echo $srcfile > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + # All platforms use -DPIC, to notify preprocessed assembler code. + command="$base_compile $srcfile $pic_flag -DPIC" + if test "$build_old_libs" = yes; then + lo_libobj="$libobj" + dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$libobj"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + + if test -d "$dir"; then + $show "$rm $libobj" + $run $rm $libobj + else + $show "$mkdir $dir" + $run $mkdir $dir + status=$? + if test $status -ne 0 && test ! -d $dir; then + exit $status + fi + fi + fi + if test "$compiler_o_lo" = yes; then + output_obj="$libobj" + command="$command -o $output_obj" + elif test "$compiler_c_o" = yes; then + output_obj="$obj" + command="$command -o $output_obj" + fi + + $run $rm "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + test -n "$output_obj" && $run $rm $removelist + exit 1 + fi + + if test "$need_locks" = warn && + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then + echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed, then go on to compile the next one + if test x"$output_obj" != x"$libobj"; then + $show "$mv $output_obj $libobj" + if $run $mv $output_obj $libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # If we have no pic_flag, then copy the object into place and finish. + if test -z "$pic_flag" && test "$build_old_libs" = yes; then + # Rename the .lo from within objdir to obj + if test -f $obj; then + $show $rm $obj + $run $rm $obj + fi + + $show "$mv $libobj $obj" + if $run $mv $libobj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` + libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + # Now arrange that obj and lo_libobj become the same file + $show "(cd $xdir && $LN_S $baseobj $libobj)" + if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then + exit 0 + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Allow error messages only from the first compilation. + suppress_output=' >/dev/null 2>&1' + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + command="$base_compile $srcfile" + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + output_obj="$obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + $run $rm "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + $run $rm $removelist + exit 1 + fi + + if test "$need_locks" = warn && + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then + echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed + if test x"$output_obj" != x"$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Create an invalid libtool object if no PIC, so that we do not + # accidentally link it into a program. + if test "$build_libtool_libs" != yes; then + $show "echo timestamp > $libobj" + $run eval "echo timestamp > \$libobj" || exit $? + else + # Move the .lo from within objdir + $show "$mv $libobj $lo_libobj" + if $run $mv $libobj $lo_libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + fi + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + $rm "$lockfile" + fi + + exit 0 + ;; + + # libtool link mode + link) + modename="$modename: link" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invokation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + + # This is a source program that is used to create dlls on Windows + # Don't remove nor modify the starting and closing comments +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ + # This is a source program that is used to create import libraries + # on Windows for dlls which lack them. Don't remove nor modify the + # starting and closing comments +# /* impgen.c starts here */ +# /* Copyright (C) 1999 Free Software Foundation, Inc. +# +# This file is part of GNU libtool. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# */ +# +# #include /* for printf() */ +# #include /* for open(), lseek(), read() */ +# #include /* for O_RDONLY, O_BINARY */ +# #include /* for strdup() */ +# +# static unsigned int +# pe_get16 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[2]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 2); +# return b[0] + (b[1]<<8); +# } +# +# static unsigned int +# pe_get32 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[4]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 4); +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# static unsigned int +# pe_as32 (ptr) +# void *ptr; +# { +# unsigned char *b = ptr; +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# int +# main (argc, argv) +# int argc; +# char *argv[]; +# { +# int dll; +# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; +# unsigned long export_rva, export_size, nsections, secptr, expptr; +# unsigned long name_rvas, nexp; +# unsigned char *expdata, *erva; +# char *filename, *dll_name; +# +# filename = argv[1]; +# +# dll = open(filename, O_RDONLY|O_BINARY); +# if (!dll) +# return 1; +# +# dll_name = filename; +# +# for (i=0; filename[i]; i++) +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') +# dll_name = filename + i +1; +# +# pe_header_offset = pe_get32 (dll, 0x3c); +# opthdr_ofs = pe_header_offset + 4 + 20; +# num_entries = pe_get32 (dll, opthdr_ofs + 92); +# +# if (num_entries < 1) /* no exports */ +# return 1; +# +# export_rva = pe_get32 (dll, opthdr_ofs + 96); +# export_size = pe_get32 (dll, opthdr_ofs + 100); +# nsections = pe_get16 (dll, pe_header_offset + 4 +2); +# secptr = (pe_header_offset + 4 + 20 + +# pe_get16 (dll, pe_header_offset + 4 + 16)); +# +# expptr = 0; +# for (i = 0; i < nsections; i++) +# { +# char sname[8]; +# unsigned long secptr1 = secptr + 40 * i; +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); +# lseek(dll, secptr1, SEEK_SET); +# read(dll, sname, 8); +# if (vaddr <= export_rva && vaddr+vsize > export_rva) +# { +# expptr = fptr + (export_rva - vaddr); +# if (export_rva + export_size > vaddr + vsize) +# export_size = vsize - (export_rva - vaddr); +# break; +# } +# } +# +# expdata = (unsigned char*)malloc(export_size); +# lseek (dll, expptr, SEEK_SET); +# read (dll, expdata, export_size); +# erva = expdata - export_rva; +# +# nexp = pe_as32 (expdata+24); +# name_rvas = pe_as32 (expdata+32); +# +# printf ("EXPORTS\n"); +# for (i = 0; i&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + fi + build_libtool_libs=no + build_old_libs=yes + prefer_static_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test $# -gt 0; do + arg="$1" + shift + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case "$prev" in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case "$arg" in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit 1 + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case "$arg" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi + + prevarg="$arg" + + case "$arg" in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: not more than one -exported-symbols argument allowed" + exit 1 + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + absdir="$dir" + fi + dir="$absdir" + ;; + esac + case " $deplibs " in + *" $arg "*) ;; + *) deplibs="$deplibs $arg";; + esac + case " $lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir";; + esac + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + dllsearchdir=`cd "$dir" && pwd || echo "$dir"` + case ":$dllsearchpath:" in + ::) dllsearchpath="$dllsearchdir";; + *":$dllsearchdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dllsearchdir";; + esac + ;; + esac + ;; + + -l*) + if test "$arg" = "-lc"; then + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* |*-*-freebsd* ) + # These systems don't actually have c library (as such) + continue + ;; + esac + elif test "$arg" = "-lm"; then + case "$host" in + *-*-cygwin* | *-*-beos*) + # These systems don't actually have math library (as such) + continue + ;; + esac + fi + deplibs="$deplibs $arg" + ;; + + -module) + module=yes + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # If we have no pic_flag, then this is the same as -all-static. + if test -z "$pic_flag" && test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + + *.o | *.obj | *.a | *.lib) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A library object. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` + prev= + fi + libobjs="$libobjs $arg" + ;; + + *.la) + # A libtool-controlled library. + + dlname= + libdir= + library_names= + old_library= + + # Check to see that this really is a libtool archive. + if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 + exit 1 + fi + + # If the library was installed with an old release of libtool, + # it will not redefine variable installed. + installed=yes + + # Read the .la file + # If there is no directory component, then add one. + case "$arg" in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 + exit 1 + fi + + # Find the relevant object directory and library name. + name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` + + if test "X$installed" = Xyes; then + dir="$libdir" + else + dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$arg"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + fi + + if test -n "$dependency_libs"; then + # Extract -R and -L from dependency_libs + temp_deplibs= + for deplib in $dependency_libs; do + case "$deplib" in + -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + case " $rpath $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + -L*) case "$compile_command $temp_deplibs " in + *" $deplib "*) ;; + *) temp_deplibs="$temp_deplibs $deplib";; + esac + temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` + case " $lib_search_path " in + *" $temp_dir "*) ;; + *) lib_search_path="$lib_search_path $temp_dir";; + esac + ;; + *) temp_deplibs="$temp_deplibs $deplib";; + esac + done + dependency_libs="$temp_deplibs" + fi + + if test -z "$libdir"; then + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $dir/$old_library" + old_convenience="$old_convenience $dir/$old_library" + deplibs="$deplibs$dependency_libs" + compile_command="$compile_command $dir/$old_library$dependency_libs" + finalize_command="$finalize_command $dir/$old_library$dependency_libs" + continue + fi + + # This library was specified with -dlopen. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking statically, + # we need to preload. + prev=dlprefiles + else + # We should not create a dependency on this library, but we + # may need any libraries it requires. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + prev= + continue + fi + fi + + # The library was specified with -dlpreopen. + if test "$prev" = dlprefiles; then + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + dlprefiles="$dlprefiles $dir/$old_library" + else + dlprefiles="$dlprefiles $dir/$linklib" + fi + prev= + fi + + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + link_against_libtool_libs="$link_against_libtool_libs $arg" + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + + # We need an absolute path. + case "$dir" in + [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + absdir="$dir" + fi + ;; + esac + + # This is the magic to use -rpath. + # Skip directories that are in the system default run-time + # search path, unless they have been requested with -R. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + + lib_linked=yes + case "$hardcode_action" in + immediate | unsupported) + if test "$hardcode_direct" = no; then + compile_command="$compile_command $dir/$linklib" + deplibs="$deplibs $dir/$linklib" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + dllsearchdir=`cd "$dir" && pwd || echo "$dir"` + if test -n "$dllsearchpath"; then + dllsearchpath="$dllsearchpath:$dllsearchdir" + else + dllsearchpath="$dllsearchdir" + fi + ;; + esac + elif test "$hardcode_minus_L" = no; then + case "$host" in + *-*-sunos*) + compile_shlibpath="$compile_shlibpath$dir:" + ;; + esac + case "$compile_command " in + *" -L$dir "*) ;; + *) compile_command="$compile_command -L$dir";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -L$dir -l$name" + elif test "$hardcode_shlibpath_var" = no; then + case ":$compile_shlibpath:" in + *":$dir:"*) ;; + *) compile_shlibpath="$compile_shlibpath$dir:";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -l$name" + else + lib_linked=no + fi + ;; + + relink) + if test "$hardcode_direct" = yes; then + compile_command="$compile_command $absdir/$linklib" + deplibs="$deplibs $absdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + case "$compile_command " in + *" -L$absdir "*) ;; + *) compile_command="$compile_command -L$absdir";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -L$absdir -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case ":$compile_shlibpath:" in + *":$absdir:"*) ;; + *) compile_shlibpath="$compile_shlibpath$absdir:";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -l$name" + else + lib_linked=no + fi + ;; + + *) + lib_linked=no + ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + finalize_command="$finalize_command $libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + case "$finalize_command " in + *" -L$libdir "*) ;; + *) finalize_command="$finalize_command -L$libdir";; + esac + finalize_command="$finalize_command -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case ":$finalize_shlibpath:" in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:";; + esac + finalize_command="$finalize_command -l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + case "$finalize_command " in + *" -L$dir "*) ;; + *) finalize_command="$finalize_command -L$libdir";; + esac + finalize_command="$finalize_command -l$name" + fi + else + # Transform directly to old archives if we don't build new libraries. + if test -n "$pic_flag" && test -z "$old_library"; then + $echo "$modename: cannot find static library for \`$arg'" 1>&2 + exit 1 + fi + + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_command="$compile_command $dir/$linklib" + finalize_command="$finalize_command $dir/$linklib" + else + case "$compile_command " in + *" -L$dir "*) ;; + *) compile_command="$compile_command -L$dir";; + esac + compile_command="$compile_command -l$name" + case "$finalize_command " in + *" -L$dir "*) ;; + *) finalize_command="$finalize_command -L$dir";; + esac + finalize_command="$finalize_command -l$name" + fi + fi + + # Add in any libraries that this one depends upon. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + esac + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + case "$output" in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *.a | *.lib) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + ;; + + *.la) + # Make sure we only generate libraries of the form `libNAME.la'. + case "$outputname" in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + + if test -n "$objs"; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 + exit 1 + fi + + # How the heck are we supposed to write a wrapper for a shared library? + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 + exit 1 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test $# -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + libext=al + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + dependency_libs="$deplibs" + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + current="$2" + revision="$3" + age="$4" + + # Check that each of the things are valid numbers. + case "$current" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$revision" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$age" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test $age -gt $current; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case "$version_type" in + none) ;; + + irix) + major=`expr $current - $age + 1` + versuffix="$major.$revision" + verstring="sgi$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test $loop != 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="sgi$major.$iface:$verstring" + done + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test $loop != 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + windows) + # Like Linux, but with '-' rather than '.', since we only + # want one extension on Windows 95. + major=`expr $current - $age` + versuffix="-$major-$age-$revision" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + verstring="0.0" + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + dependency_libs="$deplibs" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | *-*-freebsd* ) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody*) + # rhapsody is a little odd... + deplibs="$deplibs -framework System" + ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" + ;; + esac + fi + + # Create the output directory, or remove our outputs if we need to. + if test -d $output_objdir; then + $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" + $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* + else + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test $status -ne 0 && test ! -d $output_objdir; then + exit $status + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + if test "$build_libtool_libs" = yes; then + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case "$deplibs_check_method" in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behaviour. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | sed 's/.* -> //'` + case "$potliblink" in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | sed 10q \ + | egrep "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + echo "*** Warning: This library needs some functionality provided by $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | + grep . >/dev/null; then + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + echo "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Get the real and link names of the library. + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + lib="$output_objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Ensure that we have .o objects for linkers which dislike .lo + # (e.g. aix) in case we are running --disable-static + for obj in $libobjs; do + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + if test ! -f $xdir/$oldobj; then + $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" + $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? + fi + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + eval cmds=\"$export_symbols_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test $status -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case "$xlib" in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linkopts="$linkopts $flag" + fi + + # Do each of the archive commands. + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + *.lo | *.o | *.obj) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case "$output" in + *.lo) + if test -n "$objs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test $status -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case "$xlib" in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + # Create the old-style object. + reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" + + output="$obj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + $show "echo timestamp > $libobj" + $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + else + # Just create a symlink. + $show $rm $libobj + $run $rm $libobj + xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$libobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + $show "(cd $xdir && $LN_S $oldobj $baseobj)" + $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + ;; + + # Anything else should be a program. + *) + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$compile_rpath " in + *" $libdir "*) ;; + *) compile_rpath="$compile_rpath $libdir" ;; + esac + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + + # Create the binary in the object directory, then wrap it. + if test ! -d $output_objdir; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test $status -ne 0 && test ! -d $output_objdir; then + exit $status + fi + fi + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case "$dlsyms" in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$output.exp" + $run $rm $export_symbols + $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + else + $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`echo "$arg" | sed -e 's%^.*/%%'` + $run eval 'echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{\ +" + + sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ + -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ + < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr_t) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case "$host" in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then + case "$0" in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`echo $output|sed 's,.exe$,,'` ;; + esac + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + link_against_libtool_libs='$link_against_libtool_libs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + echo >> $output "\ + program=lt-'$outputname' + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if (cd \"\$thisdir\" && eval \$relink_command); then : + else + $rm \"\$progdir/\$file\" + exit 1 + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # win32 systems need to use the prog path for dll + # lookup to work + *-*-cygwin*) + $echo >> $output "\ + exec \$progdir/\$program \${1+\"\$@\"} +" + ;; + + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \$progdir\\\\\$program \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + # Export the path to the program. + PATH=\"\$progdir:\$PATH\" + export PATH + + exec \$program \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test $status -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + # Add in members from convenience archives. + for xlib in $addlibs; do + # Extract the objects. + case "$xlib" in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` + done + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + # Ensure that we have .o objects in place in case we decided + # not to build a shared library, and have fallen back to building + # static libs even though --disable-static was passed! + for oldobj in $oldobjs; do + if test ! -f $oldobj; then + xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$oldobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` + obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + $show "(cd $xdir && ${LN_S} $obj $baseobj)" + $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? + fi + done + + eval cmds=\"$old_archive_cmds\" + fi + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case "$output" in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + if test -n "$xrpath"; then + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + done + dependency_libs="$temp_xrpath $dependency_libs" + fi + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + fi + $rm $output + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$dlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Directory that this library needs to be installed in: +libdir='$install_libdir'\ +" + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case "$arg" in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test $# -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case "$file" in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case "$file" in + *.a | *.lib) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$realname $destdir/$realname" + $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? + + if test $# -gt 0; then + # Delete the old symlinks, and create new ones. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case "$destfile" in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.o | *.obj) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + link_against_libtool_libs= + relink_command= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Check the variables that should have been set. + if test -z "$link_against_libtool_libs"; then + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $link_against_libtool_libs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case "$lib" in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir="$tmpdir/libtool-$$" + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 + continue + fi + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec $SHELL $0 --finish$current_libdirs + exit 1 + fi + + exit 0 + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + echo " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + echo "See any operating system documentation about shared libraries for" + echo "more information, such as the ld(1) and ld.so(8) manual pages." + echo "----------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case "$file" in + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case "$file" in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved enviroment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now actually exec the command. + eval "exec \$cmd$args" + + $echo "$modename: cannot exec \$cmd$args" + exit 1 + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool uninstall mode + uninstall) + modename="$modename: uninstall" + rm="$nonopt" + files= + + for arg + do + case "$arg" in + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + rmfiles="$file" + + case "$name" in + *.la) + # Possibly a libtool archive, so verify it. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $dir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" + + $show "$rm $rmfiles" + $run $rm $rmfiles + + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + # FIXME: should reinstall the best remaining shared library. + fi + ;; + + *.lo) + if test "$build_old_libs" = yes; then + oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` + rmfiles="$rmfiles $dir/$oldobj" + fi + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + + *) + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + esac + done + exit 0 + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 +fi # test -z "$show_help" + +# We need to display help for each of the modes. +case "$mode" in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --version print version information + +MODE must be one of the following: + + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE." + exit 0 + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; +esac + +echo +$echo "Try \`$modename --help' for more information about other modes." + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/missing b/missing new file mode 100755 index 000000000..7789652e8 --- /dev/null +++ b/missing @@ -0,0 +1,190 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 000000000..6b3b5fc5d --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id$ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/sdl-config.in b/sdl-config.in new file mode 100644 index 000000000..c163a29b3 --- /dev/null +++ b/sdl-config.in @@ -0,0 +1,65 @@ +#!/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +exec_prefix_set=no + +usage="\ +Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]" + +if test $# -eq 0; then + echo "${usage}" 1>&2 + exit 1 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + if test $exec_prefix_set = no ; then + exec_prefix=$optarg + fi + ;; + --prefix) + echo $prefix + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + ;; + --exec-prefix) + echo $exec_prefix + ;; + --version) + echo @SDL_VERSION@ + ;; + --cflags) + if test @includedir@ != /usr/include ; then + # Handle oddities in Win32 path handling (assumes prefix) + prefix=`echo ${prefix} | sed 's,^//\([A-Z]\),\1:,'` + + includes=-I@includedir@ + fi + echo $includes -I@includedir@/SDL @SDL_CFLAGS@ + ;; +@ENABLE_SHARED_TRUE@ --libs) +@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ @SDL_RLD_FLAGS@" +@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_LIBS@ +@ENABLE_SHARED_TRUE@ ;; +@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) +@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) +@ENABLE_STATIC_TRUE@ libdirs="-L@libdir@ @SDL_RLD_FLAGS@" +@ENABLE_STATIC_TRUE@ echo $libdirs @SDL_LIBS@ @SYSTEM_LIBS@ +@ENABLE_STATIC_TRUE@ ;; + *) + echo "${usage}" 1>&2 + exit 1 + ;; + esac + shift +done diff --git a/sdl.m4 b/sdl.m4 new file mode 100644 index 000000000..38d8b0f02 --- /dev/null +++ b/sdl.m4 @@ -0,0 +1,168 @@ +# Configure paths for SDL +# Sam Lantinga 9/21/99 +# stolen from Manish Singh +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS +dnl +AC_DEFUN(AM_PATH_SDL, +[dnl +dnl Get the cflags and libraries from the sdl-config script +dnl +AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], + sdl_prefix="$withval", sdl_prefix="") +AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], + sdl_exec_prefix="$withval", sdl_exec_prefix="") +AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], + , enable_sdltest=yes) + + if test x$sdl_exec_prefix != x ; then + sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_args="$sdl_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + AC_PATH_PROG(SDL_CONFIG, sdl-config, no) + min_sdl_version=ifelse([$1], ,0.11.0,$1) + AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" +dnl +dnl Now check if the installed SDL is sufficiently new. (Also sanity +dnl checks the results of sdl-config to some extent +dnl + rm -f conf.sdltest + AC_TRY_RUN([ +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + AC_TRY_LINK([ +#include +#include "SDL.h" +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(SDL_CFLAGS) + AC_SUBST(SDL_LIBS) + rm -f conf.sdltest +]) diff --git a/src/.cvsignore b/src/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 000000000..0a2ea0a29 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,41 @@ + +## Makefile.am for the main SDL library + +# These are the subdirectories that are always built +CORE_SUBDIRS = \ + main + +# These are the subdirectories which may be built +EXTRA_SUBDIRS = \ + audio video events joystick cdrom thread timer endian file hermes + +# These are the subdirectories which will be built now +SUBDIRS = $(CORE_SUBDIRS) @SDL_EXTRADIRS@ + +# These are the subdirectories which will be distributed with "make dist" +DIST_SUBDIRS = $(CORE_SUBDIRS) $(EXTRA_SUBDIRS) + +# The SDL library target +lib_LTLIBRARIES = libSDL.la + +libSDL_la_SOURCES = $(GENERAL_SRCS) +libSDL_la_LDFLAGS = \ + -release $(LT_RELEASE) \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +libSDL_la_LIBADD = \ + main/libarch.la \ + @SDL_EXTRALIBS@ \ + @SYSTEM_LIBS@ +libSDL_la_DEPENDENCIES = \ + main/libarch.la \ + @SDL_EXTRALIBS@ + +# The SDL library sources +GENERAL_SRCS = \ + SDL.c \ + SDL_error.c \ + SDL_error_c.h \ + SDL_fatal.c \ + SDL_fatal.h \ + SDL_getenv.c + diff --git a/src/SDL.c b/src/SDL.c new file mode 100644 index 000000000..5fc235d88 --- /dev/null +++ b/src/SDL.c @@ -0,0 +1,233 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Initialization code for SDL */ + +#include /* For getenv() */ + +#include "SDL.h" +#include "SDL_endian.h" +#include "SDL_fatal.h" +#ifndef DISABLE_VIDEO +#include "SDL_leaks.h" +#endif + +/* Initialization/Cleanup routines */ +#ifndef DISABLE_JOYSTICK +extern int SDL_JoystickInit(void); +extern void SDL_JoystickQuit(void); +#endif +#ifndef DISABLE_CDROM +extern int SDL_CDROMInit(void); +extern void SDL_CDROMQuit(void); +#endif +#ifndef DISABLE_TIMERS +extern void SDL_StartTicks(void); +extern int SDL_TimerInit(void); +extern void SDL_TimerQuit(void); +#endif + +/* The current SDL version */ +static SDL_version version = + { SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL }; + +/* The initialized subsystems */ +static Uint32 SDL_initialized = 0; +static Uint32 ticks_started = 0; + +#ifdef CHECK_LEAKS +int surfaces_allocated = 0; +#endif + +int SDL_InitSubSystem(Uint32 flags) +{ +#ifndef DISABLE_VIDEO + /* Initialize the video/event subsystem */ + if ( (flags & SDL_INIT_VIDEO) && !(SDL_initialized & SDL_INIT_VIDEO) ) { + if ( SDL_VideoInit(getenv("SDL_VIDEODRIVER"), + (flags&SDL_INIT_EVENTTHREAD)) < 0 ) { + return(-1); + } + SDL_initialized |= SDL_INIT_VIDEO; + } +#else + if ( flags & SDL_INIT_VIDEO ) { + SDL_SetError("SDL not built with video support"); + return(-1); + } +#endif + +#ifndef DISABLE_AUDIO + /* Initialize the audio subsystem */ + if ( (flags & SDL_INIT_AUDIO) && !(SDL_initialized & SDL_INIT_AUDIO) ) { + if ( SDL_AudioInit(getenv("SDL_AUDIODRIVER")) < 0 ) { + return(-1); + } + SDL_initialized |= SDL_INIT_AUDIO; + } +#else + if ( flags & SDL_INIT_AUDIO ) { + SDL_SetError("SDL not built with audio support"); + return(-1); + } +#endif + +#ifndef DISABLE_TIMERS + /* Initialize the timer subsystem */ + if ( ! ticks_started ) { + SDL_StartTicks(); + ticks_started = 1; + } + if ( (flags & SDL_INIT_TIMER) && !(SDL_initialized & SDL_INIT_TIMER) ) { + if ( SDL_TimerInit() < 0 ) { + return(-1); + } + SDL_initialized |= SDL_INIT_TIMER; + } +#else + if ( flags & SDL_INIT_TIMER ) { + SDL_SetError("SDL not built with timer support"); + return(-1); + } +#endif + +#ifndef DISABLE_JOYSTICK + /* Initialize the joystick subsystem */ + if ( (flags & SDL_INIT_JOYSTICK) && + !(SDL_initialized & SDL_INIT_JOYSTICK) ) { + if ( SDL_JoystickInit() < 0 ) { + return(-1); + } + SDL_initialized |= SDL_INIT_JOYSTICK; + } +#else + if ( flags & SDL_INIT_JOYSTICK ) { + SDL_SetError("SDL not built with joystick support"); + return(-1); + } +#endif + +#ifndef DISABLE_CDROM + /* Initialize the CD-ROM subsystem */ + if ( (flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM) ) { + if ( SDL_CDROMInit() < 0 ) { + return(-1); + } + SDL_initialized |= SDL_INIT_CDROM; + } +#else + if ( flags & SDL_INIT_CDROM ) { + SDL_SetError("SDL not built with cdrom support"); + return(-1); + } +#endif + return(0); +} + +int SDL_Init(Uint32 flags) +{ + /* Clear the error message */ + SDL_ClearError(); + + /* Initialize the desired subsystems */ + if ( SDL_InitSubSystem(flags) < 0 ) { + return(-1); + } + + /* Everything is initialized */ + if ( !(flags & SDL_INIT_NOPARACHUTE) ) { + SDL_InstallParachute(); + } + return(0); +} + +void SDL_QuitSubSystem(Uint32 flags) +{ + /* Shut down requested initialized subsystems */ +#ifndef DISABLE_CDROM + if ( (flags & SDL_initialized & SDL_INIT_CDROM) ) { + SDL_CDROMQuit(); + SDL_initialized &= ~SDL_INIT_CDROM; + } +#endif +#ifndef DISABLE_JOYSTICK + if ( (flags & SDL_initialized & SDL_INIT_JOYSTICK) ) { + SDL_JoystickQuit(); + SDL_initialized &= ~SDL_INIT_JOYSTICK; + } +#endif +#ifndef DISABLE_TIMERS + if ( (flags & SDL_initialized & SDL_INIT_TIMER) ) { + SDL_TimerQuit(); + SDL_initialized &= ~SDL_INIT_TIMER; + } +#endif +#ifndef DISABLE_AUDIO + if ( (flags & SDL_initialized & SDL_INIT_AUDIO) ) { + SDL_AudioQuit(); + SDL_initialized &= ~SDL_INIT_AUDIO; + } +#endif +#ifndef DISABLE_VIDEO + if ( (flags & SDL_initialized & SDL_INIT_VIDEO) ) { + SDL_VideoQuit(); + SDL_initialized &= ~SDL_INIT_VIDEO; + } +#endif +} + +Uint32 SDL_WasInit(Uint32 flags) +{ + if ( ! flags ) { + flags = SDL_INIT_EVERYTHING; + } + return (SDL_initialized&flags); +} + +void SDL_Quit(void) +{ + /* Quit all subsystems */ + SDL_QuitSubSystem(SDL_INIT_EVERYTHING); + +#ifdef CHECK_LEAKS + /* Print the number of surfaces not freed */ + if ( surfaces_allocated != 0 ) { + fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n", + surfaces_allocated); + } +#endif + + /* Uninstall any parachute signal handlers */ + SDL_UninstallParachute(); +} + +/* Return the library version number */ +const SDL_version * SDL_Linked_Version(void) +{ + return(&version); +} + diff --git a/src/SDL_error.c b/src/SDL_error.c new file mode 100644 index 000000000..6b14071ab --- /dev/null +++ b/src/SDL_error.c @@ -0,0 +1,340 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Simple error handling in SDL */ + +#include +#include +#include +#include + +#include "SDL_types.h" +#include "SDL_getenv.h" +#include "SDL_error.h" +#include "SDL_error_c.h" +#ifndef DISABLE_THREADS +#include "SDL_thread_c.h" +#endif + +#ifdef DISABLE_THREADS +/* The default (non-thread-safe) global error variable */ +static SDL_error SDL_global_error; + +#define SDL_GetErrBuf() (&SDL_global_error) +#endif /* DISABLE_THREADS */ + +#define SDL_ERRBUFIZE 1024 + +/* Private functions */ + +static void SDL_LookupString(const Uint8 *key, Uint16 *buf, int buflen) +{ + /* FIXME: Add code to lookup key in language string hash-table */ + + /* Key not found in language string hash-table */ + while ( *key && (--buflen > 0) ) { + *buf++ = *key++; + } + *buf = 0; /* NULL terminate string */ +} + +/* Public functions */ + +void SDL_SetError (const char *fmt, ...) +{ + va_list ap; + SDL_error *error; + + /* Copy in the key, mark error as valid */ + error = SDL_GetErrBuf(); + error->error = 1; + strncpy((char *)error->key, fmt, sizeof(error->key)); + error->key[sizeof(error->key)-1] = '\0'; + + va_start(ap, fmt); + error->argc = 0; + while ( *fmt ) { + if ( *fmt++ == '%' ) { + switch (*fmt++) { + case 0: /* Malformed format string.. */ + --fmt; + break; +#if 0 /* What is a character anyway? (UNICODE issues) */ + case 'c': + error->args[error->argc++].value_c = + va_arg(ap, unsigned char); + break; +#endif + case 'd': + error->args[error->argc++].value_i = + va_arg(ap, int); + break; + case 'f': + error->args[error->argc++].value_f = + va_arg(ap, double); + break; + case 'p': + error->args[error->argc++].value_ptr = + va_arg(ap, void *); + break; + case 's': + { + int index = error->argc; + strncpy((char *)error->args[index].buf, + va_arg(ap, char *), ERR_MAX_STRLEN); + error->args[index].buf[ERR_MAX_STRLEN-1] = 0; + error->argc++; + } + break; + default: + break; + } + if ( error->argc >= ERR_MAX_ARGS ) { + break; + } + } + } + va_end(ap); + + /* If we are in debug mode, print out an error message */ +#ifdef DEBUG_ERROR + fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError()); +#else + if ( getenv("SDL_DEBUG") ) { + fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError()); + } +#endif +} + +/* Print out an integer value to a UNICODE buffer */ +static int PrintInt(Uint16 *str, unsigned int maxlen, int value) +{ + char tmp[128]; + int len, i; + + sprintf(tmp, "%d", value); + len = 0; + if ( strlen(tmp) < maxlen ) { + for ( i=0; tmp[i]; ++i ) { + *str++ = tmp[i]; + ++len; + } + } + return(len); +} +/* Print out a double value to a UNICODE buffer */ +static int PrintDouble(Uint16 *str, unsigned int maxlen, double value) +{ + char tmp[128]; + int len, i; + + sprintf(tmp, "%f", value); + len = 0; + if ( strlen(tmp) < maxlen ) { + for ( i=0; tmp[i]; ++i ) { + *str++ = tmp[i]; + ++len; + } + } + return(len); +} +/* Print out a pointer value to a UNICODE buffer */ +static int PrintPointer(Uint16 *str, unsigned int maxlen, void *value) +{ + char tmp[128]; + int len, i; + + sprintf(tmp, "%p", value); + len = 0; + if ( strlen(tmp) < maxlen ) { + for ( i=0; tmp[i]; ++i ) { + *str++ = tmp[i]; + ++len; + } + } + return(len); +} + +/* This function has a bit more overhead than most error functions + so that it supports internationalization and thread-safe errors. +*/ +Uint16 *SDL_GetErrorMsgUNICODE(Uint16 *errstr, unsigned int maxlen) +{ + SDL_error *error; + + /* Clear the error string */ + *errstr = 0; --maxlen; + + /* Get the thread-safe error, and print it out */ + error = SDL_GetErrBuf(); + if ( error->error ) { + Uint16 translated[ERR_MAX_STRLEN], *fmt, *msg; + int len; + int argi; + + /* Print out the UNICODE error message */ + SDL_LookupString(error->key, translated, sizeof(translated)); + msg = errstr; + argi = 0; + for ( fmt=translated; *fmt && (maxlen > 0); ) { + if ( *fmt == '%' ) { + switch (fmt[1]) { + case 'S': /* Special SKIP operand */ + argi += (fmt[2] - '0'); + ++fmt; + break; + case '%': + *msg++ = '%'; + maxlen -= 1; + break; +#if 0 /* What is a character anyway? (UNICODE issues) */ + case 'c': + *msg++ = (unsigned char) + error->args[argi++].value_c; + maxlen -= 1; + break; +#endif + case 'd': + len = PrintInt(msg, maxlen, + error->args[argi++].value_i); + msg += len; + maxlen -= len; + break; + case 'f': + len = PrintDouble(msg, maxlen, + error->args[argi++].value_f); + msg += len; + maxlen -= len; + break; + case 'p': + len = PrintPointer(msg, maxlen, + error->args[argi++].value_ptr); + msg += len; + maxlen -= len; + break; + case 's': /* UNICODE string */ + { Uint16 buf[ERR_MAX_STRLEN], *str; + SDL_LookupString(error->args[argi++].buf, buf, sizeof(buf)); + str = buf; + while ( *str && (maxlen > 0) ) { + *msg++ = *str++; + maxlen -= 1; + } + } + break; + } + fmt += 2; + } else { + *msg++ = *fmt++; + maxlen -= 1; + } + } + *msg = 0; /* NULL terminate the string */ + } + return(errstr); +} + +Uint8 *SDL_GetErrorMsg(Uint8 *errstr, unsigned int maxlen) +{ + Uint16 *errstr16; + unsigned int i; + + /* Allocate the UNICODE buffer */ + errstr16 = (Uint16 *)malloc(maxlen * (sizeof *errstr16)); + if ( ! errstr16 ) { + strncpy((char *)errstr, "Out of memory", maxlen); + errstr[maxlen-1] = '\0'; + return(errstr); + } + + /* Get the error message */ + SDL_GetErrorMsgUNICODE(errstr16, maxlen); + + /* Convert from UNICODE to Latin1 encoding */ + for ( i=0; ierror = 0; +} + +/* Very common errors go here */ +void SDL_Error(SDL_errorcode code) +{ + switch (code) { + case SDL_ENOMEM: + SDL_SetError("Out of memory"); + break; + case SDL_EFREAD: + SDL_SetError("Error reading from datastream"); + break; + case SDL_EFWRITE: + SDL_SetError("Error writing to datastream"); + break; + case SDL_EFSEEK: + SDL_SetError("Error seeking in datastream"); + break; + default: + SDL_SetError("Unknown SDL error"); + break; + } +} + +#ifdef TEST_ERROR +int main(int argc, char *argv[]) +{ + char buffer[BUFSIZ+1]; + + SDL_SetError("Hi there!"); + printf("Error 1: %s\n", SDL_GetError()); + SDL_ClearError(); + memset(buffer, '1', BUFSIZ); + buffer[BUFSIZ] = 0; + SDL_SetError("This is the error: %s (%f)", buffer, 1.0); + printf("Error 2: %s\n", SDL_GetError()); + exit(0); +} +#endif diff --git a/src/SDL_error_c.h b/src/SDL_error_c.h new file mode 100644 index 000000000..61125ed20 --- /dev/null +++ b/src/SDL_error_c.h @@ -0,0 +1,62 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* This file defines a structure that carries language-independent + error messages +*/ + +#ifndef _SDL_error_c_h +#define _SDL_error_c_h + +#define ERR_MAX_STRLEN 128 +#define ERR_MAX_ARGS 5 + +typedef struct { + /* This is a numeric value corresponding to the current error */ + int error; + + /* This is a key used to index into a language hashtable containing + internationalized versions of the SDL error messages. If the key + is not in the hashtable, or no hashtable is available, the key is + used directly as an error message format string. + */ + unsigned char key[ERR_MAX_STRLEN]; + + /* These are the arguments for the error functions */ + int argc; + union { + void *value_ptr; +#if 0 /* What is a character anyway? (UNICODE issues) */ + unsigned char value_c; +#endif + int value_i; + double value_f; + unsigned char buf[ERR_MAX_STRLEN]; + } args[ERR_MAX_ARGS]; +} SDL_error; + +#endif /* _SDL_error_c_h */ diff --git a/src/SDL_fatal.c b/src/SDL_fatal.c new file mode 100644 index 000000000..e1b180bcb --- /dev/null +++ b/src/SDL_fatal.c @@ -0,0 +1,160 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* General fatal signal handling code for SDL */ + +#ifdef NO_SIGNAL_H + +/* No signals on this platform, nothing to do.. */ + +void SDL_InstallParachute(void) +{ + return; +} + +void SDL_UninstallParachute(void) +{ + return; +} + +#else + +#include +#include +#include +#include + +#include "SDL.h" +#include "SDL_fatal.h" + +/* This installs some signal handlers for the more common fatal signals, + so that if the programmer is lazy, the app doesn't die so horribly if + the program crashes. +*/ + +static void SDL_Parachute(int sig) +{ + signal(sig, SIG_DFL); + fprintf(stderr, "Fatal signal: "); + switch (sig) { + case SIGSEGV: + fprintf(stderr, "Segmentation Fault"); + break; +#ifdef SIGBUS +#if SIGBUS != SIGSEGV + case SIGBUS: + fprintf(stderr, "Bus Error"); + break; +#endif +#endif /* SIGBUS */ +#ifdef SIGFPE + case SIGFPE: + fprintf(stderr, "Floating Point Exception"); + break; +#endif /* SIGFPE */ +#ifdef SIGQUIT + case SIGQUIT: + fprintf(stderr, "Keyboard Quit"); + break; +#endif /* SIGQUIT */ +#ifdef SIGPIPE + case SIGPIPE: + fprintf(stderr, "Broken Pipe"); + break; +#endif /* SIGPIPE */ + default: + fprintf(stderr, "# %d", sig); + break; + } + fprintf(stderr, " (SDL Parachute Deployed)\n"); + SDL_Quit(); + exit(-sig); +} + +static int SDL_fatal_signals[] = { + SIGSEGV, +#ifdef SIGBUS + SIGBUS, +#endif +#ifdef SIGFPE + SIGFPE, +#endif +#ifdef SIGQUIT + SIGQUIT, +#endif +#ifdef SIGPIPE + SIGPIPE, +#endif + 0 +}; + +void SDL_InstallParachute(void) +{ + int i; + void (*ohandler)(int); + + /* Set a handler for any fatal signal not already handled */ + for ( i=0; SDL_fatal_signals[i]; ++i ) { + ohandler = signal(SDL_fatal_signals[i], SDL_Parachute); + if ( ohandler != SIG_DFL ) { + signal(SDL_fatal_signals[i], ohandler); + } + } +#ifdef SIGALRM + /* Set SIGALRM to be ignored -- necessary on Solaris */ + { + struct sigaction action, oaction; + + /* Set SIG_IGN action */ + memset(&action, 0, (sizeof action)); + action.sa_handler = SIG_IGN; + sigaction(SIGALRM, &action, &oaction); + + /* Reset original action if it was already being handled */ + if ( oaction.sa_handler != SIG_DFL ) { + sigaction(SIGALRM, &oaction, NULL); + } + } +#endif + return; +} + +void SDL_UninstallParachute(void) +{ + int i; + void (*ohandler)(int); + + /* Remove a handler for any fatal signal handled */ + for ( i=0; SDL_fatal_signals[i]; ++i ) { + ohandler = signal(SDL_fatal_signals[i], SIG_DFL); + if ( ohandler != SDL_Parachute ) { + signal(SDL_fatal_signals[i], ohandler); + } + } +} + +#endif /* NO_SIGNAL_H */ diff --git a/src/SDL_fatal.h b/src/SDL_fatal.h new file mode 100644 index 000000000..3b85db9cf --- /dev/null +++ b/src/SDL_fatal.h @@ -0,0 +1,32 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* General fatal signal handling code for SDL */ + +extern void SDL_InstallParachute(void); +extern void SDL_UninstallParachute(void); + diff --git a/src/SDL_getenv.c b/src/SDL_getenv.c new file mode 100644 index 000000000..98ce19900 --- /dev/null +++ b/src/SDL_getenv.c @@ -0,0 +1,171 @@ + +/* Not all environments have a working getenv()/putenv() */ + +#ifdef TEST_MAIN +#define NEED_SDL_GETENV +#endif + +#include "SDL_getenv.h" + +#ifdef NEED_SDL_GETENV + +#include +#include + +static char **SDL_env = (char **)0; + +/* Put a variable of the form "name=value" into the environment */ +int SDL_putenv(const char *variable) +{ + const char *name, *value; + int added; + int len, i; + char **new_env; + char *new_variable; + + /* A little error checking */ + if ( ! variable ) { + return(-1); + } + name = variable; + for ( value=variable; *value && (*value != '='); ++value ) { + /* Keep looking for '=' */ ; + } + if ( *value ) { + ++value; + } else { + return(-1); + } + + /* Allocate memory for the variable */ + new_variable = (char *)malloc(strlen(variable)+1); + if ( ! new_variable ) { + return(-1); + } + strcpy(new_variable, variable); + + /* Actually put it into the environment */ + added = 0; + i = 0; + if ( SDL_env ) { + /* Check to see if it's already there... */ + len = (value - name); + for ( ; SDL_env[i]; ++i ) { + if ( strncmp(SDL_env[i], name, len) == 0 ) { + break; + } + } + /* If we found it, just replace the entry */ + if ( SDL_env[i] ) { + free(SDL_env[i]); + SDL_env[i] = new_variable; + added = 1; + } + } + + /* Didn't find it in the environment, expand and add */ + if ( ! added ) { + new_env = realloc(SDL_env, (i+2)*sizeof(char *)); + if ( new_env ) { + SDL_env = new_env; + SDL_env[i++] = new_variable; + SDL_env[i++] = (char *)0; + added = 1; + } else { + free(new_variable); + } + } + return (added ? 0 : -1); +} + +/* Retrieve a variable named "name" from the environment */ +char *SDL_getenv(const char *name) +{ + int len, i; + char *value; + + value = (char *)0; + if ( SDL_env ) { + len = strlen(name); + for ( i=0; SDL_env[i] && !value; ++i ) { + if ( (strncmp(SDL_env[i], name, len) == 0) && + (SDL_env[i][len] == '=') ) { + value = &SDL_env[i][len+1]; + } + } + } + return value; +} + +#endif /* NEED_GETENV */ + +#ifdef TEST_MAIN +#include + +int main(int argc, char *argv[]) +{ + char *value; + + printf("Checking for non-existent variable... "); + fflush(stdout); + if ( ! getenv("EXISTS") ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Setting FIRST=VALUE1 in the environment... "); + fflush(stdout); + if ( putenv("FIRST=VALUE1") == 0 ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Getting FIRST from the environment... "); + fflush(stdout); + value = getenv("FIRST"); + if ( value && (strcmp(value, "VALUE1") == 0) ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Setting SECOND=VALUE2 in the environment... "); + fflush(stdout); + if ( putenv("SECOND=VALUE2") == 0 ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Getting SECOND from the environment... "); + fflush(stdout); + value = getenv("SECOND"); + if ( value && (strcmp(value, "VALUE2") == 0) ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Setting FIRST=NOVALUE in the environment... "); + fflush(stdout); + if ( putenv("FIRST=NOVALUE") == 0 ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Getting FIRST from the environment... "); + fflush(stdout); + value = getenv("FIRST"); + if ( value && (strcmp(value, "NOVALUE") == 0) ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + printf("Checking for non-existent variable... "); + fflush(stdout); + if ( ! getenv("EXISTS") ) { + printf("okay\n"); + } else { + printf("failed\n"); + } + return(0); +} +#endif /* TEST_MAIN */ + diff --git a/src/audio/.cvsignore b/src/audio/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/Makefile.am b/src/audio/Makefile.am new file mode 100644 index 000000000..d1ad57c59 --- /dev/null +++ b/src/audio/Makefile.am @@ -0,0 +1,29 @@ + +## Makefile.am for the SDL audio library + +noinst_LTLIBRARIES = libaudio.la + +# Define which subdirectories need to be built +SUBDIRS = @AUDIO_SUBDIRS@ +DIST_SUBDIRS = alsa arts baudio dma dmedia dsp esd macrom nas nto \ + paudio sun ums windib windx5 + +DRIVERS = @AUDIO_DRIVERS@ + +# Include the architecture-independent sources +COMMON_SRCS = \ + SDL_audio.c \ + SDL_audio_c.h \ + SDL_audiocvt.c \ + SDL_audiodev.c \ + SDL_audiodev_c.h \ + SDL_audiomem.c \ + SDL_audiomem.h \ + SDL_mixer.c \ + SDL_sysaudio.h \ + SDL_wave.c \ + SDL_wave.h + +libaudio_la_SOURCES = $(COMMON_SRCS) +libaudio_la_LIBADD = $(DRIVERS) +libaudio_la_DEPENDENCIES = $(DRIVERS) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c new file mode 100644 index 000000000..5e5cfbf17 --- /dev/null +++ b/src/audio/SDL_audio.c @@ -0,0 +1,516 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer */ +#include +#include +#include + +#include "SDL.h" +#include "SDL_audio.h" +#include "SDL_timer.h" +#include "SDL_error.h" +#include "SDL_audio_c.h" +#include "SDL_audiomem.h" +#include "SDL_sysaudio.h" + +/* Available audio drivers */ +static AudioBootStrap *bootstrap[] = { +#if defined(unix) && \ + !defined(linux) && !defined(__FreeBSD__) && !defined(__CYGWIN32__) \ + && !defined(__bsdi__) + &AUDIO_bootstrap, +#endif +#ifdef OSS_SUPPORT + &DSP_bootstrap, + &DMA_bootstrap, +#endif +#ifdef ALSA_SUPPORT + &ALSA_bootstrap, +#endif +#ifdef ARTSC_SUPPORT + &ARTSC_bootstrap, +#endif +#ifdef ESD_SUPPORT + &ESD_bootstrap, +#endif +#ifdef NAS_SUPPORT + &NAS_bootstrap, +#endif +#ifdef ENABLE_DIRECTX + &DSOUND_bootstrap, +#endif +#ifdef ENABLE_WINDIB + &WAVEOUT_bootstrap, +#endif +#ifdef __BEOS__ + &BAUDIO_bootstrap, +#endif +#if defined(macintosh) || TARGET_API_MAC_CARBON + &SNDMGR_bootstrap, +#endif +#ifdef _AIX + &Paud_bootstrap, +#endif + NULL +}; +SDL_AudioDevice *current_audio = NULL; + +/* Various local functions */ +int SDL_AudioInit(const char *driver_name); +void SDL_AudioQuit(void); + + +/* The general mixing thread function */ +int SDL_RunAudio(void *audiop) +{ + SDL_AudioDevice *audio = (SDL_AudioDevice *)audiop; + Uint8 *stream; + int stream_len; + void *udata; + void (*fill)(void *userdata,Uint8 *stream, int len); + int silence; + + /* Perform any thread setup */ + if ( audio->ThreadInit ) { + audio->ThreadInit(audio); + } + audio->threadid = SDL_ThreadID(); + + /* Set up the mixing function */ + fill = audio->spec.callback; + udata = audio->spec.userdata; + if ( audio->convert.needed ) { + if ( audio->convert.src_format == AUDIO_U8 ) { + silence = 0x80; + } else { + silence = 0; + } + stream_len = audio->convert.len; + } else { + silence = audio->spec.silence; + stream_len = audio->spec.size; + } + stream = audio->fake_stream; + + /* Loop, filling the audio buffers */ + while ( audio->enabled ) { + + /* Wait for new current buffer to finish playing */ + if ( stream == audio->fake_stream ) { + SDL_Delay((audio->spec.samples*1000)/audio->spec.freq); + } else { + audio->WaitAudio(audio); + } + + /* Fill the current buffer with sound */ + if ( audio->convert.needed ) { + /* The buffer may not be allocated yet */ + if ( audio->convert.buf ) { + stream = audio->convert.buf; + } else { + continue; + } + } else { + stream = audio->GetAudioBuf(audio); + if ( stream == NULL ) { + stream = audio->fake_stream; + } + } + memset(stream, silence, stream_len); + + if ( ! audio->paused ) { + SDL_mutexP(audio->mixer_lock); + (*fill)(udata, stream, stream_len); + SDL_mutexV(audio->mixer_lock); + } + + /* Convert the audio if necessary */ + if ( audio->convert.needed ) { + SDL_ConvertAudio(&audio->convert); + stream = audio->GetAudioBuf(audio); + if ( stream == NULL ) { + stream = audio->fake_stream; + } + memcpy(stream, audio->convert.buf, + audio->convert.len_cvt); + } + + /* Ready current buffer for play and change current buffer */ + if ( stream != audio->fake_stream ) { + audio->PlayAudio(audio); + } + } + /* Wait for the audio to drain.. */ + if ( audio->WaitDone ) { + audio->WaitDone(audio); + } + return(0); +} + +int SDL_AudioInit(const char *driver_name) +{ + SDL_AudioDevice *audio; + int i = 0, idx; + + /* Check to make sure we don't overwrite 'current_audio' */ + if ( current_audio != NULL ) { + SDL_AudioQuit(); + } + + /* Select the proper audio driver */ + audio = NULL; + idx = 0; +#ifdef unix + if ( (driver_name == NULL) && (getenv("ESPEAKER") != NULL) ) { + /* Ahem, we know that if ESPEAKER is set, user probably wants + to use ESD, but don't start it if it's not already running. + This probably isn't the place to do this, but... Shh! :) + */ + for ( i=0; bootstrap[i]; ++i ) { + if ( strcmp(bootstrap[i]->name, "esd") == 0 ) { + const char *esd_no_spawn; + + /* Don't start ESD if it's not running */ + esd_no_spawn = getenv("ESD_NO_SPAWN"); + if ( esd_no_spawn == NULL ) { + putenv("ESD_NO_SPAWN=1"); + } + if ( bootstrap[i]->available() ) { + audio = bootstrap[i]->create(0); + break; + } +#ifdef linux /* No unsetenv() on most platforms */ + if ( esd_no_spawn == NULL ) { + unsetenv("ESD_NO_SPAWN"); + } +#endif + } + } + } +#endif /* unix */ + if ( audio == NULL ) { + if ( driver_name != NULL ) { +#if 0 /* This will be replaced with a better driver selection API */ + if ( strrchr(driver_name, ':') != NULL ) { + idx = atoi(strrchr(driver_name, ':')+1); + } +#endif + for ( i=0; bootstrap[i]; ++i ) { + if (strncmp(bootstrap[i]->name, driver_name, + strlen(bootstrap[i]->name)) == 0) { + if ( bootstrap[i]->available() ) { + audio=bootstrap[i]->create(idx); + break; + } + } + } + } else { + for ( i=0; bootstrap[i]; ++i ) { + if ( bootstrap[i]->available() ) { + audio = bootstrap[i]->create(idx); + if ( audio != NULL ) { + break; + } + } + } + } + if ( audio == NULL ) { + SDL_SetError("No available audio device"); +#if 0 /* Don't fail SDL_Init() if audio isn't available. + SDL_OpenAudio() will handle it at that point. *sigh* + */ + return(-1); +#endif + } + } + current_audio = audio; + if ( current_audio ) { + current_audio->name = bootstrap[i]->name; + } + return(0); +} + +char *SDL_AudioDriverName(char *namebuf, int maxlen) +{ + if ( current_audio != NULL ) { + strncpy(namebuf, current_audio->name, maxlen-1); + namebuf[maxlen-1] = '\0'; + return(namebuf); + } + return(NULL); +} + +int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained) +{ + SDL_AudioDevice *audio; + + /* Start up the audio driver, if necessary */ + if ( ! current_audio ) { + if ( (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) || + (current_audio == NULL) ) { + return(-1); + } + } + audio = current_audio; + + /* Verify some parameters */ + if ( desired->callback == NULL ) { + SDL_SetError("SDL_OpenAudio() passed a NULL callback"); + return(-1); + } + switch ( desired->channels ) { + case 1: /* Mono */ + case 2: /* Stereo */ + break; + default: + SDL_SetError("1 (mono) and 2 (stereo) channels supported"); + return(-1); + } + +#ifdef macintosh + /* FIXME: Need to implement PPC interrupt asm for SDL_LockAudio() */ +#else + /* Create a semaphore for locking the sound buffers */ + audio->mixer_lock = SDL_CreateMutex(); + if ( audio->mixer_lock == NULL ) { + SDL_SetError("Couldn't create mixer lock"); + SDL_CloseAudio(); + return(-1); + } +#endif + + /* Calculate the silence and size of the audio specification */ + SDL_CalculateAudioSpec(desired); + + /* Open the audio subsystem */ + memcpy(&audio->spec, desired, sizeof(audio->spec)); + audio->convert.needed = 0; + audio->enabled = 1; + audio->paused = 1; + audio->opened = audio->OpenAudio(audio, &audio->spec)+1; + if ( ! audio->opened ) { + SDL_CloseAudio(); + return(-1); + } + + /* If the audio driver changes the buffer size, accept it */ + if ( audio->spec.samples != desired->samples ) { + desired->samples = audio->spec.samples; + SDL_CalculateAudioSpec(desired); + } + + /* Allocate a fake audio memory buffer */ + audio->fake_stream = SDL_AllocAudioMem(audio->spec.size); + if ( audio->fake_stream == NULL ) { + SDL_CloseAudio(); + SDL_OutOfMemory(); + return(-1); + } + + /* See if we need to do any conversion */ + if ( memcmp(desired, &audio->spec, sizeof(audio->spec)) == 0 ) { + /* Just copy over the desired audio specification */ + if ( obtained != NULL ) { + memcpy(obtained, &audio->spec, sizeof(audio->spec)); + } + } else { + /* Copy over the audio specification if possible */ + if ( obtained != NULL ) { + memcpy(obtained, &audio->spec, sizeof(audio->spec)); + } else { + /* Build an audio conversion block */ + if ( SDL_BuildAudioCVT(&audio->convert, + desired->format, desired->channels, + desired->freq, + audio->spec.format, audio->spec.channels, + audio->spec.freq) < 0 ) { + SDL_CloseAudio(); + return(-1); + } + if ( audio->convert.needed ) { + audio->convert.len = desired->size; + audio->convert.buf =(Uint8 *)SDL_AllocAudioMem( + audio->convert.len*audio->convert.len_mult); + if ( audio->convert.buf == NULL ) { + SDL_CloseAudio(); + SDL_OutOfMemory(); + return(-1); + } + } + } + } + + /* Start the audio thread if necessary */ + switch (audio->opened) { + case 1: + /* Start the audio thread */ + audio->thread = SDL_CreateThread(SDL_RunAudio, audio); + if ( audio->thread == NULL ) { + SDL_CloseAudio(); + SDL_SetError("Couldn't create audio thread"); + return(-1); + } + break; + + default: + /* The audio is now playing */ + break; + } + return(0); +} + +SDL_audiostatus SDL_GetAudioStatus(void) +{ + SDL_AudioDevice *audio = current_audio; + SDL_audiostatus status; + + status = SDL_AUDIO_STOPPED; + if ( audio && audio->enabled ) { + if ( audio->paused ) { + status = SDL_AUDIO_PAUSED; + } else { + status = SDL_AUDIO_PLAYING; + } + } + return(status); +} + +void SDL_PauseAudio (int pause_on) +{ + SDL_AudioDevice *audio = current_audio; + + if ( audio ) { + audio->paused = pause_on; + } +} + +void SDL_LockAudio (void) +{ + SDL_AudioDevice *audio = current_audio; + + /* Obtain a lock on the mixing buffers */ + if ( audio ) { + if ( audio->thread && (SDL_ThreadID() == audio->threadid) ) { + return; + } + SDL_mutexP(audio->mixer_lock); + } +} + +void SDL_UnlockAudio (void) +{ + SDL_AudioDevice *audio = current_audio; + + /* Release lock on the mixing buffers */ + if ( audio ) { + if ( audio->thread && (SDL_ThreadID() == audio->threadid) ) { + return; + } + SDL_mutexV(audio->mixer_lock); + } +} + +void SDL_CloseAudio (void) +{ + SDL_QuitSubSystem(SDL_INIT_AUDIO); +} + +void SDL_AudioQuit(void) +{ + SDL_AudioDevice *audio = current_audio; + + if ( audio ) { + audio->enabled = 0; + if ( audio->thread != NULL ) { + SDL_WaitThread(audio->thread, NULL); + } + if ( audio->mixer_lock != NULL ) { + SDL_DestroyMutex(audio->mixer_lock); + } + if ( audio->fake_stream != NULL ) { + SDL_FreeAudioMem(audio->fake_stream); + } + if ( audio->convert.needed ) { + SDL_FreeAudioMem(audio->convert.buf); + } + if ( audio->opened ) { + audio->CloseAudio(audio); + audio->opened = 0; + } + + /* Free the driver data */ + audio->free(audio); + current_audio = NULL; + } +} + +#define NUM_FORMATS 6 +static int format_idx; +static int format_idx_sub; +static Uint16 format_list[NUM_FORMATS][NUM_FORMATS] = { + { AUDIO_U8, AUDIO_S8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB }, + { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB }, + { AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_U8, AUDIO_S8 }, +}; + +Uint16 SDL_FirstAudioFormat(Uint16 format) +{ + for ( format_idx=0; format_idx < NUM_FORMATS; ++format_idx ) { + if ( format_list[format_idx][0] == format ) { + break; + } + } + format_idx_sub = 0; + return(SDL_NextAudioFormat()); +} + +Uint16 SDL_NextAudioFormat(void) +{ + if ( (format_idx == NUM_FORMATS) || (format_idx_sub == NUM_FORMATS) ) { + return(0); + } + return(format_list[format_idx][format_idx_sub++]); +} + +void SDL_CalculateAudioSpec(SDL_AudioSpec *spec) +{ + switch (spec->format) { + case AUDIO_U8: + spec->silence = 0x80; + break; + default: + spec->silence = 0x00; + break; + } + spec->size = (spec->format&0xFF)/8; + spec->size *= spec->channels; + spec->size *= spec->samples; +} diff --git a/src/audio/SDL_audio_c.h b/src/audio/SDL_audio_c.h new file mode 100644 index 000000000..1d7de0076 --- /dev/null +++ b/src/audio/SDL_audio_c.h @@ -0,0 +1,38 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */ + +/* Functions to get a list of "close" audio formats */ +extern Uint16 SDL_FirstAudioFormat(Uint16 format); +extern Uint16 SDL_NextAudioFormat(void); + +/* Function to calculate the size and silence for a SDL_AudioSpec */ +extern void SDL_CalculateAudioSpec(SDL_AudioSpec *spec); + +/* The actual mixing thread function */ +extern int SDL_RunAudio(void *audiop); diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c new file mode 100644 index 000000000..d624a1028 --- /dev/null +++ b/src/audio/SDL_audiocvt.c @@ -0,0 +1,642 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Functions for audio drivers to perform runtime conversion of audio format */ + +#include + +#include "SDL_error.h" +#include "SDL_audio.h" + + +/* Effectively mix right and left channels into a single channel */ +void SDL_ConvertMono(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Sint32 sample; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting to mono\n"); +#endif + switch (format&0x8018) { + + case AUDIO_U8: { + Uint8 *src, *dst; + + src = cvt->buf; + dst = cvt->buf; + for ( i=cvt->len_cvt/2; i; --i ) { + sample = src[0] + src[1]; + if ( sample > 255 ) { + *dst = 255; + } else { + *dst = sample; + } + src += 2; + dst += 1; + } + } + break; + + case AUDIO_S8: { + Sint8 *src, *dst; + + src = (Sint8 *)cvt->buf; + dst = (Sint8 *)cvt->buf; + for ( i=cvt->len_cvt/2; i; --i ) { + sample = src[0] + src[1]; + if ( sample > 127 ) { + *dst = 127; + } else + if ( sample < -128 ) { + *dst = -128; + } else { + *dst = sample; + } + src += 2; + dst += 1; + } + } + break; + + case AUDIO_U16: { + Uint8 *src, *dst; + + src = cvt->buf; + dst = cvt->buf; + if ( (format & 0x1000) == 0x1000 ) { + for ( i=cvt->len_cvt/4; i; --i ) { + sample = (Uint16)((src[0]<<8)|src[1])+ + (Uint16)((src[2]<<8)|src[3]); + if ( sample > 65535 ) { + dst[0] = 0xFF; + dst[1] = 0xFF; + } else { + dst[1] = (sample&0xFF); + sample >>= 8; + dst[0] = (sample&0xFF); + } + src += 4; + dst += 2; + } + } else { + for ( i=cvt->len_cvt/4; i; --i ) { + sample = (Uint16)((src[1]<<8)|src[0])+ + (Uint16)((src[3]<<8)|src[2]); + if ( sample > 65535 ) { + dst[0] = 0xFF; + dst[1] = 0xFF; + } else { + dst[0] = (sample&0xFF); + sample >>= 8; + dst[1] = (sample&0xFF); + } + src += 4; + dst += 2; + } + } + } + break; + + case AUDIO_S16: { + Uint8 *src, *dst; + + src = cvt->buf; + dst = cvt->buf; + if ( (format & 0x1000) == 0x1000 ) { + for ( i=cvt->len_cvt/4; i; --i ) { + sample = (Sint16)((src[0]<<8)|src[1])+ + (Sint16)((src[2]<<8)|src[3]); + if ( sample > 32767 ) { + dst[0] = 0x7F; + dst[1] = 0xFF; + } else + if ( sample < -32768 ) { + dst[0] = 0x80; + dst[1] = 0x00; + } else { + dst[1] = (sample&0xFF); + sample >>= 8; + dst[0] = (sample&0xFF); + } + src += 4; + dst += 2; + } + } else { + for ( i=cvt->len_cvt/4; i; --i ) { + sample = (Sint16)((src[1]<<8)|src[0])+ + (Sint16)((src[3]<<8)|src[2]); + if ( sample > 32767 ) { + dst[1] = 0x7F; + dst[0] = 0xFF; + } else + if ( sample < -32768 ) { + dst[1] = 0x80; + dst[0] = 0x00; + } else { + dst[0] = (sample&0xFF); + sample >>= 8; + dst[1] = (sample&0xFF); + } + src += 4; + dst += 2; + } + } + } + break; + } + cvt->len_cvt /= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + + +/* Duplicate a mono channel to both stereo channels */ +void SDL_ConvertStereo(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting to stereo\n"); +#endif + if ( (format & 0xFF) == 16 ) { + Uint16 *src, *dst; + + src = (Uint16 *)(cvt->buf+cvt->len_cvt); + dst = (Uint16 *)(cvt->buf+cvt->len_cvt*2); + for ( i=cvt->len_cvt/2; i; --i ) { + dst -= 2; + src -= 1; + dst[0] = src[0]; + dst[1] = src[0]; + } + } else { + Uint8 *src, *dst; + + src = cvt->buf+cvt->len_cvt; + dst = cvt->buf+cvt->len_cvt*2; + for ( i=cvt->len_cvt; i; --i ) { + dst -= 2; + src -= 1; + dst[0] = src[0]; + dst[1] = src[0]; + } + } + cvt->len_cvt *= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Convert 8-bit to 16-bit - LSB */ +void SDL_Convert16LSB(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *src, *dst; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting to 16-bit LSB\n"); +#endif + src = cvt->buf+cvt->len_cvt; + dst = cvt->buf+cvt->len_cvt*2; + for ( i=cvt->len_cvt; i; --i ) { + src -= 1; + dst -= 2; + dst[1] = *src; + dst[0] = 0; + } + format = ((format & ~0x0008) | AUDIO_U16LSB); + cvt->len_cvt *= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} +/* Convert 8-bit to 16-bit - MSB */ +void SDL_Convert16MSB(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *src, *dst; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting to 16-bit MSB\n"); +#endif + src = cvt->buf+cvt->len_cvt; + dst = cvt->buf+cvt->len_cvt*2; + for ( i=cvt->len_cvt; i; --i ) { + src -= 1; + dst -= 2; + dst[0] = *src; + dst[1] = 0; + } + format = ((format & ~0x0008) | AUDIO_U16MSB); + cvt->len_cvt *= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Convert 16-bit to 8-bit */ +void SDL_Convert8(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *src, *dst; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting to 8-bit\n"); +#endif + src = cvt->buf; + dst = cvt->buf; + if ( (format & 0x1000) != 0x1000 ) { /* Little endian */ + ++src; + } + for ( i=cvt->len_cvt/2; i; --i ) { + *dst = *src; + src += 2; + dst += 1; + } + format = ((format & ~0x9010) | AUDIO_U8); + cvt->len_cvt /= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Toggle signed/unsigned */ +void SDL_ConvertSign(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *data; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting audio signedness\n"); +#endif + data = cvt->buf; + if ( (format & 0xFF) == 16 ) { + if ( (format & 0x1000) != 0x1000 ) { /* Little endian */ + ++data; + } + for ( i=cvt->len_cvt/2; i; --i ) { + *data ^= 0x80; + data += 2; + } + } else { + for ( i=cvt->len_cvt; i; --i ) { + *data++ ^= 0x80; + } + } + format = (format ^ 0x8000); + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Toggle endianness */ +void SDL_ConvertEndian(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *data, tmp; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting audio endianness\n"); +#endif + data = cvt->buf; + for ( i=cvt->len_cvt/2; i; --i ) { + tmp = data[0]; + data[0] = data[1]; + data[1] = tmp; + data += 2; + } + format = (format ^ 0x1000); + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Convert rate up by multiple of 2 */ +void SDL_RateMUL2(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *src, *dst; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting audio rate * 2\n"); +#endif + src = cvt->buf+cvt->len_cvt; + dst = cvt->buf+cvt->len_cvt*2; + switch (format & 0xFF) { + case 8: + for ( i=cvt->len_cvt; i; --i ) { + src -= 1; + dst -= 2; + dst[0] = src[0]; + dst[1] = src[0]; + } + break; + case 16: + for ( i=cvt->len_cvt/2; i; --i ) { + src -= 2; + dst -= 4; + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[0]; + dst[3] = src[1]; + } + break; + } + cvt->len_cvt *= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Convert rate down by multiple of 2 */ +void SDL_RateDIV2(SDL_AudioCVT *cvt, Uint16 format) +{ + int i; + Uint8 *src, *dst; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting audio rate / 2\n"); +#endif + src = cvt->buf; + dst = cvt->buf; + switch (format & 0xFF) { + case 8: + for ( i=cvt->len_cvt/2; i; --i ) { + dst[0] = src[0]; + src += 2; + dst += 1; + } + break; + case 16: + for ( i=cvt->len_cvt/4; i; --i ) { + dst[0] = src[0]; + dst[1] = src[1]; + src += 4; + dst += 2; + } + break; + } + cvt->len_cvt /= 2; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +/* Very slow rate conversion routine */ +void SDL_RateSLOW(SDL_AudioCVT *cvt, Uint16 format) +{ + double ipos; + int i, clen; + +#ifdef DEBUG_CONVERT + fprintf(stderr, "Converting audio rate * %4.4f\n", 1.0/cvt->rate_incr); +#endif + clen = (int)((double)cvt->len_cvt / cvt->rate_incr); + if ( cvt->rate_incr > 1.0 ) { + switch (format & 0xFF) { + case 8: { + Uint8 *output; + + output = cvt->buf; + ipos = 0.0; + for ( i=clen; i; --i ) { + *output = cvt->buf[(int)ipos]; + ipos += cvt->rate_incr; + output += 1; + } + } + break; + + case 16: { + Uint16 *output; + + clen &= ~1; + output = (Uint16 *)cvt->buf; + ipos = 0.0; + for ( i=clen/2; i; --i ) { + *output=((Uint16 *)cvt->buf)[(int)ipos]; + ipos += cvt->rate_incr; + output += 1; + } + } + break; + } + } else { + switch (format & 0xFF) { + case 8: { + Uint8 *output; + + output = cvt->buf+clen; + ipos = (double)cvt->len_cvt; + for ( i=clen; i; --i ) { + ipos -= cvt->rate_incr; + output -= 1; + *output = cvt->buf[(int)ipos]; + } + } + break; + + case 16: { + Uint16 *output; + + clen &= ~1; + output = (Uint16 *)(cvt->buf+clen); + ipos = (double)cvt->len_cvt/2; + for ( i=clen/2; i; --i ) { + ipos -= cvt->rate_incr; + output -= 1; + *output=((Uint16 *)cvt->buf)[(int)ipos]; + } + } + break; + } + } + cvt->len_cvt = clen; + if ( cvt->filters[++cvt->filter_index] ) { + cvt->filters[cvt->filter_index](cvt, format); + } +} + +int SDL_ConvertAudio(SDL_AudioCVT *cvt) +{ + /* Make sure there's data to convert */ + if ( cvt->buf == NULL ) { + SDL_SetError("No buffer allocated for conversion"); + return(-1); + } + /* Return okay if no conversion is necessary */ + cvt->len_cvt = cvt->len; + if ( cvt->filters[0] == NULL ) { + return(0); + } + + /* Set up the conversion and go! */ + cvt->filter_index = 0; + cvt->filters[0](cvt, cvt->src_format); + return(0); +} + +/* Creates a set of audio filters to convert from one format to another. + Returns -1 if the format conversion is not supported, or 1 if the + audio filter is set up. +*/ + +int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, + Uint16 src_format, Uint8 src_channels, int src_rate, + Uint16 dst_format, Uint8 dst_channels, int dst_rate) +{ + /* Start off with no conversion necessary */ + cvt->needed = 0; + cvt->filter_index = 0; + cvt->filters[0] = NULL; + cvt->len_mult = 1; + cvt->len_ratio = 1.0; + + /* First filter: Endian conversion from src to dst */ + if ( (src_format & 0x1000) != (dst_format & 0x1000) + && ((src_format & 0xff) != 8) ) { + cvt->filters[cvt->filter_index++] = SDL_ConvertEndian; + } + + /* Second filter: Sign conversion -- signed/unsigned */ + if ( (src_format & 0x8000) != (dst_format & 0x8000) ) { + cvt->filters[cvt->filter_index++] = SDL_ConvertSign; + } + + /* Next filter: Convert 16 bit <--> 8 bit PCM */ + if ( (src_format & 0xFF) != (dst_format & 0xFF) ) { + switch (dst_format&0x10FF) { + case AUDIO_U8: + cvt->filters[cvt->filter_index++] = + SDL_Convert8; + cvt->len_ratio /= 2; + break; + case AUDIO_U16LSB: + cvt->filters[cvt->filter_index++] = + SDL_Convert16LSB; + cvt->len_mult *= 2; + cvt->len_ratio *= 2; + break; + case AUDIO_U16MSB: + cvt->filters[cvt->filter_index++] = + SDL_Convert16MSB; + cvt->len_mult *= 2; + cvt->len_ratio *= 2; + break; + } + } + + /* Last filter: Mono/Stereo conversion */ + if ( src_channels != dst_channels ) { + while ( (src_channels*2) <= dst_channels ) { + cvt->filters[cvt->filter_index++] = + SDL_ConvertStereo; + cvt->len_mult *= 2; + src_channels *= 2; + cvt->len_ratio *= 2; + } + /* This assumes that 4 channel audio is in the format: + Left {front/back} + Right {front/back} + so converting to L/R stereo works properly. + */ + while ( ((src_channels%2) == 0) && + ((src_channels/2) >= dst_channels) ) { + cvt->filters[cvt->filter_index++] = + SDL_ConvertMono; + src_channels /= 2; + cvt->len_ratio /= 2; + } + if ( src_channels != dst_channels ) { + /* Uh oh.. */; + } + } + + /* Do rate conversion */ + cvt->rate_incr = 0.0; + if ( (src_rate/100) != (dst_rate/100) ) { + Uint32 hi_rate, lo_rate; + int len_mult; + double len_ratio; + void (*rate_cvt)(SDL_AudioCVT *cvt, Uint16 format); + + if ( src_rate > dst_rate ) { + hi_rate = src_rate; + lo_rate = dst_rate; + rate_cvt = SDL_RateDIV2; + len_mult = 1; + len_ratio = 0.5; + } else { + hi_rate = dst_rate; + lo_rate = src_rate; + rate_cvt = SDL_RateMUL2; + len_mult = 2; + len_ratio = 2.0; + } + /* If hi_rate = lo_rate*2^x then conversion is easy */ + while ( ((lo_rate*2)/100) <= (hi_rate/100) ) { + cvt->filters[cvt->filter_index++] = rate_cvt; + cvt->len_mult *= len_mult; + lo_rate *= 2; + cvt->len_ratio *= len_ratio; + } + /* We may need a slow conversion here to finish up */ + if ( (lo_rate/100) != (hi_rate/100) ) { +#if 1 + /* The problem with this is that if the input buffer is + say 1K, and the conversion rate is say 1.1, then the + output buffer is 1.1K, which may not be an acceptable + buffer size for the audio driver (not a power of 2) + */ + /* For now, punt and hope the rate distortion isn't great. + */ +#else + if ( src_rate < dst_rate ) { + cvt->rate_incr = (double)lo_rate/hi_rate; + cvt->len_mult *= 2; + cvt->len_ratio /= cvt->rate_incr; + } else { + cvt->rate_incr = (double)hi_rate/lo_rate; + cvt->len_ratio *= cvt->rate_incr; + } + cvt->filters[cvt->filter_index++] = SDL_RateSLOW; +#endif + } + } + + /* Set up the filter information */ + if ( cvt->filter_index != 0 ) { + cvt->needed = 1; + cvt->src_format = src_format; + cvt->dst_format = dst_format; + cvt->len = 0; + cvt->buf = NULL; + cvt->filters[cvt->filter_index] = NULL; + } + return(cvt->needed); +} diff --git a/src/audio/SDL_audiodev.c b/src/audio/SDL_audiodev.c new file mode 100644 index 000000000..f035bad8d --- /dev/null +++ b/src/audio/SDL_audiodev.c @@ -0,0 +1,182 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Get the name of the audio device we use for output */ + +#if defined(unix) || defined(__unix__) + +#include +#include +#include +#include +#include +#include + +#include "SDL_audiodev_c.h" + +#ifndef _PATH_DEV_DSP +#define _PATH_DEV_DSP "/dev/dsp" +#endif +#ifndef _PATH_DEV_DSP24 +#define _PATH_DEV_DSP24 "/dev/sound/dsp" +#endif +#ifndef _PATH_DEV_AUDIO +#define _PATH_DEV_AUDIO "/dev/audio" +#endif + + +int SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic) +{ + const char *audiodev; + int audio_fd; + char audiopath[1024]; + + /* Figure out what our audio device is */ + if ( ((audiodev=getenv("SDL_PATH_DSP")) == NULL) && + ((audiodev=getenv("AUDIODEV")) == NULL) ) { + if ( classic ) { + audiodev = _PATH_DEV_AUDIO; + } else { + struct stat sb; + + /* Added support for /dev/sound/\* in Linux 2.4 */ + if ( (stat("/dev/sound", &sb) == 0) && + S_ISDIR(sb.st_mode) ) { + audiodev = _PATH_DEV_DSP24; + } else { + audiodev = _PATH_DEV_DSP; + } + } + } + audio_fd = open(audiodev, flags, 0); + + /* If the first open fails, look for other devices */ + if ( (audio_fd < 0) && (strlen(audiodev) < (sizeof(audiopath)-3)) ) { + int exists, instance; + struct stat sb; + + instance = 1; + do { /* Don't use errno ENOENT - it may not be thread-safe */ + sprintf(audiopath, "%s%d", audiodev, instance++); + exists = 0; + if ( stat(audiopath, &sb) == 0 ) { + exists = 1; + audio_fd = open(audiopath, flags, 0); + } + } while ( exists && (audio_fd < 0) ); + audiodev = audiopath; + } + if ( path != NULL ) { + strncpy(path, audiodev, maxlen); + path[maxlen-1] = '\0'; + } + return(audio_fd); +} + +#elif defined(_AIX) + +/* Get the name of the audio device we use for output */ + +#include +#include +#include +#include + +#include "SDL_audiodev_c.h" + +#ifndef _PATH_DEV_DSP +#define _PATH_DEV_DSP "/dev/%caud%c/%c" +#endif + +char devsettings[][3] = +{ + { 'p', '0', '1' }, { 'p', '0', '2' }, { 'p', '0', '3' }, { 'p', '0', '4' }, + { 'p', '1', '1' }, { 'p', '1', '2' }, { 'p', '1', '3' }, { 'p', '1', '4' }, + { 'p', '2', '1' }, { 'p', '2', '2' }, { 'p', '2', '3' }, { 'p', '2', '4' }, + { 'p', '3', '1' }, { 'p', '3', '2' }, { 'p', '3', '3' }, { 'p', '3', '4' }, + { 'b', '0', '1' }, { 'b', '0', '2' }, { 'b', '0', '3' }, { 'b', '0', '4' }, + { 'b', '1', '1' }, { 'b', '1', '2' }, { 'b', '1', '3' }, { 'b', '1', '4' }, + { 'b', '2', '1' }, { 'b', '2', '2' }, { 'b', '2', '3' }, { 'b', '2', '4' }, + { 'b', '3', '1' }, { 'b', '3', '2' }, { 'b', '3', '3' }, { 'b', '3', '4' }, + { '\0', '\0', '\0' } +}; + +static int OpenUserDefinedDevice(char *path, int maxlen, int flags) +{ + const char *audiodev; + int audio_fd; + + /* Figure out what our audio device is */ + if ((audiodev=getenv("SDL_PATH_DSP")) == NULL) { + audiodev=getenv("AUDIODEV"); + } + if ( audiodev == NULL ) { + return -1; + } + audio_fd = open(audiodev, flags, 0); + if ( path != NULL ) { + strncpy(path, audiodev, maxlen); + path[maxlen-1] = '\0'; + } + return audio_fd; +} + +int SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic) +{ + struct stat sb; + int audio_fd; + char audiopath[1024]; + int cycle; + + audio_fd = OpenUserDefinedDevice(path,maxlen,flags); + if ( audio_fd != -1 ) { + return audio_fd; + } + + cycle = 0; + while( devsettings[cycle][0] != '\0' ) { + sprintf( audiopath, + _PATH_DEV_DSP, + devsettings[cycle][0], + devsettings[cycle][1], + devsettings[cycle][2]); + + if ( stat(audiopath, &sb) == 0 ) { + audio_fd = open(audiopath, flags, 0); + if ( audio_fd > 0 ) { + if ( path != NULL ) { + strncpy( path, audiopath, maxlen ); + path[maxlen-1] = '\0'; + } + return audio_fd; + } + } + } + return -1; +} + +#endif /* UNIX system */ diff --git a/src/audio/SDL_audiodev_c.h b/src/audio/SDL_audiodev_c.h new file mode 100644 index 000000000..3d10565ad --- /dev/null +++ b/src/audio/SDL_audiodev_c.h @@ -0,0 +1,30 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Open the audio device, storing the pathname in 'path' */ +extern int SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic); + diff --git a/src/audio/SDL_audiomem.c b/src/audio/SDL_audiomem.c new file mode 100644 index 000000000..5e696f911 --- /dev/null +++ b/src/audio/SDL_audiomem.c @@ -0,0 +1,73 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Functions to allocate audio buffer memory, shareable across threads + (necessary because SDL audio emulates threads with fork() + */ + +#ifdef FORK_HACK +#include +#include +#include +#include +#else +#include +#endif + +#include "SDL_audiomem.h" + +/* Allocate memory that will be shared between threads (freed on exit) */ +void *SDL_AllocAudioMem(int size) +{ + void *chunk; + +#ifdef FORK_HACK + int semid; + + /* Create and get the address of a shared memory segment */ + semid = shmget(IPC_PRIVATE, size, (IPC_CREAT|0600)); + if ( semid < 0 ) { + return(NULL); + } + chunk = shmat(semid, NULL, 0); + + /* Set the segment for deletion when it is detatched */ + shmctl(semid, IPC_RMID, NULL); /* Delets semid if shmat() fails */ +#else + chunk = malloc(size); +#endif + return((void *)chunk); +} + +void SDL_FreeAudioMem(void *chunk) +{ +#ifdef FORK_HACK + shmdt(chunk); +#else + free(chunk); +#endif +} diff --git a/src/audio/SDL_audiomem.h b/src/audio/SDL_audiomem.h new file mode 100644 index 000000000..a67698a58 --- /dev/null +++ b/src/audio/SDL_audiomem.h @@ -0,0 +1,34 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Functions to allocate audio buffer memory, shareable across threads + (necessary because SDL audio emulates threads with fork() + */ + +extern void *SDL_AllocAudioMem(int size); +extern void SDL_FreeAudioMem(void *mem); + diff --git a/src/audio/SDL_mixer.c b/src/audio/SDL_mixer.c new file mode 100644 index 000000000..7f740dcd0 --- /dev/null +++ b/src/audio/SDL_mixer.c @@ -0,0 +1,217 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* This provides the default mixing callback for the SDL audio routines */ + +#include +#include +#include + +#include "SDL_audio.h" +#include "SDL_mutex.h" +#include "SDL_timer.h" +#include "SDL_sysaudio.h" + + +/* This table is used to add two sound values together and pin + * the value to avoid overflow. (used with permission from ARDI) + * Changed to use 0xFE instead of 0xFF for better sound quality. + */ +static const Uint8 mix8[] = +{ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, + 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, + 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, + 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, + 0x5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E, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE +}; + +/* The volume ranges from 0 - 128 */ +#define ADJUST_VOLUME(s, v) (s = (s*v)/SDL_MIX_MAXVOLUME) +#define ADJUST_VOLUME_U8(s, v) (s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128) + +void SDL_MixAudio (Uint8 *dst, Uint8 *src, Uint32 len, int volume) +{ + Uint16 format; + + if ( volume == 0 ) { + return; + } + /* Mix the user-level audio format */ + if ( current_audio ) { + if ( current_audio->convert.needed ) { + format = current_audio->convert.src_format; + } else { + format = current_audio->spec.format; + } + } else { + /* HACK HACK HACK */ + format = AUDIO_S16; + } + switch (format) { + + case AUDIO_U8: { + Uint8 src_sample; + + while ( len-- ) { + src_sample = *src; + ADJUST_VOLUME_U8(src_sample, volume); + *dst = mix8[*dst+src_sample]; + ++dst; + ++src; + } + } + break; + + case AUDIO_S8: { + Sint8 *dst8, *src8; + Sint8 src_sample; + int dst_sample; + const int max_audioval = ((1<<(8-1))-1); + const int min_audioval = -(1<<(8-1)); + + src8 = (Sint8 *)src; + dst8 = (Sint8 *)dst; + while ( len-- ) { + src_sample = *src8; + ADJUST_VOLUME(src_sample, volume); + dst_sample = *dst8 + src_sample; + if ( dst_sample > max_audioval ) { + *dst8 = max_audioval; + } else + if ( dst_sample < min_audioval ) { + *dst8 = min_audioval; + } else { + *dst8 = dst_sample; + } + ++dst8; + ++src8; + } + } + break; + + case AUDIO_S16LSB: { + Sint16 src1, src2; + int dst_sample; + const int max_audioval = ((1<<(16-1))-1); + const int min_audioval = -(1<<(16-1)); + + len /= 2; + while ( len-- ) { + src1 = ((src[1])<<8|src[0]); + ADJUST_VOLUME(src1, volume); + src2 = ((dst[1])<<8|dst[0]); + src += 2; + dst_sample = src1+src2; + if ( dst_sample > max_audioval ) { + dst_sample = max_audioval; + } else + if ( dst_sample < min_audioval ) { + dst_sample = min_audioval; + } + dst[0] = dst_sample&0xFF; + dst_sample >>= 8; + dst[1] = dst_sample&0xFF; + dst += 2; + } + } + break; + + case AUDIO_S16MSB: { + Sint16 src1, src2; + int dst_sample; + const int max_audioval = ((1<<(16-1))-1); + const int min_audioval = -(1<<(16-1)); + + len /= 2; + while ( len-- ) { + src1 = ((src[0])<<8|src[1]); + ADJUST_VOLUME(src1, volume); + src2 = ((dst[0])<<8|dst[1]); + src += 2; + dst_sample = src1+src2; + if ( dst_sample > max_audioval ) { + dst_sample = max_audioval; + } else + if ( dst_sample < min_audioval ) { + dst_sample = min_audioval; + } + dst[1] = dst_sample&0xFF; + dst_sample >>= 8; + dst[0] = dst_sample&0xFF; + dst += 2; + } + } + break; + + default: /* If this happens... FIXME! */ + SDL_SetError("SDL_MixAudio(): unknown audio format"); + return; + } +} diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h new file mode 100644 index 000000000..709f9de1f --- /dev/null +++ b/src/audio/SDL_sysaudio.h @@ -0,0 +1,142 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_sysaudio_h +#define _SDL_sysaudio_h + +#include "SDL_mutex.h" +#include "SDL_thread.h" + +/* The SDL audio driver */ +typedef struct SDL_AudioDevice SDL_AudioDevice; + +/* Define the SDL audio driver structure */ +#define _THIS SDL_AudioDevice *_this +#ifndef _STATUS +#define _STATUS SDL_status *status +#endif +struct SDL_AudioDevice { + /* * * */ + /* The name of this audio driver */ + const char *name; + + /* * * */ + /* The description of this audio driver */ + const char *desc; + + /* * * */ + /* Public driver functions */ + int (*OpenAudio)(_THIS, SDL_AudioSpec *spec); + void (*ThreadInit)(_THIS); /* Called by audio thread at start */ + void (*WaitAudio)(_THIS); + void (*PlayAudio)(_THIS); + Uint8 *(*GetAudioBuf)(_THIS); + void (*WaitDone)(_THIS); + void (*CloseAudio)(_THIS); + + /* * * */ + /* Data common to all devices */ + + /* The current audio specification (shared with audio thread) */ + SDL_AudioSpec spec; + + /* An audio conversion block for audio format emulation */ + SDL_AudioCVT convert; + + /* Current state flags */ + int enabled; + int paused; + int opened; + + /* Fake audio buffer for when the audio hardware is busy */ + Uint8 *fake_stream; + + /* A semaphore for locking the mixing buffers */ + SDL_mutex *mixer_lock; + + /* A thread to feed the audio device */ + SDL_Thread *thread; + Uint32 threadid; + + /* * * */ + /* Data private to this driver */ + struct SDL_PrivateAudioData *hidden; + + /* * * */ + /* The function used to dispose of this structure */ + void (*free)(_THIS); +}; +#undef _THIS + +typedef struct AudioBootStrap { + const char *name; + const char *desc; + int (*available)(void); + SDL_AudioDevice *(*create)(int devindex); +} AudioBootStrap; + +#if defined(unix) && \ + !defined(linux) && !defined(__FreeBSD__) && !defined(__CYGWIN32__) \ + && !defined(__bsdi__) +extern AudioBootStrap AUDIO_bootstrap; +#endif +#ifdef OSS_SUPPORT +extern AudioBootStrap DSP_bootstrap; +extern AudioBootStrap DMA_bootstrap; +#endif +#ifdef ALSA_SUPPORT +extern AudioBootStrap ALSA_bootstrap; +#endif +#ifdef ARTSC_SUPPORT +extern AudioBootStrap ARTSC_bootstrap; +#endif +#ifdef ESD_SUPPORT +extern AudioBootStrap ESD_bootstrap; +#endif +#ifdef NAS_SUPPORT +extern AudioBootStrap NAS_bootstrap; +#endif +#ifdef ENABLE_DIRECTX +extern AudioBootStrap DSOUND_bootstrap; +#endif +#ifdef ENABLE_WINDIB +extern AudioBootStrap WAVEOUT_bootstrap; +#endif +#ifdef __BEOS__ +extern AudioBootStrap BAUDIO_bootstrap; +#endif +#if defined(macintosh) || TARGET_API_MAC_CARBON +extern AudioBootStrap SNDMGR_bootstrap; +#endif +#ifdef _AIX +extern AudioBootStrap Paud_bootstrap; +#endif + +/* This is the current audio device */ +extern SDL_AudioDevice *current_audio; + +#endif /* _SDL_sysaudio_h */ diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c new file mode 100644 index 000000000..91ebd2650 --- /dev/null +++ b/src/audio/SDL_wave.c @@ -0,0 +1,591 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef DISABLE_FILE + +/* Microsoft WAVE file loading routines */ + +#include +#include + +#include "SDL_error.h" +#include "SDL_audio.h" +#include "SDL_wave.h" +#include "SDL_endian.h" + +#ifndef NELEMS +#define NELEMS(array) ((sizeof array)/(sizeof array[0])) +#endif + +static int ReadChunk(SDL_RWops *src, Chunk *chunk); + +struct MS_ADPCM_decodestate { + Uint8 hPredictor; + Uint16 iDelta; + Sint16 iSamp1; + Sint16 iSamp2; +}; +static struct MS_ADPCM_decoder { + WaveFMT wavefmt; + Uint16 wSamplesPerBlock; + Uint16 wNumCoef; + Sint16 aCoeff[7][2]; + /* * * */ + struct MS_ADPCM_decodestate state[2]; +} MS_ADPCM_state; + +static int InitMS_ADPCM(WaveFMT *format) +{ + Uint8 *rogue_feel; + Uint16 extra_info; + int i; + + /* Set the rogue pointer to the MS_ADPCM specific data */ + MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding); + MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels); + MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency); + MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate); + MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign); + MS_ADPCM_state.wavefmt.bitspersample = + SDL_SwapLE16(format->bitspersample); + rogue_feel = (Uint8 *)format+sizeof(*format); + if ( sizeof(*format) == 16 ) { + extra_info = ((rogue_feel[1]<<8)|rogue_feel[0]); + rogue_feel += sizeof(Uint16); + } + MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]); + rogue_feel += sizeof(Uint16); + MS_ADPCM_state.wNumCoef = ((rogue_feel[1]<<8)|rogue_feel[0]); + rogue_feel += sizeof(Uint16); + if ( MS_ADPCM_state.wNumCoef != 7 ) { + SDL_SetError("Unknown set of MS_ADPCM coefficients"); + return(-1); + } + for ( i=0; iiSamp1 * coeff[0]) + + (state->iSamp2 * coeff[1]))/256; + if ( nybble & 0x08 ) { + new_sample += state->iDelta * (nybble-0x10); + } else { + new_sample += state->iDelta * nybble; + } + if ( new_sample < min_audioval ) { + new_sample = min_audioval; + } else + if ( new_sample > max_audioval ) { + new_sample = max_audioval; + } + delta = ((Sint32)state->iDelta * adaptive[nybble])/256; + if ( delta < 16 ) { + delta = 16; + } + state->iDelta = delta; + state->iSamp2 = state->iSamp1; + state->iSamp1 = new_sample; + return(new_sample); +} + +static int MS_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len) +{ + struct MS_ADPCM_decodestate *state[2]; + Uint8 *freeable, *encoded, *decoded; + Sint32 encoded_len, samplesleft; + Sint8 nybble, stereo; + Sint16 *coeff[2]; + Sint32 new_sample; + + /* Allocate the proper sized output buffer */ + encoded_len = *audio_len; + encoded = *audio_buf; + freeable = *audio_buf; + *audio_len = (encoded_len/MS_ADPCM_state.wavefmt.blockalign) * + MS_ADPCM_state.wSamplesPerBlock* + MS_ADPCM_state.wavefmt.channels*sizeof(Sint16); + *audio_buf = (Uint8 *)malloc(*audio_len); + if ( *audio_buf == NULL ) { + SDL_Error(SDL_ENOMEM); + return(-1); + } + decoded = *audio_buf; + + /* Get ready... Go! */ + stereo = (MS_ADPCM_state.wavefmt.channels == 2); + state[0] = &MS_ADPCM_state.state[0]; + state[1] = &MS_ADPCM_state.state[stereo]; + while ( encoded_len >= MS_ADPCM_state.wavefmt.blockalign ) { + /* Grab the initial information for this block */ + state[0]->hPredictor = *encoded++; + if ( stereo ) { + state[1]->hPredictor = *encoded++; + } + state[0]->iDelta = ((encoded[1]<<8)|encoded[0]); + encoded += sizeof(Sint16); + if ( stereo ) { + state[1]->iDelta = ((encoded[1]<<8)|encoded[0]); + encoded += sizeof(Sint16); + } + state[0]->iSamp1 = ((encoded[1]<<8)|encoded[0]); + encoded += sizeof(Sint16); + if ( stereo ) { + state[1]->iSamp1 = ((encoded[1]<<8)|encoded[0]); + encoded += sizeof(Sint16); + } + state[0]->iSamp2 = ((encoded[1]<<8)|encoded[0]); + encoded += sizeof(Sint16); + if ( stereo ) { + state[1]->iSamp2 = ((encoded[1]<<8)|encoded[0]); + encoded += sizeof(Sint16); + } + coeff[0] = MS_ADPCM_state.aCoeff[state[0]->hPredictor]; + coeff[1] = MS_ADPCM_state.aCoeff[state[1]->hPredictor]; + + /* Store the two initial samples we start with */ + decoded[0] = state[0]->iSamp2&0xFF; + decoded[1] = state[0]->iSamp2>>8; + decoded += 2; + if ( stereo ) { + decoded[0] = state[1]->iSamp2&0xFF; + decoded[1] = state[1]->iSamp2>>8; + decoded += 2; + } + decoded[0] = state[0]->iSamp1&0xFF; + decoded[1] = state[0]->iSamp1>>8; + decoded += 2; + if ( stereo ) { + decoded[0] = state[1]->iSamp1&0xFF; + decoded[1] = state[1]->iSamp1>>8; + decoded += 2; + } + + /* Decode and store the other samples in this block */ + samplesleft = (MS_ADPCM_state.wSamplesPerBlock-2)* + MS_ADPCM_state.wavefmt.channels; + while ( samplesleft > 0 ) { + nybble = (*encoded)>>4; + new_sample = MS_ADPCM_nibble(state[0],nybble,coeff[0]); + decoded[0] = new_sample&0xFF; + new_sample >>= 8; + decoded[1] = new_sample&0xFF; + decoded += 2; + + nybble = (*encoded)&0x0F; + new_sample = MS_ADPCM_nibble(state[1],nybble,coeff[1]); + decoded[0] = new_sample&0xFF; + new_sample >>= 8; + decoded[1] = new_sample&0xFF; + decoded += 2; + + ++encoded; + samplesleft -= 2; + } + encoded_len -= MS_ADPCM_state.wavefmt.blockalign; + } + free(freeable); + return(0); +} + +struct IMA_ADPCM_decodestate { + Sint32 sample; + Sint8 index; +}; +static struct IMA_ADPCM_decoder { + WaveFMT wavefmt; + Uint16 wSamplesPerBlock; + /* * * */ + struct IMA_ADPCM_decodestate state[2]; +} IMA_ADPCM_state; + +static int InitIMA_ADPCM(WaveFMT *format) +{ + Uint8 *rogue_feel; + Uint16 extra_info; + + /* Set the rogue pointer to the IMA_ADPCM specific data */ + IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding); + IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels); + IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency); + IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate); + IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign); + IMA_ADPCM_state.wavefmt.bitspersample = + SDL_SwapLE16(format->bitspersample); + rogue_feel = (Uint8 *)format+sizeof(*format); + if ( sizeof(*format) == 16 ) { + extra_info = ((rogue_feel[1]<<8)|rogue_feel[0]); + rogue_feel += sizeof(Uint16); + } + IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]); + return(0); +} + +static Sint32 IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state,Uint8 nybble) +{ + const Sint32 max_audioval = ((1<<(16-1))-1); + const Sint32 min_audioval = -(1<<(16-1)); + const int index_table[16] = { + -1, -1, -1, -1, + 2, 4, 6, 8, + -1, -1, -1, -1, + 2, 4, 6, 8 + }; + const Sint32 step_table[89] = { + 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, + 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, + 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, + 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, + 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, + 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, + 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, + 22385, 24623, 27086, 29794, 32767 + }; + Sint32 delta, step; + + /* Compute difference and new sample value */ + step = step_table[state->index]; + delta = step >> 3; + if ( nybble & 0x04 ) delta += step; + if ( nybble & 0x02 ) delta += (step >> 1); + if ( nybble & 0x01 ) delta += (step >> 2); + if ( nybble & 0x08 ) delta = -delta; + state->sample += delta; + + /* Update index value */ + state->index += index_table[nybble]; + if ( state->index > 88 ) { + state->index = 88; + } else + if ( state->index < 0 ) { + state->index = 0; + } + + /* Clamp output sample */ + if ( state->sample > max_audioval ) { + state->sample = max_audioval; + } else + if ( state->sample < min_audioval ) { + state->sample = min_audioval; + } + return(state->sample); +} + +/* Fill the decode buffer with a channel block of data (8 samples) */ +static void Fill_IMA_ADPCM_block(Uint8 *decoded, Uint8 *encoded, + int channel, int numchannels, struct IMA_ADPCM_decodestate *state) +{ + int i; + Sint8 nybble; + Sint32 new_sample; + + decoded += (channel * 2); + for ( i=0; i<4; ++i ) { + nybble = (*encoded)&0x0F; + new_sample = IMA_ADPCM_nibble(state, nybble); + decoded[0] = new_sample&0xFF; + new_sample >>= 8; + decoded[1] = new_sample&0xFF; + decoded += 2 * numchannels; + + nybble = (*encoded)>>4; + new_sample = IMA_ADPCM_nibble(state, nybble); + decoded[0] = new_sample&0xFF; + new_sample >>= 8; + decoded[1] = new_sample&0xFF; + decoded += 2 * numchannels; + + ++encoded; + } +} + +static int IMA_ADPCM_decode(Uint8 **audio_buf, Uint32 *audio_len) +{ + struct IMA_ADPCM_decodestate *state; + Uint8 *freeable, *encoded, *decoded; + Sint32 encoded_len, samplesleft; + int c, channels; + + /* Check to make sure we have enough variables in the state array */ + channels = IMA_ADPCM_state.wavefmt.channels; + if ( channels > NELEMS(IMA_ADPCM_state.state) ) { + SDL_SetError("IMA ADPCM decoder can only handle %d channels", + NELEMS(IMA_ADPCM_state.state)); + return(-1); + } + state = IMA_ADPCM_state.state; + + /* Allocate the proper sized output buffer */ + encoded_len = *audio_len; + encoded = *audio_buf; + freeable = *audio_buf; + *audio_len = (encoded_len/IMA_ADPCM_state.wavefmt.blockalign) * + IMA_ADPCM_state.wSamplesPerBlock* + IMA_ADPCM_state.wavefmt.channels*sizeof(Sint16); + *audio_buf = (Uint8 *)malloc(*audio_len); + if ( *audio_buf == NULL ) { + SDL_Error(SDL_ENOMEM); + return(-1); + } + decoded = *audio_buf; + + /* Get ready... Go! */ + while ( encoded_len >= IMA_ADPCM_state.wavefmt.blockalign ) { + /* Grab the initial information for this block */ + for ( c=0; c>8; + decoded += 2; + } + + /* Decode and store the other samples in this block */ + samplesleft = (IMA_ADPCM_state.wSamplesPerBlock-1)*channels; + while ( samplesleft > 0 ) { + for ( c=0; cencoding)) { + case PCM_CODE: + /* We can understand this */ + break; + case MS_ADPCM_CODE: + /* Try to understand this */ + if ( InitMS_ADPCM(format) < 0 ) { + was_error = 1; + goto done; + } + MS_ADPCM_encoded = 1; + break; + case IMA_ADPCM_CODE: + /* Try to understand this */ + if ( InitIMA_ADPCM(format) < 0 ) { + was_error = 1; + goto done; + } + IMA_ADPCM_encoded = 1; + break; + default: + SDL_SetError("Unknown WAVE data format: 0x%.4x", + SDL_SwapLE16(format->encoding)); + was_error = 1; + goto done; + } + memset(spec, 0, (sizeof *spec)); + spec->freq = SDL_SwapLE32(format->frequency); + switch (SDL_SwapLE16(format->bitspersample)) { + case 4: + if ( MS_ADPCM_encoded || IMA_ADPCM_encoded ) { + spec->format = AUDIO_S16; + } else { + was_error = 1; + } + break; + case 8: + spec->format = AUDIO_U8; + break; + case 16: + spec->format = AUDIO_S16; + break; + default: + was_error = 1; + break; + } + if ( was_error ) { + SDL_SetError("Unknown %d-bit PCM data format", + SDL_SwapLE16(format->bitspersample)); + goto done; + } + spec->channels = (Uint8)SDL_SwapLE16(format->channels); + spec->samples = 4096; /* Good default buffer size */ + + /* Read the audio data chunk */ + *audio_buf = NULL; + do { + if ( *audio_buf != NULL ) { + free(*audio_buf); + } + lenread = ReadChunk(src, &chunk); + if ( lenread < 0 ) { + was_error = 1; + goto done; + } + *audio_len = lenread; + *audio_buf = chunk.data; + } while ( chunk.magic != DATA ); + + if ( MS_ADPCM_encoded ) { + if ( MS_ADPCM_decode(audio_buf, audio_len) < 0 ) { + was_error = 1; + goto done; + } + } + if ( IMA_ADPCM_encoded ) { + if ( IMA_ADPCM_decode(audio_buf, audio_len) < 0 ) { + was_error = 1; + goto done; + } + } + + /* Don't return a buffer that isn't a multiple of samplesize */ + samplesize = ((spec->format & 0xFF)/8)*spec->channels; + *audio_len &= ~(samplesize-1); + +done: + if ( format != NULL ) { + free(format); + } + if ( freesrc && src ) { + SDL_RWclose(src); + } + if ( was_error ) { + spec = NULL; + } + return(spec); +} + +/* Since the WAV memory is allocated in the shared library, it must also + be freed here. (Necessary under Win32, VC++) + */ +void SDL_FreeWAV(Uint8 *audio_buf) +{ + if ( audio_buf != NULL ) { + free(audio_buf); + } +} + +static int ReadChunk(SDL_RWops *src, Chunk *chunk) +{ + chunk->magic = SDL_ReadLE32(src); + chunk->length = SDL_ReadLE32(src); + chunk->data = (Uint8 *)malloc(chunk->length); + if ( chunk->data == NULL ) { + SDL_Error(SDL_ENOMEM); + return(-1); + } + if ( SDL_RWread(src, chunk->data, chunk->length, 1) != 1 ) { + SDL_Error(SDL_EFREAD); + free(chunk->data); + return(-1); + } + return(chunk->length); +} + +#endif /* ENABLE_FILE */ diff --git a/src/audio/SDL_wave.h b/src/audio/SDL_wave.h new file mode 100644 index 000000000..147535cc3 --- /dev/null +++ b/src/audio/SDL_wave.h @@ -0,0 +1,65 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* WAVE files are little-endian */ + +/*******************************************/ +/* Define values for Microsoft WAVE format */ +/*******************************************/ +#define RIFF 0x46464952 /* "RIFF" */ +#define WAVE 0x45564157 /* "WAVE" */ +#define FACT 0x74636166 /* "fact" */ +#define LIST 0x5453494c /* "LIST" */ +#define FMT 0x20746D66 /* "fmt " */ +#define DATA 0x61746164 /* "data" */ +#define PCM_CODE 0x0001 +#define MS_ADPCM_CODE 0x0002 +#define IMA_ADPCM_CODE 0x0011 +#define WAVE_MONO 1 +#define WAVE_STEREO 2 + +/* Normally, these three chunks come consecutively in a WAVE file */ +typedef struct WaveFMT { +/* Not saved in the chunk we read: + Uint32 FMTchunk; + Uint32 fmtlen; +*/ + Uint16 encoding; + Uint16 channels; /* 1 = mono, 2 = stereo */ + Uint32 frequency; /* One of 11025, 22050, or 44100 Hz */ + Uint32 byterate; /* Average bytes per second */ + Uint16 blockalign; /* Bytes per sample block */ + Uint16 bitspersample; /* One of 8, 12, 16, or 4 for ADPCM */ +} WaveFMT; + +/* The general chunk found in the WAVE file */ +typedef struct Chunk { + Uint32 magic; + Uint32 length; + Uint8 *data; /* Data includes magic and length */ +} Chunk; + diff --git a/src/audio/alsa/.cvsignore b/src/audio/alsa/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/alsa/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/alsa/Makefile.am b/src/audio/alsa/Makefile.am new file mode 100644 index 000000000..f9e5280d6 --- /dev/null +++ b/src/audio/alsa/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the ALSA PCM audio API + +noinst_LTLIBRARIES = libaudio_alsa.la +libaudio_alsa_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_alsa_audio.c \ + SDL_alsa_audio.h diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c new file mode 100644 index 000000000..d58a98c26 --- /dev/null +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -0,0 +1,521 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + + + +/* Allow access to a raw mixing buffer */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_timer.h" +#include "SDL_alsa_audio.h" + +/* The tag name used by ALSA audio */ +#define DRIVER_NAME "alsa" + +/* default card and device numbers as listed in dev/snd */ +static int card_no = 0; +static int device_no = 0; + +/* default channel communication parameters */ +#define DEFAULT_CPARAMS_RATE 22050 +#define DEFAULT_CPARAMS_VOICES 1 +#define DEFAULT_CPARAMS_FRAG_SIZE 512 +#define DEFAULT_CPARAMS_FRAGS_MIN 1 +#define DEFAULT_CPARAMS_FRAGS_MAX -1 + +/* Open the audio device for playback, and don't block if busy */ +#define OPEN_FLAGS (SND_PCM_OPEN_PLAYBACK|SND_PCM_OPEN_NONBLOCK) + +/* Audio driver functions */ +static int PCM_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void PCM_WaitAudio(_THIS); +static void PCM_PlayAudio(_THIS); +static Uint8 *PCM_GetAudioBuf(_THIS); +static void PCM_CloseAudio(_THIS); + +/* PCM transfer channel parameters initialize function */ +static void init_pcm_cparams(snd_pcm_channel_params_t* cparams) +{ + memset(cparams,0,sizeof(snd_pcm_channel_params_t)); + + cparams->channel = SND_PCM_CHANNEL_PLAYBACK; + cparams->mode = SND_PCM_MODE_BLOCK; + cparams->start_mode = SND_PCM_START_DATA; //_FULL + cparams->stop_mode = SND_PCM_STOP_STOP; + cparams->format.format = SND_PCM_SFMT_S16_LE; + cparams->format.interleave = 1; + cparams->format.rate = DEFAULT_CPARAMS_RATE; + cparams->format.voices = DEFAULT_CPARAMS_VOICES; + cparams->buf.block.frag_size = DEFAULT_CPARAMS_FRAG_SIZE; + cparams->buf.block.frags_min = DEFAULT_CPARAMS_FRAGS_MIN; + cparams->buf.block.frags_max = DEFAULT_CPARAMS_FRAGS_MAX; +} + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +/* + See if we can open a nonblocking channel. + Return value '1' means we can. + Return value '0' means we cannot. +*/ +{ + int available; + int rval; + snd_pcm_t *handle; + snd_pcm_channel_params_t cparams; +#ifdef DEBUG_AUDIO + snd_pcm_channel_status_t cstatus; +#endif + + available = 0; + handle = NULL; + + init_pcm_cparams(&cparams); + + rval = snd_pcm_open(&handle, card_no, device_no, OPEN_FLAGS); + if (rval >= 0) + { + rval = snd_pcm_plugin_params(handle, &cparams); + +#ifdef DEBUG_AUDIO + snd_pcm_plugin_status(handle, &cstatus); + printf("status after snd_pcm_plugin_params call = %d\n",cstatus.status); +#endif + if (rval >= 0) + { + available = 1; + } + else + { + SDL_SetError("snd_pcm_channel_params failed: %s\n", snd_strerror (rval)); + } + + if ((rval = snd_pcm_close(handle)) < 0) + { + SDL_SetError("snd_pcm_close failed: %s\n",snd_strerror(rval)); + available = 0; + } + } + else + { + SDL_SetError("snd_pcm_open failed: %s\n", snd_strerror(rval)); + } + + return(available); +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + audio_handle = NULL; + + /* Set the function pointers */ + this->OpenAudio = PCM_OpenAudio; + this->WaitAudio = PCM_WaitAudio; + this->PlayAudio = PCM_PlayAudio; + this->GetAudioBuf = PCM_GetAudioBuf; + this->CloseAudio = PCM_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap ALSA_bootstrap = { + DRIVER_NAME, "ALSA PCM audio", + Audio_Available, Audio_CreateDevice +}; + +/* This function waits until it is possible to write a full sound buffer */ +static void PCM_WaitAudio(_THIS) +{ + + /* Check to see if the thread-parent process is still alive */ + { static int cnt = 0; + /* Note that this only works with thread implementations + that use a different process id for each thread. + */ + if (parent && (((++cnt)%10) == 0)) { /* Check every 10 loops */ + if ( kill(parent, 0) < 0 ) { + this->enabled = 0; + } + } + } + + /* See if we need to use timed audio synchronization */ + if ( frame_ticks ) + { + /* Use timer for general audio synchronization */ + Sint32 ticks; + + ticks = ((Sint32)(next_frame - SDL_GetTicks()))-FUDGE_TICKS; + if ( ticks > 0 ) + { + SDL_Delay(ticks); + } + } + else + { + /* Use select() for audio synchronization */ + fd_set fdset; + struct timeval timeout; + FD_ZERO(&fdset); + FD_SET(audio_fd, &fdset); + timeout.tv_sec = 10; + timeout.tv_usec = 0; +#ifdef DEBUG_AUDIO + fprintf(stderr, "Waiting for audio to get ready\n"); +#endif + if ( select(audio_fd+1, NULL, &fdset, NULL, &timeout) <= 0 ) + { + const char *message = + "Audio timeout - buggy audio driver? (disabled)"; + /* In general we should never print to the screen, + but in this case we have no other way of letting + the user know what happened. + */ + fprintf(stderr, "SDL: %s\n", message); + this->enabled = 0; + /* Don't try to close - may hang */ + audio_fd = -1; +#ifdef DEBUG_AUDIO + fprintf(stderr, "Done disabling audio\n"); +#endif + } +#ifdef DEBUG_AUDIO + fprintf(stderr, "Ready!\n"); +#endif + } +} + +static snd_pcm_channel_status_t cstatus; + +static void PCM_PlayAudio(_THIS) +{ + int written, rval; + + /* Write the audio data, checking for EAGAIN (buffer full) and underrun */ + do { + written = snd_pcm_plugin_write(audio_handle, pcm_buf, pcm_len); +#ifdef DEBUG_AUDIO + fprintf(stderr, "written = %d pcm_len = %d\n",written,pcm_len); +#endif + if (written != pcm_len) + { + if (errno == EAGAIN) + { + SDL_Delay(1); /* Let a little CPU time go by and try to write again */ +#ifdef DEBUG_AUDIO + fprintf(stderr, "errno == EAGAIN\n"); +#endif + } + else + { + if( (rval = snd_pcm_plugin_status(audio_handle, &cstatus)) < 0 ) + { + SDL_SetError("snd_pcm_plugin_status failed: %s\n", snd_strerror(rval)); + return; + } + if ( (cstatus.status == SND_PCM_STATUS_UNDERRUN) + ||(cstatus.status == SND_PCM_STATUS_READY) ) + { +#ifdef DEBUG_AUDIO + fprintf(stderr, "buffer underrun\n"); +#endif + if ( (rval = snd_pcm_plugin_prepare (audio_handle,SND_PCM_CHANNEL_PLAYBACK)) < 0 ) + { + SDL_SetError("snd_pcm_plugin_prepare failed: %s\n",snd_strerror(rval) ); + return; + } + /* if we reach here, try to write again */ + } + } + } + } while ( (written < 0) && ((errno == 0) || (errno == EAGAIN)) ); + + /* Set the next write frame */ + if ( frame_ticks ) { + next_frame += frame_ticks; + } + + /* If we couldn't write, assume fatal error for now */ + if ( written < 0 ) { + this->enabled = 0; + } + return; +} + +static Uint8 *PCM_GetAudioBuf(_THIS) +{ + return(pcm_buf); +} + +static void PCM_CloseAudio(_THIS) +{ + int rval; + + if ( pcm_buf != NULL ) { + free(pcm_buf); + pcm_buf = NULL; + } + if ( audio_handle != NULL ) { + if ((rval = snd_pcm_plugin_flush(audio_handle,SND_PCM_CHANNEL_PLAYBACK)) < 0) + { + SDL_SetError("snd_pcm_plugin_flush failed: %s\n",snd_strerror(rval)); + return; + } + if ((rval = snd_pcm_close(audio_handle)) < 0) + { + SDL_SetError("snd_pcm_close failed: %s\n",snd_strerror(rval)); + return; + } + audio_handle = NULL; + } +} + +static int PCM_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + int rval; + snd_pcm_channel_params_t cparams; + snd_pcm_channel_setup_t csetup; + int format; + Uint16 test_format; + int twidth; + + /* initialize channel transfer parameters to default */ + init_pcm_cparams(&cparams); + + /* Reset the timer synchronization flag */ + frame_ticks = 0.0; + + /* Open the audio device */ + + rval = snd_pcm_open(&audio_handle, card_no, device_no, OPEN_FLAGS); + if ( rval < 0 ) { + SDL_SetError("snd_pcm_open failed: %s\n", snd_strerror(rval)); + return(-1); + } + +#ifdef PLUGIN_DISABLE_MMAP /* This is gone in newer versions of ALSA? */ + /* disable count status parameter */ + if ((rval = snd_plugin_set_disable(audio_handle, PLUGIN_DISABLE_MMAP))<0) + { + SDL_SetError("snd_plugin_set_disable failed: %s\n", snd_strerror(rval)); + return(-1); + } +#endif + + pcm_buf = NULL; + + /* Try for a closest match on audio format */ + format = 0; + for ( test_format = SDL_FirstAudioFormat(spec->format); + ! format && test_format; ) + { +#ifdef DEBUG_AUDIO + fprintf(stderr, "Trying format 0x%4.4x spec->samples %d\n", test_format,spec->samples); +#endif + /* if match found set format to equivalent ALSA format */ + switch ( test_format ) { + case AUDIO_U8: + format = SND_PCM_SFMT_U8; + cparams.buf.block.frag_size = spec->samples * spec->channels; + break; + case AUDIO_S8: + format = SND_PCM_SFMT_S8; + cparams.buf.block.frag_size = spec->samples * spec->channels; + break; + case AUDIO_S16LSB: + format = SND_PCM_SFMT_S16_LE; + cparams.buf.block.frag_size = spec->samples*2 * spec->channels; + break; + case AUDIO_S16MSB: + format = SND_PCM_SFMT_S16_BE; + cparams.buf.block.frag_size = spec->samples*2 * spec->channels; + break; + case AUDIO_U16LSB: + format = SND_PCM_SFMT_U16_LE; + cparams.buf.block.frag_size = spec->samples*2 * spec->channels; + break; + case AUDIO_U16MSB: + format = SND_PCM_SFMT_U16_BE; + cparams.buf.block.frag_size = spec->samples*2 * spec->channels; + break; + default: + break; + } + if ( ! format ) { + test_format = SDL_NextAudioFormat(); + } + } + if ( format == 0 ) { + SDL_SetError("Couldn't find any hardware audio formats"); + return(-1); + } + spec->format = test_format; + + /* Set the audio format */ + cparams.format.format = format; + + /* Set mono or stereo audio (currently only two channels supported) */ + cparams.format.voices = spec->channels; + + #ifdef DEBUG_AUDIO + printf("intializing channels %d\n", cparams.format.voices); + #endif + + /* Set rate */ + cparams.format.rate = spec->freq ; + + /* Setup the transfer parameters according to cparams */ + rval = snd_pcm_plugin_params(audio_handle, &cparams); + if (rval < 0) { + SDL_SetError("snd_pcm_channel_params failed: %s\n", snd_strerror (rval)); + return(-1); + } + + /* Make sure channel is setup right one last time */ + memset( &csetup, 0, sizeof( csetup ) ); + csetup.channel = SND_PCM_CHANNEL_PLAYBACK; + if ( snd_pcm_plugin_setup( audio_handle, &csetup ) < 0 ) + { + SDL_SetError("Unable to setup playback channel\n" ); + return(-1); + } + +#ifdef DEBUG_AUDIO + else + { + fprintf(stderr,"requested format: %d\n",cparams.format.format); + fprintf(stderr,"requested frag size: %d\n",cparams.buf.block.frag_size); + fprintf(stderr,"requested max frags: %d\n\n",cparams.buf.block.frags_max); + + fprintf(stderr,"real format: %d\n", csetup.format.format ); + fprintf(stderr,"real frag size : %d\n", csetup.buf.block.frag_size ); + fprintf(stderr,"real max frags : %d\n", csetup.buf.block.frags_max ); + } +#endif // DEBUG_AUDIO + + /* Allocate memory to the audio buffer and initialize with silence + (Note that buffer size must be a multiple of fragment size, so find closest multiple) + */ + + twidth = snd_pcm_format_width(format); + if (twidth < 0) { + printf("snd_pcm_format_width failed\n"); + twidth = 0; + } +#ifdef DEBUG_AUDIO + printf("format is %d bits wide\n",twidth); +#endif + + pcm_len = csetup.buf.block.frag_size * (twidth/8) * csetup.format.voices ; + +#ifdef DEBUG_AUDIO + printf("pcm_len set to %d\n", pcm_len); +#endif + + if (pcm_len == 0) + { + pcm_len = csetup.buf.block.frag_size; + } + + pcm_buf = (Uint8*)malloc(pcm_len); + if (pcm_buf == NULL) { + SDL_SetError("pcm_buf malloc failed\n"); + return(-1); + } + memset(pcm_buf,spec->silence,pcm_len); + +#ifdef DEBUG_AUDIO + fprintf(stderr,"pcm_buf malloced and silenced.\n"); +#endif + + /* get the file descriptor */ + if( (audio_fd = snd_pcm_file_descriptor(audio_handle, device_no)) < 0) + { + fprintf(stderr, "snd_pcm_file_descriptor failed with error code: %d\n", audio_fd); + } + + /* Trigger audio playback */ + rval = snd_pcm_plugin_prepare( audio_handle, SND_PCM_CHANNEL_PLAYBACK); + if (rval < 0) { + SDL_SetError("snd_pcm_plugin_prepare failed: %s\n", snd_strerror (rval)); + return(-1); + } + rval = snd_pcm_playback_go(audio_handle); + if (rval < 0) { + SDL_SetError("snd_pcm_playback_go failed: %s\n", snd_strerror (rval)); + return(-1); + } + + /* Check to see if we need to use select() workaround */ + { char *workaround; + workaround = getenv("SDL_DSP_NOSELECT"); + if ( workaround ) { + frame_ticks = (float)(spec->samples*1000)/spec->freq; + next_frame = SDL_GetTicks()+frame_ticks; + } + } + + /* Get the parent process id (we're the parent of the audio thread) */ + parent = getpid(); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/alsa/SDL_alsa_audio.h b/src/audio/alsa/SDL_alsa_audio.h new file mode 100644 index 000000000..657fea7e4 --- /dev/null +++ b/src/audio/alsa/SDL_alsa_audio.h @@ -0,0 +1,61 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifndef _ALSA_PCM_audio_h +#define _ALSA_PCM_audio_h + +#include "SDL_sysaudio.h" +#include + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The audio device handle */ + snd_pcm_t *audio_handle; + + /* The audio file descriptor */ + int audio_fd; + + /* The parent process id, to detect when application quits */ + pid_t parent; + + /* Raw mixing buffer */ + Uint8 *pcm_buf; + int pcm_len; + + /* Support for audio timing using a timer, in addition to select() */ + float frame_ticks; + float next_frame; +}; +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ + +/* Old variable names */ +#define audio_handle (this->hidden->audio_handle) +#define audio_fd (this->hidden->audio_fd) +#define parent (this->hidden->parent) +#define pcm_buf (this->hidden->pcm_buf) +#define pcm_len (this->hidden->pcm_len) +#define frame_ticks (this->hidden->frame_ticks) +#define next_frame (this->hidden->next_frame) + +#endif /* _ALSA_PCM_audio_h */ diff --git a/src/audio/amigaos/Makefile.am b/src/audio/amigaos/Makefile.am new file mode 100644 index 000000000..1ee53ef16 --- /dev/null +++ b/src/audio/amigaos/Makefile.am @@ -0,0 +1,8 @@ + +## Makefile.am for the SDL AmigaOS audio subsystem + +noinst_LTLIBRARIES = libaudio_arch.la + +ARCH_SRCS = SDL_ahiaudio.c SDL_audio.c SDL_lowaudio.h SDL_sysaudio.h + +libaudio_arch_la_SOURCES = $(ARCH_SRCS) diff --git a/src/audio/amigaos/SDL_ahiaudio.c b/src/audio/amigaos/SDL_ahiaudio.c new file mode 100644 index 000000000..6ff717a8c --- /dev/null +++ b/src/audio/amigaos/SDL_ahiaudio.c @@ -0,0 +1,299 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + 5635-34 Springhouse Dr. + Pleasanton, CA 94588 (USA) + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer (For IRIX 6.5 and higher) */ + +#include "SDL_endian.h" +#include "SDL_audio.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_lowaudio.h" + +/* Audio driver functions */ +static int AHI_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void AHI_WaitAudio(_THIS); +static void AHI_PlayAudio(_THIS); +static Uint8 *AHI_GetAudioBuf(_THIS); +static void AHI_CloseAudio(_THIS); + +#ifndef __SASC + #define mymalloc(x) AllocVec(x,MEMF_PUBLIC) + #define myfree FreeVec +#else + #define mymalloc malloc + #define myfree free +#endif + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ +#ifndef NO_AMIGADEBUG + D(bug("AHI available.\n")); +#endif + + return 1; +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + +#ifndef NO_AMIGADEBUG + D(bug("AHI created...\n")); +#endif + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + + /* Set the function pointers */ + this->OpenAudio = AHI_OpenAudio; + this->WaitAudio = AHI_WaitAudio; + this->PlayAudio = AHI_PlayAudio; + this->GetAudioBuf = AHI_GetAudioBuf; + this->CloseAudio = AHI_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap AHI_bootstrap = { + "AHI", Audio_Available, Audio_CreateDevice +}; + + +void static AHI_WaitAudio(_THIS) +{ + if(!CheckIO((struct IORequest *)audio_req[current_buffer])) + { + WaitIO((struct IORequest *)audio_req[current_buffer]); +// AbortIO((struct IORequest *)audio_req[current_buffer]); + } +} + +static void AHI_PlayAudio(_THIS) +{ + if(playing>1) + WaitIO((struct IORequest *)audio_req[current_buffer]); + + /* Write the audio data out */ + audio_req[current_buffer] -> ahir_Std. io_Message.mn_Node.ln_Pri = 60; + audio_req[current_buffer] -> ahir_Std. io_Data = mixbuf[current_buffer]; + audio_req[current_buffer] -> ahir_Std. io_Length = this->spec.samples*this->hidden->bytespersample; + audio_req[current_buffer] -> ahir_Std. io_Offset = 0; + audio_req[current_buffer] -> ahir_Std . io_Command = CMD_WRITE; + audio_req[current_buffer] -> ahir_Frequency = this->hidden->freq; + audio_req[current_buffer] -> ahir_Volume = 0x10000; + audio_req[current_buffer] -> ahir_Type = this->hidden->type; + audio_req[current_buffer] -> ahir_Position = 0x8000; + audio_req[current_buffer] -> ahir_Link = (playing>0 ? audio_req[current_buffer^1] : NULL); + + SendIO((struct IORequest *)audio_req[current_buffer]); + current_buffer^=1; + + playing++; +} + +static Uint8 *AHI_GetAudioBuf(_THIS) +{ + return(mixbuf[current_buffer]); +} + +static void AHI_CloseAudio(_THIS) +{ + D(bug("Closing audio...\n")); + + if ( mixbuf[0] != NULL ) { + myfree(mixbuf[0]); +// SDL_FreeAudioMem(mixbuf[0]); + mixbuf[0] = NULL; + } + + if ( mixbuf[1] != NULL ) { + myfree(mixbuf[1]); +// SDL_FreeAudioMem(mixbuf[1]); + mixbuf[1] = NULL; + } + + playing=0; + + if(audio_req[0]) + { + if(audio_req[1]) + { + if(!CheckIO((struct IORequest *)audio_req[1])) + { + AbortIO((struct IORequest *)audio_req[1]); + WaitIO((struct IORequest *)audio_req[1]); + } + myfree(audio_req[1]); + } + + if(!CheckIO((struct IORequest *)audio_req[0])) + { + AbortIO((struct IORequest *)audio_req[0]); + WaitIO((struct IORequest *)audio_req[0]); + } + + CloseDevice((struct IORequest *)audio_req[0]); + DeleteIORequest((struct IORequest *)audio_req[0]); + audio_req[0]=audio_req[1]=NULL; + } + + if ( audio_port != NULL ) { + DeleteMsgPort(audio_port); + audio_port = NULL; + } + D(bug("...done!\n")); +} + +static int AHI_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ +// int width; + + D(bug("AHI opening...\n")); + + /* Determine the audio parameters from the AudioSpec */ + switch ( spec->format & 0xFF ) { + + case 8: { /* Signed 8 bit audio data */ + D(bug("Samples a 8 bit...\n")); + spec->format = AUDIO_S8; + this->hidden->bytespersample=1; + this->hidden->type = AHIST_M8S; + + } + break; + + case 16: { /* Signed 16 bit audio data */ + D(bug("Samples a 16 bit...\n")); + spec->format = AUDIO_S16MSB; + this->hidden->bytespersample=2; + this->hidden->type = AHIST_M16S; + } + break; + + default: { + SDL_SetError("Unsupported audio format"); + return(-1); + } + } + + D(bug("Before CalculateAudioSpec\n")); + /* Update the fragment size as size in bytes */ + SDL_CalculateAudioSpec(spec); + + D(bug("Before CreateMsgPort\n")); + + if(!(audio_port=CreateMsgPort())) + { + SDL_SetError("Unable to create a MsgPort"); + return -1; + } + + D(bug("Before CreateIORequest\n")); + + if(!(audio_req[0]=(struct AHIRequest *)CreateIORequest(audio_port,sizeof(struct AHIRequest)))) + { + SDL_SetError("Unable to create an AHIRequest"); + DeleteMsgPort(audio_port); + return -1; + } + + audio_req[0]->ahir_Version = 4; + + if(OpenDevice(AHINAME,0,(struct IORequest *)audio_req[0],NULL)) + { + SDL_SetError("Unable to open AHI device!\n"); + DeleteIORequest((struct IORequest *)audio_req[0]); + DeleteMsgPort(audio_port); + return -1; + } + + D(bug("AFTER opendevice\n")); + + /* Set output frequency */ + this->hidden->freq = spec->freq; + + D(bug("Before buffer allocation\n")); + + /* Allocate mixing buffer */ + mixbuf[0] = (Uint8 *)mymalloc(spec->size); + mixbuf[1] = (Uint8 *)mymalloc(spec->size); + + D(bug("Before audio_req allocation\n")); + + if(!(audio_req[1]=mymalloc(sizeof(struct AHIRequest)))) + { + SDL_OutOfMemory(); + return(-1); + } + + D(bug("Before audio_req memcpy\n")); + + memcpy(audio_req[1],audio_req[0],sizeof(struct AHIRequest)); + + if ( mixbuf[0] == NULL || mixbuf[1] == NULL ) { + SDL_OutOfMemory(); + return(-1); + } + + D(bug("Before mixbuf memset\n")); + + memset(mixbuf[0], spec->silence, spec->size); + memset(mixbuf[1], spec->silence, spec->size); + + current_buffer=0; + playing=0; + + D(bug("AHI opened: freq:%ld mixbuf:%lx/%lx buflen:%ld bits:%ld\n",spec->freq,mixbuf[0],mixbuf[1],spec->size,this->hidden->bytespersample*8)); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/amigaos/SDL_audio.c b/src/audio/amigaos/SDL_audio.c new file mode 100644 index 000000000..5a1b343db --- /dev/null +++ b/src/audio/amigaos/SDL_audio.c @@ -0,0 +1,532 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer */ +#include +#include +#include +#include + +#include "SDL.h" +#include "SDL_audio.h" +#include "SDL_timer.h" +#include "SDL_error.h" +#include "SDL_audio_c.h" +#include "SDL_audiomem.h" +#include "SDL_sysaudio.h" + + +/* Available audio drivers */ +static AudioBootStrap *bootstrap[] = { +#ifdef unix + &AUDIO_bootstrap, +#endif +#ifdef linux + &DMA_bootstrap, +#endif +#ifdef ESD_SUPPORT + &ESD_bootstrap, +#endif +#ifdef ENABLE_DIRECTX + &DSOUND_bootstrap, +#endif +#ifdef ENABLE_WINDIB + &WAVEOUT_bootstrap, +#endif +#ifdef __BEOS__ + &BAUDIO_bootstrap, +#endif +#ifdef macintosh + &AUDIO_bootstrap, +#endif +#ifdef _AIX + &Paud_bootstrap, +#endif +#ifdef ENABLE_CYBERGRAPHICS + &AHI_bootstrap, +#endif + NULL +}; +SDL_AudioDevice *current_audio = NULL; + +/* Various local functions */ +int SDL_AudioInit(const char *driver_name); +void SDL_AudioQuit(void); + +struct SignalSemaphore AudioSem; + +/* The general mixing thread function */ +int RunAudio(void *audiop) +{ + SDL_AudioDevice *audio = (SDL_AudioDevice *)audiop; + Uint8 *stream; + int stream_len; + void *udata; + void (*fill)(void *userdata,Uint8 *stream, int len); + int silence,started=0; + + D(bug("Task audio started audio struct:<%lx>...\n",audiop)); + + D(bug("Before Openaudio...")); + if(audio->OpenAudio(audio, &audio->spec)==-1) + { + return(-1); + } + + D(bug("OpenAudio...OK\n")); + + /* Perform any thread setup */ + if ( audio->ThreadInit ) { + audio->ThreadInit(audio); + } + audio->threadid = SDL_ThreadID(); + + /* Set up the mixing function */ + fill = audio->spec.callback; + udata = audio->spec.userdata; + if ( audio->convert.needed ) { + if ( audio->convert.src_format == AUDIO_U8 ) { + silence = 0x80; + D(bug("*** Silence 0x80 ***\n")); + } else { + silence = 0; + } + stream_len = audio->convert.len; + } else { + silence = audio->spec.silence; + stream_len = audio->spec.size; + } + stream = audio->fake_stream; + + ObtainSemaphore(&AudioSem); + ReleaseSemaphore(&AudioSem); + + D(bug("Enering audio loop...\n")); + + D(if(audio->convert.needed)bug("*** Conversion needed.\n")); + + /* Loop, filling the audio buffers */ + while ( audio->enabled ) + { + /* Wait for new current buffer to finish playing */ + + if ( stream == audio->fake_stream ) + SDL_Delay((audio->spec.samples*1000)/audio->spec.freq); + else + { + if(started>1) + { +// D(bug("Waiting audio...\n")); + audio->WaitAudio(audio); + } + } + + ObtainSemaphore(&AudioSem); + + /* Fill the current buffer with sound */ + if ( audio->convert.needed ) { + stream = audio->convert.buf; + } else { + stream = audio->GetAudioBuf(audio); + } + + if(stream!=audio->fake_stream) + memset(stream, silence, stream_len); + + if ( ! audio->paused ) { + ObtainSemaphore(&audio->mixer_lock); + (*fill)(udata, stream, stream_len); + ReleaseSemaphore(&audio->mixer_lock); + } + + /* Convert the audio if necessary */ + if ( audio->convert.needed ) { + SDL_ConvertAudio(&audio->convert); + stream = audio->GetAudioBuf(audio); + memcpy(stream, audio->convert.buf,audio->convert.len_cvt); + } + + if(stream!=audio->fake_stream) + { +// D(bug("Playing stream at %lx\n",stream)); + + audio->PlayAudio(audio); + started++; + } + ReleaseSemaphore(&AudioSem); + + } + D(bug("Out of subtask loop...\n")); + + /* Wait for the audio to drain.. */ + if ( audio->WaitDone ) { + audio->WaitDone(audio); + } + + D(bug("WaitAudio...Done\n")); + + audio->CloseAudio(audio); + + D(bug("CloseAudio..Done, subtask exiting...\n")); + + return(0); +} + +int SDL_AudioInit(const char *driver_name) +{ + SDL_AudioDevice *audio; + int i = 0, idx; + + /* Check to make sure we don't overwrite 'current_audio' */ + if ( current_audio != NULL ) { + SDL_AudioQuit(); + } + + /* Select the proper audio driver */ + audio = NULL; + idx = 0; + + InitSemaphore(&AudioSem); + + if ( audio == NULL ) { + if ( driver_name != NULL ) { + if ( strrchr(driver_name, ':') != NULL ) { + idx = atoi(strrchr(driver_name, ':')+1); + } + for ( i=0; bootstrap[i]; ++i ) { + if (strncmp(bootstrap[i]->name, driver_name, + strlen(bootstrap[i]->name)) == 0) { + if ( bootstrap[i]->available() ) { + audio=bootstrap[i]->create(idx); + break; + } + } + } + } else { + for ( i=0; bootstrap[i]; ++i ) { + if ( bootstrap[i]->available() ) { + audio = bootstrap[i]->create(idx); + if ( audio != NULL ) { + break; + } + } + } + } + if ( audio == NULL ) { + SDL_SetError("No available audio device"); +#if 0 /* Don't fail SDL_Init() if audio isn't available. + SDL_OpenAudio() will handle it at that point. *sigh* + */ + return(-1); +#endif + } + } + current_audio = audio; + if ( current_audio ) { + current_audio->name = bootstrap[i]->name; + } + return(0); +} + +char *SDL_AudioDriverName(char *namebuf, int maxlen) +{ + if ( current_audio != NULL ) { + strncpy(namebuf, current_audio->name, maxlen-1); + namebuf[maxlen-1] = '\0'; + return(namebuf); + } + return(NULL); +} + +int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained) +{ + SDL_AudioDevice *audio; + + /* Start up the audio driver, if necessary */ + if ( ! current_audio ) { + if ( (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) || + (current_audio == NULL) ) { + return(-1); + } + } + audio = current_audio; + + D(bug("Chiamata SDL_OpenAudio...\n")); + + /* Verify some parameters */ + if ( desired->callback == NULL ) { + SDL_SetError("SDL_OpenAudio() passed a NULL callback"); + return(-1); + } + switch ( desired->channels ) { + case 1: /* Mono */ + case 2: /* Stereo */ + break; + default: + SDL_SetError("1 (mono) and 2 (stereo) channels supported"); + return(-1); + } + + /* Create a semaphore for locking the sound buffers */ + InitSemaphore(&audio->mixer_lock); + + /* Calculate the silence and size of the audio specification */ + SDL_CalculateAudioSpec(desired); + + /* Open the audio subsystem */ + memcpy(&audio->spec, desired, sizeof(audio->spec)); + audio->convert.needed = 0; + audio->enabled = 1; + audio->paused = 1; + + ObtainSemaphore(&AudioSem); + + audio->thread = SDL_CreateThread(RunAudio, audio); + + if ( audio->thread == NULL ) { + ReleaseSemaphore(&AudioSem); + SDL_CloseAudio(); + SDL_SetError("Couldn't create audio thread"); + return(-1); + } + + /* If the audio driver changes the buffer size, accept it */ + if ( audio->spec.samples != desired->samples ) { + desired->samples = audio->spec.samples; + SDL_CalculateAudioSpec(desired); + } + + /* Allocate a fake audio memory buffer */ + audio->fake_stream = SDL_AllocAudioMem(audio->spec.size); + if ( audio->fake_stream == NULL ) { + ReleaseSemaphore(&AudioSem); + SDL_CloseAudio(); + SDL_OutOfMemory(); + return(-1); + } + + /* See if we need to do any conversion */ + if ( memcmp(desired, &audio->spec, sizeof(audio->spec)) == 0 ) { + /* Just copy over the desired audio specification */ + if ( obtained != NULL ) { + memcpy(obtained, &audio->spec, sizeof(audio->spec)); + } + } else { + /* Copy over the audio specification if possible */ + if ( obtained != NULL ) { + memcpy(obtained, &audio->spec, sizeof(audio->spec)); + } else { + /* Build an audio conversion block */ + D(bug("Need conversion:\n desired: C:%ld F:%ld T:%lx\navailable: C:%ld F:%ld T:%lx\n", + desired->channels, desired->freq, desired->format, + audio->spec.channels,audio->spec.freq,audio->spec.format)); + + Forbid(); + +// Magari poi lo sostiutisco con un semaforo. + + if ( SDL_BuildAudioCVT(&audio->convert, + desired->format, desired->channels, + desired->freq, + audio->spec.format, audio->spec.channels, + audio->spec.freq) < 0 ) { + ReleaseSemaphore(&AudioSem); + SDL_CloseAudio(); + return(-1); + } + if ( audio->convert.needed ) { + audio->convert.len = desired->size; + audio->convert.buf =(Uint8 *)SDL_AllocAudioMem( + audio->convert.len*audio->convert.len_mult); + if ( audio->convert.buf == NULL ) { + ReleaseSemaphore(&AudioSem); + SDL_CloseAudio(); + SDL_OutOfMemory(); + return(-1); + } + } + } + } + + ReleaseSemaphore(&AudioSem); + + D(bug("SDL_OpenAudio USCITA...\n")); + + return(0); +} + +SDL_audiostatus SDL_GetAudioStatus(void) +{ + SDL_AudioDevice *audio = current_audio; + SDL_audiostatus status; + + status = SDL_AUDIO_STOPPED; + if ( audio && audio->enabled ) { + if ( audio->paused ) { + status = SDL_AUDIO_PAUSED; + } else { + status = SDL_AUDIO_PLAYING; + } + } + return(status); +} + +void SDL_PauseAudio (int pause_on) +{ + SDL_AudioDevice *audio = current_audio; + + if ( audio ) { + audio->paused = pause_on; + } +} + +void SDL_LockAudio (void) +{ + SDL_AudioDevice *audio = current_audio; + + /* Obtain a lock on the mixing buffers */ + if ( audio ) { + if ( audio->thread && (SDL_ThreadID() == audio->threadid) ) { + return; + } + ObtainSemaphore(&audio->mixer_lock); + } +} + +void SDL_UnlockAudio (void) +{ + SDL_AudioDevice *audio = current_audio; + + /* Release lock on the mixing buffers */ + if ( audio ) { + if ( audio->thread && (SDL_ThreadID() == audio->threadid) ) { + return; + } + ReleaseSemaphore(&audio->mixer_lock); + } +} + +void SDL_CloseAudio (void) +{ + SDL_AudioDevice *audio = current_audio; + + if ( audio ) { + if(audio->enabled) + { + audio->enabled = 0; + + if ( audio->thread != NULL ) { + D(bug("Waiting audio thread...\n")); + SDL_WaitThread(audio->thread, NULL); + D(bug("...audio replied\n")); + } + } + + if ( audio->fake_stream != NULL ) { + SDL_FreeAudioMem(audio->fake_stream); + audio->fake_stream=NULL; + } + if ( audio->convert.needed && current_audio->convert.buf!=NULL) { + SDL_FreeAudioMem(audio->convert.buf); + current_audio->convert.buf=NULL; + } + } + SDL_QuitSubSystem(SDL_INIT_AUDIO); +} + +void SDL_AudioQuit(void) +{ + if ( current_audio ) { + if(current_audio->enabled) + { + D(bug("Closing audio in AudioQuit...\n")); + current_audio->enabled = 0; + + if ( current_audio->thread != NULL ) { + D(bug("Waiting audio thread...\n")); + SDL_WaitThread(current_audio->thread, NULL); + D(bug("...audio replied\n")); + } + } + if ( current_audio->fake_stream != NULL ) { + SDL_FreeAudioMem(current_audio->fake_stream); + } + if ( current_audio->convert.needed && + current_audio->convert.buf) { + SDL_FreeAudioMem(current_audio->convert.buf); + } + + current_audio->free(current_audio); + current_audio = NULL; + } +} + +#define NUM_FORMATS 6 +static int format_idx; +static int format_idx_sub; +static Uint16 format_list[NUM_FORMATS][NUM_FORMATS] = { + { AUDIO_U8, AUDIO_S8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB }, + { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB }, + { AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_U8, AUDIO_S8 }, + { AUDIO_U16MSB, AUDIO_U16LSB, AUDIO_S16MSB, AUDIO_S16LSB, AUDIO_U8, AUDIO_S8 }, +}; + +Uint16 SDL_FirstAudioFormat(Uint16 format) +{ + for ( format_idx=0; format_idx < NUM_FORMATS; ++format_idx ) { + if ( format_list[format_idx][0] == format ) { + break; + } + } + format_idx_sub = 0; + return(SDL_NextAudioFormat()); +} + +Uint16 SDL_NextAudioFormat(void) +{ + if ( (format_idx == NUM_FORMATS) || (format_idx_sub == NUM_FORMATS) ) { + return(0); + } + return(format_list[format_idx][format_idx_sub++]); +} + +void SDL_CalculateAudioSpec(SDL_AudioSpec *spec) +{ + switch (spec->format) { + case AUDIO_U8: + spec->silence = 0x80; + break; + default: + spec->silence = 0x00; + break; + } + spec->size = (spec->format&0xFF)/8; + spec->size *= spec->channels; + spec->size *= spec->samples; +} diff --git a/src/audio/amigaos/SDL_lowaudio.h b/src/audio/amigaos/SDL_lowaudio.h new file mode 100644 index 000000000..cea9f8379 --- /dev/null +++ b/src/audio/amigaos/SDL_lowaudio.h @@ -0,0 +1,58 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_lowaudio_h +#define _SDL_lowaudio_h + +// #include + +#include "SDL_sysaudio.h" +#include +#include +#include + +/* Hidden "this" pointer for the audio functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The handle for the audio device */ + struct AHIRequest *audio_req[2]; + struct MsgPort *audio_port; + Sint32 freq,type,bytespersample; + Uint8 *mixbuf[2]; /* The app mixing buffer */ + int current_buffer; + Uint32 playing; +}; + +/* Old variable names */ +#define audio_port (this->hidden->audio_port) +#define audio_req (this->hidden->audio_req) +#define mixbuf (this->hidden->mixbuf) +#define current_buffer (this->hidden->current_buffer) +#define playing (this->hidden->playing) + +#endif /* _SDL_lowaudio_h */ diff --git a/src/audio/amigaos/SDL_sysaudio.h b/src/audio/amigaos/SDL_sysaudio.h new file mode 100644 index 000000000..2cc12b516 --- /dev/null +++ b/src/audio/amigaos/SDL_sysaudio.h @@ -0,0 +1,142 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_sysaudio_h +#define _SDL_sysaudio_h + +#include "SDL_mutex.h" +#include "SDL_thread.h" + +#include +#include +#ifdef __SASC +#include +#else +#include +#endif + +#include +#include "mydebug.h" + +/* The SDL audio driver */ +typedef struct SDL_AudioDevice SDL_AudioDevice; + +/* Define the SDL audio driver structure */ +#define _THIS SDL_AudioDevice *_this +#ifndef _STATUS +#define _STATUS SDL_status *status +#endif +struct SDL_AudioDevice { + /* * * */ + /* The name of this audio driver */ + const char *name; + + /* * * */ + /* Public driver functions */ + int (*OpenAudio)(_THIS, SDL_AudioSpec *spec); + void (*ThreadInit)(_THIS); /* Called by audio thread at start */ + void (*WaitAudio)(_THIS); + void (*PlayAudio)(_THIS); + Uint8 *(*GetAudioBuf)(_THIS); + void (*WaitDone)(_THIS); + void (*CloseAudio)(_THIS); + + /* * * */ + /* Data common to all devices */ + + /* The current audio specification (shared with audio thread) */ + SDL_AudioSpec spec; + + /* An audio conversion block for audio format emulation */ + SDL_AudioCVT convert; + + /* Current state flags */ + int enabled; + int paused; + + /* Fake audio buffer for when the audio hardware is busy */ + Uint8 *fake_stream; + + /* A semaphore for locking the mixing buffers */ + struct SignalSemaphore mixer_lock; + + /* A thread to feed the audio device */ + SDL_Thread *thread; + Uint32 threadid; + + /* * * */ + /* Data private to this driver */ + struct SDL_PrivateAudioData *hidden; + + /* * * */ + /* The function used to dispose of this structure */ + void (*free)(_THIS); +}; +#undef _THIS + +typedef struct AudioBootStrap { + const char *name; + int (*available)(void); + SDL_AudioDevice *(*create)(int devindex); +} AudioBootStrap; + +#ifdef ESD_SUPPORT +extern AudioBootStrap ESD_bootstrap; +#endif +#ifdef linux +extern AudioBootStrap DMA_bootstrap; +#endif +#ifdef unix +extern AudioBootStrap AUDIO_bootstrap; +#endif +#ifdef ENABLE_WINDIB +extern AudioBootStrap WAVEOUT_bootstrap; +#endif +#ifdef ENABLE_DIRECTX +extern AudioBootStrap DSOUND_bootstrap; +#endif +#ifdef __BEOS__ +extern AudioBootStrap BAUDIO_bootstrap; +#endif +#ifdef macintosh +extern AudioBootStrap AUDIO_bootstrap; +#endif +#ifdef _AIX +extern AudioBootStrap Paud_bootstrap; +#endif +#ifdef ENABLE_CYBERGRAPHICS +extern AudioBootStrap AHI_bootstrap; +#endif + +/* This is the current audio device */ +extern SDL_AudioDevice *current_audio; + +#ifndef __SASC +extern struct ExecBase *SysBase; +#endif + +#endif /* _SDL_sysaudio_h */ diff --git a/src/audio/arts/.cvsignore b/src/audio/arts/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/arts/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/arts/Makefile.am b/src/audio/arts/Makefile.am new file mode 100644 index 000000000..f0f12f24e --- /dev/null +++ b/src/audio/arts/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the Analog Realtime Synthesizer sound driver + +noinst_LTLIBRARIES = libaudio_arts.la +libaudio_arts_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_artsaudio.c \ + SDL_artsaudio.h diff --git a/src/audio/arts/SDL_artsaudio.c b/src/audio/arts/SDL_artsaudio.c new file mode 100644 index 000000000..92904af07 --- /dev/null +++ b/src/audio/arts/SDL_artsaudio.c @@ -0,0 +1,247 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer */ + +#include +#include +#include +#include +#include +#include +#include + +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_timer.h" +#include "SDL_audiodev_c.h" +#include "SDL_artsaudio.h" + +/* The tag name used by artsc audio */ +#define ARTSC_DRIVER_NAME "artsc" + +/* Audio driver functions */ +static int ARTSC_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void ARTSC_WaitAudio(_THIS); +static void ARTSC_PlayAudio(_THIS); +static Uint8 *ARTSC_GetAudioBuf(_THIS); +static void ARTSC_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + if(arts_init()) + return 0; + else + return 1; +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + stream = 0; + + /* Set the function pointers */ + this->OpenAudio = ARTSC_OpenAudio; + this->WaitAudio = ARTSC_WaitAudio; + this->PlayAudio = ARTSC_PlayAudio; + this->GetAudioBuf = ARTSC_GetAudioBuf; + this->CloseAudio = ARTSC_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap ARTSC_bootstrap = { + ARTSC_DRIVER_NAME, "Analog Realtime Synthesizer", + Audio_Available, Audio_CreateDevice +}; + +/* This function waits until it is possible to write a full sound buffer */ +static void ARTSC_WaitAudio(_THIS) +{ + Sint32 ticks; + + /* Check to see if the thread-parent process is still alive */ + { static int cnt = 0; + /* Note that this only works with thread implementations + that use a different process id for each thread. + */ + if (parent && (((++cnt)%10) == 0)) { /* Check every 10 loops */ + if ( kill(parent, 0) < 0 ) { + this->enabled = 0; + } + } + } + + /* Use timer for general audio synchronization */ + ticks = ((Sint32)(next_frame - SDL_GetTicks()))-FUDGE_TICKS; + if ( ticks > 0 ) { + SDL_Delay(ticks); + } +} + +static void ARTSC_PlayAudio(_THIS) +{ + int written; + + /* Write the audio data */ + written = arts_write(stream, mixbuf, mixlen); + + /* If timer synchronization is enabled, set the next write frame */ + if ( frame_ticks ) { + next_frame += frame_ticks; + } + + /* If we couldn't write, assume fatal error for now */ + if ( written < 0 ) { + this->enabled = 0; + } +#ifdef DEBUG_AUDIO + fprintf(stderr, "Wrote %d bytes of audio data\n", written); +#endif +} + +static Uint8 *ARTSC_GetAudioBuf(_THIS) +{ + return(mixbuf); +} + +static void ARTSC_CloseAudio(_THIS) +{ + if ( mixbuf != NULL ) { + SDL_FreeAudioMem(mixbuf); + mixbuf = NULL; + } + if ( stream ) { + arts_close_stream(stream); + stream = 0; + } +} + +static int ARTSC_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + int bits, frag_spec; + Uint16 test_format, format; + + /* Reset the timer synchronization flag */ + frame_ticks = 0.0; + + mixbuf = NULL; + + /* Try for a closest match on audio format */ + format = 0; + bits = 0; + for ( test_format = SDL_FirstAudioFormat(spec->format); + ! format && test_format; ) { +#ifdef DEBUG_AUDIO + fprintf(stderr, "Trying format 0x%4.4x\n", test_format); +#endif + switch ( test_format ) { + case AUDIO_U8: + bits = 8; + format = 1; + break; + case AUDIO_S16LSB: + bits = 16; + format = 1; + break; + default: + format = 0; + break; + } + if ( ! format ) { + test_format = SDL_NextAudioFormat(); + } + } + if ( format == 0 ) { + SDL_SetError("Couldn't find any hardware audio formats"); + return(-1); + } + spec->format = test_format; + + stream = arts_play_stream(spec->freq, bits, spec->channels, "SDL"); + + /* Calculate the final parameters for this audio specification */ + SDL_CalculateAudioSpec(spec); + + /* Determine the power of two of the fragment size */ + for ( frag_spec = 0; (0x01<size; ++frag_spec ); + if ( (0x01<size ) { + SDL_SetError("Fragment size must be a power of two"); + return(-1); + } + frag_spec |= 0x00020000; /* two fragments, for low latency */ + +#ifdef ARTS_P_PACKET_SETTINGS + arts_stream_set(stream, ARTS_P_PACKET_SETTINGS, frag_spec); +#else + arts_stream_set(stream, ARTS_P_PACKET_SIZE, frag_spec&0xffff); + arts_stream_set(stream, ARTS_P_PACKET_COUNT, frag_spec>>16); +#endif + spec->size = arts_stream_get(stream, ARTS_P_PACKET_SIZE); + + /* Allocate mixing buffer */ + mixlen = spec->size; + mixbuf = (Uint8 *)SDL_AllocAudioMem(mixlen); + if ( mixbuf == NULL ) { + return(-1); + } + memset(mixbuf, spec->silence, spec->size); + + /* Get the parent process id (we're the parent of the audio thread) */ + parent = getpid(); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/arts/SDL_artsaudio.h b/src/audio/arts/SDL_artsaudio.h new file mode 100644 index 000000000..19e35e09d --- /dev/null +++ b/src/audio/arts/SDL_artsaudio.h @@ -0,0 +1,63 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_artscaudio_h +#define _SDL_artscaudio_h + +#include +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The stream descriptor for the audio device */ + arts_stream_t stream; + + /* The parent process id, to detect when application quits */ + pid_t parent; + + /* Raw mixing buffer */ + Uint8 *mixbuf; + int mixlen; + + /* Support for audio timing using a timer, in addition to select() */ + float frame_ticks; + float next_frame; +}; +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ + +/* Old variable names */ +#define stream (this->hidden->stream) +#define parent (this->hidden->parent) +#define mixbuf (this->hidden->mixbuf) +#define mixlen (this->hidden->mixlen) +#define frame_ticks (this->hidden->frame_ticks) +#define next_frame (this->hidden->next_frame) + +#endif /* _SDL_artscaudio_h */ + diff --git a/src/audio/baudio/.cvsignore b/src/audio/baudio/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/baudio/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/baudio/Makefile.am b/src/audio/baudio/Makefile.am new file mode 100644 index 000000000..a98d9d9ed --- /dev/null +++ b/src/audio/baudio/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the BeOS BSoundPlayer sound driver + +noinst_LTLIBRARIES = libaudio_baudio.la +libaudio_baudio_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_beaudio.cc \ + SDL_beaudio.h diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc new file mode 100644 index 000000000..f415b2ccf --- /dev/null +++ b/src/audio/baudio/SDL_beaudio.cc @@ -0,0 +1,211 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to the audio stream on BeOS */ + +#include +#include +#include +#include + +#include "SDL_BeApp.h" + +extern "C" { + +#include "SDL_audio.h" +#include "SDL_audio_c.h" +#include "SDL_sysaudio.h" +#include "SDL_systhread_c.h" +#include "SDL_beaudio.h" + + +/* Audio driver functions */ +static int BE_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void BE_WaitAudio(_THIS); +static void BE_PlayAudio(_THIS); +static Uint8 *BE_GetAudioBuf(_THIS); +static void BE_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + return(1); +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *device; + + /* Initialize all variables that we clean on shutdown */ + device = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( device ) { + memset(device, 0, (sizeof *device)); + device->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *device->hidden)); + } + if ( (device == NULL) || (device->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( device ) { + free(device); + } + return(0); + } + memset(device->hidden, 0, (sizeof *device->hidden)); + + /* Set the function pointers */ + device->OpenAudio = BE_OpenAudio; + device->WaitAudio = BE_WaitAudio; + device->PlayAudio = BE_PlayAudio; + device->GetAudioBuf = BE_GetAudioBuf; + device->CloseAudio = BE_CloseAudio; + + device->free = Audio_DeleteDevice; + + return device; +} + +AudioBootStrap BAUDIO_bootstrap = { + "baudio", "BeOS BSoundPlayer", + Audio_Available, Audio_CreateDevice +}; + +/* The BeOS callback for handling the audio buffer */ +static void FillSound(void *device, void *stream, size_t len, + const media_raw_audio_format &format) +{ + SDL_AudioDevice *audio = (SDL_AudioDevice *)device; + + /* Silence the buffer, since it's ours */ + memset(stream, audio->spec.silence, len); + + /* Only do soemthing if audio is enabled */ + if ( ! audio->enabled ) + return; + + if ( ! audio->paused ) { + if ( audio->convert.needed ) { + SDL_mutexP(audio->mixer_lock); + (*audio->spec.callback)(audio->spec.userdata, + (Uint8 *)audio->convert.buf,audio->convert.len); + SDL_mutexV(audio->mixer_lock); + SDL_ConvertAudio(&audio->convert); + memcpy(stream,audio->convert.buf,audio->convert.len_cvt); + } else { + SDL_mutexP(audio->mixer_lock); + (*audio->spec.callback)(audio->spec.userdata, + (Uint8 *)stream, len); + SDL_mutexV(audio->mixer_lock); + } + } + return; +} + +/* Dummy functions -- we don't use thread-based audio */ +void BE_WaitAudio(_THIS) +{ + return; +} +void BE_PlayAudio(_THIS) +{ + return; +} +Uint8 *BE_GetAudioBuf(_THIS) +{ + return(NULL); +} + +void BE_CloseAudio(_THIS) +{ + if ( audio_obj ) { + audio_obj->Stop(); + delete audio_obj; + audio_obj = NULL; + } + + /* Quit the Be Application, if there's nothing left to do */ + SDL_QuitBeApp(); +} + +int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + media_raw_audio_format format; + + /* Initialize the Be Application, if it's not already started */ + if ( SDL_InitBeApp() < 0 ) { + return(-1); + } + + /* Parse the audio format and fill the Be raw audio format */ + format.frame_rate = (float)spec->freq; + format.channel_count = spec->channels; + switch (spec->format&~0x1000) { + case AUDIO_S8: + /* Signed 8-bit audio unsupported, convert to U8 */ + spec->format = AUDIO_U8; + case AUDIO_U8: + format.format = media_raw_audio_format::B_AUDIO_UCHAR; + format.byte_order = 0; + break; + case AUDIO_U16: + /* Unsigned 16-bit audio unsupported, convert to S16 */ + spec->format ^= 0x8000; + case AUDIO_S16: + format.format = media_raw_audio_format::B_AUDIO_SHORT; + if ( spec->format & 0x1000 ) { + format.byte_order = 1; /* Big endian */ + } else { + format.byte_order = 2; /* Little endian */ + } + break; + } + format.buffer_size = spec->samples; + + /* Calculate the final parameters for this audio specification */ + SDL_CalculateAudioSpec(spec); + + /* Subscribe to the audio stream (creates a new thread) */ + { sigset_t omask; + SDL_MaskSignals(&omask); + audio_obj = new BSoundPlayer(&format, "SDL Audio", FillSound, + NULL, _this); + SDL_UnmaskSignals(&omask); + } + audio_obj->Start(); + audio_obj->SetHasData(true); + + /* We're running! */ + return(1); +} + +}; /* Extern C */ diff --git a/src/audio/baudio/SDL_beaudio.h b/src/audio/baudio/SDL_beaudio.h new file mode 100644 index 000000000..97a85ea40 --- /dev/null +++ b/src/audio/baudio/SDL_beaudio.h @@ -0,0 +1,43 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_lowaudio_h +#define _SDL_lowaudio_h + +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *_this + +struct SDL_PrivateAudioData { + BSoundPlayer *audio_obj; +}; + +/* Old variable names */ +#define audio_obj (_this->hidden->audio_obj) + +#endif /* _SDL_lowaudio_h */ diff --git a/src/audio/dma/.cvsignore b/src/audio/dma/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/dma/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/dma/Makefile.am b/src/audio/dma/Makefile.am new file mode 100644 index 000000000..fa4ce467d --- /dev/null +++ b/src/audio/dma/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the OSS /dev/dsp DMA sound driver + +noinst_LTLIBRARIES = libaudio_dma.la +libaudio_dma_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_dmaaudio.c \ + SDL_dmaaudio.h diff --git a/src/audio/dma/SDL_dmaaudio.c b/src/audio/dma/SDL_dmaaudio.c new file mode 100644 index 000000000..9e1a83f57 --- /dev/null +++ b/src/audio/dma/SDL_dmaaudio.c @@ -0,0 +1,466 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef linux +#include +#endif +#ifdef __bsdi__ +#include +#endif +#ifdef __FreeBSD__ +#include +#endif +#ifdef __USLC__ +#include +#endif + +#ifndef MAP_FAILED +#define MAP_FAILED ((Uint8 *)-1) +#endif + +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_timer.h" +#include "SDL_audiodev_c.h" +#include "SDL_dmaaudio.h" + +/* The tag name used by DMA audio */ +#define DMA_DRIVER_NAME "dma" + +/* Open the audio device for playback, and don't block if busy */ +#define OPEN_FLAGS (O_RDWR|O_NONBLOCK) + +/* Audio driver functions */ +static int DMA_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void DMA_WaitAudio(_THIS); +static void DMA_PlayAudio(_THIS); +static Uint8 *DMA_GetAudioBuf(_THIS); +static void DMA_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + int available; + int fd; + + available = 0; + + fd = SDL_OpenAudioPath(NULL, 0, OPEN_FLAGS, 0); + if ( fd >= 0 ) { + int caps; + struct audio_buf_info info; + + if ( (ioctl(fd, SNDCTL_DSP_GETCAPS, &caps) == 0) && + (caps & DSP_CAP_TRIGGER) && (caps & DSP_CAP_MMAP) && + (ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) == 0) ) { + available = 1; + } + close(fd); + } + return(available); +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + audio_fd = -1; + + /* Set the function pointers */ + this->OpenAudio = DMA_OpenAudio; + this->WaitAudio = DMA_WaitAudio; + this->PlayAudio = DMA_PlayAudio; + this->GetAudioBuf = DMA_GetAudioBuf; + this->CloseAudio = DMA_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap DMA_bootstrap = { + DMA_DRIVER_NAME, "OSS /dev/dsp DMA audio", + Audio_Available, Audio_CreateDevice +}; + +/* This function waits until it is possible to write a full sound buffer */ +static void DMA_WaitAudio(_THIS) +{ + fd_set fdset; + + /* Check to see if the thread-parent process is still alive */ + { static int cnt = 0; + /* Note that this only works with thread implementations + that use a different process id for each thread. + */ + if (parent && (((++cnt)%10) == 0)) { /* Check every 10 loops */ + if ( kill(parent, 0) < 0 ) { + this->enabled = 0; + } + } + } + + /* See if we need to use timed audio synchronization */ + if ( frame_ticks ) { + /* Use timer for general audio synchronization */ + Sint32 ticks; + + ticks = ((Sint32)(next_frame - SDL_GetTicks()))-FUDGE_TICKS; + if ( ticks > 0 ) { + SDL_Delay(ticks); + } + } else { + /* Use select() for audio synchronization */ + struct timeval timeout; + FD_ZERO(&fdset); + FD_SET(audio_fd, &fdset); + timeout.tv_sec = 10; + timeout.tv_usec = 0; +#ifdef DEBUG_AUDIO + fprintf(stderr, "Waiting for audio to get ready\n"); +#endif + if ( select(audio_fd+1, NULL, &fdset, NULL, &timeout) <= 0 ) { + const char *message = +#ifdef AUDIO_OSPACE_HACK + "Audio timeout - buggy audio driver? (trying ospace)"; +#else + "Audio timeout - buggy audio driver? (disabled)"; +#endif + /* In general we should never print to the screen, + but in this case we have no other way of letting + the user know what happened. + */ + fprintf(stderr, "SDL: %s\n", message); +#ifdef AUDIO_OSPACE_HACK + /* We may be able to use GET_OSPACE trick */ + frame_ticks = (float)(this->spec->samples*1000) / + this->spec->freq; + next_frame = SDL_GetTicks()+frame_ticks; +#else + this->enabled = 0; + /* Don't try to close - may hang */ + audio_fd = -1; +#ifdef DEBUG_AUDIO + fprintf(stderr, "Done disabling audio\n"); +#endif +#endif /* AUDIO_OSPACE_HACK */ + } +#ifdef DEBUG_AUDIO + fprintf(stderr, "Ready!\n"); +#endif + } +} + +static void DMA_PlayAudio(_THIS) +{ + /* If timer synchronization is enabled, set the next write frame */ + if ( frame_ticks ) { + next_frame += frame_ticks; + } + return; +} + +static Uint8 *DMA_GetAudioBuf(_THIS) +{ + count_info info; + int playing; + int filling; + + /* Get number of blocks, looping if we're not using select() */ + do { + if ( ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) < 0 ) { + /* Uh oh... */ + this->enabled = 0; + return(NULL); + } + } while ( frame_ticks && (info.blocks < 1) ); +#ifdef DEBUG_AUDIO + if ( info.blocks > 1 ) { + printf("Warning: audio underflow (%d frags)\n", info.blocks-1); + } +#endif + playing = info.ptr / this->spec.size; + filling = (playing + 1)%num_buffers; + return (dma_buf + (filling * this->spec.size)); +} + +static void DMA_CloseAudio(_THIS) +{ + if ( dma_buf != NULL ) { + munmap(dma_buf, dma_len); + dma_buf = NULL; + } + if ( audio_fd >= 0 ) { + close(audio_fd); + audio_fd = -1; + } +} + +static int DMA_ReopenAudio(_THIS, const char *audiodev, int format, int stereo, + SDL_AudioSpec *spec) +{ + int frag_spec; + int value; + + /* Close and then reopen the audio device */ + close(audio_fd); + audio_fd = open(audiodev, O_RDWR, 0); + if ( audio_fd < 0 ) { + SDL_SetError("Couldn't open %s: %s", audiodev, strerror(errno)); + return(-1); + } + ioctl(audio_fd, SNDCTL_DSP_RESET, 0); + + /* Calculate the final parameters for this audio specification */ + SDL_CalculateAudioSpec(spec); + + /* Determine the power of two of the fragment size */ + for ( frag_spec = 0; (0x01<size; ++frag_spec ); + if ( (0x01<size ) { + SDL_SetError("Fragment size must be a power of two"); + return(-1); + } + + /* Set the audio buffering parameters */ + if ( ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0 ) { + SDL_SetError("Couldn't set audio fragment spec"); + return(-1); + } + + /* Set the audio format */ + value = format; + if ( (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) || + (value != format) ) { + SDL_SetError("Couldn't set audio format"); + return(-1); + } + + /* Set mono or stereo audio */ + value = (spec->channels > 1); + if ( (ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo) < 0) || + (value != stereo) ) { + SDL_SetError("Couldn't set audio channels"); + return(-1); + } + + /* Set the DSP frequency */ + value = spec->freq; + if ( ioctl(audio_fd, SOUND_PCM_WRITE_RATE, &value) < 0 ) { + SDL_SetError("Couldn't set audio frequency"); + return(-1); + } + spec->freq = value; + + /* We successfully re-opened the audio */ + return(0); +} + +static int DMA_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + char audiodev[1024]; + int format; + int stereo; + int value; + Uint16 test_format; + struct audio_buf_info info; + + /* Reset the timer synchronization flag */ + frame_ticks = 0.0; + + /* Open the audio device */ + audio_fd = SDL_OpenAudioPath(audiodev, sizeof(audiodev), OPEN_FLAGS, 0); + if ( audio_fd < 0 ) { + SDL_SetError("Couldn't open %s: %s", audiodev, strerror(errno)); + return(-1); + } + dma_buf = NULL; + ioctl(audio_fd, SNDCTL_DSP_RESET, 0); + + /* Get a list of supported hardware formats */ + if ( ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &value) < 0 ) { + SDL_SetError("Couldn't get audio format list"); + return(-1); + } + + /* Try for a closest match on audio format */ + format = 0; + for ( test_format = SDL_FirstAudioFormat(spec->format); + ! format && test_format; ) { +#ifdef DEBUG_AUDIO + fprintf(stderr, "Trying format 0x%4.4x\n", test_format); +#endif + switch ( test_format ) { + case AUDIO_U8: + if ( value & AFMT_U8 ) { + format = AFMT_U8; + } + break; + case AUDIO_S8: + if ( value & AFMT_S8 ) { + format = AFMT_S8; + } + break; + case AUDIO_S16LSB: + if ( value & AFMT_S16_LE ) { + format = AFMT_S16_LE; + } + break; + case AUDIO_S16MSB: + if ( value & AFMT_S16_BE ) { + format = AFMT_S16_BE; + } + break; + case AUDIO_U16LSB: + if ( value & AFMT_U16_LE ) { + format = AFMT_U16_LE; + } + break; + case AUDIO_U16MSB: + if ( value & AFMT_U16_BE ) { + format = AFMT_U16_BE; + } + break; + default: + break; + } + if ( ! format ) { + test_format = SDL_NextAudioFormat(); + } + } + if ( format == 0 ) { + SDL_SetError("Couldn't find any hardware audio formats"); + return(-1); + } + spec->format = test_format; + + /* Set the audio format */ + value = format; + if ( (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) || + (value != format) ) { + SDL_SetError("Couldn't set audio format"); + return(-1); + } + + /* Set mono or stereo audio (currently only two channels supported) */ + stereo = (spec->channels > 1); + ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo); + if ( stereo ) { + spec->channels = 2; + } else { + spec->channels = 1; + } + + /* Because some drivers don't allow setting the buffer size + after setting the format, we must re-open the audio device + once we know what format and channels are supported + */ + if ( DMA_ReopenAudio(this, audiodev, format, stereo, spec) < 0 ) { + /* Error is set by DMA_ReopenAudio() */ + return(-1); + } + + /* Memory map the audio buffer */ + if ( ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info) < 0 ) { + SDL_SetError("Couldn't get OSPACE parameters"); + return(-1); + } + spec->size = info.fragsize; + spec->samples = spec->size / ((spec->format & 0xFF) / 8); + spec->samples /= spec->channels; + num_buffers = info.fragstotal; + dma_len = num_buffers*spec->size; + dma_buf = (Uint8 *)mmap(NULL, dma_len, PROT_WRITE, MAP_SHARED, + audio_fd, 0); + if ( dma_buf == MAP_FAILED ) { + SDL_SetError("DMA memory map failed"); + dma_buf = NULL; + return(-1); + } + memset(dma_buf, spec->silence, dma_len); + + /* Check to see if we need to use select() workaround */ + { char *workaround; + workaround = getenv("SDL_DSP_NOSELECT"); + if ( workaround ) { + frame_ticks = (float)(spec->samples*1000)/spec->freq; + next_frame = SDL_GetTicks()+frame_ticks; + } + } + + /* Trigger audio playback */ + value = 0; + ioctl(audio_fd, SNDCTL_DSP_SETTRIGGER, &value); + value = PCM_ENABLE_OUTPUT; + if ( ioctl(audio_fd, SNDCTL_DSP_SETTRIGGER, &value) < 0 ) { + SDL_SetError("Couldn't trigger audio output"); + return(-1); + } + + /* Get the parent process id (we're the parent of the audio thread) */ + parent = getpid(); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/dma/SDL_dmaaudio.h b/src/audio/dma/SDL_dmaaudio.h new file mode 100644 index 000000000..e17524c98 --- /dev/null +++ b/src/audio/dma/SDL_dmaaudio.h @@ -0,0 +1,63 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_dspaudio_h +#define _SDL_dspaudio_h + +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The file descriptor for the audio device */ + int audio_fd; + + /* The parent process id, to detect when application quits */ + pid_t parent; + + /* Raw mixing buffer */ + Uint8 *dma_buf; + int dma_len; + int num_buffers; + + /* Support for audio timing using a timer, in addition to select() */ + float frame_ticks; + float next_frame; +}; +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ + +/* Old variable names */ +#define audio_fd (this->hidden->audio_fd) +#define parent (this->hidden->parent) +#define dma_buf (this->hidden->dma_buf) +#define dma_len (this->hidden->dma_len) +#define num_buffers (this->hidden->num_buffers) +#define frame_ticks (this->hidden->frame_ticks) +#define next_frame (this->hidden->next_frame) + +#endif /* _SDL_dspaudio_h */ diff --git a/src/audio/dmedia/.cvsignore b/src/audio/dmedia/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/dmedia/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/dmedia/Makefile.am b/src/audio/dmedia/Makefile.am new file mode 100644 index 000000000..149385eb3 --- /dev/null +++ b/src/audio/dmedia/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the IRIX DMedia sound driver + +noinst_LTLIBRARIES = libaudio_dmedia.la +libaudio_dmedia_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_irixaudio.c \ + SDL_irixaudio.h diff --git a/src/audio/dmedia/SDL_irixaudio.c b/src/audio/dmedia/SDL_irixaudio.c new file mode 100644 index 000000000..bc9903ca3 --- /dev/null +++ b/src/audio/dmedia/SDL_irixaudio.c @@ -0,0 +1,201 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + 5635-34 Springhouse Dr. + Pleasanton, CA 94588 (USA) + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer (For IRIX 6.5 and higher) */ + +#include + +#include "SDL_endian.h" +#include "SDL_timer.h" +#include "SDL_audio.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_irixaudio.h" + + +/* Audio driver functions */ +static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void AL_WaitAudio(_THIS); +static void AL_PlayAudio(_THIS); +static Uint8 *AL_GetAudioBuf(_THIS); +static void AL_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + return 1; +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + + /* Set the function pointers */ + this->OpenAudio = AL_OpenAudio; + this->WaitAudio = AL_WaitAudio; + this->PlayAudio = AL_PlayAudio; + this->GetAudioBuf = AL_GetAudioBuf; + this->CloseAudio = AL_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap AUDIO_bootstrap = { + "AL", "IRIX DMedia audio", + Audio_Available, Audio_CreateDevice +}; + + +void static AL_WaitAudio(_THIS) +{ + Sint32 timeleft; + + timeleft = this->spec.samples - alGetFillable(audio_port); + if ( timeleft > 0 ) { + timeleft /= (this->spec.freq/1000); + SDL_Delay((Uint32)timeleft); + } +} + +static void AL_PlayAudio(_THIS) +{ + /* Write the audio data out */ + if ( alWriteFrames(audio_port, mixbuf, this->spec.samples) < 0 ) { + /* Assume fatal error, for now */ + this->enabled = 0; + } +} + +static Uint8 *AL_GetAudioBuf(_THIS) +{ + return(mixbuf); +} + +static void AL_CloseAudio(_THIS) +{ + if ( mixbuf != NULL ) { + SDL_FreeAudioMem(mixbuf); + mixbuf = NULL; + } + if ( audio_port != NULL ) { + ALcloseport(audio_port); + audio_port = NULL; + } +} + +static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + ALconfig audio_config; + ALpv audio_param; + int width; + + /* Determine the audio parameters from the AudioSpec */ + switch ( spec->format & 0xFF ) { + + case 8: { /* Signed 8 bit audio data */ + spec->format = AUDIO_S8; + width = AL_SAMPLE_8; + } + break; + + case 16: { /* Signed 16 bit audio data */ + spec->format = AUDIO_S16MSB; + width = AL_SAMPLE_16; + } + break; + + default: { + SDL_SetError("Unsupported audio format"); + return(-1); + } + } + + /* Update the fragment size as size in bytes */ + SDL_CalculateAudioSpec(spec); + + /* Set output frequency */ + audio_param.param = AL_RATE; + audio_param.value.i = spec->freq; + if( alSetParams(AL_DEFAULT_OUTPUT, &audio_param, 1) < 0 ) { + SDL_SetError("alSetParams failed"); + return(-1); + } + + /* Open the audio port with the requested frequency */ + audio_port = NULL; + audio_config = alNewConfig(); + if ( audio_config && + (alSetSampFmt(audio_config, AL_SAMPFMT_TWOSCOMP) >= 0) && + (alSetWidth(audio_config, width) >= 0) && + (alSetQueueSize(audio_config, spec->samples*2) >= 0) && + (alSetChannels(audio_config, spec->channels) >= 0) ) { + audio_port = ALopenport("SDL audio", "w", audio_config); + } + alFreeConfig(audio_config); + if( audio_port == NULL ) { + SDL_SetError("Unable to open audio port"); + return(-1); + } + + /* Allocate mixing buffer */ + mixbuf = (Uint8 *)SDL_AllocAudioMem(spec->size); + if ( mixbuf == NULL ) { + SDL_OutOfMemory(); + return(-1); + } + memset(mixbuf, spec->silence, spec->size); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/dmedia/SDL_irixaudio.h b/src/audio/dmedia/SDL_irixaudio.h new file mode 100644 index 000000000..9f0955955 --- /dev/null +++ b/src/audio/dmedia/SDL_irixaudio.h @@ -0,0 +1,49 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_lowaudio_h +#define _SDL_lowaudio_h + +#include + +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the audio functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The handle for the audio device */ + ALport audio_port; + + Uint8 *mixbuf; /* The app mixing buffer */ +}; + +/* Old variable names */ +#define audio_port (this->hidden->audio_port) +#define mixbuf (this->hidden->mixbuf) + +#endif /* _SDL_lowaudio_h */ diff --git a/src/audio/dsp/.cvsignore b/src/audio/dsp/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/dsp/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/dsp/Makefile.am b/src/audio/dsp/Makefile.am new file mode 100644 index 000000000..bccca129c --- /dev/null +++ b/src/audio/dsp/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the OSS /dev/dsp standard sound driver + +noinst_LTLIBRARIES = libaudio_dsp.la +libaudio_dsp_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_dspaudio.c \ + SDL_dspaudio.h diff --git a/src/audio/dsp/SDL_dspaudio.c b/src/audio/dsp/SDL_dspaudio.c new file mode 100644 index 000000000..83b0b9bdb --- /dev/null +++ b/src/audio/dsp/SDL_dspaudio.c @@ -0,0 +1,450 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef linux +#include +#endif +#ifdef __bsdi__ +#include +#endif +#ifdef __FreeBSD__ +#include +#endif +#ifdef __USLC__ +#include +#endif + +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_timer.h" +#include "SDL_audiodev_c.h" +#include "SDL_dspaudio.h" + +/* The tag name used by DSP audio */ +#define DSP_DRIVER_NAME "dsp" + +/* Open the audio device for playback, and don't block if busy */ +/*#define USE_BLOCKING_WRITES*/ +#ifdef USE_BLOCKING_WRITES +#define OPEN_FLAGS O_WRONLY +#else +#define OPEN_FLAGS (O_WRONLY|O_NONBLOCK) +#endif + +/* Audio driver functions */ +static int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void DSP_WaitAudio(_THIS); +static void DSP_PlayAudio(_THIS); +static Uint8 *DSP_GetAudioBuf(_THIS); +static void DSP_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + int fd; + int available; + + available = 0; + fd = SDL_OpenAudioPath(NULL, 0, OPEN_FLAGS, 0); + if ( fd >= 0 ) { + available = 1; + close(fd); + } + return(available); +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + audio_fd = -1; + + /* Set the function pointers */ + this->OpenAudio = DSP_OpenAudio; + this->WaitAudio = DSP_WaitAudio; + this->PlayAudio = DSP_PlayAudio; + this->GetAudioBuf = DSP_GetAudioBuf; + this->CloseAudio = DSP_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap DSP_bootstrap = { + DSP_DRIVER_NAME, "OSS /dev/dsp standard audio", + Audio_Available, Audio_CreateDevice +}; + +/* This function waits until it is possible to write a full sound buffer */ +static void DSP_WaitAudio(_THIS) +{ +#ifndef USE_BLOCKING_WRITES /* Not necessary because of blocking writes */ + fd_set fdset; + + /* Check to see if the thread-parent process is still alive */ + { static int cnt = 0; + /* Note that this only works with thread implementations + that use a different process id for each thread. + */ + if (parent && (((++cnt)%10) == 0)) { /* Check every 10 loops */ + if ( kill(parent, 0) < 0 ) { + this->enabled = 0; + } + } + } + + /* See if we need to use timed audio synchronization */ + if ( frame_ticks ) { + /* Use timer for general audio synchronization */ + Sint32 ticks; + + ticks = ((Sint32)(next_frame - SDL_GetTicks()))-FUDGE_TICKS; + if ( ticks > 0 ) { + SDL_Delay(ticks); + } + } else { + /* Use select() for audio synchronization */ + struct timeval timeout; + FD_ZERO(&fdset); + FD_SET(audio_fd, &fdset); + timeout.tv_sec = 10; + timeout.tv_usec = 0; +#ifdef DEBUG_AUDIO + fprintf(stderr, "Waiting for audio to get ready\n"); +#endif + if ( select(audio_fd+1, NULL, &fdset, NULL, &timeout) <= 0 ) { + const char *message = + "Audio timeout - buggy audio driver? (disabled)"; + /* In general we should never print to the screen, + but in this case we have no other way of letting + the user know what happened. + */ + fprintf(stderr, "SDL: %s\n", message); + this->enabled = 0; + /* Don't try to close - may hang */ + audio_fd = -1; +#ifdef DEBUG_AUDIO + fprintf(stderr, "Done disabling audio\n"); +#endif + } +#ifdef DEBUG_AUDIO + fprintf(stderr, "Ready!\n"); +#endif + } +#endif /* !USE_BLOCKING_WRITES */ +} + +static void DSP_PlayAudio(_THIS) +{ + int written; + + /* Write the audio data, checking for EAGAIN on broken audio drivers */ + do { + written = write(audio_fd, mixbuf, mixlen); + if ( (written < 0) && ((errno == 0) || (errno == EAGAIN)) ) { + SDL_Delay(1); /* Let a little CPU time go by */ + } + } while ( (written < 0) && + ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)) ); + + /* If timer synchronization is enabled, set the next write frame */ + if ( frame_ticks ) { + next_frame += frame_ticks; + } + + /* If we couldn't write, assume fatal error for now */ + if ( written < 0 ) { + this->enabled = 0; + } +#ifdef DEBUG_AUDIO + fprintf(stderr, "Wrote %d bytes of audio data\n", written); +#endif +} + +static Uint8 *DSP_GetAudioBuf(_THIS) +{ + return(mixbuf); +} + +static void DSP_CloseAudio(_THIS) +{ + if ( mixbuf != NULL ) { + SDL_FreeAudioMem(mixbuf); + mixbuf = NULL; + } + if ( audio_fd >= 0 ) { + close(audio_fd); + audio_fd = -1; + } +} + +static int DSP_ReopenAudio(_THIS, const char *audiodev, int format, + SDL_AudioSpec *spec) +{ + int frag_spec; + int value; + + /* Close and then reopen the audio device */ + close(audio_fd); + audio_fd = open(audiodev, O_WRONLY, 0); + if ( audio_fd < 0 ) { + SDL_SetError("Couldn't open %s: %s", audiodev, strerror(errno)); + return(-1); + } + + /* Calculate the final parameters for this audio specification */ + SDL_CalculateAudioSpec(spec); + + /* Determine the power of two of the fragment size */ + for ( frag_spec = 0; (0x01<size; ++frag_spec ); + if ( (0x01<size ) { + SDL_SetError("Fragment size must be a power of two"); + return(-1); + } + frag_spec |= 0x00020000; /* two fragments, for low latency */ + + /* Set the audio buffering parameters */ +#ifdef DEBUG_AUDIO + fprintf(stderr, "Requesting %d fragments of size %d\n", + (frag_spec >> 16), 1<<(frag_spec&0xFFFF)); +#endif + if ( ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0 ) { + fprintf(stderr, "Warning: Couldn't set audio fragment size\n"); + } +#ifdef DEBUG_AUDIO + { audio_buf_info info; + ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info); + fprintf(stderr, "fragments = %d\n", info.fragments); + fprintf(stderr, "fragstotal = %d\n", info.fragstotal); + fprintf(stderr, "fragsize = %d\n", info.fragsize); + fprintf(stderr, "bytes = %d\n", info.bytes); + } +#endif + + /* Set the audio format */ + value = format; + if ( (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) || + (value != format) ) { + SDL_SetError("Couldn't set audio format"); + return(-1); + } + + /* Set the number of channels of output */ + value = spec->channels; +#ifdef SNDCTL_DSP_CHANNELS + if ( ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &value) < 0 ) { +#endif + value = (spec->channels > 1); + ioctl(audio_fd, SNDCTL_DSP_STEREO, &value); + value = (value ? 2 : 1); +#ifdef SNDCTL_DSP_CHANNELS + } +#endif + if ( value != spec->channels ) { + SDL_SetError("Couldn't set audio channels"); + return(-1); + } + + /* Set the DSP frequency */ + value = spec->freq; + if ( ioctl(audio_fd, SOUND_PCM_WRITE_RATE, &value) < 0 ) { + SDL_SetError("Couldn't set audio frequency"); + return(-1); + } + spec->freq = value; + + /* We successfully re-opened the audio */ + return(0); +} + +static int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + char audiodev[1024]; + int format; + int value; + Uint16 test_format; + + /* Reset the timer synchronization flag */ + frame_ticks = 0.0; + + /* Open the audio device */ + audio_fd = SDL_OpenAudioPath(audiodev, sizeof(audiodev), OPEN_FLAGS, 0); + if ( audio_fd < 0 ) { + SDL_SetError("Couldn't open %s: %s", audiodev, strerror(errno)); + return(-1); + } + mixbuf = NULL; + + /* Get a list of supported hardware formats */ + if ( ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &value) < 0 ) { + SDL_SetError("Couldn't get audio format list"); + return(-1); + } + + /* Try for a closest match on audio format */ + format = 0; + for ( test_format = SDL_FirstAudioFormat(spec->format); + ! format && test_format; ) { +#ifdef DEBUG_AUDIO + fprintf(stderr, "Trying format 0x%4.4x\n", test_format); +#endif + switch ( test_format ) { + case AUDIO_U8: + if ( value & AFMT_U8 ) { + format = AFMT_U8; + } + break; + case AUDIO_S8: + if ( value & AFMT_S8 ) { + format = AFMT_S8; + } + break; + case AUDIO_S16LSB: + if ( value & AFMT_S16_LE ) { + format = AFMT_S16_LE; + } + break; + case AUDIO_S16MSB: + if ( value & AFMT_S16_BE ) { + format = AFMT_S16_BE; + } + break; + case AUDIO_U16LSB: + if ( value & AFMT_U16_LE ) { + format = AFMT_U16_LE; + } + break; + case AUDIO_U16MSB: + if ( value & AFMT_U16_BE ) { + format = AFMT_U16_BE; + } + break; + default: + break; + } + if ( ! format ) { + test_format = SDL_NextAudioFormat(); + } + } + if ( format == 0 ) { + SDL_SetError("Couldn't find any hardware audio formats"); + return(-1); + } + spec->format = test_format; + + /* Set the audio format */ + value = format; + if ( (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) || + (value != format) ) { + SDL_SetError("Couldn't set audio format"); + return(-1); + } + + /* Set the number of channels of output */ + value = spec->channels; +#ifdef SNDCTL_DSP_CHANNELS + if ( ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &value) < 0 ) { +#endif + value = (spec->channels > 1); + ioctl(audio_fd, SNDCTL_DSP_STEREO, &value); + value = (value ? 2 : 1); +#ifdef SNDCTL_DSP_CHANNELS + } +#endif + spec->channels = value; + + /* Because some drivers don't allow setting the buffer size + after setting the format, we must re-open the audio device + once we know what format and channels are supported + */ + if ( DSP_ReopenAudio(this, audiodev, format, spec) < 0 ) { + /* Error is set by DSP_ReopenAudio() */ + return(-1); + } + + /* Allocate mixing buffer */ + mixlen = spec->size; + mixbuf = (Uint8 *)SDL_AllocAudioMem(mixlen); + if ( mixbuf == NULL ) { + return(-1); + } + memset(mixbuf, spec->silence, spec->size); + +#ifndef USE_BLOCKING_WRITES + /* Check to see if we need to use select() workaround */ + { char *workaround; + workaround = getenv("SDL_DSP_NOSELECT"); + if ( workaround ) { + frame_ticks = (float)(spec->samples*1000)/spec->freq; + next_frame = SDL_GetTicks()+frame_ticks; + } + } +#endif /* !USE_BLOCKING_WRITES */ + + /* Get the parent process id (we're the parent of the audio thread) */ + parent = getpid(); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/dsp/SDL_dspaudio.h b/src/audio/dsp/SDL_dspaudio.h new file mode 100644 index 000000000..4929c210d --- /dev/null +++ b/src/audio/dsp/SDL_dspaudio.h @@ -0,0 +1,61 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_dspaudio_h +#define _SDL_dspaudio_h + +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The file descriptor for the audio device */ + int audio_fd; + + /* The parent process id, to detect when application quits */ + pid_t parent; + + /* Raw mixing buffer */ + Uint8 *mixbuf; + int mixlen; + + /* Support for audio timing using a timer, in addition to select() */ + float frame_ticks; + float next_frame; +}; +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ + +/* Old variable names */ +#define audio_fd (this->hidden->audio_fd) +#define parent (this->hidden->parent) +#define mixbuf (this->hidden->mixbuf) +#define mixlen (this->hidden->mixlen) +#define frame_ticks (this->hidden->frame_ticks) +#define next_frame (this->hidden->next_frame) + +#endif /* _SDL_dspaudio_h */ diff --git a/src/audio/esd/.cvsignore b/src/audio/esd/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/esd/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/esd/Makefile.am b/src/audio/esd/Makefile.am new file mode 100644 index 000000000..2bbecd81f --- /dev/null +++ b/src/audio/esd/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the Enlightened Sound Daemon sound driver + +noinst_LTLIBRARIES = libaudio_esd.la +libaudio_esd_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_esdaudio.c \ + SDL_esdaudio.h diff --git a/src/audio/esd/SDL_esdaudio.c b/src/audio/esd/SDL_esdaudio.c new file mode 100644 index 000000000..cee85f8d5 --- /dev/null +++ b/src/audio/esd/SDL_esdaudio.c @@ -0,0 +1,260 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to an ESD network stream mixing buffer */ + +#ifdef ESD_SUPPORT + +#include +#include +#include +#include +#include +#include + +#include + +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_timer.h" +#include "SDL_audiodev_c.h" +#include "SDL_esdaudio.h" + +/* The tag name used by ESD audio */ +#define ESD_DRIVER_NAME "esd" + +/* Audio driver functions */ +static int ESD_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void ESD_WaitAudio(_THIS); +static void ESD_PlayAudio(_THIS); +static Uint8 *ESD_GetAudioBuf(_THIS); +static void ESD_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + int connection; + int available; + + available = 0; + connection = esd_open_sound(NULL); + if ( connection >= 0 ) { + available = 1; + esd_close(connection); + } + return(available); +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + audio_fd = -1; + + /* Set the function pointers */ + this->OpenAudio = ESD_OpenAudio; + this->WaitAudio = ESD_WaitAudio; + this->PlayAudio = ESD_PlayAudio; + this->GetAudioBuf = ESD_GetAudioBuf; + this->CloseAudio = ESD_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap ESD_bootstrap = { + ESD_DRIVER_NAME, "Enlightened Sound Daemon", + Audio_Available, Audio_CreateDevice +}; + +/* This function waits until it is possible to write a full sound buffer */ +static void ESD_WaitAudio(_THIS) +{ + Sint32 ticks; + + /* Check to see if the thread-parent process is still alive */ + { static int cnt = 0; + /* Note that this only works with thread implementations + that use a different process id for each thread. + */ + if (parent && (((++cnt)%10) == 0)) { /* Check every 10 loops */ + if ( kill(parent, 0) < 0 ) { + this->enabled = 0; + } + } + } + + /* Use timer for general audio synchronization */ + ticks = ((Sint32)(next_frame - SDL_GetTicks()))-FUDGE_TICKS; + if ( ticks > 0 ) { + SDL_Delay(ticks); + } +} + +static void ESD_PlayAudio(_THIS) +{ + int written; + + /* Write the audio data, checking for EAGAIN on broken audio drivers */ + do { + written = write(audio_fd, mixbuf, mixlen); + if ( (written < 0) && ((errno == 0) || (errno == EAGAIN)) ) { + SDL_Delay(1); /* Let a little CPU time go by */ + } + } while ( (written < 0) && + ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)) ); + + /* Set the next write frame */ + next_frame += frame_ticks; + + /* If we couldn't write, assume fatal error for now */ + if ( written < 0 ) { + this->enabled = 0; + } +} + +static Uint8 *ESD_GetAudioBuf(_THIS) +{ + return(mixbuf); +} + +static void ESD_CloseAudio(_THIS) +{ + if ( mixbuf != NULL ) { + SDL_FreeAudioMem(mixbuf); + mixbuf = NULL; + } + if ( audio_fd >= 0 ) { + close(audio_fd); + audio_fd = -1; + } +} + +/* Try to get the name of the program */ +static char *get_progname(void) +{ + char *progname = NULL; +#ifdef linux + FILE *fp; + static char temp[BUFSIZ]; + + sprintf(temp, "/proc/%d/cmdline", getpid()); + fp = fopen(temp, "r"); + if ( fp != NULL ) { + if ( fgets(temp, sizeof(temp)-1, fp) ) { + progname = strrchr(temp, '/'); + if ( progname == NULL ) { + progname = temp; + } else { + progname = progname+1; + } + } + fclose(fp); + } +#endif + return(progname); +} + +static int ESD_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + esd_format_t format; + + /* Convert audio spec to the ESD audio format */ + format = (ESD_STREAM | ESD_PLAY); + switch ( spec->format & 0xFF ) { + case 8: + format |= ESD_BITS8; + break; + case 16: + format |= ESD_BITS16; + break; + default: + SDL_SetError("Unsupported ESD audio format"); + return(-1); + } + if ( spec->channels == 1 ) { + format |= ESD_MONO; + } else { + format |= ESD_STEREO; + } +#if 0 + spec->samples = ESD_BUF_SIZE; /* Darn, no way to change this yet */ +#endif + + /* Open a connection to the ESD audio server */ + audio_fd = esd_play_stream(format, spec->freq, NULL, get_progname()); + if ( audio_fd < 0 ) { + SDL_SetError("Couldn't open ESD connection"); + return(-1); + } + + /* Calculate the final parameters for this audio specification */ + SDL_CalculateAudioSpec(spec); + frame_ticks = (float)(spec->samples*1000)/spec->freq; + next_frame = SDL_GetTicks()+frame_ticks; + + /* Allocate mixing buffer */ + mixlen = spec->size; + mixbuf = (Uint8 *)SDL_AllocAudioMem(mixlen); + if ( mixbuf == NULL ) { + return(-1); + } + memset(mixbuf, spec->silence, spec->size); + + /* Get the parent process id (we're the parent of the audio thread) */ + parent = getpid(); + + /* We're ready to rock and roll. :-) */ + return(0); +} + +#endif /* ESD_SUPPORT */ diff --git a/src/audio/esd/SDL_esdaudio.h b/src/audio/esd/SDL_esdaudio.h new file mode 100644 index 000000000..15fb0a02b --- /dev/null +++ b/src/audio/esd/SDL_esdaudio.h @@ -0,0 +1,61 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_esdaudio_h +#define _SDL_esdaudio_h + +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* The file descriptor for the audio device */ + int audio_fd; + + /* The parent process id, to detect when application quits */ + pid_t parent; + + /* Raw mixing buffer */ + Uint8 *mixbuf; + int mixlen; + + /* Support for audio timing using a timer */ + float frame_ticks; + float next_frame; +}; +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ + +/* Old variable names */ +#define audio_fd (this->hidden->audio_fd) +#define parent (this->hidden->parent) +#define mixbuf (this->hidden->mixbuf) +#define mixlen (this->hidden->mixlen) +#define frame_ticks (this->hidden->frame_ticks) +#define next_frame (this->hidden->next_frame) + +#endif /* _SDL_esdaudio_h */ diff --git a/src/audio/macrom/.cvsignore b/src/audio/macrom/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/macrom/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/macrom/Makefile.am b/src/audio/macrom/Makefile.am new file mode 100644 index 000000000..31ee995ce --- /dev/null +++ b/src/audio/macrom/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the MacOS SoundManager audio driver + +noinst_LTLIBRARIES = libaudio_macrom.la +libaudio_macrom_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_romaudio.c \ + SDL_romaudio.h diff --git a/src/audio/macrom/SDL_romaudio.c b/src/audio/macrom/SDL_romaudio.c new file mode 100644 index 000000000..6ecaef93b --- /dev/null +++ b/src/audio/macrom/SDL_romaudio.c @@ -0,0 +1,439 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#if TARGET_API_MAC_CARBON +# include +#else +# include /* SoundManager interface */ +# include +#endif + +#include +#include + +#include "SDL_endian.h" +#include "SDL_audio.h" +#include "SDL_audio_c.h" +#include "SDL_audiomem.h" +#include "SDL_sysaudio.h" +#include "SDL_romaudio.h" + +/* Audio driver functions */ + +static void Mac_CloseAudio(_THIS); +static int Mac_OpenAudio(_THIS, SDL_AudioSpec *spec); + +/* Audio driver bootstrap functions */ + + +static int Audio_Available(void) +{ + return(1); +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + + /* Set the function pointers */ + this->OpenAudio = Mac_OpenAudio; + this->CloseAudio = Mac_CloseAudio; + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap SNDMGR_bootstrap = { + "sndmgr", "MacOS SoundManager 3.0", + Audio_Available, Audio_CreateDevice +}; + +#if TARGET_API_MAC_CARBON + +static UInt8 *buffer[2]; +static volatile UInt32 running = 0; +static CmpSoundHeader header; + +static void callBackProc (SndChannel *chan, SndCommand *cmd_passed ) { + + UInt32 fill_me, play_me; + SndCommand cmd; + SDL_AudioDevice *audio = (SDL_AudioDevice *)chan->userInfo; + + fill_me = cmd_passed->param2; /* buffer that has just finished playing, +so fill it */ + play_me = ! fill_me; /* filled buffer to play _now_ */ + + if ( ! audio->enabled ) { + return; + } + + header.samplePtr = (Ptr)buffer[play_me]; + + cmd.cmd = bufferCmd; + cmd.param1 = 0; + cmd.param2 = (long)&header; + + SndDoCommand (chan, &cmd, 0); + + memset (buffer[fill_me], 0, audio->spec.size); + + if ( ! audio->paused ) { + if ( audio->convert.needed ) { + audio->spec.callback(audio->spec.userdata, + (Uint8 *)audio->convert.buf,audio->convert.len); + SDL_ConvertAudio(&audio->convert); +#if 0 + if ( audio->convert.len_cvt != audio->spec.size ) { + /* Uh oh... probably crashes here; */ + } +#endif + memcpy(buffer[fill_me], audio->convert.buf, + audio->convert.len_cvt); + } else { + audio->spec.callback(audio->spec.userdata, + (Uint8 *)buffer[fill_me], audio->spec.size); + } + } + + if ( running ) { + + cmd.cmd = callBackCmd; + cmd.param1 = 0; + cmd.param2 = play_me; + + SndDoCommand (chan, &cmd, 0); + } +} + +static int Mac_OpenAudio(_THIS, SDL_AudioSpec *spec) { + + SndCallBackUPP callback; + int sample_bits; + int i; + long initOptions; + + /* Very few conversions are required, but... */ + switch (spec->format) { + case AUDIO_S8: + spec->format = AUDIO_U8; + break; + case AUDIO_U16LSB: + spec->format = AUDIO_S16LSB; + break; + case AUDIO_U16MSB: + spec->format = AUDIO_S16MSB; + break; + } + SDL_CalculateAudioSpec(spec); + + /* initialize bufferCmd header */ + memset (&header, 0, sizeof(header)); + callback = NewSndCallBackUPP (callBackProc); + sample_bits = spec->size / spec->samples / spec->channels * 8; + +#ifdef DEBUG_AUDIO + fprintf(stderr, + "Audio format 0x%x, channels = %d, sample_bits = %d, frequency = %d\n", + spec->format, spec->channels, sample_bits, spec->freq); +#endif /* DEBUG_AUDIO */ + + header.numChannels = spec->channels; + header.sampleSize = sample_bits; + header.sampleRate = spec->freq << 16; + header.numFrames = spec->samples; + header.encode = cmpSH; + + /* Note that we install the 16bitLittleEndian Converter if needed. */ + if ( spec->format == 0x8010 ) { + header.compressionID = fixedCompression; + header.format = k16BitLittleEndianFormat; + } + + /* allocate 2 buffers */ + for (i=0; i<2; i++) { + buffer[i] = (UInt8*)malloc (sizeof(UInt8) * spec->size); + if (buffer[i] == NULL) { + SDL_OutOfMemory(); + return (-1); + } + memset (buffer[i], 0, spec->size); + } + + /* Create the sound manager channel */ + channel = (SndChannelPtr)malloc(sizeof(*channel)); + if ( channel == NULL ) { + SDL_OutOfMemory(); + return(-1); + } + if ( spec->channels >= 2 ) { + initOptions = initStereo; + } else { + initOptions = initMono; + } + channel->userInfo = (long)this; + channel->qLength = 128; + if ( SndNewChannel(&channel, sampledSynth, initOptions, callback) != +noErr ) { + SDL_SetError("Unable to create audio channel"); + free(channel); + channel = NULL; + return(-1); + } + + /* start playback */ + { + SndCommand cmd; + cmd.cmd = callBackCmd; + cmd.param2 = 0; + running = 1; + SndDoCommand (channel, &cmd, 0); + } + + return 1; +} + +static void Mac_CloseAudio(_THIS) { + + int i; + + running = 0; + + if (channel) { + SndDisposeChannel (channel, true); + channel = NULL; + } + + for ( i=0; i<2; ++i ) { + if ( buffer[i] ) { + free(buffer[i]); + buffer[i] = NULL; + } + } +} + +#else /* !TARGET_API_MAC_CARBON */ + +/* This function is called by Sound Manager when it has exhausted one of + the buffers, so we'll zero it to silence and fill it with audio if + we're not paused. +*/ +static pascal +void sndDoubleBackProc (SndChannelPtr chan, SndDoubleBufferPtr newbuf) +{ + SDL_AudioDevice *audio = (SDL_AudioDevice *)newbuf->dbUserInfo[0]; + + /* If audio is quitting, don't do anything */ + if ( ! audio->enabled ) { + return; + } + memset (newbuf->dbSoundData, 0, audio->spec.size); + newbuf->dbNumFrames = audio->spec.samples; + if ( ! audio->paused ) { + if ( audio->convert.needed ) { + audio->spec.callback(audio->spec.userdata, + (Uint8 *)audio->convert.buf,audio->convert.len); + SDL_ConvertAudio(&audio->convert); +#if 0 + if ( audio->convert.len_cvt != audio->spec.size ) { + /* Uh oh... probably crashes here */; + } +#endif + memcpy(newbuf->dbSoundData, audio->convert.buf, + audio->convert.len_cvt); + } else { + audio->spec.callback(audio->spec.userdata, + (Uint8 *)newbuf->dbSoundData, audio->spec.size); + } + } + newbuf->dbFlags |= dbBufferReady; +} + +static int DoubleBufferAudio_Available(void) +{ + int available; + NumVersion sndversion; + long response; + + available = 0; + sndversion = SndSoundManagerVersion(); + if ( sndversion.majorRev >= 3 ) { + if ( Gestalt(gestaltSoundAttr, &response) == noErr ) { + if ( (response & (1 << gestaltSndPlayDoubleBuffer)) ) { + available = 1; + } + } + } else { + if ( Gestalt(gestaltSoundAttr, &response) == noErr ) { + if ( (response & (1 << gestaltHasASC)) ) { + available = 1; + } + } + } + return(available); +} + +static void Mac_CloseAudio(_THIS) +{ + int i; + + if ( channel != NULL ) { +#if 0 + SCStatus status; + + /* Wait for audio to complete */ + do { + SndChannelStatus(channel, sizeof(status), &status); + } while ( status.scChannelBusy ); +#endif + /* Clean up the audio channel */ + SndDisposeChannel(channel, true); + channel = NULL; + } + for ( i=0; i<2; ++i ) { + if ( audio_buf[i] ) { + free(audio_buf[i]); + audio_buf[i] = NULL; + } + } +} + +static int Mac_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + SndDoubleBufferHeader2 audio_dbh; + int i; + long initOptions; + int sample_bits; + SndDoubleBackUPP doubleBackProc; + + /* Check to make sure double-buffered audio is available */ + if ( ! DoubleBufferAudio_Available() ) { + SDL_SetError("Sound manager doesn't support double-buffering"); + return(-1); + } + + /* Very few conversions are required, but... */ + switch (spec->format) { + case AUDIO_S8: + spec->format = AUDIO_U8; + break; + case AUDIO_U16LSB: + spec->format = AUDIO_S16LSB; + break; + case AUDIO_U16MSB: + spec->format = AUDIO_S16MSB; + break; + } + SDL_CalculateAudioSpec(spec); + + /* initialize the double-back header */ + memset(&audio_dbh, 0, sizeof(audio_dbh)); + doubleBackProc = NewSndDoubleBackProc (sndDoubleBackProc); + sample_bits = spec->size / spec->samples / spec->channels * 8; + + audio_dbh.dbhNumChannels = spec->channels; + audio_dbh.dbhSampleSize = sample_bits; + audio_dbh.dbhCompressionID = 0; + audio_dbh.dbhPacketSize = 0; + audio_dbh.dbhSampleRate = spec->freq << 16; + audio_dbh.dbhDoubleBack = doubleBackProc; + audio_dbh.dbhFormat = 0; + + /* Note that we install the 16bitLittleEndian Converter if needed. */ + if ( spec->format == 0x8010 ) { + audio_dbh.dbhCompressionID = fixedCompression; + audio_dbh.dbhFormat = k16BitLittleEndianFormat; + } + + /* allocate the 2 double-back buffers */ + for ( i=0; i<2; ++i ) { + audio_buf[i] = calloc(1, sizeof(SndDoubleBuffer)+spec->size); + if ( audio_buf[i] == NULL ) { + SDL_OutOfMemory(); + return(-1); + } + audio_buf[i]->dbNumFrames = spec->samples; + audio_buf[i]->dbFlags = dbBufferReady; + audio_buf[i]->dbUserInfo[0] = (long)this; + audio_dbh.dbhBufferPtr[i] = audio_buf[i]; + } + + /* Create the sound manager channel */ + channel = (SndChannelPtr)malloc(sizeof(*channel)); + if ( channel == NULL ) { + SDL_OutOfMemory(); + return(-1); + } + if ( spec->channels >= 2 ) { + initOptions = initStereo; + } else { + initOptions = initMono; + } + channel->userInfo = 0; + channel->qLength = 128; + if ( SndNewChannel(&channel, sampledSynth, initOptions, 0L) != noErr ) { + SDL_SetError("Unable to create audio channel"); + free(channel); + channel = NULL; + return(-1); + } + + /* Start playback */ + if ( SndPlayDoubleBuffer(channel, (SndDoubleBufferHeaderPtr)&audio_dbh) + != noErr ) { + SDL_SetError("Unable to play double buffered audio"); + return(-1); + } + + return 1; +} + +#endif /* TARGET_API_MAC_CARBON */ + + diff --git a/src/audio/macrom/SDL_romaudio.h b/src/audio/macrom/SDL_romaudio.h new file mode 100644 index 000000000..74aa1935b --- /dev/null +++ b/src/audio/macrom/SDL_romaudio.h @@ -0,0 +1,49 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_romaudio_h +#define _SDL_romaudio_h + +#include "SDL_sysaudio.h" + +/* Hidden "this" pointer for the video functions */ +#define _THIS SDL_AudioDevice *this + +struct SDL_PrivateAudioData { + /* Sound manager audio channel */ + SndChannelPtr channel; + #if ! TARGET_API_MAC_CARBON + /* Double buffering variables */ + SndDoubleBufferPtr audio_buf[2]; + #endif +}; + +/* Old variable names */ +#define channel (this->hidden->channel) +#define audio_buf (this->hidden->audio_buf) + +#endif /* _SDL_romaudio_h */ diff --git a/src/audio/nas/.cvsignore b/src/audio/nas/.cvsignore new file mode 100644 index 000000000..899d53557 --- /dev/null +++ b/src/audio/nas/.cvsignore @@ -0,0 +1,6 @@ +Makefile.in +Makefile +.libs +*.o +*.lo +*.la diff --git a/src/audio/nas/Makefile.am b/src/audio/nas/Makefile.am new file mode 100644 index 000000000..abb6f131f --- /dev/null +++ b/src/audio/nas/Makefile.am @@ -0,0 +1,9 @@ + +## Makefile.am for SDL using the Network Audio System sound driver + +noinst_LTLIBRARIES = libaudio_nas.la +libaudio_nas_la_SOURCES = $(SRCS) + +# The SDL audio driver sources +SRCS = SDL_nasaudio.c \ + SDL_nasaudio.h diff --git a/src/audio/nas/SDL_nasaudio.c b/src/audio/nas/SDL_nasaudio.c new file mode 100644 index 000000000..ef236fa9b --- /dev/null +++ b/src/audio/nas/SDL_nasaudio.c @@ -0,0 +1,308 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com + + This driver was written by: + Erik Inge Bolsø + knan@mo.himolde.no +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +/* Allow access to a raw mixing buffer */ + +#include +#include +#include +#include +#include +#include + +#include "SDL_audio.h" +#include "SDL_error.h" +#include "SDL_audiomem.h" +#include "SDL_audio_c.h" +#include "SDL_timer.h" +#include "SDL_audiodev_c.h" +#include "SDL_nasaudio.h" + +/* The tag name used by artsc audio */ +#define NAS_DRIVER_NAME "nas" + +static struct SDL_PrivateAudioData *this2 = NULL; + +/* Audio driver functions */ +static int NAS_OpenAudio(_THIS, SDL_AudioSpec *spec); +static void NAS_WaitAudio(_THIS); +static void NAS_PlayAudio(_THIS); +static Uint8 *NAS_GetAudioBuf(_THIS); +static void NAS_CloseAudio(_THIS); + +/* Audio driver bootstrap functions */ + +static int Audio_Available(void) +{ + AuServer *aud = AuOpenServer("", 0, NULL, 0, NULL, NULL); + if (!aud) return 0; + + AuCloseServer(aud); + return 1; +} + +static void Audio_DeleteDevice(SDL_AudioDevice *device) +{ + free(device->hidden); + free(device); +} + +static SDL_AudioDevice *Audio_CreateDevice(int devindex) +{ + SDL_AudioDevice *this; + + /* Initialize all variables that we clean on shutdown */ + this = (SDL_AudioDevice *)malloc(sizeof(SDL_AudioDevice)); + if ( this ) { + memset(this, 0, (sizeof *this)); + this->hidden = (struct SDL_PrivateAudioData *) + malloc((sizeof *this->hidden)); + } + if ( (this == NULL) || (this->hidden == NULL) ) { + SDL_OutOfMemory(); + if ( this ) { + free(this); + } + return(0); + } + memset(this->hidden, 0, (sizeof *this->hidden)); + + /* Set the function pointers */ + this->OpenAudio = NAS_OpenAudio; + this->WaitAudio = NAS_WaitAudio; + this->PlayAudio = NAS_PlayAudio; + this->GetAudioBuf = NAS_GetAudioBuf; + this->CloseAudio = NAS_CloseAudio; + + this->free = Audio_DeleteDevice; + + return this; +} + +AudioBootStrap NAS_bootstrap = { + NAS_DRIVER_NAME, "Network Audio System", + Audio_Available, Audio_CreateDevice +}; + +/* This function waits until it is possible to write a full sound buffer */ +static void NAS_WaitAudio(_THIS) +{ + while ( this->hidden->buf_free < this->hidden->mixlen ) { + AuEvent ev; + AuNextEvent(this->hidden->aud, AuTrue, &ev); + AuDispatchEvent(this->hidden->aud, &ev); + } +} + +static void NAS_PlayAudio(_THIS) +{ + while (this->hidden->mixlen > this->hidden->buf_free) { /* We think the buffer is full? Yikes! Ask the server for events, + in the hope that some of them is LowWater events telling us more + of the buffer is free now than what we think. */ + AuEvent ev; + AuNextEvent(this->hidden->aud, AuTrue, &ev); + AuDispatchEvent(this->hidden->aud, &ev); + } + this->hidden->buf_free -= this->hidden->mixlen; + + /* Write the audio data */ + AuWriteElement(this->hidden->aud, this->hidden->flow, 0, this->hidden->mixlen, this->hidden->mixbuf, AuFalse, NULL); + + this->hidden->written += this->hidden->mixlen; + +#ifdef DEBUG_AUDIO + fprintf(stderr, "Wrote %d bytes of audio data\n", this->hidden->mixlen); +#endif +} + +static Uint8 *NAS_GetAudioBuf(_THIS) +{ + return(this->hidden->mixbuf); +} + +static void NAS_CloseAudio(_THIS) +{ + if ( this->hidden->mixbuf != NULL ) { + SDL_FreeAudioMem(this->hidden->mixbuf); + this->hidden->mixbuf = NULL; + } + if ( this->hidden->aud ) { + AuCloseServer(this->hidden->aud); + this->hidden->aud = 0; + } +} + +static unsigned char sdlformat_to_auformat(unsigned int fmt) +{ + switch (fmt) + { + case AUDIO_U8: + return AuFormatLinearUnsigned8; + case AUDIO_S8: + return AuFormatLinearSigned8; + case AUDIO_U16LSB: + return AuFormatLinearUnsigned16LSB; + case AUDIO_U16MSB: + return AuFormatLinearUnsigned16MSB; + case AUDIO_S16LSB: + return AuFormatLinearSigned16LSB; + case AUDIO_S16MSB: + return AuFormatLinearSigned16MSB; + } + return AuNone; +} + +static AuBool +event_handler(AuServer* aud, AuEvent* ev, AuEventHandlerRec* hnd) +{ + switch (ev->type) { + case AuEventTypeElementNotify: { + AuElementNotifyEvent* event = (AuElementNotifyEvent *)ev; + + switch (event->kind) { + case AuElementNotifyKindLowWater: + if (this2->buf_free >= 0) { + this2->really += event->num_bytes; + gettimeofday(&this2->last_tv, 0); + this2->buf_free += event->num_bytes; + } else { + this2->buf_free = event->num_bytes; + } + break; + case AuElementNotifyKindState: + switch (event->cur_state) { + case AuStatePause: + if (event->reason != AuReasonUser) { + if (this2->buf_free >= 0) { + this2->really += event->num_bytes; + gettimeofday(&this2->last_tv, 0); + this2->buf_free += event->num_bytes; + } else { + this2->buf_free = event->num_bytes; + } + } + break; + } + } + } + } + return AuTrue; +} + +static AuDeviceID +find_device(_THIS, int nch) +{ + int i; + for (i = 0; i < AuServerNumDevices(this->hidden->aud); i++) { + if ((AuDeviceKind(AuServerDevice(this->hidden->aud, i)) == + AuComponentKindPhysicalOutput) && + AuDeviceNumTracks(AuServerDevice(this->hidden->aud, i)) == nch) { + return AuDeviceIdentifier(AuServerDevice(this->hidden->aud, i)); + } + } + return AuNone; +} + +static int NAS_OpenAudio(_THIS, SDL_AudioSpec *spec) +{ + AuElement elms[3]; + int buffer_size; + Uint16 test_format, format; + + this->hidden->mixbuf = NULL; + + /* Try for a closest match on audio format */ + format = 0; + for ( test_format = SDL_FirstAudioFormat(spec->format); + ! format && test_format; ) { + format = sdlformat_to_auformat(test_format); + + if (format == AuNone) { + test_format = SDL_NextAudioFormat(); + } + } + if ( format == 0 ) { + SDL_SetError("Couldn't find any hardware audio formats"); + return(-1); + } + spec->format = test_format; + + this->hidden->aud = AuOpenServer("", 0, NULL, 0, NULL, NULL); + if (this->hidden->aud == 0) + { + SDL_SetError("Couldn't open connection to NAS server"); + return (-1); + } + + this->hidden->dev = find_device(this, spec->channels); + if ((this->hidden->dev == AuNone) || (!(this->hidden->flow = AuCreateFlow(this->hidden->aud, NULL)))) { + AuCloseServer(this->hidden->aud); + this->hidden->aud = 0; + SDL_SetError("Couldn't find a fitting playback device on NAS server"); + return (-1); + } + + buffer_size = spec->freq; + if (buffer_size < 4096) + buffer_size = 4096; + + if (buffer_size > 32768) + buffer_size = 32768; /* So that the buffer won't get unmanageably big. */ + + /* Calculate the final parameters for this audio specification */ + SDL_CalculateAudioSpec(spec); + + this2 = this->hidden; + + AuMakeElementImportClient(elms, spec->freq, format, spec->channels, AuTrue, + buffer_size, buffer_size / 4, 0, NULL); + AuMakeElementExportDevice(elms+1, 0, this->hidden->dev, spec->freq, + AuUnlimitedSamples, 0, NULL); + AuSetElements(this->hidden->aud, this->hidden->flow, AuTrue, 2, elms, NULL); + AuRegisterEventHandler(this->hidden->aud, AuEventHandlerIDMask, 0, this->hidden->flow, + event_handler, (AuPointer) NULL); + + AuStartFlow(this->hidden->aud, this->hidden->flow, NULL); + + /* Allocate mixing buffer */ + this->hidden->mixlen = spec->size; + this->hidden->mixbuf = (Uint8 *)SDL_AllocAudioMem(this->hidden->mixlen); + if ( this->hidden->mixbuf == NULL ) { + return(-1); + } + memset(this->hidden->mixbuf, spec->silence, spec->size); + + /* Get the parent process id (we're the parent of the audio thread) */ + this->hidden->parent = getpid(); + + /* We're ready to rock and roll. :-) */ + return(0); +} diff --git a/src/audio/nas/SDL_nasaudio.h b/src/audio/nas/SDL_nasaudio.h new file mode 100644 index 000000000..3b2fdbf8f --- /dev/null +++ b/src/audio/nas/SDL_nasaudio.h @@ -0,0 +1,61 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + slouken@devolution.com + + This driver was written by: + Erik Inge Bolsø + knan@mo.himolde.no +*/ + +#ifdef SAVE_RCSID +static char rcsid = + "@(#) $Id$"; +#endif + +#ifndef _SDL_nasaudio_h +#define _SDL_nasaudio_h + +#include