SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
authorSam Lantinga <slouken@libsdl.org>
Mon, 10 Jul 2006 21:04:37 +0000
changeset 1895c121d94672cb
parent 1894 c69cee13dd76
child 1896 4a74fa359e7e
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
.indent.pro
CWprojects.sea.bin
Makefile.dc
Makefile.in
README.OS2
TODO
UNDER_CONSTRUCTION.txt
VisualC.zip
Watcom-OS2.zip
WhatsNew
configure.in
docs.html
include/SDL.h
include/SDL_active.h
include/SDL_audio.h
include/SDL_byteorder.h
include/SDL_cdrom.h
include/SDL_compat.h
include/SDL_config.h.in
include/SDL_config_amiga.h
include/SDL_config_dreamcast.h
include/SDL_config_macos.h
include/SDL_config_os2.h
include/SDL_config_win32.h
include/SDL_copying.h
include/SDL_cpuinfo.h
include/SDL_endian.h
include/SDL_error.h
include/SDL_events.h
include/SDL_getenv.h
include/SDL_joystick.h
include/SDL_keyboard.h
include/SDL_keysym.h
include/SDL_loadso.h
include/SDL_main.h
include/SDL_mouse.h
include/SDL_mutex.h
include/SDL_opengl.h
include/SDL_pixels.h
include/SDL_quit.h
include/SDL_rwops.h
include/SDL_stdinc.h
include/SDL_syswm.h
include/SDL_thread.h
include/SDL_timer.h
include/SDL_version.h
include/SDL_video.h
include/begin_code.h
include/close_code.h
include/doxyfile
sdl-config.in
src/SDL.c
src/SDL_compat.c
src/SDL_error.c
src/SDL_error_c.h
src/SDL_fatal.c
src/SDL_fatal.h
src/audio/SDL_audio.c
src/audio/SDL_audio_c.h
src/audio/SDL_audiocvt.c
src/audio/SDL_audiodev.c
src/audio/SDL_audiodev_c.h
src/audio/SDL_audiomem.h
src/audio/SDL_mixer.c
src/audio/SDL_mixer_MMX.c
src/audio/SDL_mixer_MMX.h
src/audio/SDL_mixer_MMX_VC.c
src/audio/SDL_mixer_MMX_VC.h
src/audio/SDL_mixer_m68k.c
src/audio/SDL_mixer_m68k.h
src/audio/SDL_sysaudio.h
src/audio/SDL_wave.c
src/audio/SDL_wave.h
src/audio/alsa/SDL_alsa_audio.c
src/audio/alsa/SDL_alsa_audio.h
src/audio/amigaos/SDL_ahiaudio.c
src/audio/amigaos/SDL_ahiaudio.h
src/audio/arts/SDL_artsaudio.c
src/audio/arts/SDL_artsaudio.h
src/audio/baudio/SDL_beaudio.cc
src/audio/baudio/SDL_beaudio.h
src/audio/bsd/SDL_bsdaudio.c
src/audio/bsd/SDL_bsdaudio.h
src/audio/dart/SDL_dart.c
src/audio/dart/SDL_dart.h
src/audio/dc/SDL_dcaudio.c
src/audio/dc/SDL_dcaudio.h
src/audio/dc/aica.c
src/audio/dc/aica.h
src/audio/disk/SDL_diskaudio.c
src/audio/disk/SDL_diskaudio.h
src/audio/dma/SDL_dmaaudio.c
src/audio/dma/SDL_dmaaudio.h
src/audio/dmedia/SDL_irixaudio.c
src/audio/dmedia/SDL_irixaudio.h
src/audio/dsp/SDL_dspaudio.c
src/audio/dsp/SDL_dspaudio.h
src/audio/dummy/SDL_dummyaudio.c
src/audio/dummy/SDL_dummyaudio.h
src/audio/esd/SDL_esdaudio.c
src/audio/esd/SDL_esdaudio.h
src/audio/macosx/SDL_coreaudio.c
src/audio/macosx/SDL_coreaudio.h
src/audio/macrom/SDL_romaudio.c
src/audio/macrom/SDL_romaudio.h
src/audio/mint/SDL_mintaudio.c
src/audio/mint/SDL_mintaudio.h
src/audio/mint/SDL_mintaudio_dma8.c
src/audio/mint/SDL_mintaudio_dma8.h
src/audio/mint/SDL_mintaudio_gsxb.c
src/audio/mint/SDL_mintaudio_gsxb.h
src/audio/mint/SDL_mintaudio_mcsn.c
src/audio/mint/SDL_mintaudio_mcsn.h
src/audio/mint/SDL_mintaudio_stfa.c
src/audio/mint/SDL_mintaudio_stfa.h
src/audio/mint/SDL_mintaudio_xbios.c
src/audio/mme/SDL_mmeaudio.c
src/audio/mme/SDL_mmeaudio.h
src/audio/nas/SDL_nasaudio.c
src/audio/nas/SDL_nasaudio.h
src/audio/nto/SDL_nto_audio.c
src/audio/nto/SDL_nto_audio.h
src/audio/paudio/SDL_paudio.c
src/audio/paudio/SDL_paudio.h
src/audio/sun/SDL_sunaudio.c
src/audio/sun/SDL_sunaudio.h
src/audio/ums/SDL_umsaudio.c
src/audio/ums/SDL_umsaudio.h
src/audio/windib/SDL_dibaudio.c
src/audio/windib/SDL_dibaudio.h
src/audio/windx5/SDL_dx5audio.c
src/audio/windx5/SDL_dx5audio.h
src/audio/windx5/directx.h
src/cdrom/SDL_cdrom.c
src/cdrom/SDL_syscdrom.h
src/cdrom/aix/SDL_syscdrom.c
src/cdrom/beos/SDL_syscdrom.cc
src/cdrom/bsdi/SDL_syscdrom.c
src/cdrom/dc/SDL_syscdrom.c
src/cdrom/dummy/SDL_syscdrom.c
src/cdrom/freebsd/SDL_syscdrom.c
src/cdrom/linux/SDL_syscdrom.c
src/cdrom/macos/SDL_syscdrom.c
src/cdrom/macos/SDL_syscdrom_c.h
src/cdrom/macosx/AudioFilePlayer.c
src/cdrom/macosx/AudioFilePlayer.h
src/cdrom/macosx/AudioFileReaderThread.c
src/cdrom/macosx/CDPlayer.c
src/cdrom/macosx/CDPlayer.h
src/cdrom/macosx/SDLOSXCAGuard.c
src/cdrom/macosx/SDLOSXCAGuard.h
src/cdrom/macosx/SDL_syscdrom.c
src/cdrom/macosx/SDL_syscdrom_c.h
src/cdrom/mint/SDL_syscdrom.c
src/cdrom/openbsd/SDL_syscdrom.c
src/cdrom/os2/SDL_syscdrom.c
src/cdrom/osf/SDL_syscdrom.c
src/cdrom/qnx/SDL_syscdrom.c
src/cdrom/win32/SDL_syscdrom.c
src/cpuinfo/SDL_cpuinfo.c
src/events/SDL_active.c
src/events/SDL_events.c
src/events/SDL_events_c.h
src/events/SDL_expose.c
src/events/SDL_keyboard.c
src/events/SDL_keyboard_c.h
src/events/SDL_mouse.c
src/events/SDL_mouse_c.h
src/events/SDL_quit.c
src/events/SDL_resize.c
src/events/SDL_sysevents.h
src/events/SDL_windowevents.c
src/events/SDL_windowevents_c.h
src/events/blank_cursor.h
src/events/default_cursor.h
src/file/SDL_rwops.c
src/hermes/HeadMMX.h
src/hermes/HeadX86.h
src/joystick/SDL_joystick.c
src/joystick/SDL_joystick_c.h
src/joystick/SDL_sysjoystick.h
src/joystick/amigaos/SDL_sysjoystick.c
src/joystick/beos/SDL_bejoystick.cc
src/joystick/bsd/SDL_sysjoystick.c
src/joystick/darwin/SDL_sysjoystick.c
src/joystick/dc/SDL_sysjoystick.c
src/joystick/dummy/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick.c
src/joystick/macos/SDL_sysjoystick.c
src/joystick/mint/SDL_sysjoystick.c
src/joystick/os2/SDL_sysjoystick.c
src/joystick/os2/joyos2.h
src/joystick/riscos/SDL_sysjoystick.c
src/joystick/win32/SDL_dxjoystick.c
src/joystick/win32/SDL_mmjoystick.c
src/loadso/beos/SDL_sysloadso.c
src/loadso/dlopen/SDL_sysloadso.c
src/loadso/dummy/SDL_sysloadso.c
src/loadso/macos/SDL_sysloadso.c
src/loadso/macosx/SDL_dlcompat.c
src/loadso/mint/SDL_sysloadso.c
src/loadso/os2/SDL_sysloadso.c
src/loadso/win32/SDL_sysloadso.c
src/main/beos/SDL_BeApp.cc
src/main/beos/SDL_BeApp.h
src/main/dummy/SDL_dummy_main.c
src/main/macos/SDL_main.c
src/main/macos/exports/SDL.x
src/main/macosx/SDLMain.h
src/main/qtopia/SDL_qtopia_main.cc
src/main/win32/SDL_win32_main.c
src/stdlib/SDL_getenv.c
src/stdlib/SDL_iconv.c
src/stdlib/SDL_malloc.c
src/stdlib/SDL_qsort.c
src/stdlib/SDL_stdlib.c
src/stdlib/SDL_string.c
src/thread/SDL_systhread.h
src/thread/SDL_thread.c
src/thread/SDL_thread_c.h
src/thread/amigaos/SDL_syssem.c
src/thread/amigaos/SDL_systhread.c
src/thread/amigaos/SDL_systhread_c.h
src/thread/amigaos/SDL_thread.c
src/thread/beos/SDL_syssem.c
src/thread/beos/SDL_systhread.c
src/thread/beos/SDL_systhread_c.h
src/thread/dc/SDL_syscond.c
src/thread/dc/SDL_syscond_c.h
src/thread/dc/SDL_sysmutex.c
src/thread/dc/SDL_sysmutex_c.h
src/thread/dc/SDL_syssem.c
src/thread/dc/SDL_syssem_c.h
src/thread/dc/SDL_systhread.c
src/thread/dc/SDL_systhread_c.h
src/thread/epoc/SDL_systhread_c.h
src/thread/generic/SDL_syscond.c
src/thread/generic/SDL_sysmutex.c
src/thread/generic/SDL_sysmutex_c.h
src/thread/generic/SDL_syssem.c
src/thread/generic/SDL_systhread.c
src/thread/generic/SDL_systhread_c.h
src/thread/irix/SDL_syssem.c
src/thread/irix/SDL_systhread.c
src/thread/irix/SDL_systhread_c.h
src/thread/os2/SDL_syscond.c
src/thread/os2/SDL_syscond_c.h
src/thread/os2/SDL_sysmutex.c
src/thread/os2/SDL_syssem.c
src/thread/os2/SDL_systhread.c
src/thread/os2/SDL_systhread_c.h
src/thread/pth/SDL_syscond.c
src/thread/pth/SDL_sysmutex.c
src/thread/pth/SDL_sysmutex_c.h
src/thread/pth/SDL_systhread.c
src/thread/pth/SDL_systhread_c.h
src/thread/pthread/SDL_syscond.c
src/thread/pthread/SDL_sysmutex.c
src/thread/pthread/SDL_sysmutex_c.h
src/thread/pthread/SDL_syssem.c
src/thread/pthread/SDL_systhread.c
src/thread/pthread/SDL_systhread_c.h
src/thread/riscos/SDL_syscond.c
src/thread/riscos/SDL_sysmutex.c
src/thread/riscos/SDL_sysmutex_c.h
src/thread/riscos/SDL_syssem.c
src/thread/riscos/SDL_systhread.c
src/thread/riscos/SDL_systhread_c.h
src/thread/win32/SDL_sysmutex.c
src/thread/win32/SDL_syssem.c
src/thread/win32/SDL_systhread.c
src/thread/win32/SDL_systhread_c.h
src/thread/win32/win_ce_semaphore.c
src/thread/win32/win_ce_semaphore.h
src/timer/SDL_systimer.h
src/timer/SDL_timer.c
src/timer/SDL_timer_c.h
src/timer/amigaos/SDL_systimer.c
src/timer/beos/SDL_systimer.c
src/timer/dc/SDL_systimer.c
src/timer/dummy/SDL_systimer.c
src/timer/macos/FastTimes.c
src/timer/macos/FastTimes.h
src/timer/macos/SDL_MPWtimer.c
src/timer/macos/SDL_systimer.c
src/timer/mint/SDL_systimer.c
src/timer/mint/SDL_vbltimer_s.h
src/timer/os2/SDL_systimer.c
src/timer/riscos/SDL_systimer.c
src/timer/unix/SDL_systimer.c
src/timer/win32/SDL_systimer.c
src/timer/wince/SDL_systimer.c
src/video/SDL_RLEaccel.c
src/video/SDL_RLEaccel_c.h
src/video/SDL_blit.c
src/video/SDL_blit.h
src/video/SDL_blit_0.c
src/video/SDL_blit_1.c
src/video/SDL_blit_A.c
src/video/SDL_blit_N.c
src/video/SDL_bmp.c
src/video/SDL_cursor.c
src/video/SDL_cursor_c.h
src/video/SDL_gamma.c
src/video/SDL_glfuncs.h
src/video/SDL_leaks.h
src/video/SDL_pixels.c
src/video/SDL_pixels_c.h
src/video/SDL_rect.c
src/video/SDL_rect_c.h
src/video/SDL_renderer_sw.c
src/video/SDL_renderer_sw.h
src/video/SDL_stretch.c
src/video/SDL_stretch_c.h
src/video/SDL_surface.c
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/SDL_yuv.c
src/video/SDL_yuv_mmx.c
src/video/SDL_yuv_sw.c
src/video/SDL_yuv_sw_c.h
src/video/SDL_yuvfuncs.h
src/video/Xext/XME/xme.c
src/video/Xext/Xinerama/Xinerama.c
src/video/Xext/Xv/Xv.c
src/video/Xext/Xv/Xvlibint.h
src/video/Xext/Xxf86dga/XF86DGA.c
src/video/Xext/Xxf86dga/XF86DGA2.c
src/video/Xext/Xxf86vm/XF86VMode.c
src/video/Xext/extensions/Xext.h
src/video/Xext/extensions/Xinerama.h
src/video/Xext/extensions/Xv.h
src/video/Xext/extensions/Xvlib.h
src/video/Xext/extensions/Xvproto.h
src/video/Xext/extensions/extutil.h
src/video/Xext/extensions/panoramiXext.h
src/video/Xext/extensions/panoramiXproto.h
src/video/Xext/extensions/xf86dga.h
src/video/Xext/extensions/xf86dga1.h
src/video/Xext/extensions/xf86dga1str.h
src/video/Xext/extensions/xf86dgastr.h
src/video/Xext/extensions/xf86vmode.h
src/video/Xext/extensions/xf86vmstr.h
src/video/Xext/extensions/xme.h
src/video/aalib/SDL_aaevents.c
src/video/aalib/SDL_aaevents_c.h
src/video/aalib/SDL_aamouse.c
src/video/aalib/SDL_aamouse_c.h
src/video/aalib/SDL_aavideo.c
src/video/aalib/SDL_aavideo.h
src/video/ataricommon/SDL_ataric2p_s.h
src/video/ataricommon/SDL_ataridevmouse.c
src/video/ataricommon/SDL_ataridevmouse_c.h
src/video/ataricommon/SDL_atarieddi_s.h
src/video/ataricommon/SDL_atarievents.c
src/video/ataricommon/SDL_atarievents_c.h
src/video/ataricommon/SDL_atarigl.c
src/video/ataricommon/SDL_atarigl_c.h
src/video/ataricommon/SDL_atarikeys.h
src/video/ataricommon/SDL_atarimxalloc.c
src/video/ataricommon/SDL_atarimxalloc_c.h
src/video/ataricommon/SDL_biosevents.c
src/video/ataricommon/SDL_biosevents_c.h
src/video/ataricommon/SDL_gemdosevents.c
src/video/ataricommon/SDL_gemdosevents_c.h
src/video/ataricommon/SDL_ikbdevents.c
src/video/ataricommon/SDL_ikbdevents_c.h
src/video/ataricommon/SDL_ikbdinterrupt_s.h
src/video/ataricommon/SDL_xbiosevents.c
src/video/ataricommon/SDL_xbiosevents_c.h
src/video/ataricommon/SDL_xbiosinterrupt_s.h
src/video/blank_cursor.h
src/video/bwindow/SDL_BView.h
src/video/bwindow/SDL_BWin.h
src/video/bwindow/SDL_lowvideo.h
src/video/bwindow/SDL_sysevents.cc
src/video/bwindow/SDL_sysevents_c.h
src/video/bwindow/SDL_sysmouse.cc
src/video/bwindow/SDL_sysmouse_c.h
src/video/bwindow/SDL_sysvideo.cc
src/video/bwindow/SDL_syswm.cc
src/video/bwindow/SDL_syswm_c.h
src/video/bwindow/SDL_sysyuv.cc
src/video/bwindow/SDL_sysyuv.h
src/video/cybergfx/SDL_amigaevents.c
src/video/cybergfx/SDL_amigaevents_c.h
src/video/cybergfx/SDL_amigamouse.c
src/video/cybergfx/SDL_amigamouse_c.h
src/video/cybergfx/SDL_cgxaccel.c
src/video/cybergfx/SDL_cgxgl.c
src/video/cybergfx/SDL_cgxgl_c.h
src/video/cybergfx/SDL_cgximage.c
src/video/cybergfx/SDL_cgximage_c.h
src/video/cybergfx/SDL_cgxmodes.c
src/video/cybergfx/SDL_cgxmodes_c.h
src/video/cybergfx/SDL_cgxvideo.c
src/video/cybergfx/SDL_cgxvideo.h
src/video/cybergfx/SDL_cgxwm.c
src/video/cybergfx/SDL_cgxwm_c.h
src/video/dc/SDL_dcevents.c
src/video/dc/SDL_dcevents_c.h
src/video/dc/SDL_dcmouse.c
src/video/dc/SDL_dcmouse_c.h
src/video/dc/SDL_dcvideo.c
src/video/dc/SDL_dcvideo.h
src/video/default_cursor.h
src/video/dga/SDL_dgaevents.c
src/video/dga/SDL_dgaevents_c.h
src/video/dga/SDL_dgamouse.c
src/video/dga/SDL_dgamouse_c.h
src/video/dga/SDL_dgavideo.c
src/video/dga/SDL_dgavideo.h
src/video/directfb/SDL_DirectFB_events.c
src/video/directfb/SDL_DirectFB_events.h
src/video/directfb/SDL_DirectFB_keys.h
src/video/directfb/SDL_DirectFB_video.c
src/video/directfb/SDL_DirectFB_video.h
src/video/directfb/SDL_DirectFB_yuv.c
src/video/directfb/SDL_DirectFB_yuv.h
src/video/dummy/SDL_nullevents.c
src/video/dummy/SDL_nullevents_c.h
src/video/dummy/SDL_nullmouse.c
src/video/dummy/SDL_nullmouse_c.h
src/video/dummy/SDL_nullrender.c
src/video/dummy/SDL_nullrender_c.h
src/video/dummy/SDL_nullvideo.c
src/video/dummy/SDL_nullvideo.h
src/video/e_log.h
src/video/e_pow.h
src/video/e_sqrt.h
src/video/epoc/SDL_epocevents_c.h
src/video/epoc/SDL_epocvideo.h
src/video/fbcon/3dfx_mmio.h
src/video/fbcon/3dfx_regs.h
src/video/fbcon/SDL_fb3dfx.c
src/video/fbcon/SDL_fb3dfx.h
src/video/fbcon/SDL_fbelo.c
src/video/fbcon/SDL_fbelo.h
src/video/fbcon/SDL_fbevents.c
src/video/fbcon/SDL_fbevents_c.h
src/video/fbcon/SDL_fbkeys.h
src/video/fbcon/SDL_fbmatrox.c
src/video/fbcon/SDL_fbmatrox.h
src/video/fbcon/SDL_fbmouse.c
src/video/fbcon/SDL_fbmouse_c.h
src/video/fbcon/SDL_fbriva.c
src/video/fbcon/SDL_fbriva.h
src/video/fbcon/SDL_fbvideo.c
src/video/fbcon/SDL_fbvideo.h
src/video/fbcon/matrox_mmio.h
src/video/fbcon/matrox_regs.h
src/video/fbcon/riva_mmio.h
src/video/fbcon/riva_regs.h
src/video/gapi/SDL_gapivideo.c
src/video/gapi/SDL_gapivideo.h
src/video/gem/SDL_gemevents.c
src/video/gem/SDL_gemevents_c.h
src/video/gem/SDL_gemmouse.c
src/video/gem/SDL_gemmouse_c.h
src/video/gem/SDL_gemvideo.c
src/video/gem/SDL_gemvideo.h
src/video/gem/SDL_gemwm.c
src/video/gem/SDL_gemwm_c.h
src/video/ggi/SDL_ggievents.c
src/video/ggi/SDL_ggievents_c.h
src/video/ggi/SDL_ggikeys.h
src/video/ggi/SDL_ggimouse.c
src/video/ggi/SDL_ggimouse_c.h
src/video/ggi/SDL_ggivideo.c
src/video/ggi/SDL_ggivideo.h
src/video/glsdl/SDL_glsdl.c
src/video/glsdl/SDL_glsdl.h
src/video/ipod/SDL_ipodvideo.c
src/video/ipod/SDL_ipodvideo.h
src/video/maccommon/SDL_lowvideo.h
src/video/maccommon/SDL_macevents.c
src/video/maccommon/SDL_macevents_c.h
src/video/maccommon/SDL_macgl.c
src/video/maccommon/SDL_macgl_c.h
src/video/maccommon/SDL_mackeys.h
src/video/maccommon/SDL_macmouse.c
src/video/maccommon/SDL_macmouse_c.h
src/video/maccommon/SDL_macwm.c
src/video/maccommon/SDL_macwm_c.h
src/video/macdsp/SDL_dspvideo.c
src/video/macdsp/SDL_dspvideo.h
src/video/macrom/SDL_romvideo.c
src/video/macrom/SDL_romvideo.h
src/video/math_private.h
src/video/mmx.h
src/video/nanox/SDL_nxevents.c
src/video/nanox/SDL_nxevents_c.h
src/video/nanox/SDL_nximage.c
src/video/nanox/SDL_nximage_c.h
src/video/nanox/SDL_nxmodes.c
src/video/nanox/SDL_nxmodes_c.h
src/video/nanox/SDL_nxmouse.c
src/video/nanox/SDL_nxmouse_c.h
src/video/nanox/SDL_nxvideo.c
src/video/nanox/SDL_nxvideo.h
src/video/nanox/SDL_nxwm.c
src/video/nanox/SDL_nxwm_c.h
src/video/os2fslib/SDL_os2fslib.c
src/video/os2fslib/SDL_os2fslib.h
src/video/os2fslib/SDL_vkeys.h
src/video/photon/SDL_ph_events.c
src/video/photon/SDL_ph_events_c.h
src/video/photon/SDL_ph_gl.c
src/video/photon/SDL_ph_gl.h
src/video/photon/SDL_ph_image.c
src/video/photon/SDL_ph_image_c.h
src/video/photon/SDL_ph_modes.c
src/video/photon/SDL_ph_modes_c.h
src/video/photon/SDL_ph_mouse.c
src/video/photon/SDL_ph_mouse_c.h
src/video/photon/SDL_ph_video.c
src/video/photon/SDL_ph_video.h
src/video/photon/SDL_ph_wm.c
src/video/photon/SDL_ph_wm_c.h
src/video/photon/SDL_phyuv.c
src/video/photon/SDL_phyuv_c.h
src/video/picogui/SDL_pgevents.c
src/video/picogui/SDL_pgevents_c.h
src/video/picogui/SDL_pgvideo.c
src/video/picogui/SDL_pgvideo.h
src/video/ps2gs/SDL_gsevents.c
src/video/ps2gs/SDL_gsevents_c.h
src/video/ps2gs/SDL_gskeys.h
src/video/ps2gs/SDL_gsmouse.c
src/video/ps2gs/SDL_gsmouse_c.h
src/video/ps2gs/SDL_gsvideo.c
src/video/ps2gs/SDL_gsvideo.h
src/video/ps2gs/SDL_gsyuv.c
src/video/ps2gs/SDL_gsyuv_c.h
src/video/qtopia/SDL_QPEApp.cc
src/video/qtopia/SDL_QPEApp.h
src/video/qtopia/SDL_QWin.cc
src/video/qtopia/SDL_QWin.h
src/video/qtopia/SDL_lowvideo.h
src/video/qtopia/SDL_sysevents.cc
src/video/qtopia/SDL_sysevents_c.h
src/video/qtopia/SDL_sysmouse.cc
src/video/qtopia/SDL_sysmouse_c.h
src/video/qtopia/SDL_sysvideo.cc
src/video/qtopia/SDL_syswm.cc
src/video/qtopia/SDL_syswm_c.h
src/video/quartz/CGS.h
src/video/quartz/SDL_QuartzEvents.m
src/video/quartz/SDL_QuartzGL.m
src/video/quartz/SDL_QuartzKeys.h
src/video/quartz/SDL_QuartzVideo.h
src/video/quartz/SDL_QuartzVideo.m
src/video/quartz/SDL_QuartzWM.m
src/video/quartz/SDL_QuartzWindow.h
src/video/quartz/SDL_QuartzWindow.m
src/video/quartz/SDL_QuartzYUV.m
src/video/riscos/SDL_riscosFullScreenVideo.c
src/video/riscos/SDL_riscosevents.c
src/video/riscos/SDL_riscosevents_c.h
src/video/riscos/SDL_riscosmouse.c
src/video/riscos/SDL_riscosmouse_c.h
src/video/riscos/SDL_riscossprite.c
src/video/riscos/SDL_riscostask.c
src/video/riscos/SDL_riscostask.h
src/video/riscos/SDL_riscosvideo.c
src/video/riscos/SDL_riscosvideo.h
src/video/riscos/SDL_wimppoll.c
src/video/riscos/SDL_wimpvideo.c
src/video/svga/SDL_svgaevents.c
src/video/svga/SDL_svgaevents_c.h
src/video/svga/SDL_svgamouse.c
src/video/svga/SDL_svgamouse_c.h
src/video/svga/SDL_svgavideo.c
src/video/svga/SDL_svgavideo.h
src/video/vgl/SDL_vglevents.c
src/video/vgl/SDL_vglevents_c.h
src/video/vgl/SDL_vglmouse.c
src/video/vgl/SDL_vglmouse_c.h
src/video/vgl/SDL_vglvideo.c
src/video/vgl/SDL_vglvideo.h
src/video/win32/SDL_d3drender.c
src/video/win32/SDL_d3drender.h
src/video/win32/SDL_gdirender.c
src/video/win32/SDL_gdirender.h
src/video/win32/SDL_vkeys.h
src/video/win32/SDL_win32events.c
src/video/win32/SDL_win32events.h
src/video/win32/SDL_win32gamma.c
src/video/win32/SDL_win32gamma.h
src/video/win32/SDL_win32keyboard.c
src/video/win32/SDL_win32keyboard.h
src/video/win32/SDL_win32modes.c
src/video/win32/SDL_win32modes.h
src/video/win32/SDL_win32mouse.c
src/video/win32/SDL_win32mouse.h
src/video/win32/SDL_win32video.c
src/video/win32/SDL_win32video.h
src/video/win32/SDL_win32window.c
src/video/win32/SDL_win32window.h
src/video/win32/wmmsg.h
src/video/wincommon/SDL_lowvideo.h
src/video/wincommon/SDL_sysevents.c
src/video/wincommon/SDL_sysmouse.c
src/video/wincommon/SDL_sysmouse_c.h
src/video/wincommon/SDL_syswm.c
src/video/wincommon/SDL_syswm_c.h
src/video/wincommon/SDL_wingl.c
src/video/wincommon/SDL_wingl_c.h
src/video/wincommon/wmmsg.h
src/video/windib/SDL_dibevents.c
src/video/windib/SDL_dibevents_c.h
src/video/windib/SDL_dibvideo.c
src/video/windib/SDL_dibvideo.h
src/video/windib/SDL_vkeys.h
src/video/windx5/SDL_dx5events.c
src/video/windx5/SDL_dx5events_c.h
src/video/windx5/SDL_dx5video.c
src/video/windx5/SDL_dx5video.h
src/video/windx5/SDL_dx5yuv.c
src/video/windx5/SDL_dx5yuv_c.h
src/video/windx5/directx.h
src/video/wscons/SDL_wsconsevents.c
src/video/wscons/SDL_wsconsevents_c.h
src/video/wscons/SDL_wsconsmouse.c
src/video/wscons/SDL_wsconsmouse_c.h
src/video/wscons/SDL_wsconsvideo.c
src/video/wscons/SDL_wsconsvideo.h
src/video/x11/SDL_x11dga.c
src/video/x11/SDL_x11dga_c.h
src/video/x11/SDL_x11dyn.c
src/video/x11/SDL_x11dyn.h
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11events_c.h
src/video/x11/SDL_x11gamma.c
src/video/x11/SDL_x11gamma_c.h
src/video/x11/SDL_x11gl.c
src/video/x11/SDL_x11gl_c.h
src/video/x11/SDL_x11image.c
src/video/x11/SDL_x11image_c.h
src/video/x11/SDL_x11modes.c
src/video/x11/SDL_x11modes_c.h
src/video/x11/SDL_x11mouse.c
src/video/x11/SDL_x11mouse_c.h
src/video/x11/SDL_x11sym.h
src/video/x11/SDL_x11video.c
src/video/x11/SDL_x11video.h
src/video/x11/SDL_x11wm.c
src/video/x11/SDL_x11wm_c.h
src/video/x11/SDL_x11yuv.c
src/video/x11/SDL_x11yuv_c.h
src/video/xbios/SDL_xbios.c
src/video/xbios/SDL_xbios.h
src/video/xbios/SDL_xbios_blowup.c
src/video/xbios/SDL_xbios_blowup.h
src/video/xbios/SDL_xbios_centscreen.c
src/video/xbios/SDL_xbios_centscreen.h
src/video/xbios/SDL_xbios_sb3.c
src/video/xbios/SDL_xbios_sb3.h
test/Makefile.in
test/checkkeys.c
test/configure.in
test/graywin.c
test/loopwave.c
test/testalpha.c
test/testbitmap.c
test/testblitspeed.c
test/testcdrom.c
test/testcursor.c
test/testdyngl.c
test/testerror.c
test/testfile.c
test/testgamma.c
test/testgl.c
test/testhread.c
test/testiconv.c
test/testjoystick.c
test/testkeys.c
test/testlock.c
test/testoverlay.c
test/testoverlay2.c
test/testpalette.c
test/testplatform.c
test/testsem.c
test/testsprite.c
test/testsprite2.c
test/testtimer.c
test/testver.c
test/testvidinfo.c
test/testwin.c
test/testwm.c
test/testwm2.c
test/threadwin.c
test/torturethread.c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.indent.pro	Mon Jul 10 21:04:37 2006 +0000
     1.3 @@ -0,0 +1,1 @@
     1.4 +-i4 -nut -nsc -br -ce -cdw -npcs
     2.1 Binary file CWprojects.sea.bin has changed
     3.1 --- a/Makefile.dc	Thu Jul 06 18:01:37 2006 +0000
     3.2 +++ b/Makefile.dc	Mon Jul 10 21:04:37 2006 +0000
     3.3 @@ -55,6 +55,7 @@
     3.4  	src/video/dummy/SDL_nullevents.c \
     3.5  	src/video/dummy/SDL_nullmouse.c \
     3.6  	src/video/dummy/SDL_nullvideo.c \
     3.7 +	src/video/glsdl/SDL_glsdl.c \
     3.8  	src/video/SDL_blit.c \
     3.9  	src/video/SDL_blit_0.c \
    3.10  	src/video/SDL_blit_1.c \
     4.1 --- a/Makefile.in	Thu Jul 06 18:01:37 2006 +0000
     4.2 +++ b/Makefile.in	Mon Jul 10 21:04:37 2006 +0000
     4.3 @@ -167,6 +167,29 @@
     4.4  rpm: $(distfile)
     4.5  	rpmbuild -ta $?
     4.6  
     4.7 +# Run indent on the source to standardize coding style
     4.8 +indent:
     4.9 +	@echo "Running indent... modified files:"
    4.10 +	@cd $(srcdir) && \
    4.11 +	find . \( \
    4.12 +	    -name '*.h' -o \
    4.13 +	    -name '*.c' -o \
    4.14 +	    -name '*.cc' \) \
    4.15 +	    -print | \
    4.16 +	while read file; do \
    4.17 +	    indent "$$file" -o "$$file.indent"; \
    4.18 +	    if cmp "$$file" "$$file.indent" >/dev/null; then \
    4.19 +	        rm -f "$$file.indent"; \
    4.20 +	    else \
    4.21 +	        echo "$$file"; \
    4.22 +	        mv -f "$$file.indent" "$$file"; \
    4.23 +	    fi; \
    4.24 +	done
    4.25 +
    4.26 +# Run indent and then commit modified files
    4.27 +commit: indent
    4.28 +	svn commit
    4.29 +
    4.30  # Create a SVN snapshot that people can run update on
    4.31  snapshot:
    4.32  	svn co svn://libsdl.org/trunk/SDL
     5.1 --- a/README.OS2	Thu Jul 06 18:01:37 2006 +0000
     5.2 +++ b/README.OS2	Mon Jul 10 21:04:37 2006 +0000
     5.3 @@ -3,7 +3,7 @@
     5.4  SDL on OS/2
     5.5  ===========
     5.6  
     5.7 -Last updated on May. 17, 2006.
     5.8 +Last updated on May. 1, 2006.
     5.9  
    5.10  
    5.11  1. How to compile?
    5.12 @@ -13,6 +13,8 @@
    5.13  - The OS/2 Developer's Toolkit
    5.14  - The OpenWatcom compiler 
    5.15    (http://www.openwatcom.org)
    5.16 +- The FSLib library
    5.17 +  (ftp://ftp.netlabs.org/pub/SDL)
    5.18  
    5.19  First of all, you have to unzip the Watcom-OS2.zip file. This will result in a 
    5.20  file called "makefile" and a file called "setvars.cmd" in this folder (and some
    5.21 @@ -30,7 +32,7 @@
    5.22  for debugging.
    5.23  
    5.24  Then run "wmake".
    5.25 -This should create the SDL12.DLL and the corresponding SDL12.LIB file here.
    5.26 +This should create the SDL.DLL and the corresponding SDL.LIB file here.
    5.27  
    5.28  To test applications, it's a good idea to use the 'debug' build of SDL, and
    5.29  redirect the standard output and standard error output to files, to see what
    5.30 @@ -46,8 +48,8 @@
    5.31  2. How to compile the testapps?
    5.32  -------------------------------
    5.33  
    5.34 -Once you have SDL12.DLL compiled, navigate into the 'test' folder, copy in 
    5.35 -there the newly built SDL12.DLL, and copy in there FSLib.DLL.
    5.36 +Once you have SDL.DLL compiled, navigate into the 'test' folder, copy in there
    5.37 +the newly built SDL.DLL, and copy in there FSLib.DLL.
    5.38  
    5.39  Then run "wmake" in there to compile some of the testapps.
    5.40  
    5.41 @@ -189,10 +191,6 @@
    5.42  10. Changelog of the OS/2 port
    5.43  ------------------------------
    5.44  
    5.45 -Version 1.2.10 - 2006-05-17  - Doodle
    5.46 - - Small modifications for v1.2.10 release
    5.47 - - Changed DLL name to include version info (currently SDL12.dll)
    5.48 -
    5.49  Version 1.2 - 2006-05-01  - Doodle
    5.50   - Modified makefile system to have only one makefile
    5.51   - Included FSLib headers, DLL and LIB file
    5.52 @@ -218,7 +216,7 @@
    5.53      SET SDL_USE_PROPORTIONAL_WINDOW=1
    5.54      dosbox.exe
    5.55     )
    5.56 -   or, if you have the HOME environment variable set, then SDL12.DLL will
    5.57 +   or, if you have the HOME environment variable set, then SDL.DLL will
    5.58     create a file in that directory called .sdl.proportionals, and you can
    5.59     put there the name of executable files that will be automatically made
    5.60     proportional.
     6.1 --- a/TODO	Thu Jul 06 18:01:37 2006 +0000
     6.2 +++ b/TODO	Mon Jul 10 21:04:37 2006 +0000
     6.3 @@ -2,6 +2,9 @@
     6.4  Wish list for the 1.3 development branch:
     6.5  http://bugzilla.libsdl.org/
     6.6  
     6.7 + * Add a way to register custom events
     6.8 + * Add internal support for adding video modes and refresh rates
     6.9 + * Support querying and setting refresh rate with video modes
    6.10   * Add mousewheel events (new unified event architecture?)
    6.11   * DirectInput joystick support needs to be implemented
    6.12   * Be able to enumerate and select available audio and video drivers
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/UNDER_CONSTRUCTION.txt	Mon Jul 10 21:04:37 2006 +0000
     7.3 @@ -0,0 +1,1 @@
     7.4 +WARNING: This code is under construction, may not build, and is unstable!
     8.1 Binary file VisualC.zip has changed
     9.1 Binary file Watcom-OS2.zip has changed
    10.1 --- a/WhatsNew	Thu Jul 06 18:01:37 2006 +0000
    10.2 +++ b/WhatsNew	Mon Jul 10 21:04:37 2006 +0000
    10.3 @@ -1,7 +1,11 @@
    10.4  
    10.5  This is a list of API changes in SDL's version history.
    10.6  
    10.7 -Version 1.0:
    10.8 +1.3.0:
    10.9 +	Added SDL_GetNumVideoDrivers() and SDL_GetVideoDriver().
   10.10 +	Replaced SDL_VideoDriverName() with SDL_GetCurrentVideoDriver()
   10.11 +	Added SDL_GetNumAudioDrivers() and SDL_GetAudioDriver().
   10.12 +	Replaced SDL_AudioDriverName() with SDL_GetCurrentAudioDriver()
   10.13  
   10.14  1.2.10:
   10.15  	If SDL_OpenAudio() is passed zero for the desired format
   10.16 @@ -416,8 +420,6 @@
   10.17  1.0.0:
   10.18  	New public release
   10.19  
   10.20 -Version 0.11:
   10.21 -
   10.22  0.11.5:
   10.23  	A new function SDL_GetVideoSurface() has been added, and returns
   10.24  	a pointer to the current display surface.
   10.25 @@ -436,8 +438,6 @@
   10.26  	installing fatal signal handlers on operating systems that support
   10.27  	them.
   10.28  
   10.29 -Version 0.9:
   10.30 -
   10.31  0.9.15:
   10.32  	SDL_CreateColorCursor() has been removed.  Color cursors should
   10.33  	be implemented as sprites, blitted by the application when the
    11.1 --- a/configure.in	Thu Jul 06 18:01:37 2006 +0000
    11.2 +++ b/configure.in	Mon Jul 10 21:04:37 2006 +0000
    11.3 @@ -15,10 +15,10 @@
    11.4  # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
    11.5  #
    11.6  SDL_MAJOR_VERSION=1
    11.7 -SDL_MINOR_VERSION=2
    11.8 -SDL_MICRO_VERSION=11
    11.9 +SDL_MINOR_VERSION=3
   11.10 +SDL_MICRO_VERSION=0
   11.11  SDL_INTERFACE_AGE=0
   11.12 -SDL_BINARY_AGE=11
   11.13 +SDL_BINARY_AGE=0
   11.14  SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
   11.15  
   11.16  AC_SUBST(SDL_MAJOR_VERSION)
   11.17 @@ -1533,6 +1533,20 @@
   11.18      fi
   11.19  }
   11.20  
   11.21 +dnl Find glSDL
   11.22 +CheckglSDL()
   11.23 +{
   11.24 +    AC_ARG_ENABLE(video-glsdl,
   11.25 +[  --enable-video-glsdl    use glSDL video driver [default=yes]],
   11.26 +                  , enable_video_glsdl=yes)
   11.27 +    AC_MSG_CHECKING(for glSDL support)
   11.28 +    AC_MSG_RESULT($video_opengl)
   11.29 +    if test x$video_opengl = xyes -a x$enable_video_glsdl = xyes; then
   11.30 +        AC_DEFINE(SDL_VIDEO_DRIVER_GLSDL)
   11.31 +        SOURCES="$SOURCES $srcdir/src/video/glsdl/*.c"
   11.32 +    fi
   11.33 +}
   11.34 +
   11.35  dnl Check for Mesa offscreen rendering
   11.36  CheckAtariOSMesa()
   11.37  {
   11.38 @@ -1847,13 +1861,6 @@
   11.39      if test x$enable_stdio_redirect != xyes; then
   11.40          EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
   11.41      fi
   11.42 -
   11.43 -    if test x$enable_video = xyes; then
   11.44 -        AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
   11.45 -        SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
   11.46 -        SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
   11.47 -        have_video=yes
   11.48 -    fi
   11.49  }
   11.50  
   11.51  dnl Find the DirectX includes and libraries
   11.52 @@ -1863,18 +1870,9 @@
   11.53  AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [[default=yes]]]),
   11.54                    , enable_directx=yes)
   11.55      if test x$enable_directx = xyes; then
   11.56 -        have_directx=no
   11.57 -        AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
   11.58 +        AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
   11.59          AC_CHECK_HEADER(dsound.h, have_dsound=yes)
   11.60          AC_CHECK_HEADER(dinput.h, use_dinput=yes)
   11.61 -        if test x$have_ddraw = xyes -a x$have_dsound = xyes -a x$use_dinput = xyes; then
   11.62 -            have_directx=yes
   11.63 -        fi
   11.64 -        if test x$enable_video = xyes -a x$have_directx = xyes; then
   11.65 -            AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
   11.66 -            SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
   11.67 -            have_video=yes
   11.68 -        fi
   11.69      fi
   11.70  }
   11.71  
   11.72 @@ -2155,6 +2153,7 @@
   11.73          CheckQtopia
   11.74          CheckPicoGUI
   11.75          CheckOpenGLX11
   11.76 +        CheckglSDL
   11.77          CheckInputEvents
   11.78          CheckTslib
   11.79          CheckUSBHID
   11.80 @@ -2253,6 +2252,7 @@
   11.81          CheckPHOTON
   11.82          CheckX11
   11.83          CheckOpenGLX11
   11.84 +        CheckglSDL
   11.85          CheckPTHREAD
   11.86          # Set up files for the audio library
   11.87          if test x$enable_audio = xyes; then
   11.88 @@ -2290,13 +2290,32 @@
   11.89          CheckDummyAudio
   11.90          CheckWIN32
   11.91          CheckWIN32GL
   11.92 +        CheckglSDL
   11.93          CheckDIRECTX
   11.94          CheckNASM
   11.95 +        # Set up files for the video library
   11.96 +        if test x$enable_video = xyes; then
   11.97 +            AC_DEFINE(SDL_VIDEO_DRIVER_WIN32)
   11.98 +            SOURCES="$SOURCES $srcdir/src/video/win32/*.c"
   11.99 +            have_video=yes
  11.100 +            AC_ARG_ENABLE(render-gdi,
  11.101 +AC_HELP_STRING([--enable-render-gdi], [enable the GDI render driver [[default=yes]]]),
  11.102 +                                , enable_render_gdi=yes)
  11.103 +            if test x$enable_render_gdi = xyes; then
  11.104 +                AC_DEFINE(SDL_VIDEO_RENDER_GDI)
  11.105 +            fi
  11.106 +            AC_ARG_ENABLE(render-d3d,
  11.107 +AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
  11.108 +                                , enable_render_d3d=yes)
  11.109 +            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
  11.110 +                AC_DEFINE(SDL_VIDEO_RENDER_D3D)
  11.111 +            fi
  11.112 +        fi
  11.113          # Set up files for the audio library
  11.114          if test x$enable_audio = xyes; then
  11.115              AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
  11.116              SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
  11.117 -            if test x$have_directx = xyes; then
  11.118 +            if test x$have_dsound = xyes; then
  11.119                  AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
  11.120                  SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
  11.121              fi
  11.122 @@ -2304,8 +2323,13 @@
  11.123          fi
  11.124          # Set up files for the joystick library
  11.125          if test x$enable_joystick = xyes; then
  11.126 -            AC_DEFINE(SDL_JOYSTICK_WINMM)
  11.127 -            SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
  11.128 +            if test x$have_dinput = xyes; then
  11.129 +                AC_DEFINE(SDL_JOYSTICK_DINPUT)
  11.130 +                SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
  11.131 +            else
  11.132 +                AC_DEFINE(SDL_JOYSTICK_WINMM)
  11.133 +                SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
  11.134 +            fi
  11.135              have_joystick=yes
  11.136          fi
  11.137          # Set up files for the cdrom library
  11.138 @@ -2336,10 +2360,7 @@
  11.139              have_loadso=yes
  11.140          fi
  11.141          # Set up the system libraries we need
  11.142 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm"
  11.143 -        if test x$have_directx = xyes; then
  11.144 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
  11.145 -        fi
  11.146 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
  11.147          # The Win32 platform requires special setup
  11.148          SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
  11.149          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
  11.150 @@ -2354,6 +2375,7 @@
  11.151          CheckNASM
  11.152          CheckBWINDOW
  11.153          CheckBeGL
  11.154 +        CheckglSDL
  11.155          # Set up files for the audio library
  11.156          if test x$enable_audio = xyes; then
  11.157              AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
  11.158 @@ -2435,6 +2457,7 @@
  11.159          CheckX11
  11.160          CheckMacGL
  11.161          CheckOpenGLX11
  11.162 +        CheckglSDL
  11.163          CheckPTHREAD
  11.164          CheckAltivec
  11.165  
  11.166 @@ -2496,6 +2519,7 @@
  11.167          CheckAtariAudio
  11.168          CheckAtariLdg
  11.169          CheckAtariOSMesa
  11.170 +        CheckglSDL
  11.171          CheckPTH
  11.172          # Set up files for the audio library
  11.173          if test x$enable_threads = xyes -a x$enable_pth = xyes; then
    12.1 --- a/docs.html	Thu Jul 06 18:01:37 2006 +0000
    12.2 +++ b/docs.html	Mon Jul 10 21:04:37 2006 +0000
    12.3 @@ -14,64 +14,6 @@
    12.4  
    12.5  <H2> <A HREF="docs/index.html">API Documentation</A> </H2>
    12.6  
    12.7 -<H2> SDL 1.2.11 Release Notes </H2>
    12.8 -<P>
    12.9 -SDL 1.2.11 is a minor bug fix release.
   12.10 -</P>
   12.11 -
   12.12 -<H3> Unix Notes </H3>
   12.13 -
   12.14 -<BLOCKQUOTE>
   12.15 -<P>
   12.16 -	Dynamic X11 loading is only enabled with gcc 4 supporting -fvisibility=hidden.  This fixes crashes related to symbol collisions, and allows building on Solaris and IRIX.
   12.17 -</P>
   12.18 -<P>
   12.19 -	Fixed building SDL with Xinerama disabled.
   12.20 -</P>
   12.21 -<P>
   12.22 -	Fixed DRI OpenGL library loading, using RTLD_GLOBAL in dlopen().
   12.23 -</P>
   12.24 -<P>
   12.25 -	Added pkgconfig configuration support.
   12.26 -</P>
   12.27 -</BLOCKQUOTE>
   12.28 -
   12.29 -<H3> Windows Notes </H3>
   12.30 -
   12.31 -<BLOCKQUOTE>
   12.32 -<P>
   12.33 -	Setting SDL_GL_SWAP_CONTROL now works with Windows OpenGL.
   12.34 -</P>
   12.35 -<P>
   12.36 -	The Win32 window positioning code works properly for windows with menus.
   12.37 -</P>
   12.38 -<P>
   12.39 -	DirectSound audio quality has been improved on certain sound cards.
   12.40 -</P>
   12.41 -<P>
   12.42 -	Fixed 5.1 audio channel ordering on Windows and Mac OS X.
   12.43 -</P>
   12.44 -<P>
   12.45 -	Plugged a couple of minor memory leaks in the windib video driver.
   12.46 -</P>
   12.47 -<P>
   12.48 -	Fixed type collision with stdint.h when building with gcc on Win32.
   12.49 -</P>
   12.50 -<P>
   12.51 -	Fixed building with the Digital Mars Compiler on Win32.
   12.52 -</P>
   12.53 -</BLOCKQUOTE>
   12.54 -
   12.55 -<H3> Mac OS X Notes </H3>
   12.56 -
   12.57 -<BLOCKQUOTE>
   12.58 -<P>
   12.59 -	The Quartz video driver supports 32x32 cursors on Mac OS X 10.3 and above.
   12.60 -</P>
   12.61 -</BLOCKQUOTE>
   12.62 -
   12.63 -<IMG SRC="docs/images/rainbow.gif" ALT="[separator]" WIDTH="100%">
   12.64 -
   12.65  <H2> SDL 1.2.10 Release Notes </H2>
   12.66  <P>
   12.67  SDL 1.2.10 is a major release, featuring a revamp of the build system and many API improvements and bug fixes.
    13.1 --- a/include/SDL.h	Thu Jul 06 18:01:37 2006 +0000
    13.2 +++ b/include/SDL.h	Mon Jul 10 21:04:37 2006 +0000
    13.3 @@ -20,7 +20,56 @@
    13.4      slouken@libsdl.org
    13.5  */
    13.6  
    13.7 -/* Main include header for the SDL library */
    13.8 +/**
    13.9 + * \file SDL.h
   13.10 + *
   13.11 + * Main include header for the SDL library
   13.12 + */
   13.13 +/**
   13.14 + * \mainpage Simple DirectMedia Layer (SDL)
   13.15 +
   13.16 +http://www.libsdl.org/
   13.17 +
   13.18 +* \section intro_sec Introduction
   13.19 +
   13.20 +This is the Simple DirectMedia Layer, a general API that provides low
   13.21 +level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
   13.22 +and 2D framebuffer across multiple platforms.
   13.23 +
   13.24 +The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
   13.25 +Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
   13.26 +The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64,
   13.27 +RISC OS, SymbianOS, and OS/2, but these are not officially supported.
   13.28 +
   13.29 +SDL is written in C, but works with C++ natively, and has bindings to
   13.30 +several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
   13.31 +Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
   13.32 +Pike, Pliant, Python, Ruby, and Smalltalk.
   13.33 +
   13.34 +This library is distributed under GNU LGPL version 2, which can be
   13.35 +found in the file  "COPYING".  This license allows you to use SDL
   13.36 +freely in commercial programs as long as you link with the dynamic
   13.37 +library.
   13.38 +
   13.39 +The best way to learn how to use SDL is to check out the header files in
   13.40 +the "include" subdirectory and the programs in the "test" subdirectory.
   13.41 +The header files and test programs are well commented and always up to date.
   13.42 +More documentation is available in HTML format in "docs/index.html", and
   13.43 +a documentation wiki is available online at:
   13.44 +	http://www.libsdl.org/cgi/docwiki.cgi
   13.45 +
   13.46 +The test programs in the "test" subdirectory are in the public domain.
   13.47 +
   13.48 +Frequently asked questions are answered online:
   13.49 +	http://www.libsdl.org/faq.php
   13.50 +
   13.51 +If you need help with the library, or just want to discuss SDL related
   13.52 +issues, you can join the developers mailing list:
   13.53 +	http://www.libsdl.org/mailing-list.php
   13.54 +
   13.55 +Enjoy!
   13.56 +	Sam Lantinga				(slouken@libsdl.org)
   13.57 + */
   13.58  
   13.59  #ifndef _SDL_H
   13.60  #define _SDL_H
   13.61 @@ -40,11 +89,14 @@
   13.62  #include "SDL_timer.h"
   13.63  #include "SDL_video.h"
   13.64  #include "SDL_version.h"
   13.65 +#include "SDL_compat.h"
   13.66  
   13.67  #include "begin_code.h"
   13.68  /* Set up for C function definitions, even when using C++ */
   13.69  #ifdef __cplusplus
   13.70 +/* *INDENT-OFF* */
   13.71  extern "C" {
   13.72 +/* *INDENT-ON* */
   13.73  #endif
   13.74  
   13.75  /* As of version 0.5, SDL is loaded dynamically into the application */
   13.76 @@ -57,8 +109,8 @@
   13.77  #define SDL_INIT_VIDEO		0x00000020
   13.78  #define SDL_INIT_CDROM		0x00000100
   13.79  #define SDL_INIT_JOYSTICK	0x00000200
   13.80 -#define SDL_INIT_NOPARACHUTE	0x00100000	/* Don't catch fatal signals */
   13.81 -#define SDL_INIT_EVENTTHREAD	0x01000000	/* Not supported on all OS's */
   13.82 +#define SDL_INIT_NOPARACHUTE	0x00100000      /* Don't catch fatal signals */
   13.83 +#define SDL_INIT_EVENTTHREAD	0x01000000      /* Not supported on all OS's */
   13.84  #define SDL_INIT_EVERYTHING	0x0000FFFF
   13.85  
   13.86  /* This function loads the SDL dynamically linked library and initializes 
   13.87 @@ -87,8 +139,12 @@
   13.88  
   13.89  /* Ends C function definitions when using C++ */
   13.90  #ifdef __cplusplus
   13.91 +/* *INDENT-OFF* */
   13.92  }
   13.93 +/* *INDENT-ON* */
   13.94  #endif
   13.95  #include "close_code.h"
   13.96  
   13.97  #endif /* _SDL_H */
   13.98 +
   13.99 +/* vi: set ts=4 sw=4 expandtab: */
    14.1 --- a/include/SDL_active.h	Thu Jul 06 18:01:37 2006 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,58 +0,0 @@
    14.4 -/*
    14.5 -    SDL - Simple DirectMedia Layer
    14.6 -    Copyright (C) 1997-2006 Sam Lantinga
    14.7 -
    14.8 -    This library is free software; you can redistribute it and/or
    14.9 -    modify it under the terms of the GNU Lesser General Public
   14.10 -    License as published by the Free Software Foundation; either
   14.11 -    version 2.1 of the License, or (at your option) any later version.
   14.12 -
   14.13 -    This library is distributed in the hope that it will be useful,
   14.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14.16 -    Lesser General Public License for more details.
   14.17 -
   14.18 -    You should have received a copy of the GNU Lesser General Public
   14.19 -    License along with this library; if not, write to the Free Software
   14.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   14.21 -
   14.22 -    Sam Lantinga
   14.23 -    slouken@libsdl.org
   14.24 -*/
   14.25 -
   14.26 -/* Include file for SDL application focus event handling */
   14.27 -
   14.28 -#ifndef _SDL_active_h
   14.29 -#define _SDL_active_h
   14.30 -
   14.31 -#include "SDL_stdinc.h"
   14.32 -#include "SDL_error.h"
   14.33 -
   14.34 -#include "begin_code.h"
   14.35 -/* Set up for C function definitions, even when using C++ */
   14.36 -#ifdef __cplusplus
   14.37 -extern "C" {
   14.38 -#endif
   14.39 -
   14.40 -/* The available application states */
   14.41 -#define SDL_APPMOUSEFOCUS	0x01		/* The app has mouse coverage */
   14.42 -#define SDL_APPINPUTFOCUS	0x02		/* The app has input focus */
   14.43 -#define SDL_APPACTIVE		0x04		/* The application is active */
   14.44 -
   14.45 -/* Function prototypes */
   14.46 -/* 
   14.47 - * This function returns the current state of the application, which is a
   14.48 - * bitwise combination of SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS, and
   14.49 - * SDL_APPACTIVE.  If SDL_APPACTIVE is set, then the user is able to
   14.50 - * see your application, otherwise it has been iconified or disabled.
   14.51 - */
   14.52 -extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
   14.53 -
   14.54 -
   14.55 -/* Ends C function definitions when using C++ */
   14.56 -#ifdef __cplusplus
   14.57 -}
   14.58 -#endif
   14.59 -#include "close_code.h"
   14.60 -
   14.61 -#endif /* _SDL_active_h */
    15.1 --- a/include/SDL_audio.h	Thu Jul 06 18:01:37 2006 +0000
    15.2 +++ b/include/SDL_audio.h	Mon Jul 10 21:04:37 2006 +0000
    15.3 @@ -20,7 +20,11 @@
    15.4      slouken@libsdl.org
    15.5  */
    15.6  
    15.7 -/* Access to the raw audio mixing buffer for the SDL library */
    15.8 +/**
    15.9 + * \file SDL_audio.h
   15.10 + *
   15.11 + * Access to the raw audio mixing buffer for the SDL library
   15.12 + */
   15.13  
   15.14  #ifndef _SDL_audio_h
   15.15  #define _SDL_audio_h
   15.16 @@ -35,35 +39,38 @@
   15.17  #include "begin_code.h"
   15.18  /* Set up for C function definitions, even when using C++ */
   15.19  #ifdef __cplusplus
   15.20 +/* *INDENT-OFF* */
   15.21  extern "C" {
   15.22 +/* *INDENT-ON* */
   15.23  #endif
   15.24  
   15.25  /* The calculated values in this structure are calculated by SDL_OpenAudio() */
   15.26 -typedef struct SDL_AudioSpec {
   15.27 -	int freq;		/* DSP frequency -- samples per second */
   15.28 -	Uint16 format;		/* Audio data format */
   15.29 -	Uint8  channels;	/* Number of channels: 1 mono, 2 stereo */
   15.30 -	Uint8  silence;		/* Audio buffer silence value (calculated) */
   15.31 -	Uint16 samples;		/* Audio buffer size in samples (power of 2) */
   15.32 -	Uint16 padding;		/* Necessary for some compile environments */
   15.33 -	Uint32 size;		/* Audio buffer size in bytes (calculated) */
   15.34 -	/* This function is called when the audio device needs more data.
   15.35 -	   'stream' is a pointer to the audio data buffer
   15.36 -	   'len' is the length of that buffer in bytes.
   15.37 -	   Once the callback returns, the buffer will no longer be valid.
   15.38 -	   Stereo samples are stored in a LRLRLR ordering.
   15.39 -	*/
   15.40 -	void (SDLCALL *callback)(void *userdata, Uint8 *stream, int len);
   15.41 -	void  *userdata;
   15.42 +typedef struct SDL_AudioSpec
   15.43 +{
   15.44 +    int freq;                   /* DSP frequency -- samples per second */
   15.45 +    Uint16 format;              /* Audio data format */
   15.46 +    Uint8 channels;             /* Number of channels: 1 mono, 2 stereo */
   15.47 +    Uint8 silence;              /* Audio buffer silence value (calculated) */
   15.48 +    Uint16 samples;             /* Audio buffer size in samples (power of 2) */
   15.49 +    Uint16 padding;             /* Necessary for some compile environments */
   15.50 +    Uint32 size;                /* Audio buffer size in bytes (calculated) */
   15.51 +    /* This function is called when the audio device needs more data.
   15.52 +       'stream' is a pointer to the audio data buffer
   15.53 +       'len' is the length of that buffer in bytes.
   15.54 +       Once the callback returns, the buffer will no longer be valid.
   15.55 +       Stereo samples are stored in a LRLRLR ordering.
   15.56 +     */
   15.57 +    void (SDLCALL * callback) (void *userdata, Uint8 * stream, int len);
   15.58 +    void *userdata;
   15.59  } SDL_AudioSpec;
   15.60  
   15.61  /* Audio format flags (defaults to LSB byte order) */
   15.62 -#define AUDIO_U8	0x0008	/* Unsigned 8-bit samples */
   15.63 -#define AUDIO_S8	0x8008	/* Signed 8-bit samples */
   15.64 -#define AUDIO_U16LSB	0x0010	/* Unsigned 16-bit samples */
   15.65 -#define AUDIO_S16LSB	0x8010	/* Signed 16-bit samples */
   15.66 -#define AUDIO_U16MSB	0x1010	/* As above, but big-endian byte order */
   15.67 -#define AUDIO_S16MSB	0x9010	/* As above, but big-endian byte order */
   15.68 +#define AUDIO_U8	0x0008  /* Unsigned 8-bit samples */
   15.69 +#define AUDIO_S8	0x8008  /* Signed 8-bit samples */
   15.70 +#define AUDIO_U16LSB	0x0010  /* Unsigned 16-bit samples */
   15.71 +#define AUDIO_S16LSB	0x8010  /* Signed 16-bit samples */
   15.72 +#define AUDIO_U16MSB	0x1010  /* As above, but big-endian byte order */
   15.73 +#define AUDIO_S16MSB	0x9010  /* As above, but big-endian byte order */
   15.74  #define AUDIO_U16	AUDIO_U16LSB
   15.75  #define AUDIO_S16	AUDIO_S16LSB
   15.76  
   15.77 @@ -78,23 +85,30 @@
   15.78  
   15.79  
   15.80  /* A structure to hold a set of audio conversion filters and buffers */
   15.81 -typedef struct SDL_AudioCVT {
   15.82 -	int needed;			/* Set to 1 if conversion possible */
   15.83 -	Uint16 src_format;		/* Source audio format */
   15.84 -	Uint16 dst_format;		/* Target audio format */
   15.85 -	double rate_incr;		/* Rate conversion increment */
   15.86 -	Uint8 *buf;			/* Buffer to hold entire audio data */
   15.87 -	int    len;			/* Length of original audio buffer */
   15.88 -	int    len_cvt;			/* Length of converted audio buffer */
   15.89 -	int    len_mult;		/* buffer must be len*len_mult big */
   15.90 -	double len_ratio; 	/* Given len, final size is len*len_ratio */
   15.91 -	void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
   15.92 -	int filter_index;		/* Current audio conversion function */
   15.93 +typedef struct SDL_AudioCVT
   15.94 +{
   15.95 +    int needed;                 /* Set to 1 if conversion possible */
   15.96 +    Uint16 src_format;          /* Source audio format */
   15.97 +    Uint16 dst_format;          /* Target audio format */
   15.98 +    double rate_incr;           /* Rate conversion increment */
   15.99 +    Uint8 *buf;                 /* Buffer to hold entire audio data */
  15.100 +    int len;                    /* Length of original audio buffer */
  15.101 +    int len_cvt;                /* Length of converted audio buffer */
  15.102 +    int len_mult;               /* buffer must be len*len_mult big */
  15.103 +    double len_ratio;           /* Given len, final size is len*len_ratio */
  15.104 +    void (SDLCALL * filters[10]) (struct SDL_AudioCVT * cvt, Uint16 format);
  15.105 +    int filter_index;           /* Current audio conversion function */
  15.106  } SDL_AudioCVT;
  15.107  
  15.108  
  15.109  /* Function prototypes */
  15.110  
  15.111 +/* These functions return the list of built in video drivers, in the 
  15.112 + * order that they are normally initialized by default.
  15.113 + */
  15.114 +extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
  15.115 +extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
  15.116 +
  15.117  /* These functions are used internally, and should not be used unless you
  15.118   * have a specific need to specify the audio driver you want to use.
  15.119   * You should normally use SDL_Init() or SDL_InitSubSystem().
  15.120 @@ -102,11 +116,10 @@
  15.121  extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
  15.122  extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
  15.123  
  15.124 -/* This function fills the given character buffer with the name of the
  15.125 - * current audio driver, and returns a pointer to it if the audio driver has
  15.126 - * been initialized.  It returns NULL if no driver has been initialized.
  15.127 +/* This function returns the name of the current audio driver, or NULL
  15.128 + * if no driver has been initialized.
  15.129   */
  15.130 -extern DECLSPEC char * SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
  15.131 +extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
  15.132  
  15.133  /*
  15.134   * This function opens the audio device with the desired parameters, and
  15.135 @@ -149,15 +162,17 @@
  15.136   * may modify the requested size of the audio buffer, you should allocate
  15.137   * any local mixing buffers after you open the audio device.
  15.138   */
  15.139 -extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
  15.140 +extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
  15.141 +                                          SDL_AudioSpec * obtained);
  15.142  
  15.143  /*
  15.144   * Get the current audio state:
  15.145   */
  15.146 -typedef enum {
  15.147 -	SDL_AUDIO_STOPPED = 0,
  15.148 -	SDL_AUDIO_PLAYING,
  15.149 -	SDL_AUDIO_PAUSED
  15.150 +typedef enum
  15.151 +{
  15.152 +    SDL_AUDIO_STOPPED = 0,
  15.153 +    SDL_AUDIO_PLAYING,
  15.154 +    SDL_AUDIO_PAUSED
  15.155  } SDL_audiostatus;
  15.156  extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
  15.157  
  15.158 @@ -187,7 +202,11 @@
  15.159   * wave file cannot be opened, uses an unknown data format, or is 
  15.160   * corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
  15.161   */
  15.162 -extern DECLSPEC SDL_AudioSpec * SDLCALL SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
  15.163 +extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
  15.164 +                                                      int freesrc,
  15.165 +                                                      SDL_AudioSpec * spec,
  15.166 +                                                      Uint8 ** audio_buf,
  15.167 +                                                      Uint32 * audio_len);
  15.168  
  15.169  /* Compatibility convenience function -- loads a WAV from a file */
  15.170  #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
  15.171 @@ -196,7 +215,7 @@
  15.172  /*
  15.173   * This function frees data previously allocated with SDL_LoadWAV_RW()
  15.174   */
  15.175 -extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 *audio_buf);
  15.176 +extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
  15.177  
  15.178  /*
  15.179   * This function takes a source format and rate and a destination format
  15.180 @@ -205,9 +224,13 @@
  15.181   * to the other.
  15.182   * This function returns 0, or -1 if there was an error.
  15.183   */
  15.184 -extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
  15.185 -		Uint16 src_format, Uint8 src_channels, int src_rate,
  15.186 -		Uint16 dst_format, Uint8 dst_channels, int dst_rate);
  15.187 +extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
  15.188 +                                              Uint16 src_format,
  15.189 +                                              Uint8 src_channels,
  15.190 +                                              int src_rate,
  15.191 +                                              Uint16 dst_format,
  15.192 +                                              Uint8 dst_channels,
  15.193 +                                              int dst_rate);
  15.194  
  15.195  /* Once you have initialized the 'cvt' structure using SDL_BuildAudioCVT(),
  15.196   * created an audio buffer cvt->buf, and filled it with cvt->len bytes of
  15.197 @@ -217,7 +240,7 @@
  15.198   * cvt->buf should be allocated after the cvt structure is initialized by
  15.199   * SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long.
  15.200   */
  15.201 -extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT *cvt);
  15.202 +extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
  15.203  
  15.204  /*
  15.205   * This takes two audio buffers of the playing audio format and mixes
  15.206 @@ -227,7 +250,8 @@
  15.207   * This is provided for convenience -- you can mix your own audio data.
  15.208   */
  15.209  #define SDL_MIX_MAXVOLUME 128
  15.210 -extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume);
  15.211 +extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
  15.212 +                                          Uint32 len, int volume);
  15.213  
  15.214  /*
  15.215   * The lock manipulated by these functions protects the callback function.
  15.216 @@ -246,8 +270,12 @@
  15.217  
  15.218  /* Ends C function definitions when using C++ */
  15.219  #ifdef __cplusplus
  15.220 +/* *INDENT-OFF* */
  15.221  }
  15.222 +/* *INDENT-ON* */
  15.223  #endif
  15.224  #include "close_code.h"
  15.225  
  15.226  #endif /* _SDL_audio_h */
  15.227 +
  15.228 +/* vi: set ts=4 sw=4 expandtab: */
    16.1 --- a/include/SDL_byteorder.h	Thu Jul 06 18:01:37 2006 +0000
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,24 +0,0 @@
    16.4 -/*
    16.5 -    SDL - Simple DirectMedia Layer
    16.6 -    Copyright (C) 1997-2006 Sam Lantinga
    16.7 -
    16.8 -    This library is free software; you can redistribute it and/or
    16.9 -    modify it under the terms of the GNU Lesser General Public
   16.10 -    License as published by the Free Software Foundation; either
   16.11 -    version 2.1 of the License, or (at your option) any later version.
   16.12 -
   16.13 -    This library is distributed in the hope that it will be useful,
   16.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   16.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   16.16 -    Lesser General Public License for more details.
   16.17 -
   16.18 -    You should have received a copy of the GNU Lesser General Public
   16.19 -    License along with this library; if not, write to the Free Software
   16.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   16.21 -
   16.22 -    Sam Lantinga
   16.23 -    slouken@libsdl.org
   16.24 -*/
   16.25 -
   16.26 -/* DEPRECATED */
   16.27 -#include "SDL_endian.h"
    17.1 --- a/include/SDL_cdrom.h	Thu Jul 06 18:01:37 2006 +0000
    17.2 +++ b/include/SDL_cdrom.h	Mon Jul 10 21:04:37 2006 +0000
    17.3 @@ -20,7 +20,11 @@
    17.4      slouken@libsdl.org
    17.5  */
    17.6  
    17.7 -/* This is the CD-audio control API for Simple DirectMedia Layer */
    17.8 +/**
    17.9 + * \file SDL_cdrom.h
   17.10 + *
   17.11 + * This is the CD-audio control API for Simple DirectMedia Layer
   17.12 + */
   17.13  
   17.14  #ifndef _SDL_cdrom_h
   17.15  #define _SDL_cdrom_h
   17.16 @@ -31,7 +35,9 @@
   17.17  #include "begin_code.h"
   17.18  /* Set up for C function definitions, even when using C++ */
   17.19  #ifdef __cplusplus
   17.20 +/* *INDENT-OFF* */
   17.21  extern "C" {
   17.22 +/* *INDENT-ON* */
   17.23  #endif
   17.24  
   17.25  /* In order to use these functions, SDL_Init() must have been called
   17.26 @@ -47,35 +53,38 @@
   17.27  #define SDL_DATA_TRACK	0x04
   17.28  
   17.29  /* The possible states which a CD-ROM drive can be in. */
   17.30 -typedef enum {
   17.31 -	CD_TRAYEMPTY,
   17.32 -	CD_STOPPED,
   17.33 -	CD_PLAYING,
   17.34 -	CD_PAUSED,
   17.35 -	CD_ERROR = -1
   17.36 +typedef enum
   17.37 +{
   17.38 +    CD_TRAYEMPTY,
   17.39 +    CD_STOPPED,
   17.40 +    CD_PLAYING,
   17.41 +    CD_PAUSED,
   17.42 +    CD_ERROR = -1
   17.43  } CDstatus;
   17.44  
   17.45  /* Given a status, returns true if there's a disk in the drive */
   17.46  #define CD_INDRIVE(status)	((int)(status) > 0)
   17.47  
   17.48 -typedef struct SDL_CDtrack {
   17.49 -	Uint8 id;		/* Track number */
   17.50 -	Uint8 type;		/* Data or audio track */
   17.51 -	Uint16 unused;
   17.52 -	Uint32 length;		/* Length, in frames, of this track */
   17.53 -	Uint32 offset;		/* Offset, in frames, from start of disk */
   17.54 +typedef struct SDL_CDtrack
   17.55 +{
   17.56 +    Uint8 id;                   /* Track number */
   17.57 +    Uint8 type;                 /* Data or audio track */
   17.58 +    Uint16 unused;
   17.59 +    Uint32 length;              /* Length, in frames, of this track */
   17.60 +    Uint32 offset;              /* Offset, in frames, from start of disk */
   17.61  } SDL_CDtrack;
   17.62  
   17.63  /* This structure is only current as of the last call to SDL_CDStatus() */
   17.64 -typedef struct SDL_CD {
   17.65 -	int id;			/* Private drive identifier */
   17.66 -	CDstatus status;	/* Current drive status */
   17.67 +typedef struct SDL_CD
   17.68 +{
   17.69 +    int id;                     /* Private drive identifier */
   17.70 +    CDstatus status;            /* Current drive status */
   17.71  
   17.72 -	/* The rest of this structure is only valid if there's a CD in drive */
   17.73 -	int numtracks;		/* Number of tracks on disk */
   17.74 -	int cur_track;		/* Current track position */
   17.75 -	int cur_frame;		/* Current frame offset within current track */
   17.76 -	SDL_CDtrack track[SDL_MAX_TRACKS+1];
   17.77 +    /* The rest of this structure is only valid if there's a CD in drive */
   17.78 +    int numtracks;              /* Number of tracks on disk */
   17.79 +    int cur_track;              /* Current track position */
   17.80 +    int cur_frame;              /* Current frame offset within current track */
   17.81 +    SDL_CDtrack track[SDL_MAX_TRACKS + 1];
   17.82  } SDL_CD;
   17.83  
   17.84  /* Conversion functions from frames to Minute/Second/Frames and vice versa */
   17.85 @@ -103,7 +112,7 @@
   17.86  	"E:"
   17.87  	"/dev/disk/ide/1/master"
   17.88  */
   17.89 -extern DECLSPEC const char * SDLCALL SDL_CDName(int drive);
   17.90 +extern DECLSPEC const char *SDLCALL SDL_CDName(int drive);
   17.91  
   17.92  /* Opens a CD-ROM drive for access.  It returns a drive handle on success,
   17.93     or NULL if the drive was invalid or busy.  This newly opened CD-ROM
   17.94 @@ -111,13 +120,13 @@
   17.95     CD-ROM handle.
   17.96     Drives are numbered starting with 0.  Drive 0 is the system default CD-ROM.
   17.97  */
   17.98 -extern DECLSPEC SDL_CD * SDLCALL SDL_CDOpen(int drive);
   17.99 +extern DECLSPEC SDL_CD *SDLCALL SDL_CDOpen(int drive);
  17.100  
  17.101  /* This function returns the current status of the given drive.
  17.102     If the drive has a CD in it, the table of contents of the CD and current
  17.103     play position of the CD will be stored in the SDL_CD structure.
  17.104  */
  17.105 -extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD *cdrom);
  17.106 +extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD * cdrom);
  17.107  
  17.108  /* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks'
  17.109     tracks and 'nframes' frames.  If both 'ntrack' and 'nframe' are 0, play 
  17.110 @@ -138,34 +147,40 @@
  17.111  
  17.112     This function returns 0, or -1 if there was an error.
  17.113  */
  17.114 -extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD *cdrom,
  17.115 -		int start_track, int start_frame, int ntracks, int nframes);
  17.116 +extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD * cdrom,
  17.117 +                                             int start_track,
  17.118 +                                             int start_frame, int ntracks,
  17.119 +                                             int nframes);
  17.120  
  17.121  /* Play the given CD starting at 'start' frame for 'length' frames.
  17.122     It returns 0, or -1 if there was an error.
  17.123  */
  17.124 -extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD *cdrom, int start, int length);
  17.125 +extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD * cdrom, int start, int length);
  17.126  
  17.127  /* Pause play -- returns 0, or -1 on error */
  17.128 -extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD *cdrom);
  17.129 +extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD * cdrom);
  17.130  
  17.131  /* Resume play -- returns 0, or -1 on error */
  17.132 -extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD *cdrom);
  17.133 +extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD * cdrom);
  17.134  
  17.135  /* Stop play -- returns 0, or -1 on error */
  17.136 -extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD *cdrom);
  17.137 +extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD * cdrom);
  17.138  
  17.139  /* Eject CD-ROM -- returns 0, or -1 on error */
  17.140 -extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD *cdrom);
  17.141 +extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD * cdrom);
  17.142  
  17.143  /* Closes the handle for the CD-ROM drive */
  17.144 -extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD *cdrom);
  17.145 +extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD * cdrom);
  17.146  
  17.147  
  17.148  /* Ends C function definitions when using C++ */
  17.149  #ifdef __cplusplus
  17.150 +/* *INDENT-OFF* */
  17.151  }
  17.152 +/* *INDENT-ON* */
  17.153  #endif
  17.154  #include "close_code.h"
  17.155  
  17.156  #endif /* _SDL_video_h */
  17.157 +
  17.158 +/* vi: set ts=4 sw=4 expandtab: */
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/include/SDL_compat.h	Mon Jul 10 21:04:37 2006 +0000
    18.3 @@ -0,0 +1,186 @@
    18.4 +/*
    18.5 +    SDL - Simple DirectMedia Layer
    18.6 +    Copyright (C) 1997-2006 Sam Lantinga
    18.7 +
    18.8 +    This library is free software; you can redistribute it and/or
    18.9 +    modify it under the terms of the GNU Lesser General Public
   18.10 +    License as published by the Free Software Foundation; either
   18.11 +    version 2.1 of the License, or (at your option) any later version.
   18.12 +
   18.13 +    This library is distributed in the hope that it will be useful,
   18.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   18.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   18.16 +    Lesser General Public License for more details.
   18.17 +
   18.18 +    You should have received a copy of the GNU Lesser General Public
   18.19 +    License along with this library; if not, write to the Free Software
   18.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   18.21 +
   18.22 +    Sam Lantinga
   18.23 +    slouken@libsdl.org
   18.24 +*/
   18.25 +
   18.26 +/* This file contains functions for backwards compatibility with SDL 1.2 */
   18.27 +
   18.28 +#ifndef _SDL_compat_h
   18.29 +#define _SDL_compat_h
   18.30 +
   18.31 +#include "SDL_video.h"
   18.32 +#include "SDL_version.h"
   18.33 +
   18.34 +#include "begin_code.h"
   18.35 +/* Set up for C function definitions, even when using C++ */
   18.36 +#ifdef __cplusplus
   18.37 +/* *INDENT-OFF* */
   18.38 +extern "C" {
   18.39 +/* *INDENT-ON* */
   18.40 +#endif
   18.41 +
   18.42 +#define SDL_SWSURFACE       0x00000000
   18.43 +#define SDL_ANYFORMAT       0x00100000
   18.44 +#define SDL_HWPALETTE       0x00200000
   18.45 +#define SDL_DOUBLEBUF       0x00400000
   18.46 +#define SDL_FULLSCREEN      0x00800000
   18.47 +#define SDL_RESIZABLE       0x01000000
   18.48 +#define SDL_NOFRAME         0x02000000
   18.49 +#define SDL_OPENGL          0x04000000
   18.50 +#define SDL_ASYNCBLIT       0x08000000  /* Not used */
   18.51 +#define SDL_HWACCEL         0x08000000  /* Not used */
   18.52 +
   18.53 +#define SDL_APPMOUSEFOCUS	0x01
   18.54 +#define SDL_APPINPUTFOCUS	0x02
   18.55 +#define SDL_APPACTIVE		0x04
   18.56 +
   18.57 +#define SDL_LOGPAL 0x01
   18.58 +#define SDL_PHYSPAL 0x02
   18.59 +
   18.60 +#define SDL_ACTIVEEVENT	SDL_EVENT_RESERVED1
   18.61 +#define SDL_VIDEORESIZE	SDL_EVENT_RESERVED2
   18.62 +#define SDL_VIDEOEXPOSE	SDL_EVENT_RESERVED3
   18.63 +#define SDL_ACTIVEEVENTMASK	SDL_EVENTMASK(SDL_ACTIVEEVENT)
   18.64 +#define SDL_VIDEORESIZEMASK SDL_EVENTMASK(SDL_VIDEORESIZE)
   18.65 +#define SDL_VIDEOEXPOSEMASK SDL_EVENTMASK(SDL_VIDEOEXPOSE)
   18.66 +
   18.67 +#define SDL_BUTTON_WHEELUP	4
   18.68 +#define SDL_BUTTON_WHEELDOWN	5
   18.69 +
   18.70 +typedef struct SDL_VideoInfo
   18.71 +{
   18.72 +    Uint32 hw_available:1;
   18.73 +    Uint32 wm_available:1;
   18.74 +    Uint32 UnusedBits1:6;
   18.75 +    Uint32 UnusedBits2:1;
   18.76 +    Uint32 blit_hw:1;
   18.77 +    Uint32 blit_hw_CC:1;
   18.78 +    Uint32 blit_hw_A:1;
   18.79 +    Uint32 blit_sw:1;
   18.80 +    Uint32 blit_sw_CC:1;
   18.81 +    Uint32 blit_sw_A:1;
   18.82 +    Uint32 blit_fill:1;
   18.83 +    Uint32 UnusedBits3:16;
   18.84 +    Uint32 video_mem;
   18.85 +
   18.86 +    SDL_PixelFormat *vfmt;
   18.87 +} SDL_VideoInfo;
   18.88 +
   18.89 +/* The most common video overlay formats.
   18.90 +   For an explanation of these pixel formats, see:
   18.91 +   http://www.webartz.com/fourcc/indexyuv.htm
   18.92 +
   18.93 +   For information on the relationship between color spaces, see:
   18.94 +   http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
   18.95 + */
   18.96 +#define SDL_YV12_OVERLAY  0x32315659    /* Planar mode: Y + V + U  (3 planes) */
   18.97 +#define SDL_IYUV_OVERLAY  0x56555949    /* Planar mode: Y + U + V  (3 planes) */
   18.98 +#define SDL_YUY2_OVERLAY  0x32595559    /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
   18.99 +#define SDL_UYVY_OVERLAY  0x59565955    /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
  18.100 +#define SDL_YVYU_OVERLAY  0x55595659    /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
  18.101 +
  18.102 +/* The YUV hardware video overlay */
  18.103 +typedef struct SDL_Overlay
  18.104 +{
  18.105 +    Uint32 format;              /* Read-only */
  18.106 +    int w, h;                   /* Read-only */
  18.107 +    int planes;                 /* Read-only */
  18.108 +    Uint16 *pitches;            /* Read-only */
  18.109 +    Uint8 **pixels;             /* Read-write */
  18.110 +
  18.111 +    /* Hardware-specific surface info */
  18.112 +    struct private_yuvhwfuncs *hwfuncs;
  18.113 +    struct private_yuvhwdata *hwdata;
  18.114 +
  18.115 +    /* Special flags */
  18.116 +    Uint32 hw_overlay:1;        /* Flag: This overlay hardware accelerated? */
  18.117 +    Uint32 UnusedBits:31;
  18.118 +} SDL_Overlay;
  18.119 +
  18.120 +typedef enum
  18.121 +{
  18.122 +    SDL_GRAB_QUERY = -1,
  18.123 +    SDL_GRAB_OFF = 0,
  18.124 +    SDL_GRAB_ON = 1
  18.125 +} SDL_GrabMode;
  18.126 +
  18.127 +struct SDL_SysWMinfo;
  18.128 +
  18.129 +#define SDL_SetModuleHandle(x)
  18.130 +#define SDL_AllocSurface    SDL_CreateRGBSurface
  18.131 +
  18.132 +extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
  18.133 +extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
  18.134 +extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
  18.135 +extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
  18.136 +extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
  18.137 +                                            Uint32 flags);
  18.138 +extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
  18.139 +                                                 Uint32 flags);
  18.140 +extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
  18.141 +                                                      int bpp, Uint32 flags);
  18.142 +extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
  18.143 +extern DECLSPEC void SDLCALL SDL_UpdateRects(SDL_Surface * screen,
  18.144 +                                             int numrects, SDL_Rect * rects);
  18.145 +extern DECLSPEC void SDLCALL SDL_UpdateRect(SDL_Surface * screen, Sint32 x,
  18.146 +                                            Sint32 y, Uint32 w, Uint32 h);
  18.147 +extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
  18.148 +extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
  18.149 +extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
  18.150 +                                                            surface);
  18.151 +extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
  18.152 +                                               const char *icon);
  18.153 +extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
  18.154 +extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
  18.155 +extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
  18.156 +extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
  18.157 +extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
  18.158 +extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
  18.159 +                                           const SDL_Color * colors,
  18.160 +                                           int firstcolor, int ncolors);
  18.161 +extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
  18.162 +                                          const SDL_Color * colors,
  18.163 +                                          int firstcolor, int ncolors);
  18.164 +extern DECLSPEC int SDLCALL SDL_GetWMInfo(struct SDL_SysWMinfo *info);
  18.165 +extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
  18.166 +extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
  18.167 +extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
  18.168 +                                                          int height,
  18.169 +                                                          Uint32 format,
  18.170 +                                                          SDL_Surface *
  18.171 +                                                          display);
  18.172 +extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
  18.173 +extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
  18.174 +extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
  18.175 +                                                  SDL_Rect * dstrect);
  18.176 +extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
  18.177 +extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
  18.178 +
  18.179 +/* Ends C function definitions when using C++ */
  18.180 +#ifdef __cplusplus
  18.181 +/* *INDENT-OFF* */
  18.182 +}
  18.183 +/* *INDENT-ON* */
  18.184 +#endif
  18.185 +#include "close_code.h"
  18.186 +
  18.187 +#endif /* _SDL_compat_h */
  18.188 +
  18.189 +/* vi: set ts=4 sw=4 expandtab: */
    19.1 --- a/include/SDL_config.h.in	Thu Jul 06 18:01:37 2006 +0000
    19.2 +++ b/include/SDL_config.h.in	Mon Jul 10 21:04:37 2006 +0000
    19.3 @@ -198,6 +198,7 @@
    19.4  #undef SDL_JOYSTICK_AMIGA
    19.5  #undef SDL_JOYSTICK_BEOS
    19.6  #undef SDL_JOYSTICK_DC
    19.7 +#undef SDL_JOYSTICK_DINPUT
    19.8  #undef SDL_JOYSTICK_DUMMY
    19.9  #undef SDL_JOYSTICK_IOKIT
   19.10  #undef SDL_JOYSTICK_LINUX
   19.11 @@ -252,7 +253,6 @@
   19.12  #undef SDL_VIDEO_DRIVER_BWINDOW
   19.13  #undef SDL_VIDEO_DRIVER_CYBERGRAPHICS
   19.14  #undef SDL_VIDEO_DRIVER_DC
   19.15 -#undef SDL_VIDEO_DRIVER_DDRAW
   19.16  #undef SDL_VIDEO_DRIVER_DGA
   19.17  #undef SDL_VIDEO_DRIVER_DIRECTFB
   19.18  #undef SDL_VIDEO_DRIVER_DRAWSPROCKET
   19.19 @@ -262,6 +262,7 @@
   19.20  #undef SDL_VIDEO_DRIVER_GAPI
   19.21  #undef SDL_VIDEO_DRIVER_GEM
   19.22  #undef SDL_VIDEO_DRIVER_GGI
   19.23 +#undef SDL_VIDEO_DRIVER_GLSDL
   19.24  #undef SDL_VIDEO_DRIVER_IPOD
   19.25  #undef SDL_VIDEO_DRIVER_NANOX
   19.26  #undef SDL_VIDEO_DRIVER_OS2FS
   19.27 @@ -274,7 +275,7 @@
   19.28  #undef SDL_VIDEO_DRIVER_SVGALIB
   19.29  #undef SDL_VIDEO_DRIVER_TOOLBOX
   19.30  #undef SDL_VIDEO_DRIVER_VGL
   19.31 -#undef SDL_VIDEO_DRIVER_WINDIB
   19.32 +#undef SDL_VIDEO_DRIVER_WIN32
   19.33  #undef SDL_VIDEO_DRIVER_WSCONS
   19.34  #undef SDL_VIDEO_DRIVER_X11
   19.35  #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
   19.36 @@ -290,6 +291,10 @@
   19.37  #undef SDL_VIDEO_DRIVER_X11_XV
   19.38  #undef SDL_VIDEO_DRIVER_XBIOS
   19.39  
   19.40 +#undef SDL_VIDEO_RENDER_D3D
   19.41 +#undef SDL_VIDEO_RENDER_GDI
   19.42 +#undef SDL_VIDEO_RENDER_OGL
   19.43 +
   19.44  /* Enable OpenGL support */
   19.45  #undef SDL_VIDEO_OPENGL
   19.46  #undef SDL_VIDEO_OPENGL_GLX
    20.1 --- a/include/SDL_config_amiga.h	Thu Jul 06 18:01:37 2006 +0000
    20.2 +++ b/include/SDL_config_amiga.h	Mon Jul 10 21:04:37 2006 +0000
    20.3 @@ -73,6 +73,7 @@
    20.4  /* Enable various video drivers */
    20.5  #define SDL_VIDEO_DRIVER_CYBERGRAPHICS	1
    20.6  #define SDL_VIDEO_DRIVER_DUMMY	1
    20.7 +#define SDL_VIDEO_DRIVER_GLSDL	1
    20.8  
    20.9  /* Enable OpenGL support */
   20.10  #define SDL_VIDEO_OPENGL	1
    21.1 --- a/include/SDL_config_dreamcast.h	Thu Jul 06 18:01:37 2006 +0000
    21.2 +++ b/include/SDL_config_dreamcast.h	Mon Jul 10 21:04:37 2006 +0000
    21.3 @@ -102,5 +102,6 @@
    21.4  /* Enable various video drivers */
    21.5  #define SDL_VIDEO_DRIVER_DC	1
    21.6  #define SDL_VIDEO_DRIVER_DUMMY	1
    21.7 +#define SDL_VIDEO_DRIVER_GLSDL	1
    21.8  
    21.9  #endif /* _SDL_config_dreamcast_h */
    22.1 --- a/include/SDL_config_macos.h	Thu Jul 06 18:01:37 2006 +0000
    22.2 +++ b/include/SDL_config_macos.h	Mon Jul 10 21:04:37 2006 +0000
    22.3 @@ -29,15 +29,15 @@
    22.4  
    22.5  #include <MacTypes.h>
    22.6  
    22.7 -typedef SInt8	int8_t;
    22.8 -typedef UInt8	uint8_t;
    22.9 -typedef SInt16	int16_t;
   22.10 -typedef UInt16	uint16_t;
   22.11 -typedef SInt32	int32_t;
   22.12 -typedef UInt32	uint32_t;
   22.13 -typedef SInt64	int64_t;
   22.14 -typedef UInt64	uint64_t;
   22.15 -typedef unsigned long	uintptr_t;
   22.16 +typedef SInt8 int8_t;
   22.17 +typedef UInt8 uint8_t;
   22.18 +typedef SInt16 int16_t;
   22.19 +typedef UInt16 uint16_t;
   22.20 +typedef SInt32 int32_t;
   22.21 +typedef UInt32 uint32_t;
   22.22 +typedef SInt64 int64_t;
   22.23 +typedef UInt64 uint64_t;
   22.24 +typedef unsigned long uintptr_t;
   22.25  
   22.26  #define SDL_HAS_64BIT_TYPE	1
   22.27  
   22.28 @@ -104,6 +104,7 @@
   22.29  /* Enable various video drivers */
   22.30  #define SDL_VIDEO_DRIVER_DUMMY	1
   22.31  #define SDL_VIDEO_DRIVER_DRAWSPROCKET	1
   22.32 +#define SDL_VIDEO_DRIVER_GLSDL	1
   22.33  #define SDL_VIDEO_DRIVER_TOOLBOX	1
   22.34  
   22.35  /* Enable OpenGL support */
    23.1 --- a/include/SDL_config_os2.h	Thu Jul 06 18:01:37 2006 +0000
    23.2 +++ b/include/SDL_config_os2.h	Mon Jul 10 21:04:37 2006 +0000
    23.3 @@ -27,16 +27,16 @@
    23.4  
    23.5  /* This is a set of defines to configure the SDL features */
    23.6  
    23.7 -typedef signed char         int8_t;
    23.8 -typedef unsigned char       uint8_t;
    23.9 -typedef signed short        int16_t;
   23.10 -typedef unsigned short      uint16_t;
   23.11 -typedef signed int          int32_t;
   23.12 -typedef unsigned int        uint32_t;
   23.13 -typedef unsigned int        size_t;
   23.14 -typedef unsigned long       uintptr_t;
   23.15 -typedef signed long long    int64_t;
   23.16 -typedef unsigned long long  uint64_t;
   23.17 +typedef signed char int8_t;
   23.18 +typedef unsigned char uint8_t;
   23.19 +typedef signed short int16_t;
   23.20 +typedef unsigned short uint16_t;
   23.21 +typedef signed int int32_t;
   23.22 +typedef unsigned int uint32_t;
   23.23 +typedef unsigned int size_t;
   23.24 +typedef unsigned long uintptr_t;
   23.25 +typedef signed long long int64_t;
   23.26 +typedef unsigned long long uint64_t;
   23.27  
   23.28  #define SDL_HAS_64BIT_TYPE	1
   23.29  
    24.1 --- a/include/SDL_config_win32.h	Thu Jul 06 18:01:37 2006 +0000
    24.2 +++ b/include/SDL_config_win32.h	Mon Jul 10 21:04:37 2006 +0000
    24.3 @@ -30,23 +30,23 @@
    24.4  #ifdef __GNUC__
    24.5  #define HAVE_STDINT_H	1
    24.6  #elif defined(_MSC_VER)
    24.7 -typedef signed __int8		int8_t;
    24.8 -typedef unsigned __int8		uint8_t;
    24.9 -typedef signed __int16		int16_t;
   24.10 -typedef unsigned __int16	uint16_t;
   24.11 -typedef signed __int32		int32_t;
   24.12 -typedef unsigned __int32	uint32_t;
   24.13 -typedef signed __int64		int64_t;
   24.14 -typedef unsigned __int64	uint64_t;
   24.15 +typedef signed __int8 int8_t;
   24.16 +typedef unsigned __int8 uint8_t;
   24.17 +typedef signed __int16 int16_t;
   24.18 +typedef unsigned __int16 uint16_t;
   24.19 +typedef signed __int32 int32_t;
   24.20 +typedef unsigned __int32 uint32_t;
   24.21 +typedef signed __int64 int64_t;
   24.22 +typedef unsigned __int64 uint64_t;
   24.23  #ifndef _UINTPTR_T_DEFINED
   24.24  #ifdef  _WIN64
   24.25 -typedef unsigned __int64    uintptr_t;
   24.26 +typedef unsigned __int64 uintptr_t;
   24.27  #else
   24.28 -typedef unsigned int   uintptr_t;
   24.29 +typedef unsigned int uintptr_t;
   24.30  #endif
   24.31  #define _UINTPTR_T_DEFINED
   24.32  #endif
   24.33 -#else	/* !__GNUC__ && !_MSC_VER */
   24.34 +#else /* !__GNUC__ && !_MSC_VER */
   24.35  typedef signed char int8_t;
   24.36  typedef unsigned char uint8_t;
   24.37  typedef signed short int16_t;
   24.38 @@ -150,19 +150,17 @@
   24.39  #endif
   24.40  
   24.41  /* Enable various video drivers */
   24.42 -#ifdef _WIN32_WCE
   24.43 -#define SDL_VIDEO_DRIVER_GAPI	1
   24.44 -#endif
   24.45 -#ifndef _WIN32_WCE
   24.46 -#define SDL_VIDEO_DRIVER_DDRAW	1
   24.47 -#endif
   24.48  #define SDL_VIDEO_DRIVER_DUMMY	1
   24.49 -#define SDL_VIDEO_DRIVER_WINDIB	1
   24.50 +#define SDL_VIDEO_DRIVER_WIN32	1
   24.51 +
   24.52 +#define SDL_VIDEO_RENDER_D3D	1
   24.53 +#define SDL_VIDEO_RENDER_GDI	1
   24.54  
   24.55  /* Enable OpenGL support */
   24.56  #ifndef _WIN32_WCE
   24.57  #define SDL_VIDEO_OPENGL	1
   24.58  #define SDL_VIDEO_OPENGL_WGL	1
   24.59 +#define SDL_VIDEO_RENDER_OGL	1
   24.60  #endif
   24.61  
   24.62  /* Enable assembly routines (Win64 doesn't have inline asm) */
    25.1 --- a/include/SDL_copying.h	Thu Jul 06 18:01:37 2006 +0000
    25.2 +++ b/include/SDL_copying.h	Mon Jul 10 21:04:37 2006 +0000
    25.3 @@ -19,4 +19,3 @@
    25.4      Sam Lantinga
    25.5      slouken@libsdl.org
    25.6  */
    25.7 -
    26.1 --- a/include/SDL_cpuinfo.h	Thu Jul 06 18:01:37 2006 +0000
    26.2 +++ b/include/SDL_cpuinfo.h	Mon Jul 10 21:04:37 2006 +0000
    26.3 @@ -20,8 +20,11 @@
    26.4      slouken@libsdl.org
    26.5  */
    26.6  
    26.7 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    26.8 -/* CPU feature detection for SDL                                       */
    26.9 +/**
   26.10 + * \file SDL_cpuinfo.h
   26.11 + *
   26.12 + * CPU feature detection for SDL
   26.13 + */
   26.14  
   26.15  #ifndef _SDL_cpuinfo_h
   26.16  #define _SDL_cpuinfo_h
   26.17 @@ -31,7 +34,9 @@
   26.18  #include "begin_code.h"
   26.19  /* Set up for C function definitions, even when using C++ */
   26.20  #ifdef __cplusplus
   26.21 +/* *INDENT-OFF* */
   26.22  extern "C" {
   26.23 +/* *INDENT-ON* */
   26.24  #endif
   26.25  
   26.26  /* This function returns true if the CPU has the RDTSC instruction
   26.27 @@ -68,8 +73,12 @@
   26.28  
   26.29  /* Ends C function definitions when using C++ */
   26.30  #ifdef __cplusplus
   26.31 +/* *INDENT-OFF* */
   26.32  }
   26.33 +/* *INDENT-ON* */
   26.34  #endif
   26.35  #include "close_code.h"
   26.36  
   26.37  #endif /* _SDL_cpuinfo_h */
   26.38 +
   26.39 +/* vi: set ts=4 sw=4 expandtab: */
    27.1 --- a/include/SDL_endian.h	Thu Jul 06 18:01:37 2006 +0000
    27.2 +++ b/include/SDL_endian.h	Mon Jul 10 21:04:37 2006 +0000
    27.3 @@ -20,7 +20,11 @@
    27.4      slouken@libsdl.org
    27.5  */
    27.6  
    27.7 -/* Functions for reading and writing endian-specific values */
    27.8 +/**
    27.9 + * \file SDL_endian.h
   27.10 + *
   27.11 + * Functions for reading and writing endian-specific values
   27.12 + */
   27.13  
   27.14  #ifndef _SDL_endian_h
   27.15  #define _SDL_endian_h
   27.16 @@ -31,7 +35,7 @@
   27.17  #define SDL_LIL_ENDIAN	1234
   27.18  #define SDL_BIG_ENDIAN	4321
   27.19  
   27.20 -#ifndef SDL_BYTEORDER	/* Not defined in SDL_config.h? */
   27.21 +#ifndef SDL_BYTEORDER           /* Not defined in SDL_config.h? */
   27.22  #if defined(__hppa__) || \
   27.23      defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
   27.24      (defined(__MIPS__) && defined(__MISPEB__)) || \
   27.25 @@ -47,7 +51,9 @@
   27.26  #include "begin_code.h"
   27.27  /* Set up for C function definitions, even when using C++ */
   27.28  #ifdef __cplusplus
   27.29 +/* *INDENT-OFF* */
   27.30  extern "C" {
   27.31 +/* *INDENT-ON* */
   27.32  #endif
   27.33  
   27.34  /* Use inline functions for compilers that support them, and static
   27.35 @@ -57,104 +63,124 @@
   27.36  */
   27.37  #if defined(__GNUC__) && defined(__i386__) && \
   27.38     !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
   27.39 -static __inline__ Uint16 SDL_Swap16(Uint16 x)
   27.40 +static __inline__ Uint16
   27.41 +SDL_Swap16(Uint16 x)
   27.42  {
   27.43 -	__asm__("xchgb %b0,%h0" : "=q" (x) :  "0" (x));
   27.44 -	return x;
   27.45 +  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
   27.46 +    return x;
   27.47  }
   27.48  #elif defined(__GNUC__) && defined(__x86_64__)
   27.49 -static __inline__ Uint16 SDL_Swap16(Uint16 x)
   27.50 +static __inline__ Uint16
   27.51 +SDL_Swap16(Uint16 x)
   27.52  {
   27.53 -	__asm__("xchgb %b0,%h0" : "=Q" (x) :  "0" (x));
   27.54 -	return x;
   27.55 +  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
   27.56 +    return x;
   27.57  }
   27.58  #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
   27.59 -static __inline__ Uint16 SDL_Swap16(Uint16 x)
   27.60 +static __inline__ Uint16
   27.61 +SDL_Swap16(Uint16 x)
   27.62  {
   27.63 -	Uint16 result;
   27.64 +    Uint16 result;
   27.65  
   27.66 -	__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
   27.67 -	return result;
   27.68 +  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
   27.69 +    return result;
   27.70  }
   27.71  #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
   27.72 -static __inline__ Uint16 SDL_Swap16(Uint16 x)
   27.73 +static __inline__ Uint16
   27.74 +SDL_Swap16(Uint16 x)
   27.75  {
   27.76 -	__asm__("rorw #8,%0" : "=d" (x) :  "0" (x) : "cc");
   27.77 -	return x;
   27.78 +  __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
   27.79 +    return x;
   27.80  }
   27.81  #else
   27.82 -static __inline__ Uint16 SDL_Swap16(Uint16 x) {
   27.83 -	return((x<<8)|(x>>8));
   27.84 +static __inline__ Uint16
   27.85 +SDL_Swap16(Uint16 x)
   27.86 +{
   27.87 +    return ((x << 8) | (x >> 8));
   27.88  }
   27.89  #endif
   27.90  
   27.91  #if defined(__GNUC__) && defined(__i386__)
   27.92 -static __inline__ Uint32 SDL_Swap32(Uint32 x)
   27.93 +static __inline__ Uint32
   27.94 +SDL_Swap32(Uint32 x)
   27.95  {
   27.96 -	__asm__("bswap %0" : "=r" (x) : "0" (x));
   27.97 -	return x;
   27.98 +  __asm__("bswap %0": "=r"(x):"0"(x));
   27.99 +    return x;
  27.100  }
  27.101  #elif defined(__GNUC__) && defined(__x86_64__)
  27.102 -static __inline__ Uint32 SDL_Swap32(Uint32 x)
  27.103 +static __inline__ Uint32
  27.104 +SDL_Swap32(Uint32 x)
  27.105  {
  27.106 -	__asm__("bswapl %0" : "=r" (x) : "0" (x));
  27.107 -	return x;
  27.108 +  __asm__("bswapl %0": "=r"(x):"0"(x));
  27.109 +    return x;
  27.110  }
  27.111  #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
  27.112 -static __inline__ Uint32 SDL_Swap32(Uint32 x)
  27.113 +static __inline__ Uint32
  27.114 +SDL_Swap32(Uint32 x)
  27.115  {
  27.116 -	Uint32 result;
  27.117 +    Uint32 result;
  27.118  
  27.119 -	__asm__("rlwimi %0,%2,24,16,23" : "=&r" (result) : "0" (x>>24), "r" (x));
  27.120 -	__asm__("rlwimi %0,%2,8,8,15"   : "=&r" (result) : "0" (result),    "r" (x));
  27.121 -	__asm__("rlwimi %0,%2,24,0,7"   : "=&r" (result) : "0" (result),    "r" (x));
  27.122 -	return result;
  27.123 +  __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
  27.124 +  __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
  27.125 +  __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
  27.126 +    return result;
  27.127  }
  27.128  #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
  27.129 -static __inline__ Uint32 SDL_Swap32(Uint32 x)
  27.130 +static __inline__ Uint32
  27.131 +SDL_Swap32(Uint32 x)
  27.132  {
  27.133 -	__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) :  "0" (x) : "cc");
  27.134 -	return x;
  27.135 +  __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
  27.136 +    return x;
  27.137  }
  27.138  #else
  27.139 -static __inline__ Uint32 SDL_Swap32(Uint32 x) {
  27.140 -	return((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24));
  27.141 +static __inline__ Uint32
  27.142 +SDL_Swap32(Uint32 x)
  27.143 +{
  27.144 +    return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) |
  27.145 +            (x >> 24));
  27.146  }
  27.147  #endif
  27.148  
  27.149  #ifdef SDL_HAS_64BIT_TYPE
  27.150  #if defined(__GNUC__) && defined(__i386__)
  27.151 -static __inline__ Uint64 SDL_Swap64(Uint64 x)
  27.152 +static __inline__ Uint64
  27.153 +SDL_Swap64(Uint64 x)
  27.154  {
  27.155 -	union { 
  27.156 -		struct { Uint32 a,b; } s;
  27.157 -		Uint64 u;
  27.158 -	} v;
  27.159 -	v.u = x;
  27.160 -	__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1" 
  27.161 -	        : "=r" (v.s.a), "=r" (v.s.b) 
  27.162 -	        : "0" (v.s.a), "1" (v.s.b)); 
  27.163 -	return v.u;
  27.164 +    union
  27.165 +    {
  27.166 +        struct
  27.167 +        {
  27.168 +            Uint32 a, b;
  27.169 +        } s;
  27.170 +        Uint64 u;
  27.171 +    } v;
  27.172 +    v.u = x;
  27.173 +  __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
  27.174 +            "1"(v.s.
  27.175 +                b));
  27.176 +    return v.u;
  27.177  }
  27.178  #elif defined(__GNUC__) && defined(__x86_64__)
  27.179 -static __inline__ Uint64 SDL_Swap64(Uint64 x)
  27.180 +static __inline__ Uint64
  27.181 +SDL_Swap64(Uint64 x)
  27.182  {
  27.183 -	__asm__("bswapq %0" : "=r" (x) : "0" (x));
  27.184 -	return x;
  27.185 +  __asm__("bswapq %0": "=r"(x):"0"(x));
  27.186 +    return x;
  27.187  }
  27.188  #else
  27.189 -static __inline__ Uint64 SDL_Swap64(Uint64 x)
  27.190 +static __inline__ Uint64
  27.191 +SDL_Swap64(Uint64 x)
  27.192  {
  27.193 -	Uint32 hi, lo;
  27.194 +    Uint32 hi, lo;
  27.195  
  27.196 -	/* Separate into high and low 32-bit values and swap them */
  27.197 -	lo = (Uint32)(x&0xFFFFFFFF);
  27.198 -	x >>= 32;
  27.199 -	hi = (Uint32)(x&0xFFFFFFFF);
  27.200 -	x = SDL_Swap32(lo);
  27.201 -	x <<= 32;
  27.202 -	x |= SDL_Swap32(hi);
  27.203 -	return(x);
  27.204 +    /* Separate into high and low 32-bit values and swap them */
  27.205 +    lo = (Uint32) (x & 0xFFFFFFFF);
  27.206 +    x >>= 32;
  27.207 +    hi = (Uint32) (x & 0xFFFFFFFF);
  27.208 +    x = SDL_Swap32(lo);
  27.209 +    x <<= 32;
  27.210 +    x |= SDL_Swap32(hi);
  27.211 +    return (x);
  27.212  }
  27.213  #endif
  27.214  #else
  27.215 @@ -185,8 +211,12 @@
  27.216  
  27.217  /* Ends C function definitions when using C++ */
  27.218  #ifdef __cplusplus
  27.219 +/* *INDENT-OFF* */
  27.220  }
  27.221 +/* *INDENT-ON* */
  27.222  #endif
  27.223  #include "close_code.h"
  27.224  
  27.225  #endif /* _SDL_endian_h */
  27.226 +
  27.227 +/* vi: set ts=4 sw=4 expandtab: */
    28.1 --- a/include/SDL_error.h	Thu Jul 06 18:01:37 2006 +0000
    28.2 +++ b/include/SDL_error.h	Mon Jul 10 21:04:37 2006 +0000
    28.3 @@ -20,7 +20,10 @@
    28.4      slouken@libsdl.org
    28.5  */
    28.6  
    28.7 -/* Simple error message routines for SDL */
    28.8 +/**
    28.9 + * \file SDL_error.h
   28.10 + * Simple error message routines for SDL
   28.11 + */
   28.12  
   28.13  #ifndef _SDL_error_h
   28.14  #define _SDL_error_h
   28.15 @@ -30,32 +33,39 @@
   28.16  #include "begin_code.h"
   28.17  /* Set up for C function definitions, even when using C++ */
   28.18  #ifdef __cplusplus
   28.19 +/* *INDENT-OFF* */
   28.20  extern "C" {
   28.21 +/* *INDENT-ON* */
   28.22  #endif
   28.23  
   28.24  /* Public functions */
   28.25  extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
   28.26 -extern DECLSPEC char * SDLCALL SDL_GetError(void);
   28.27 +extern DECLSPEC char *SDLCALL SDL_GetError(void);
   28.28  extern DECLSPEC void SDLCALL SDL_ClearError(void);
   28.29  
   28.30  /* Private error message function - used internally */
   28.31  #define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
   28.32  #define SDL_Unsupported()	SDL_Error(SDL_UNSUPPORTED)
   28.33 -typedef enum {
   28.34 -	SDL_ENOMEM,
   28.35 -	SDL_EFREAD,
   28.36 -	SDL_EFWRITE,
   28.37 -	SDL_EFSEEK,
   28.38 -	SDL_UNSUPPORTED,
   28.39 -	SDL_LASTERROR
   28.40 +typedef enum
   28.41 +{
   28.42 +    SDL_ENOMEM,
   28.43 +    SDL_EFREAD,
   28.44 +    SDL_EFWRITE,
   28.45 +    SDL_EFSEEK,
   28.46 +    SDL_UNSUPPORTED,
   28.47 +    SDL_LASTERROR
   28.48  } SDL_errorcode;
   28.49  extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
   28.50  
   28.51  
   28.52  /* Ends C function definitions when using C++ */
   28.53  #ifdef __cplusplus
   28.54 +/* *INDENT-OFF* */
   28.55  }
   28.56 +/* *INDENT-ON* */
   28.57  #endif
   28.58  #include "close_code.h"
   28.59  
   28.60  #endif /* _SDL_error_h */
   28.61 +
   28.62 +/* vi: set ts=4 sw=4 expandtab: */
    29.1 --- a/include/SDL_events.h	Thu Jul 06 18:01:37 2006 +0000
    29.2 +++ b/include/SDL_events.h	Mon Jul 10 21:04:37 2006 +0000
    29.3 @@ -20,14 +20,18 @@
    29.4      slouken@libsdl.org
    29.5  */
    29.6  
    29.7 -/* Include file for SDL event handling */
    29.8 +/**
    29.9 + * \file SDL_events.h
   29.10 + *
   29.11 + * Include file for SDL event handling
   29.12 + */
   29.13  
   29.14  #ifndef _SDL_events_h
   29.15  #define _SDL_events_h
   29.16  
   29.17  #include "SDL_stdinc.h"
   29.18  #include "SDL_error.h"
   29.19 -#include "SDL_active.h"
   29.20 +#include "SDL_video.h"
   29.21  #include "SDL_keyboard.h"
   29.22  #include "SDL_mouse.h"
   29.23  #include "SDL_joystick.h"
   29.24 @@ -36,202 +40,304 @@
   29.25  #include "begin_code.h"
   29.26  /* Set up for C function definitions, even when using C++ */
   29.27  #ifdef __cplusplus
   29.28 +/* *INDENT-OFF* */
   29.29  extern "C" {
   29.30 +/* *INDENT-ON* */
   29.31  #endif
   29.32  
   29.33  /* General keyboard/mouse state definitions */
   29.34  #define SDL_RELEASED	0
   29.35  #define SDL_PRESSED	1
   29.36  
   29.37 -/* Event enumerations */
   29.38 -typedef enum {
   29.39 -       SDL_NOEVENT = 0,			/* Unused (do not remove) */
   29.40 -       SDL_ACTIVEEVENT,			/* Application loses/gains visibility */
   29.41 -       SDL_KEYDOWN,			/* Keys pressed */
   29.42 -       SDL_KEYUP,			/* Keys released */
   29.43 -       SDL_MOUSEMOTION,			/* Mouse moved */
   29.44 -       SDL_MOUSEBUTTONDOWN,		/* Mouse button pressed */
   29.45 -       SDL_MOUSEBUTTONUP,		/* Mouse button released */
   29.46 -       SDL_JOYAXISMOTION,		/* Joystick axis motion */
   29.47 -       SDL_JOYBALLMOTION,		/* Joystick trackball motion */
   29.48 -       SDL_JOYHATMOTION,		/* Joystick hat position change */
   29.49 -       SDL_JOYBUTTONDOWN,		/* Joystick button pressed */
   29.50 -       SDL_JOYBUTTONUP,			/* Joystick button released */
   29.51 -       SDL_QUIT,			/* User-requested quit */
   29.52 -       SDL_SYSWMEVENT,			/* System specific event */
   29.53 -       SDL_EVENT_RESERVEDA,		/* Reserved for future use.. */
   29.54 -       SDL_EVENT_RESERVEDB,		/* Reserved for future use.. */
   29.55 -       SDL_VIDEORESIZE,			/* User resized video mode */
   29.56 -       SDL_VIDEOEXPOSE,			/* Screen needs to be redrawn */
   29.57 -       SDL_EVENT_RESERVED2,		/* Reserved for future use.. */
   29.58 -       SDL_EVENT_RESERVED3,		/* Reserved for future use.. */
   29.59 -       SDL_EVENT_RESERVED4,		/* Reserved for future use.. */
   29.60 -       SDL_EVENT_RESERVED5,		/* Reserved for future use.. */
   29.61 -       SDL_EVENT_RESERVED6,		/* Reserved for future use.. */
   29.62 -       SDL_EVENT_RESERVED7,		/* Reserved for future use.. */
   29.63 -       /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
   29.64 -       SDL_USEREVENT = 24,
   29.65 -       /* This last event is only for bounding internal arrays
   29.66 -	  It is the number of bits in the event mask datatype -- Uint32
   29.67 -        */
   29.68 -       SDL_NUMEVENTS = 32
   29.69 +/**
   29.70 + * \enum SDL_EventType
   29.71 + *
   29.72 + * \brief The types of events that can be delivered
   29.73 + */
   29.74 +typedef enum
   29.75 +{
   29.76 +    SDL_NOEVENT = 0,            /**< Unused (do not remove) */
   29.77 +    SDL_WINDOWEVENT,            /**< Window state change */
   29.78 +    SDL_KEYDOWN,                /**< Keys pressed */
   29.79 +    SDL_KEYUP,                  /**< Keys released */
   29.80 +    SDL_TEXTINPUT,                              /**< Keyboard text input */
   29.81 +    SDL_MOUSEMOTION,            /**< Mouse moved */
   29.82 +    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
   29.83 +    SDL_MOUSEBUTTONUP,          /**< Mouse button released */
   29.84 +    SDL_MOUSEWHEEL,                             /**< Mouse wheel motion */
   29.85 +    SDL_JOYAXISMOTION,          /**< Joystick axis motion */
   29.86 +    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
   29.87 +    SDL_JOYHATMOTION,           /**< Joystick hat position change */
   29.88 +    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
   29.89 +    SDL_JOYBUTTONUP,            /**< Joystick button released */
   29.90 +    SDL_QUIT,                   /**< User-requested quit */
   29.91 +    SDL_SYSWMEVENT,             /**< System specific event */
   29.92 +    SDL_EVENT_RESERVED1,        /**< Reserved for future use... */
   29.93 +    SDL_EVENT_RESERVED2,        /**< Reserved for future use... */
   29.94 +    SDL_EVENT_RESERVED3,        /**< Reserved for future use... */
   29.95 +    /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
   29.96 +    SDL_USEREVENT = 24,
   29.97 +    /* This last event is only for bounding internal arrays
   29.98 +       It is the number of bits in the event mask datatype -- Uint32
   29.99 +     */
  29.100 +    SDL_NUMEVENTS = 32
  29.101  } SDL_EventType;
  29.102  
  29.103 -/* Predefined event masks */
  29.104 +/**
  29.105 + * \enum SDL_EventMask
  29.106 + *
  29.107 + * \brief Predefined event masks
  29.108 + */
  29.109  #define SDL_EVENTMASK(X)	(1<<(X))
  29.110 -typedef enum {
  29.111 -	SDL_ACTIVEEVENTMASK	= SDL_EVENTMASK(SDL_ACTIVEEVENT),
  29.112 -	SDL_KEYDOWNMASK		= SDL_EVENTMASK(SDL_KEYDOWN),
  29.113 -	SDL_KEYUPMASK		= SDL_EVENTMASK(SDL_KEYUP),
  29.114 -	SDL_KEYEVENTMASK	= SDL_EVENTMASK(SDL_KEYDOWN)|
  29.115 -	                          SDL_EVENTMASK(SDL_KEYUP),
  29.116 -	SDL_MOUSEMOTIONMASK	= SDL_EVENTMASK(SDL_MOUSEMOTION),
  29.117 -	SDL_MOUSEBUTTONDOWNMASK	= SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
  29.118 -	SDL_MOUSEBUTTONUPMASK	= SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
  29.119 -	SDL_MOUSEEVENTMASK	= SDL_EVENTMASK(SDL_MOUSEMOTION)|
  29.120 -	                          SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN)|
  29.121 -	                          SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
  29.122 -	SDL_JOYAXISMOTIONMASK	= SDL_EVENTMASK(SDL_JOYAXISMOTION),
  29.123 -	SDL_JOYBALLMOTIONMASK	= SDL_EVENTMASK(SDL_JOYBALLMOTION),
  29.124 -	SDL_JOYHATMOTIONMASK	= SDL_EVENTMASK(SDL_JOYHATMOTION),
  29.125 -	SDL_JOYBUTTONDOWNMASK	= SDL_EVENTMASK(SDL_JOYBUTTONDOWN),
  29.126 -	SDL_JOYBUTTONUPMASK	= SDL_EVENTMASK(SDL_JOYBUTTONUP),
  29.127 -	SDL_JOYEVENTMASK	= SDL_EVENTMASK(SDL_JOYAXISMOTION)|
  29.128 -	                          SDL_EVENTMASK(SDL_JOYBALLMOTION)|
  29.129 -	                          SDL_EVENTMASK(SDL_JOYHATMOTION)|
  29.130 -	                          SDL_EVENTMASK(SDL_JOYBUTTONDOWN)|
  29.131 -	                          SDL_EVENTMASK(SDL_JOYBUTTONUP),
  29.132 -	SDL_VIDEORESIZEMASK	= SDL_EVENTMASK(SDL_VIDEORESIZE),
  29.133 -	SDL_VIDEOEXPOSEMASK	= SDL_EVENTMASK(SDL_VIDEOEXPOSE),
  29.134 -	SDL_QUITMASK		= SDL_EVENTMASK(SDL_QUIT),
  29.135 -	SDL_SYSWMEVENTMASK	= SDL_EVENTMASK(SDL_SYSWMEVENT)
  29.136 -} SDL_EventMask ;
  29.137 +typedef enum
  29.138 +{
  29.139 +    SDL_WINDOWEVENTMASK = SDL_EVENTMASK(SDL_WINDOWEVENT),
  29.140 +    SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
  29.141 +    SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
  29.142 +    SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP),
  29.143 +    SDL_TEXTINPUTMASK = SDL_EVENTMASK(SDL_TEXTINPUT),
  29.144 +    SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
  29.145 +    SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
  29.146 +    SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
  29.147 +    SDL_MOUSEWHEELMASK = SDL_EVENTMASK(SDL_MOUSEWHEEL),
  29.148 +    SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION) |
  29.149 +        SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN) | SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
  29.150 +    SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION),
  29.151 +    SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION),
  29.152 +    SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION),
  29.153 +    SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN),
  29.154 +    SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP),
  29.155 +    SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) |
  29.156 +        SDL_EVENTMASK(SDL_JOYBALLMOTION) |
  29.157 +        SDL_EVENTMASK(SDL_JOYHATMOTION) |
  29.158 +        SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP),
  29.159 +    SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
  29.160 +    SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT)
  29.161 +} SDL_EventMask;
  29.162  #define SDL_ALLEVENTS		0xFFFFFFFF
  29.163  
  29.164 -/* Application visibility event structure */
  29.165 -typedef struct SDL_ActiveEvent {
  29.166 -	Uint8 type;	/* SDL_ACTIVEEVENT */
  29.167 -	Uint8 gain;	/* Whether given states were gained or lost (1/0) */
  29.168 -	Uint8 state;	/* A mask of the focus states */
  29.169 -} SDL_ActiveEvent;
  29.170 +/**
  29.171 + * \struct SDL_WindowEvent
  29.172 + *
  29.173 + * \brief Window state change event data
  29.174 + */
  29.175 +typedef struct SDL_WindowEvent
  29.176 +{
  29.177 +    Uint8 type;             /**< SDL_WINDOWEVENT */
  29.178 +    Uint8 event;            /**< SDL_WindowEventID */
  29.179 +    int data1;              /**< event dependent data */
  29.180 +    int data2;              /**< event dependent data */
  29.181 +    SDL_WindowID windowID;  /**< The associated window */
  29.182 +} SDL_WindowEvent;
  29.183  
  29.184 -/* Keyboard event structure */
  29.185 -typedef struct SDL_KeyboardEvent {
  29.186 -	Uint8 type;	/* SDL_KEYDOWN or SDL_KEYUP */
  29.187 -	Uint8 which;	/* The keyboard device index */
  29.188 -	Uint8 state;	/* SDL_PRESSED or SDL_RELEASED */
  29.189 -	SDL_keysym keysym;
  29.190 +/**
  29.191 + * \struct SDL_KeyboardEvent
  29.192 + *
  29.193 + * \brief Keyboard button event structure
  29.194 + */
  29.195 +typedef struct SDL_KeyboardEvent
  29.196 +{
  29.197 +    Uint8 type;             /**< SDL_KEYDOWN or SDL_KEYUP */
  29.198 +    Uint8 which;            /**< The keyboard device index */
  29.199 +    Uint8 state;            /**< SDL_PRESSED or SDL_RELEASED */
  29.200 +    SDL_keysym keysym;      /**< The key that was pressed or released */
  29.201 +    SDL_WindowID windowID;  /**< The window with keyboard focus, if any */
  29.202  } SDL_KeyboardEvent;
  29.203  
  29.204 -/* Mouse motion event structure */
  29.205 -typedef struct SDL_MouseMotionEvent {
  29.206 -	Uint8 type;	/* SDL_MOUSEMOTION */
  29.207 -	Uint8 which;	/* The mouse device index */
  29.208 -	Uint8 state;	/* The current button state */
  29.209 -	Uint16 x, y;	/* The X/Y coordinates of the mouse */
  29.210 -	Sint16 xrel;	/* The relative motion in the X direction */
  29.211 -	Sint16 yrel;	/* The relative motion in the Y direction */
  29.212 +/**
  29.213 + * \struct SDL_TextInputEvent
  29.214 + *
  29.215 + * \brief Keyboard text input event structure
  29.216 + */
  29.217 +typedef struct SDL_TextInputEvent
  29.218 +{
  29.219 +    Uint8 type;             /**< SDL_TEXTINPUT */
  29.220 +    Uint8 which;            /**< The keyboard device index */
  29.221 +    char text[32];          /**< The input text */
  29.222 +    SDL_WindowID windowID;  /**< The window with keyboard focus, if any */
  29.223 +} SDL_TextInputEvent;
  29.224 +
  29.225 +/**
  29.226 + * \struct SDL_MouseMotionEvent
  29.227 + *
  29.228 + * \brief Mouse motion event structure
  29.229 + */
  29.230 +typedef struct SDL_MouseMotionEvent
  29.231 +{
  29.232 +    Uint8 type;             /**< SDL_MOUSEMOTION */
  29.233 +    Uint8 which;            /**< The mouse device index */
  29.234 +    Uint8 state;            /**< The current button state */
  29.235 +    int x;                  /**< X coordinate, relative to window */
  29.236 +    int y;                  /**< Y coordinate, relative to window */
  29.237 +    int xrel;               /**< The relative motion in the X direction */
  29.238 +    int yrel;               /**< The relative motion in the Y direction */
  29.239 +    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
  29.240  } SDL_MouseMotionEvent;
  29.241  
  29.242 -/* Mouse button event structure */
  29.243 -typedef struct SDL_MouseButtonEvent {
  29.244 -	Uint8 type;	/* SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
  29.245 -	Uint8 which;	/* The mouse device index */
  29.246 -	Uint8 button;	/* The mouse button index */
  29.247 -	Uint8 state;	/* SDL_PRESSED or SDL_RELEASED */
  29.248 -	Uint16 x, y;	/* The X/Y coordinates of the mouse at press time */
  29.249 +/**
  29.250 + * \struct SDL_MouseButtonEvent
  29.251 + *
  29.252 + * \brief Mouse button event structure
  29.253 + */
  29.254 +typedef struct SDL_MouseButtonEvent
  29.255 +{
  29.256 +    Uint8 type;             /**< SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
  29.257 +    Uint8 which;            /**< The mouse device index */
  29.258 +    Uint8 button;           /**< The mouse button index */
  29.259 +    Uint8 state;            /**< SDL_PRESSED or SDL_RELEASED */
  29.260 +    int x;                  /**< X coordinate, relative to window */
  29.261 +    int y;                  /**< Y coordinate, relative to window */
  29.262 +    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
  29.263  } SDL_MouseButtonEvent;
  29.264  
  29.265 -/* Joystick axis motion event structure */
  29.266 -typedef struct SDL_JoyAxisEvent {
  29.267 -	Uint8 type;	/* SDL_JOYAXISMOTION */
  29.268 -	Uint8 which;	/* The joystick device index */
  29.269 -	Uint8 axis;	/* The joystick axis index */
  29.270 -	Sint16 value;	/* The axis value (range: -32768 to 32767) */
  29.271 +/**
  29.272 + * \struct SDL_MouseWheelEvent
  29.273 + *
  29.274 + * \brief Mouse wheel event structure
  29.275 + */
  29.276 +typedef struct SDL_MouseWheelEvent
  29.277 +{
  29.278 +    Uint8 type;             /**< SDL_MOUSEWHEEL */
  29.279 +    Uint8 which;            /**< The mouse device index */
  29.280 +    int motion;                                 /**< The direction and distance scrolled */
  29.281 +    SDL_WindowID windowID;  /**< The window with mouse focus, if any */
  29.282 +} SDL_MouseWheelEvent;
  29.283 +
  29.284 +/**
  29.285 + * \struct SDL_JoyAxisEvent
  29.286 + *
  29.287 + * \brief Joystick axis motion event structure
  29.288 + */
  29.289 +typedef struct SDL_JoyAxisEvent
  29.290 +{
  29.291 +    Uint8 type;         /**< SDL_JOYAXISMOTION */
  29.292 +    Uint8 which;        /**< The joystick device index */
  29.293 +    Uint8 axis;         /**< The joystick axis index */
  29.294 +    int value;          /**< The axis value (range: -32768 to 32767) */
  29.295  } SDL_JoyAxisEvent;
  29.296  
  29.297 -/* Joystick trackball motion event structure */
  29.298 -typedef struct SDL_JoyBallEvent {
  29.299 -	Uint8 type;	/* SDL_JOYBALLMOTION */
  29.300 -	Uint8 which;	/* The joystick device index */
  29.301 -	Uint8 ball;	/* The joystick trackball index */
  29.302 -	Sint16 xrel;	/* The relative motion in the X direction */
  29.303 -	Sint16 yrel;	/* The relative motion in the Y direction */
  29.304 +/**
  29.305 + * \struct SDL_JoyBallEvent
  29.306 + *
  29.307 + * \brief Joystick trackball motion event structure
  29.308 + */
  29.309 +typedef struct SDL_JoyBallEvent
  29.310 +{
  29.311 +    Uint8 type;         /**< SDL_JOYBALLMOTION */
  29.312 +    Uint8 which;        /**< The joystick device index */
  29.313 +    Uint8 ball;         /**< The joystick trackball index */
  29.314 +    int xrel;           /**< The relative motion in the X direction */
  29.315 +    int yrel;           /**< The relative motion in the Y direction */
  29.316  } SDL_JoyBallEvent;
  29.317  
  29.318 -/* Joystick hat position change event structure */
  29.319 -typedef struct SDL_JoyHatEvent {
  29.320 -	Uint8 type;	/* SDL_JOYHATMOTION */
  29.321 -	Uint8 which;	/* The joystick device index */
  29.322 -	Uint8 hat;	/* The joystick hat index */
  29.323 -	Uint8 value;	/* The hat position value:
  29.324 -			    SDL_HAT_LEFTUP   SDL_HAT_UP       SDL_HAT_RIGHTUP
  29.325 -			    SDL_HAT_LEFT     SDL_HAT_CENTERED SDL_HAT_RIGHT
  29.326 -			    SDL_HAT_LEFTDOWN SDL_HAT_DOWN     SDL_HAT_RIGHTDOWN
  29.327 -			   Note that zero means the POV is centered.
  29.328 -			*/
  29.329 +/**
  29.330 + * \struct SDL_JoyHatEvent
  29.331 + *
  29.332 + * \brief Joystick hat position change event structure
  29.333 + */
  29.334 +typedef struct SDL_JoyHatEvent
  29.335 +{
  29.336 +    Uint8 type;         /**< SDL_JOYHATMOTION */
  29.337 +    Uint8 which;        /**< The joystick device index */
  29.338 +    Uint8 hat;          /**< The joystick hat index */
  29.339 +    Uint8 value;        /**< The hat position value:
  29.340 +                             SDL_HAT_LEFTUP   SDL_HAT_UP       SDL_HAT_RIGHTUP
  29.341 +                             SDL_HAT_LEFT     SDL_HAT_CENTERED SDL_HAT_RIGHT
  29.342 +                             SDL_HAT_LEFTDOWN SDL_HAT_DOWN     SDL_HAT_RIGHTDOWN
  29.343 +                             Note that zero means the POV is centered.
  29.344 +                         */
  29.345  } SDL_JoyHatEvent;
  29.346  
  29.347 -/* Joystick button event structure */
  29.348 -typedef struct SDL_JoyButtonEvent {
  29.349 -	Uint8 type;	/* SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
  29.350 -	Uint8 which;	/* The joystick device index */
  29.351 -	Uint8 button;	/* The joystick button index */
  29.352 -	Uint8 state;	/* SDL_PRESSED or SDL_RELEASED */
  29.353 +/**
  29.354 + * \struct SDL_JoyButtonEvent
  29.355 + *
  29.356 + * \brief Joystick button event structure
  29.357 + */
  29.358 +typedef struct SDL_JoyButtonEvent
  29.359 +{
  29.360 +    Uint8 type;         /**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
  29.361 +    Uint8 which;        /**< The joystick device index */
  29.362 +    Uint8 button;       /**< The joystick button index */
  29.363 +    Uint8 state;        /**< SDL_PRESSED or SDL_RELEASED */
  29.364  } SDL_JoyButtonEvent;
  29.365  
  29.366 -/* The "window resized" event
  29.367 -   When you get this event, you are responsible for setting a new video
  29.368 -   mode with the new width and height.
  29.369 +/**
  29.370 + * \struct SDL_QuitEvent
  29.371 + *
  29.372 + * \brief The "quit requested" event
  29.373   */
  29.374 -typedef struct SDL_ResizeEvent {
  29.375 -	Uint8 type;	/* SDL_VIDEORESIZE */
  29.376 -	int w;		/* New width */
  29.377 -	int h;		/* New height */
  29.378 +typedef struct SDL_QuitEvent
  29.379 +{
  29.380 +    Uint8 type;         /**< SDL_QUIT */
  29.381 +} SDL_QuitEvent;
  29.382 +
  29.383 +/**
  29.384 + * \struct SDL_UserEvent
  29.385 + *
  29.386 + * \brief A user-defined event type
  29.387 + */
  29.388 +typedef struct SDL_UserEvent
  29.389 +{
  29.390 +    Uint8 type;         /**< SDL_USEREVENT through SDL_NUMEVENTS-1 */
  29.391 +    int code;           /**< User defined event code */
  29.392 +    void *data1;        /**< User defined data pointer */
  29.393 +    void *data2;        /**< User defined data pointer */
  29.394 +} SDL_UserEvent;
  29.395 +
  29.396 +/**
  29.397 + * \struct SDL_SysWMEvent
  29.398 + *
  29.399 + * \brief A video driver dependent system event
  29.400 + *
  29.401 + * \note If you want to use this event, you should include SDL_syswm.h
  29.402 + */
  29.403 +struct SDL_SysWMmsg;
  29.404 +typedef struct SDL_SysWMmsg SDL_SysWMmsg;
  29.405 +typedef struct SDL_SysWMEvent
  29.406 +{
  29.407 +    Uint8 type;         /**< SDL_SYSWMEVENT */
  29.408 +    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
  29.409 +} SDL_SysWMEvent;
  29.410 +
  29.411 +/* Typedefs for backwards compatibility */
  29.412 +typedef struct SDL_ActiveEvent
  29.413 +{
  29.414 +    Uint8 type;
  29.415 +    Uint8 gain;
  29.416 +    Uint8 state;
  29.417 +} SDL_ActiveEvent;
  29.418 +typedef struct SDL_ResizeEvent
  29.419 +{
  29.420 +    Uint8 type;
  29.421 +    int w;
  29.422 +    int h;
  29.423  } SDL_ResizeEvent;
  29.424  
  29.425 -/* The "screen redraw" event */
  29.426 -typedef struct SDL_ExposeEvent {
  29.427 -	Uint8 type;	/* SDL_VIDEOEXPOSE */
  29.428 -} SDL_ExposeEvent;
  29.429 +/**
  29.430 + * \union SDL_Event
  29.431 + *
  29.432 + * \brief General event structure
  29.433 + */
  29.434 +typedef union SDL_Event
  29.435 +{
  29.436 +    Uint8 type;                     /**< Event type, shared with all events */
  29.437 +    SDL_WindowEvent window;         /**< Window event data */
  29.438 +    SDL_KeyboardEvent key;          /**< Keyboard event data */
  29.439 +    SDL_TextInputEvent text;                    /**< Text input event data */
  29.440 +    SDL_MouseMotionEvent motion;    /**< Mouse motion event data */
  29.441 +    SDL_MouseButtonEvent button;    /**< Mouse button event data */
  29.442 +    SDL_MouseWheelEvent wheel;                  /**< Mouse wheel event data */
  29.443 +    SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */
  29.444 +    SDL_JoyBallEvent jball;         /**< Joystick ball event data */
  29.445 +    SDL_JoyHatEvent jhat;           /**< Joystick hat event data */
  29.446 +    SDL_JoyButtonEvent jbutton;     /**< Joystick button event data */
  29.447 +    SDL_QuitEvent quit;             /**< Quit request event data */
  29.448 +    SDL_UserEvent user;             /**< Custom event data */
  29.449 +    SDL_SysWMEvent syswm;           /**< System dependent window event data */
  29.450  
  29.451 -/* The "quit requested" event */
  29.452 -typedef struct SDL_QuitEvent {
  29.453 -	Uint8 type;	/* SDL_QUIT */
  29.454 -} SDL_QuitEvent;
  29.455 -
  29.456 -/* A user-defined event type */
  29.457 -typedef struct SDL_UserEvent {
  29.458 -	Uint8 type;	/* SDL_USEREVENT through SDL_NUMEVENTS-1 */
  29.459 -	int code;	/* User defined event code */
  29.460 -	void *data1;	/* User defined data pointer */
  29.461 -	void *data2;	/* User defined data pointer */
  29.462 -} SDL_UserEvent;
  29.463 -
  29.464 -/* If you want to use this event, you should include SDL_syswm.h */
  29.465 -struct SDL_SysWMmsg;
  29.466 -typedef struct SDL_SysWMmsg SDL_SysWMmsg;
  29.467 -typedef struct SDL_SysWMEvent {
  29.468 -	Uint8 type;
  29.469 -	SDL_SysWMmsg *msg;
  29.470 -} SDL_SysWMEvent;
  29.471 -
  29.472 -/* General event structure */
  29.473 -typedef union SDL_Event {
  29.474 -	Uint8 type;
  29.475 -	SDL_ActiveEvent active;
  29.476 -	SDL_KeyboardEvent key;
  29.477 -	SDL_MouseMotionEvent motion;
  29.478 -	SDL_MouseButtonEvent button;
  29.479 -	SDL_JoyAxisEvent jaxis;
  29.480 -	SDL_JoyBallEvent jball;
  29.481 -	SDL_JoyHatEvent jhat;
  29.482 -	SDL_JoyButtonEvent jbutton;
  29.483 -	SDL_ResizeEvent resize;
  29.484 -	SDL_ExposeEvent expose;
  29.485 -	SDL_QuitEvent quit;
  29.486 -	SDL_UserEvent user;
  29.487 -	SDL_SysWMEvent syswm;
  29.488 +    /* Temporarily here for backwards compatibility */
  29.489 +    SDL_ActiveEvent active;
  29.490 +    SDL_ResizeEvent resize;
  29.491  } SDL_Event;
  29.492  
  29.493  
  29.494 @@ -255,32 +361,38 @@
  29.495     This function returns the number of events actually stored, or -1
  29.496     if there was an error.  This function is thread-safe.
  29.497  */
  29.498 -typedef enum {
  29.499 -	SDL_ADDEVENT,
  29.500 -	SDL_PEEKEVENT,
  29.501 -	SDL_GETEVENT
  29.502 +typedef enum
  29.503 +{
  29.504 +    SDL_ADDEVENT,
  29.505 +    SDL_PEEKEVENT,
  29.506 +    SDL_GETEVENT
  29.507  } SDL_eventaction;
  29.508  /* */
  29.509 -extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents,
  29.510 -				SDL_eventaction action, Uint32 mask);
  29.511 +extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
  29.512 +                                           SDL_eventaction action,
  29.513 +                                           Uint32 mask);
  29.514 +
  29.515 +/* Checks to see if certain event types are in the event queue.
  29.516 + */
  29.517 +extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 mask);
  29.518  
  29.519  /* Polls for currently pending events, and returns 1 if there are any pending
  29.520     events, or 0 if there are none available.  If 'event' is not NULL, the next
  29.521     event is removed from the queue and stored in that area.
  29.522   */
  29.523 -extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event *event);
  29.524 +extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
  29.525  
  29.526  /* Waits indefinitely for the next available event, returning 1, or 0 if there
  29.527     was an error while waiting for events.  If 'event' is not NULL, the next
  29.528     event is removed from the queue and stored in that area.
  29.529   */
  29.530 -extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event *event);
  29.531 +extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
  29.532  
  29.533  /* Add an event to the event queue.
  29.534 -   This function returns 0 on success, or -1 if the event queue was full
  29.535 -   or there was some other error.
  29.536 +   This function returns 1 on success, 0 if the event was filtered,
  29.537 +   or -1 if the event queue was full or there was some other error.
  29.538   */
  29.539 -extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event *event);
  29.540 +extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
  29.541  
  29.542  /*
  29.543    This function sets up a filter to process all events before they
  29.544 @@ -288,7 +400,7 @@
  29.545  
  29.546    The filter is protypted as:
  29.547  */
  29.548 -typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event);
  29.549 +typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
  29.550  /*
  29.551    If the filter returns 1, then the event will be added to the internal queue.
  29.552    If it returns 0, then the event will be dropped from the queue, but the 
  29.553 @@ -305,13 +417,22 @@
  29.554    If the quit event is generated by an interrupt signal, it will bypass the
  29.555    internal queue and be delivered to the application at the next event poll.
  29.556  */
  29.557 -extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
  29.558 +extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
  29.559 +                                                void *userdata);
  29.560  
  29.561  /*
  29.562    Return the current event filter - can be used to "chain" filters.
  29.563 -  If there is no event filter set, this function returns NULL.
  29.564 +  If there is no event filter set, this function returns SDL_FALSE.
  29.565  */
  29.566 -extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
  29.567 +extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
  29.568 +                                                    void **userdata);
  29.569 +
  29.570 +/*
  29.571 +  Run the filter function on the current event queue, removing any
  29.572 +  events for which the filter returns 0.
  29.573 +*/
  29.574 +extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
  29.575 +                                              void *userdata);
  29.576  
  29.577  /*
  29.578    This function allows you to set the state of processing certain events.
  29.579 @@ -330,8 +451,12 @@
  29.580  
  29.581  /* Ends C function definitions when using C++ */
  29.582  #ifdef __cplusplus
  29.583 +/* *INDENT-OFF* */
  29.584  }
  29.585 +/* *INDENT-ON* */
  29.586  #endif
  29.587  #include "close_code.h"
  29.588  
  29.589  #endif /* _SDL_events_h */
  29.590 +
  29.591 +/* vi: set ts=4 sw=4 expandtab: */
    30.1 --- a/include/SDL_getenv.h	Thu Jul 06 18:01:37 2006 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,24 +0,0 @@
    30.4 -/*
    30.5 -    SDL - Simple DirectMedia Layer
    30.6 -    Copyright (C) 1997-2006 Sam Lantinga
    30.7 -
    30.8 -    This library is free software; you can redistribute it and/or
    30.9 -    modify it under the terms of the GNU Lesser General Public
   30.10 -    License as published by the Free Software Foundation; either
   30.11 -    version 2.1 of the License, or (at your option) any later version.
   30.12 -
   30.13 -    This library is distributed in the hope that it will be useful,
   30.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   30.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   30.16 -    Lesser General Public License for more details.
   30.17 -
   30.18 -    You should have received a copy of the GNU Lesser General Public
   30.19 -    License along with this library; if not, write to the Free Software
   30.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   30.21 -
   30.22 -    Sam Lantinga
   30.23 -    slouken@libsdl.org
   30.24 -*/
   30.25 -
   30.26 -/* DEPRECATED */
   30.27 -#include "SDL_stdinc.h"
    31.1 --- a/include/SDL_joystick.h	Thu Jul 06 18:01:37 2006 +0000
    31.2 +++ b/include/SDL_joystick.h	Mon Jul 10 21:04:37 2006 +0000
    31.3 @@ -20,7 +20,11 @@
    31.4      slouken@libsdl.org
    31.5  */
    31.6  
    31.7 -/* Include file for SDL joystick event handling */
    31.8 +/**
    31.9 + * \file SDL_joystick.h
   31.10 + *
   31.11 + * Include file for SDL joystick event handling
   31.12 + */
   31.13  
   31.14  #ifndef _SDL_joystick_h
   31.15  #define _SDL_joystick_h
   31.16 @@ -31,7 +35,9 @@
   31.17  #include "begin_code.h"
   31.18  /* Set up for C function definitions, even when using C++ */
   31.19  #ifdef __cplusplus
   31.20 +/* *INDENT-OFF* */
   31.21  extern "C" {
   31.22 +/* *INDENT-ON* */
   31.23  #endif
   31.24  
   31.25  /* In order to use these functions, SDL_Init() must have been called
   31.26 @@ -55,7 +61,7 @@
   31.27   * This can be called before any joysticks are opened.
   31.28   * If no name can be found, this function returns NULL.
   31.29   */
   31.30 -extern DECLSPEC const char * SDLCALL SDL_JoystickName(int device_index);
   31.31 +extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index);
   31.32  
   31.33  /*
   31.34   * Open a joystick for use - the index passed as an argument refers to
   31.35 @@ -64,7 +70,7 @@
   31.36   *
   31.37   * This function returns a joystick identifier, or NULL if an error occurred.
   31.38   */
   31.39 -extern DECLSPEC SDL_Joystick * SDLCALL SDL_JoystickOpen(int device_index);
   31.40 +extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
   31.41  
   31.42  /*
   31.43   * Returns 1 if the joystick has been opened, or 0 if it has not.
   31.44 @@ -74,29 +80,29 @@
   31.45  /*
   31.46   * Get the device index of an opened joystick.
   31.47   */
   31.48 -extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick *joystick);
   31.49 +extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick);
   31.50  
   31.51  /*
   31.52   * Get the number of general axis controls on a joystick
   31.53   */
   31.54 -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
   31.55 +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
   31.56  
   31.57  /*
   31.58   * Get the number of trackballs on a joystick
   31.59   * Joystick trackballs have only relative motion events associated
   31.60   * with them and their state cannot be polled.
   31.61   */
   31.62 -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
   31.63 +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
   31.64  
   31.65  /*
   31.66   * Get the number of POV hats on a joystick
   31.67   */
   31.68 -extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
   31.69 +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
   31.70  
   31.71  /*
   31.72   * Get the number of buttons on a joystick
   31.73   */
   31.74 -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
   31.75 +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
   31.76  
   31.77  /*
   31.78   * Update the current state of the open joysticks.
   31.79 @@ -119,7 +125,8 @@
   31.80   * The state is a value ranging from -32768 to 32767.
   31.81   * The axis indices start at index 0.
   31.82   */
   31.83 -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
   31.84 +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
   31.85 +                                                   int axis);
   31.86  
   31.87  /*
   31.88   * Get the current state of a POV hat on a joystick
   31.89 @@ -137,31 +144,38 @@
   31.90  /*
   31.91   * The hat indices start at index 0.
   31.92   */
   31.93 -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);
   31.94 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
   31.95 +                                                 int hat);
   31.96  
   31.97  /*
   31.98   * Get the ball axis change since the last poll
   31.99   * This returns 0, or -1 if you passed it invalid parameters.
  31.100   * The ball indices start at index 0.
  31.101   */
  31.102 -extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
  31.103 +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
  31.104 +                                                int ball, int *dx, int *dy);
  31.105  
  31.106  /*
  31.107   * Get the current state of a button on a joystick
  31.108   * The button indices start at index 0.
  31.109   */
  31.110 -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, int button);
  31.111 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
  31.112 +                                                    int button);
  31.113  
  31.114  /*
  31.115   * Close a joystick previously opened with SDL_JoystickOpen()
  31.116   */
  31.117 -extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
  31.118 +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
  31.119  
  31.120  
  31.121  /* Ends C function definitions when using C++ */
  31.122  #ifdef __cplusplus
  31.123 +/* *INDENT-OFF* */
  31.124  }
  31.125 +/* *INDENT-ON* */
  31.126  #endif
  31.127  #include "close_code.h"
  31.128  
  31.129  #endif /* _SDL_joystick_h */
  31.130 +
  31.131 +/* vi: set ts=4 sw=4 expandtab: */
    32.1 --- a/include/SDL_keyboard.h	Thu Jul 06 18:01:37 2006 +0000
    32.2 +++ b/include/SDL_keyboard.h	Mon Jul 10 21:04:37 2006 +0000
    32.3 @@ -20,7 +20,11 @@
    32.4      slouken@libsdl.org
    32.5  */
    32.6  
    32.7 -/* Include file for SDL keyboard event handling */
    32.8 +/**
    32.9 + * \file SDL_keyboard.h
   32.10 + *
   32.11 + * Include file for SDL keyboard event handling
   32.12 + */
   32.13  
   32.14  #ifndef _SDL_keyboard_h
   32.15  #define _SDL_keyboard_h
   32.16 @@ -32,90 +36,133 @@
   32.17  #include "begin_code.h"
   32.18  /* Set up for C function definitions, even when using C++ */
   32.19  #ifdef __cplusplus
   32.20 +/* *INDENT-OFF* */
   32.21  extern "C" {
   32.22 +/* *INDENT-ON* */
   32.23  #endif
   32.24  
   32.25 -/* Keysym structure
   32.26 -   - The scancode is hardware dependent, and should not be used by general
   32.27 -     applications.  If no hardware scancode is available, it will be 0.
   32.28 -
   32.29 -   - The 'unicode' translated character is only available when character
   32.30 -     translation is enabled by the SDL_EnableUNICODE() API.  If non-zero,
   32.31 -     this is a UNICODE character corresponding to the keypress.  If the
   32.32 -     high 9 bits of the character are 0, then this maps to the equivalent
   32.33 -     ASCII character:
   32.34 -	char ch;
   32.35 -	if ( (keysym.unicode & 0xFF80) == 0 ) {
   32.36 -		ch = keysym.unicode & 0x7F;
   32.37 -	} else {
   32.38 -		An international character..
   32.39 -	}
   32.40 +/**
   32.41 + * \struct SDL_keysym
   32.42 + *
   32.43 + * \brief The SDL keysym structure, used in key events.
   32.44   */
   32.45 -typedef struct SDL_keysym {
   32.46 -	Uint8 scancode;			/* hardware specific scancode */
   32.47 -	SDLKey sym;			/* SDL virtual keysym */
   32.48 -	SDLMod mod;			/* current key modifiers */
   32.49 -	Uint16 unicode;			/* translated character */
   32.50 +typedef struct SDL_keysym
   32.51 +{
   32.52 +    Uint8 scancode;             /**< keyboard specific scancode */
   32.53 +    Uint8 padding[3];           /**< alignment padding */
   32.54 +    Uint16 sym;                 /**< SDL virtual keysym */
   32.55 +    Uint16 mod;                 /**< current key modifiers */
   32.56 +    Uint32 unicode;             /**< OBSOLETE, use SDL_TextInputEvent instead */
   32.57  } SDL_keysym;
   32.58  
   32.59 -/* This is the mask which refers to all hotkey bindings */
   32.60 -#define SDL_ALL_HOTKEYS		0xFFFFFFFF
   32.61 +/* Function prototypes */
   32.62  
   32.63 -/* Function prototypes */
   32.64 -/*
   32.65 - * Enable/Disable UNICODE translation of keyboard input.
   32.66 - * This translation has some overhead, so translation defaults off.
   32.67 - * If 'enable' is 1, translation is enabled.
   32.68 - * If 'enable' is 0, translation is disabled.
   32.69 - * If 'enable' is -1, the translation state is not changed.
   32.70 - * It returns the previous state of keyboard translation.
   32.71 +/**
   32.72 + * \fn int SDL_GetNumKeyboards(void)
   32.73 + *
   32.74 + * \brief Get the number of keyboard input devices available.
   32.75 + *
   32.76 + * \sa SDL_SelectKeyboard()
   32.77 + */
   32.78 +extern DECLSPEC int SDLCALL SDL_GetNumKeyboards(void);
   32.79 +
   32.80 +/**
   32.81 + * \fn int SDL_SelectKeyboard(int index)
   32.82 + *
   32.83 + * \brief Set the index of the currently selected keyboard.
   32.84 + *
   32.85 + * \return The index of the previously selected keyboard.
   32.86 + *
   32.87 + * \note You can query the currently selected keyboard by passing an index of -1.
   32.88 + *
   32.89 + * \sa SDL_GetNumKeyboards()
   32.90 + */
   32.91 +extern DECLSPEC int SDLCALL SDL_SelectKeyboard(int index);
   32.92 +
   32.93 +/**
   32.94 + * \fn int SDL_EnableUNICODE(int enable)
   32.95 + *
   32.96 + * \brief Enable/Disable UNICODE translation of keyboard input.
   32.97 + *
   32.98 + * \param enable 1 to enable translation, 0 to disable translation, -1 to query translation
   32.99 + *
  32.100 + * \return The previous state of keyboard translation
  32.101 + *
  32.102 + * \note This translation has some overhead, so translation defaults off.
  32.103   */
  32.104  extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
  32.105  
  32.106 -/*
  32.107 - * Enable/Disable keyboard repeat.  Keyboard repeat defaults to off.
  32.108 - * 'delay' is the initial delay in ms between the time when a key is
  32.109 - * pressed, and keyboard repeat begins.
  32.110 - * 'interval' is the time in ms between keyboard repeat events.
  32.111 +/**
  32.112 + * \fn int SDL_EnableKeyRepeat(int delay, int interval)
  32.113 + * 
  32.114 + * \brief Enable keyboard repeat for the selected keyboard.
  32.115 + *
  32.116 + * \param delay The initial delay in milliseconds between the time when a
  32.117 + *              key is pressed and keyboard repeat begins.  Setting a delay
  32.118 + *              of 0 will disable keyboard repeat.
  32.119 + * \param interval The time in milliseconds between keyboard repeat events.
  32.120 + *
  32.121 + * \return 0 on success, or -1 if there was an error.
  32.122 + *
  32.123 + * \note Keyboard repeat defaults to off.
  32.124   */
  32.125  #define SDL_DEFAULT_REPEAT_DELAY	500
  32.126  #define SDL_DEFAULT_REPEAT_INTERVAL	30
  32.127 -/*
  32.128 - * If 'delay' is set to 0, keyboard repeat is disabled.
  32.129 + /**/
  32.130 +    extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
  32.131 +
  32.132 +/**
  32.133 + * \fn void SDL_GetKeyRepeat(int *delay, int *interval)
  32.134 + *
  32.135 + * \brief Get the current keyboard repeat setting for the selected keyboard.
  32.136   */
  32.137 -extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
  32.138  extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
  32.139  
  32.140 -/*
  32.141 - * Get a snapshot of the current state of the keyboard.
  32.142 - * Returns an array of keystates, indexed by the SDLK_* syms.
  32.143 - * Used:
  32.144 +/**
  32.145 + * \fn Uint8 *SDL_GetKeyState(int *numkeys)
  32.146 + *
  32.147 + * \brief Get a snapshot of the current state of the selected keyboard.
  32.148 + *
  32.149 + * \return An array of keystates, indexed by the SDLK_* syms.
  32.150 + *
  32.151 + * Example:
  32.152   * 	Uint8 *keystate = SDL_GetKeyState(NULL);
  32.153   *	if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed.
  32.154   */
  32.155 -extern DECLSPEC Uint8 * SDLCALL SDL_GetKeyState(int *numkeys);
  32.156 +extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState(int *numkeys);
  32.157  
  32.158 -/*
  32.159 - * Get the current key modifier state
  32.160 +/**
  32.161 + * \fn SDLMod SDL_GetModState(void)
  32.162 + *
  32.163 + * \brief Get the current key modifier state for the selected keyboard.
  32.164   */
  32.165  extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
  32.166  
  32.167 -/*
  32.168 - * Set the current key modifier state
  32.169 - * This does not change the keyboard state, only the key modifier flags.
  32.170 +/**
  32.171 + * \fn void SDL_SetModState(SDLMod modstate)
  32.172 + *
  32.173 + * \brief Set the current key modifier state for the selected keyboard.
  32.174 + *
  32.175 + * \note This does not change the keyboard state, only the key modifier flags.
  32.176   */
  32.177  extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
  32.178  
  32.179 -/*
  32.180 - * Get the name of an SDL virtual keysym
  32.181 +/**
  32.182 + * \fn const char *SDL_GetKeyName(SDLKey key)
  32.183 + * 
  32.184 + * \brief Get the name of an SDL virtual keysym
  32.185   */
  32.186 -extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key);
  32.187 +extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
  32.188  
  32.189  
  32.190  /* Ends C function definitions when using C++ */
  32.191  #ifdef __cplusplus
  32.192 +/* *INDENT-OFF* */
  32.193  }
  32.194 +/* *INDENT-ON* */
  32.195  #endif
  32.196  #include "close_code.h"
  32.197  
  32.198  #endif /* _SDL_keyboard_h */
  32.199 +
  32.200 +/* vi: set ts=4 sw=4 expandtab: */
    33.1 --- a/include/SDL_keysym.h	Thu Jul 06 18:01:37 2006 +0000
    33.2 +++ b/include/SDL_keysym.h	Mon Jul 10 21:04:37 2006 +0000
    33.3 @@ -20,287 +20,203 @@
    33.4      slouken@libsdl.org
    33.5  */
    33.6  
    33.7 +/**
    33.8 + * \file SDL_keysym.h
    33.9 + */
   33.10 +
   33.11  #ifndef _SDL_keysym_h
   33.12  #define _SDL_keysym_h
   33.13  
   33.14 -/* What we really want is a mapping of every raw key on the keyboard.
   33.15 -   To support international keyboards, we use the range 0xA1 - 0xFF
   33.16 -   as international virtual keycodes.  We'll follow in the footsteps of X11...
   33.17 -   The names of the keys
   33.18 +/**
   33.19 + * \enum SDLKey
   33.20 + *
   33.21 + * \brief The SDL virtual key representation
   33.22 + *
   33.23 + * The SDLKey represents the unmodified character printed on the key
   33.24 + * for the current keyboard layout.  The first 255 characters are used
   33.25 + * unchanged from Latin-1, e.g. a key with 'a' on it will have the value "a".
   33.26 + * The rest of the keys are named below, and fall into the range above 255.
   33.27   */
   33.28 - 
   33.29 -typedef enum {
   33.30 -	/* The keyboard syms have been cleverly chosen to map to ASCII */
   33.31 -	SDLK_UNKNOWN		= 0,
   33.32 -	SDLK_FIRST		= 0,
   33.33 -	SDLK_BACKSPACE		= 8,
   33.34 -	SDLK_TAB		= 9,
   33.35 -	SDLK_CLEAR		= 12,
   33.36 -	SDLK_RETURN		= 13,
   33.37 -	SDLK_PAUSE		= 19,
   33.38 -	SDLK_ESCAPE		= 27,
   33.39 -	SDLK_SPACE		= 32,
   33.40 -	SDLK_EXCLAIM		= 33,
   33.41 -	SDLK_QUOTEDBL		= 34,
   33.42 -	SDLK_HASH		= 35,
   33.43 -	SDLK_DOLLAR		= 36,
   33.44 -	SDLK_AMPERSAND		= 38,
   33.45 -	SDLK_QUOTE		= 39,
   33.46 -	SDLK_LEFTPAREN		= 40,
   33.47 -	SDLK_RIGHTPAREN		= 41,
   33.48 -	SDLK_ASTERISK		= 42,
   33.49 -	SDLK_PLUS		= 43,
   33.50 -	SDLK_COMMA		= 44,
   33.51 -	SDLK_MINUS		= 45,
   33.52 -	SDLK_PERIOD		= 46,
   33.53 -	SDLK_SLASH		= 47,
   33.54 -	SDLK_0			= 48,
   33.55 -	SDLK_1			= 49,
   33.56 -	SDLK_2			= 50,
   33.57 -	SDLK_3			= 51,
   33.58 -	SDLK_4			= 52,
   33.59 -	SDLK_5			= 53,
   33.60 -	SDLK_6			= 54,
   33.61 -	SDLK_7			= 55,
   33.62 -	SDLK_8			= 56,
   33.63 -	SDLK_9			= 57,
   33.64 -	SDLK_COLON		= 58,
   33.65 -	SDLK_SEMICOLON		= 59,
   33.66 -	SDLK_LESS		= 60,
   33.67 -	SDLK_EQUALS		= 61,
   33.68 -	SDLK_GREATER		= 62,
   33.69 -	SDLK_QUESTION		= 63,
   33.70 -	SDLK_AT			= 64,
   33.71 -	/* 
   33.72 -	   Skip uppercase letters
   33.73 -	 */
   33.74 -	SDLK_LEFTBRACKET	= 91,
   33.75 -	SDLK_BACKSLASH		= 92,
   33.76 -	SDLK_RIGHTBRACKET	= 93,
   33.77 -	SDLK_CARET		= 94,
   33.78 -	SDLK_UNDERSCORE		= 95,
   33.79 -	SDLK_BACKQUOTE		= 96,
   33.80 -	SDLK_a			= 97,
   33.81 -	SDLK_b			= 98,
   33.82 -	SDLK_c			= 99,
   33.83 -	SDLK_d			= 100,
   33.84 -	SDLK_e			= 101,
   33.85 -	SDLK_f			= 102,
   33.86 -	SDLK_g			= 103,
   33.87 -	SDLK_h			= 104,
   33.88 -	SDLK_i			= 105,
   33.89 -	SDLK_j			= 106,
   33.90 -	SDLK_k			= 107,
   33.91 -	SDLK_l			= 108,
   33.92 -	SDLK_m			= 109,
   33.93 -	SDLK_n			= 110,
   33.94 -	SDLK_o			= 111,
   33.95 -	SDLK_p			= 112,
   33.96 -	SDLK_q			= 113,
   33.97 -	SDLK_r			= 114,
   33.98 -	SDLK_s			= 115,
   33.99 -	SDLK_t			= 116,
  33.100 -	SDLK_u			= 117,
  33.101 -	SDLK_v			= 118,
  33.102 -	SDLK_w			= 119,
  33.103 -	SDLK_x			= 120,
  33.104 -	SDLK_y			= 121,
  33.105 -	SDLK_z			= 122,
  33.106 -	SDLK_DELETE		= 127,
  33.107 -	/* End of ASCII mapped keysyms */
  33.108 +typedef enum
  33.109 +{
  33.110 +    /* The keyboard syms have been cleverly chosen to map to ASCII */
  33.111 +    SDLK_UNKNOWN = 0,
  33.112 +    SDLK_FIRST = 0,
  33.113 +    SDLK_BACKSPACE = 8,
  33.114 +    SDLK_TAB = 9,
  33.115 +    SDLK_CLEAR = 12,
  33.116 +    SDLK_RETURN = 13,
  33.117 +    SDLK_PAUSE = 19,
  33.118 +    SDLK_ESCAPE = 27,
  33.119 +    SDLK_SPACE = 32,
  33.120 +    SDLK_EXCLAIM = 33,
  33.121 +    SDLK_QUOTEDBL = 34,
  33.122 +    SDLK_HASH = 35,
  33.123 +    SDLK_DOLLAR = 36,
  33.124 +    SDLK_AMPERSAND = 38,
  33.125 +    SDLK_QUOTE = 39,
  33.126 +    SDLK_LEFTPAREN = 40,
  33.127 +    SDLK_RIGHTPAREN = 41,
  33.128 +    SDLK_ASTERISK = 42,
  33.129 +    SDLK_PLUS = 43,
  33.130 +    SDLK_COMMA = 44,
  33.131 +    SDLK_MINUS = 45,
  33.132 +    SDLK_PERIOD = 46,
  33.133 +    SDLK_SLASH = 47,
  33.134 +    SDLK_0 = 48,
  33.135 +    SDLK_1 = 49,
  33.136 +    SDLK_2 = 50,
  33.137 +    SDLK_3 = 51,
  33.138 +    SDLK_4 = 52,
  33.139 +    SDLK_5 = 53,
  33.140 +    SDLK_6 = 54,
  33.141 +    SDLK_7 = 55,
  33.142 +    SDLK_8 = 56,
  33.143 +    SDLK_9 = 57,
  33.144 +    SDLK_COLON = 58,
  33.145 +    SDLK_SEMICOLON = 59,
  33.146 +    SDLK_LESS = 60,
  33.147 +    SDLK_EQUALS = 61,
  33.148 +    SDLK_GREATER = 62,
  33.149 +    SDLK_QUESTION = 63,
  33.150 +    SDLK_AT = 64,
  33.151 +    /* 
  33.152 +       Skip uppercase letters
  33.153 +     */
  33.154 +    SDLK_LEFTBRACKET = 91,
  33.155 +    SDLK_BACKSLASH = 92,
  33.156 +    SDLK_RIGHTBRACKET = 93,
  33.157 +    SDLK_CARET = 94,
  33.158 +    SDLK_UNDERSCORE = 95,
  33.159 +    SDLK_BACKQUOTE = 96,
  33.160 +    SDLK_a = 97,
  33.161 +    SDLK_b = 98,
  33.162 +    SDLK_c = 99,
  33.163 +    SDLK_d = 100,
  33.164 +    SDLK_e = 101,
  33.165 +    SDLK_f = 102,
  33.166 +    SDLK_g = 103,
  33.167 +    SDLK_h = 104,
  33.168 +    SDLK_i = 105,
  33.169 +    SDLK_j = 106,
  33.170 +    SDLK_k = 107,
  33.171 +    SDLK_l = 108,
  33.172 +    SDLK_m = 109,
  33.173 +    SDLK_n = 110,
  33.174 +    SDLK_o = 111,
  33.175 +    SDLK_p = 112,
  33.176 +    SDLK_q = 113,
  33.177 +    SDLK_r = 114,
  33.178 +    SDLK_s = 115,
  33.179 +    SDLK_t = 116,
  33.180 +    SDLK_u = 117,
  33.181 +    SDLK_v = 118,
  33.182 +    SDLK_w = 119,
  33.183 +    SDLK_x = 120,
  33.184 +    SDLK_y = 121,
  33.185 +    SDLK_z = 122,
  33.186 +    SDLK_DELETE = 127,
  33.187 +    /* End of ASCII mapped keysyms */
  33.188  
  33.189 -	/* International keyboard syms */
  33.190 -	SDLK_WORLD_0		= 160,		/* 0xA0 */
  33.191 -	SDLK_WORLD_1		= 161,
  33.192 -	SDLK_WORLD_2		= 162,
  33.193 -	SDLK_WORLD_3		= 163,
  33.194 -	SDLK_WORLD_4		= 164,
  33.195 -	SDLK_WORLD_5		= 165,
  33.196 -	SDLK_WORLD_6		= 166,
  33.197 -	SDLK_WORLD_7		= 167,
  33.198 -	SDLK_WORLD_8		= 168,
  33.199 -	SDLK_WORLD_9		= 169,
  33.200 -	SDLK_WORLD_10		= 170,
  33.201 -	SDLK_WORLD_11		= 171,
  33.202 -	SDLK_WORLD_12		= 172,
  33.203 -	SDLK_WORLD_13		= 173,
  33.204 -	SDLK_WORLD_14		= 174,
  33.205 -	SDLK_WORLD_15		= 175,
  33.206 -	SDLK_WORLD_16		= 176,
  33.207 -	SDLK_WORLD_17		= 177,
  33.208 -	SDLK_WORLD_18		= 178,
  33.209 -	SDLK_WORLD_19		= 179,
  33.210 -	SDLK_WORLD_20		= 180,
  33.211 -	SDLK_WORLD_21		= 181,
  33.212 -	SDLK_WORLD_22		= 182,
  33.213 -	SDLK_WORLD_23		= 183,
  33.214 -	SDLK_WORLD_24		= 184,
  33.215 -	SDLK_WORLD_25		= 185,
  33.216 -	SDLK_WORLD_26		= 186,
  33.217 -	SDLK_WORLD_27		= 187,
  33.218 -	SDLK_WORLD_28		= 188,
  33.219 -	SDLK_WORLD_29		= 189,
  33.220 -	SDLK_WORLD_30		= 190,
  33.221 -	SDLK_WORLD_31		= 191,
  33.222 -	SDLK_WORLD_32		= 192,
  33.223 -	SDLK_WORLD_33		= 193,
  33.224 -	SDLK_WORLD_34		= 194,
  33.225 -	SDLK_WORLD_35		= 195,
  33.226 -	SDLK_WORLD_36		= 196,
  33.227 -	SDLK_WORLD_37		= 197,
  33.228 -	SDLK_WORLD_38		= 198,
  33.229 -	SDLK_WORLD_39		= 199,
  33.230 -	SDLK_WORLD_40		= 200,
  33.231 -	SDLK_WORLD_41		= 201,
  33.232 -	SDLK_WORLD_42		= 202,
  33.233 -	SDLK_WORLD_43		= 203,
  33.234 -	SDLK_WORLD_44		= 204,
  33.235 -	SDLK_WORLD_45		= 205,
  33.236 -	SDLK_WORLD_46		= 206,
  33.237 -	SDLK_WORLD_47		= 207,
  33.238 -	SDLK_WORLD_48		= 208,
  33.239 -	SDLK_WORLD_49		= 209,
  33.240 -	SDLK_WORLD_50		= 210,
  33.241 -	SDLK_WORLD_51		= 211,
  33.242 -	SDLK_WORLD_52		= 212,
  33.243 -	SDLK_WORLD_53		= 213,
  33.244 -	SDLK_WORLD_54		= 214,
  33.245 -	SDLK_WORLD_55		= 215,
  33.246 -	SDLK_WORLD_56		= 216,
  33.247 -	SDLK_WORLD_57		= 217,
  33.248 -	SDLK_WORLD_58		= 218,
  33.249 -	SDLK_WORLD_59		= 219,
  33.250 -	SDLK_WORLD_60		= 220,
  33.251 -	SDLK_WORLD_61		= 221,
  33.252 -	SDLK_WORLD_62		= 222,
  33.253 -	SDLK_WORLD_63		= 223,
  33.254 -	SDLK_WORLD_64		= 224,
  33.255 -	SDLK_WORLD_65		= 225,
  33.256 -	SDLK_WORLD_66		= 226,
  33.257 -	SDLK_WORLD_67		= 227,
  33.258 -	SDLK_WORLD_68		= 228,
  33.259 -	SDLK_WORLD_69		= 229,
  33.260 -	SDLK_WORLD_70		= 230,
  33.261 -	SDLK_WORLD_71		= 231,
  33.262 -	SDLK_WORLD_72		= 232,
  33.263 -	SDLK_WORLD_73		= 233,
  33.264 -	SDLK_WORLD_74		= 234,
  33.265 -	SDLK_WORLD_75		= 235,
  33.266 -	SDLK_WORLD_76		= 236,
  33.267 -	SDLK_WORLD_77		= 237,
  33.268 -	SDLK_WORLD_78		= 238,
  33.269 -	SDLK_WORLD_79		= 239,
  33.270 -	SDLK_WORLD_80		= 240,
  33.271 -	SDLK_WORLD_81		= 241,
  33.272 -	SDLK_WORLD_82		= 242,
  33.273 -	SDLK_WORLD_83		= 243,
  33.274 -	SDLK_WORLD_84		= 244,
  33.275 -	SDLK_WORLD_85		= 245,
  33.276 -	SDLK_WORLD_86		= 246,
  33.277 -	SDLK_WORLD_87		= 247,
  33.278 -	SDLK_WORLD_88		= 248,
  33.279 -	SDLK_WORLD_89		= 249,
  33.280 -	SDLK_WORLD_90		= 250,
  33.281 -	SDLK_WORLD_91		= 251,
  33.282 -	SDLK_WORLD_92		= 252,
  33.283 -	SDLK_WORLD_93		= 253,
  33.284 -	SDLK_WORLD_94		= 254,
  33.285 -	SDLK_WORLD_95		= 255,		/* 0xFF */
  33.286 +    /* Numeric keypad */
  33.287 +    SDLK_KP0 = 256,
  33.288 +    SDLK_KP1 = 257,
  33.289 +    SDLK_KP2 = 258,
  33.290 +    SDLK_KP3 = 259,
  33.291 +    SDLK_KP4 = 260,
  33.292 +    SDLK_KP5 = 261,
  33.293 +    SDLK_KP6 = 262,
  33.294 +    SDLK_KP7 = 263,
  33.295 +    SDLK_KP8 = 264,
  33.296 +    SDLK_KP9 = 265,
  33.297 +    SDLK_KP_PERIOD = 266,
  33.298 +    SDLK_KP_DIVIDE = 267,
  33.299 +    SDLK_KP_MULTIPLY = 268,
  33.300 +    SDLK_KP_MINUS = 269,
  33.301 +    SDLK_KP_PLUS = 270,
  33.302 +    SDLK_KP_ENTER = 271,
  33.303 +    SDLK_KP_EQUALS = 272,
  33.304  
  33.305 -	/* Numeric keypad */
  33.306 -	SDLK_KP0		= 256,
  33.307 -	SDLK_KP1		= 257,
  33.308 -	SDLK_KP2		= 258,
  33.309 -	SDLK_KP3		= 259,
  33.310 -	SDLK_KP4		= 260,
  33.311 -	SDLK_KP5		= 261,
  33.312 -	SDLK_KP6		= 262,
  33.313 -	SDLK_KP7		= 263,
  33.314 -	SDLK_KP8		= 264,
  33.315 -	SDLK_KP9		= 265,
  33.316 -	SDLK_KP_PERIOD		= 266,
  33.317 -	SDLK_KP_DIVIDE		= 267,
  33.318 -	SDLK_KP_MULTIPLY	= 268,
  33.319 -	SDLK_KP_MINUS		= 269,
  33.320 -	SDLK_KP_PLUS		= 270,
  33.321 -	SDLK_KP_ENTER		= 271,
  33.322 -	SDLK_KP_EQUALS		= 272,
  33.323 +    /* Arrows + Home/End pad */
  33.324 +    SDLK_UP = 273,
  33.325 +    SDLK_DOWN = 274,
  33.326 +    SDLK_RIGHT = 275,
  33.327 +    SDLK_LEFT = 276,
  33.328 +    SDLK_INSERT = 277,
  33.329 +    SDLK_HOME = 278,
  33.330 +    SDLK_END = 279,
  33.331 +    SDLK_PAGEUP = 280,
  33.332 +    SDLK_PAGEDOWN = 281,
  33.333  
  33.334 -	/* Arrows + Home/End pad */
  33.335 -	SDLK_UP			= 273,
  33.336 -	SDLK_DOWN		= 274,
  33.337 -	SDLK_RIGHT		= 275,
  33.338 -	SDLK_LEFT		= 276,
  33.339 -	SDLK_INSERT		= 277,
  33.340 -	SDLK_HOME		= 278,
  33.341 -	SDLK_END		= 279,
  33.342 -	SDLK_PAGEUP		= 280,
  33.343 -	SDLK_PAGEDOWN		= 281,
  33.344 +    /* Function keys */
  33.345 +    SDLK_F1 = 282,
  33.346 +    SDLK_F2 = 283,
  33.347 +    SDLK_F3 = 284,
  33.348 +    SDLK_F4 = 285,
  33.349 +    SDLK_F5 = 286,
  33.350 +    SDLK_F6 = 287,
  33.351 +    SDLK_F7 = 288,
  33.352 +    SDLK_F8 = 289,
  33.353 +    SDLK_F9 = 290,
  33.354 +    SDLK_F10 = 291,
  33.355 +    SDLK_F11 = 292,
  33.356 +    SDLK_F12 = 293,
  33.357 +    SDLK_F13 = 294,
  33.358 +    SDLK_F14 = 295,
  33.359 +    SDLK_F15 = 296,
  33.360  
  33.361 -	/* Function keys */
  33.362 -	SDLK_F1			= 282,
  33.363 -	SDLK_F2			= 283,
  33.364 -	SDLK_F3			= 284,
  33.365 -	SDLK_F4			= 285,
  33.366 -	SDLK_F5			= 286,
  33.367 -	SDLK_F6			= 287,
  33.368 -	SDLK_F7			= 288,
  33.369 -	SDLK_F8			= 289,
  33.370 -	SDLK_F9			= 290,
  33.371 -	SDLK_F10		= 291,
  33.372 -	SDLK_F11		= 292,
  33.373 -	SDLK_F12		= 293,
  33.374 -	SDLK_F13		= 294,
  33.375 -	SDLK_F14		= 295,
  33.376 -	SDLK_F15		= 296,
  33.377 +    /* Key state modifier keys */
  33.378 +    SDLK_NUMLOCK = 300,
  33.379 +    SDLK_CAPSLOCK = 301,
  33.380 +    SDLK_SCROLLOCK = 302,
  33.381 +    SDLK_RSHIFT = 303,
  33.382 +    SDLK_LSHIFT = 304,
  33.383 +    SDLK_RCTRL = 305,
  33.384 +    SDLK_LCTRL = 306,
  33.385 +    SDLK_RALT = 307,
  33.386 +    SDLK_LALT = 308,
  33.387 +    SDLK_RMETA = 309,
  33.388 +    SDLK_LMETA = 310,
  33.389 +    SDLK_LSUPER = 311,          /**< Left "Windows" key */
  33.390 +    SDLK_RSUPER = 312,          /**< Right "Windows" key */
  33.391 +    SDLK_MODE = 313,            /**< "Alt Gr" key */
  33.392 +    SDLK_COMPOSE = 314,         /**< Multi-key compose key */
  33.393  
  33.394 -	/* Key state modifier keys */
  33.395 -	SDLK_NUMLOCK		= 300,
  33.396 -	SDLK_CAPSLOCK		= 301,
  33.397 -	SDLK_SCROLLOCK		= 302,
  33.398 -	SDLK_RSHIFT		= 303,
  33.399 -	SDLK_LSHIFT		= 304,
  33.400 -	SDLK_RCTRL		= 305,
  33.401 -	SDLK_LCTRL		= 306,
  33.402 -	SDLK_RALT		= 307,
  33.403 -	SDLK_LALT		= 308,
  33.404 -	SDLK_RMETA		= 309,
  33.405 -	SDLK_LMETA		= 310,
  33.406 -	SDLK_LSUPER		= 311,		/* Left "Windows" key */
  33.407 -	SDLK_RSUPER		= 312,		/* Right "Windows" key */
  33.408 -	SDLK_MODE		= 313,		/* "Alt Gr" key */
  33.409 -	SDLK_COMPOSE		= 314,		/* Multi-key compose key */
  33.410 +    /* Miscellaneous function keys */
  33.411 +    SDLK_HELP = 315,
  33.412 +    SDLK_PRINT = 316,
  33.413 +    SDLK_SYSREQ = 317,
  33.414 +    SDLK_BREAK = 318,
  33.415 +    SDLK_MENU = 319,
  33.416 +    SDLK_POWER = 320,           /**< Power Macintosh power key */
  33.417 +    SDLK_EURO = 321,            /**< Some european keyboards */
  33.418 +    SDLK_UNDO = 322,            /**< Atari keyboard has Undo */
  33.419  
  33.420 -	/* Miscellaneous function keys */
  33.421 -	SDLK_HELP		= 315,
  33.422 -	SDLK_PRINT		= 316,
  33.423 -	SDLK_SYSREQ		= 317,
  33.424 -	SDLK_BREAK		= 318,
  33.425 -	SDLK_MENU		= 319,
  33.426 -	SDLK_POWER		= 320,		/* Power Macintosh power key */
  33.427 -	SDLK_EURO		= 321,		/* Some european keyboards */
  33.428 -	SDLK_UNDO		= 322,		/* Atari keyboard has Undo */
  33.429 +    /* Add any other keys here */
  33.430  
  33.431 -	/* Add any other keys here */
  33.432 -
  33.433 -	SDLK_LAST
  33.434 +    SDLK_LAST
  33.435  } SDLKey;
  33.436  
  33.437 -/* Enumeration of valid key mods (possibly OR'd together) */
  33.438 -typedef enum {
  33.439 -	KMOD_NONE  = 0x0000,
  33.440 -	KMOD_LSHIFT= 0x0001,
  33.441 -	KMOD_RSHIFT= 0x0002,
  33.442 -	KMOD_LCTRL = 0x0040,
  33.443 -	KMOD_RCTRL = 0x0080,
  33.444 -	KMOD_LALT  = 0x0100,
  33.445 -	KMOD_RALT  = 0x0200,
  33.446 -	KMOD_LMETA = 0x0400,
  33.447 -	KMOD_RMETA = 0x0800,
  33.448 -	KMOD_NUM   = 0x1000,
  33.449 -	KMOD_CAPS  = 0x2000,
  33.450 -	KMOD_MODE  = 0x4000,
  33.451 -	KMOD_RESERVED = 0x8000
  33.452 +/**
  33.453 + * \enum SDLMod
  33.454 + *
  33.455 + * \brief Enumeration of valid key mods (possibly OR'd together)
  33.456 + */
  33.457 +typedef enum
  33.458 +{
  33.459 +    KMOD_NONE = 0x0000,
  33.460 +    KMOD_LSHIFT = 0x0001,
  33.461 +    KMOD_RSHIFT = 0x0002,
  33.462 +    KMOD_LCTRL = 0x0040,
  33.463 +    KMOD_RCTRL = 0x0080,
  33.464 +    KMOD_LALT = 0x0100,
  33.465 +    KMOD_RALT = 0x0200,
  33.466 +    KMOD_LMETA = 0x0400,
  33.467 +    KMOD_RMETA = 0x0800,
  33.468 +    KMOD_NUM = 0x1000,
  33.469 +    KMOD_CAPS = 0x2000,
  33.470 +    KMOD_MODE = 0x4000,
  33.471 +    KMOD_RESERVED = 0x8000
  33.472  } SDLMod;
  33.473  
  33.474  #define KMOD_CTRL	(KMOD_LCTRL|KMOD_RCTRL)
    34.1 --- a/include/SDL_loadso.h	Thu Jul 06 18:01:37 2006 +0000
    34.2 +++ b/include/SDL_loadso.h	Mon Jul 10 21:04:37 2006 +0000
    34.3 @@ -20,23 +20,24 @@
    34.4      slouken@libsdl.org
    34.5  */
    34.6  
    34.7 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    34.8 -/* System dependent library loading routines                           */
    34.9 -
   34.10 -/* Some things to keep in mind:                                        
   34.11 -   - These functions only work on C function names.  Other languages may
   34.12 -     have name mangling and intrinsic language support that varies from
   34.13 -     compiler to compiler.
   34.14 -   - Make sure you declare your function pointers with the same calling
   34.15 -     convention as the actual library function.  Your code will crash
   34.16 -     mysteriously if you do not do this.
   34.17 -   - Avoid namespace collisions.  If you load a symbol from the library,
   34.18 -     it is not defined whether or not it goes into the global symbol
   34.19 -     namespace for the application.  If it does and it conflicts with
   34.20 -     symbols in your code or other shared libraries, you will not get
   34.21 -     the results you expect. :)
   34.22 -*/
   34.23 -
   34.24 +/**
   34.25 + * \file SDL_loadso.h
   34.26 + *
   34.27 + * System dependent library loading routines
   34.28 + *
   34.29 + * Some things to keep in mind:                                        
   34.30 + * - These functions only work on C function names.  Other languages may
   34.31 + *   have name mangling and intrinsic language support that varies from
   34.32 + *   compiler to compiler.
   34.33 + * - Make sure you declare your function pointers with the same calling
   34.34 + *   convention as the actual library function.  Your code will crash
   34.35 + *   mysteriously if you do not do this.
   34.36 + * - Avoid namespace collisions.  If you load a symbol from the library,
   34.37 + *   it is not defined whether or not it goes into the global symbol
   34.38 + *   namespace for the application.  If it does and it conflicts with
   34.39 + *   symbols in your code or other shared libraries, you will not get
   34.40 + *   the results you expect. :)
   34.41 + */
   34.42  
   34.43  #ifndef _SDL_loadso_h
   34.44  #define _SDL_loadso_h
   34.45 @@ -47,28 +48,35 @@
   34.46  #include "begin_code.h"
   34.47  /* Set up for C function definitions, even when using C++ */
   34.48  #ifdef __cplusplus
   34.49 +/* *INDENT-OFF* */
   34.50  extern "C" {
   34.51 +/* *INDENT-ON* */
   34.52  #endif
   34.53  
   34.54  /* This function dynamically loads a shared object and returns a pointer
   34.55   * to the object handle (or NULL if there was an error).
   34.56   * The 'sofile' parameter is a system dependent name of the object file.
   34.57   */
   34.58 -extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile);
   34.59 +extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
   34.60  
   34.61  /* Given an object handle, this function looks up the address of the
   34.62   * named function in the shared object and returns it.  This address
   34.63   * is no longer valid after calling SDL_UnloadObject().
   34.64   */
   34.65 -extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name);
   34.66 +extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
   34.67 +                                               const char *name);
   34.68  
   34.69  /* Unload a shared object from memory */
   34.70  extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
   34.71  
   34.72  /* Ends C function definitions when using C++ */
   34.73  #ifdef __cplusplus
   34.74 +/* *INDENT-OFF* */
   34.75  }
   34.76 +/* *INDENT-ON* */
   34.77  #endif
   34.78  #include "close_code.h"
   34.79  
   34.80  #endif /* _SDL_loadso_h */
   34.81 +
   34.82 +/* vi: set ts=4 sw=4 expandtab: */
    35.1 --- a/include/SDL_main.h	Thu Jul 06 18:01:37 2006 +0000
    35.2 +++ b/include/SDL_main.h	Mon Jul 10 21:04:37 2006 +0000
    35.3 @@ -58,17 +58,20 @@
    35.4  
    35.5  #include "begin_code.h"
    35.6  #ifdef __cplusplus
    35.7 +/* *INDENT-OFF* */
    35.8  extern "C" {
    35.9 +/* *INDENT-ON* */
   35.10  #endif
   35.11  
   35.12 -/* This should be called from your WinMain() function, if any */
   35.13 -extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
   35.14 -/* This can also be called, but is no longer necessary */
   35.15 -extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
   35.16 -/* This can also be called, but is no longer necessary (SDL_Quit calls it) */
   35.17 +/* This can be called to set the application class at startup */
   35.18 +extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
   35.19 +                                            void *hInst);
   35.20  extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
   35.21 +
   35.22  #ifdef __cplusplus
   35.23 +/* *INDENT-OFF* */
   35.24  }
   35.25 +/* *INDENT-ON* */
   35.26  #endif
   35.27  #include "close_code.h"
   35.28  #endif
   35.29 @@ -78,7 +81,9 @@
   35.30  
   35.31  #include "begin_code.h"
   35.32  #ifdef __cplusplus
   35.33 +/* *INDENT-OFF* */
   35.34  extern "C" {
   35.35 +/* *INDENT-ON* */
   35.36  #endif
   35.37  
   35.38  /* Forward declaration so we don't need to include QuickDraw.h */
   35.39 @@ -88,7 +93,9 @@
   35.40  extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd);
   35.41  
   35.42  #ifdef __cplusplus
   35.43 +/* *INDENT-OFF* */
   35.44  }
   35.45 +/* *INDENT-ON* */
   35.46  #endif
   35.47  #include "close_code.h"
   35.48  #endif
   35.49 @@ -96,3 +103,5 @@
   35.50  #endif /* Need to redefine main()? */
   35.51  
   35.52  #endif /* _SDL_main_h */
   35.53 +
   35.54 +/* vi: set ts=4 sw=4 expandtab: */
    36.1 --- a/include/SDL_mouse.h	Thu Jul 06 18:01:37 2006 +0000
    36.2 +++ b/include/SDL_mouse.h	Mon Jul 10 21:04:37 2006 +0000
    36.3 @@ -20,7 +20,11 @@
    36.4      slouken@libsdl.org
    36.5  */
    36.6  
    36.7 -/* Include file for SDL mouse event handling */
    36.8 +/**
    36.9 + * \file SDL_mouse.h
   36.10 + *
   36.11 + * Include file for SDL mouse event handling
   36.12 + */
   36.13  
   36.14  #ifndef _SDL_mouse_h
   36.15  #define _SDL_mouse_h
   36.16 @@ -32,43 +36,116 @@
   36.17  #include "begin_code.h"
   36.18  /* Set up for C function definitions, even when using C++ */
   36.19  #ifdef __cplusplus
   36.20 +/* *INDENT-OFF* */
   36.21  extern "C" {
   36.22 +/* *INDENT-ON* */
   36.23  #endif
   36.24  
   36.25 -typedef struct WMcursor WMcursor;	/* Implementation dependent */
   36.26 -typedef struct SDL_Cursor {
   36.27 -	SDL_Rect area;			/* The area of the mouse cursor */
   36.28 -	Sint16 hot_x, hot_y;		/* The "tip" of the cursor */
   36.29 -	Uint8 *data;			/* B/W cursor data */
   36.30 -	Uint8 *mask;			/* B/W cursor mask */
   36.31 -	Uint8 *save[2];			/* Place to save cursor area */
   36.32 -	WMcursor *wm_cursor;		/* Window-manager cursor */
   36.33 -} SDL_Cursor;
   36.34 +typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
   36.35  
   36.36  /* Function prototypes */
   36.37 -/*
   36.38 - * Retrieve the current state of the mouse.
   36.39 +
   36.40 +/**
   36.41 + * \fn int SDL_GetNumMice(void)
   36.42 + *
   36.43 + * \brief Get the number of mouse input devices available.
   36.44 + *
   36.45 + * \sa SDL_SelectMouse()
   36.46 + */
   36.47 +extern DECLSPEC int SDLCALL SDL_GetNumMice(void);
   36.48 +
   36.49 +/**
   36.50 + * \fn int SDL_SelectMouse(int index)
   36.51 + *
   36.52 + * \brief Set the index of the currently selected mouse.
   36.53 + *
   36.54 + * \return The index of the previously selected mouse.
   36.55 + *
   36.56 + * \note You can query the currently selected mouse by passing an index of -1.
   36.57 + *
   36.58 + * \sa SDL_GetNumMice()
   36.59 + */
   36.60 +extern DECLSPEC int SDLCALL SDL_SelectMouse(int index);
   36.61 +
   36.62 +/**
   36.63 + * \fn SDL_WindowID SDL_GetMouseFocusWindow(void)
   36.64 + *
   36.65 + * \brief Get the window which currently has focus for the currently selected mouse.
   36.66 + */
   36.67 +extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(void);
   36.68 +
   36.69 +/**
   36.70 + * \fn int SDL_SetRelativeMouseMode(SDL_bool enabled)
   36.71 + *
   36.72 + * \brief Set relative mouse mode for the currently selected mouse.
   36.73 + *
   36.74 + * \param enabled Whether or not to enable relative mode
   36.75 + *
   36.76 + * \return 0 on success, or -1 if relative mode is not supported.
   36.77 + *
   36.78 + * While the mouse is in relative mode, the cursor is hidden, and the
   36.79 + * driver will try to report continuous motion in the current window.
   36.80 + * Only relative motion events will be delivered, the mouse position
   36.81 + * will not change.
   36.82 + *
   36.83 + * \note This function will flush any pending mouse motion.
   36.84 + *
   36.85 + * \sa SDL_GetRelativeMouseMode()
   36.86 + */
   36.87 +extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
   36.88 +
   36.89 +/**
   36.90 + * \fn SDL_bool SDL_GetRelativeMouseMode()
   36.91 + *
   36.92 + * \brief Query whether relative mouse mode is enabled for the currently selected mouse.
   36.93 + *
   36.94 + * \sa SDL_SetRelativeMouseMode()
   36.95 + */
   36.96 +extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode();
   36.97 +
   36.98 +/**
   36.99 + * \fn Uint8 SDL_GetMouseState(int *x, int *y)
  36.100 + *
  36.101 + * \brief Retrieve the current state of the currently selected mouse.
  36.102 + *
  36.103   * The current button state is returned as a button bitmask, which can
  36.104   * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
  36.105 - * current mouse cursor position.  You can pass NULL for either x or y.
  36.106 + * mouse cursor position relative to the focus window for the currently
  36.107 + * selected mouse.  You can pass NULL for either x or y.
  36.108   */
  36.109  extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
  36.110  
  36.111 -/*
  36.112 - * Retrieve the current state of the mouse.
  36.113 +/**
  36.114 + * \fn Uint8 SDL_GetRelativeMouseState(int *x, int *y)
  36.115 + *
  36.116 + * \brief Retrieve the state of the currently selected mouse.
  36.117 + *
  36.118   * The current button state is returned as a button bitmask, which can
  36.119   * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
  36.120   * mouse deltas since the last call to SDL_GetRelativeMouseState().
  36.121   */
  36.122  extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
  36.123  
  36.124 -/*
  36.125 - * Set the position of the mouse cursor (generates a mouse motion event)
  36.126 +/**
  36.127 + * \fn void SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y)
  36.128 + *
  36.129 + * \brief Moves the currently selected mouse to the given position within the window.
  36.130 + *
  36.131 + * \param windowID The window to move the mouse into, or 0 for the current mouse focus
  36.132 + * \param x The x coordinate within the window
  36.133 + * \param y The y coordinate within the window
  36.134 + *
  36.135 + * \note This function generates a mouse motion event
  36.136   */
  36.137 -extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
  36.138 +extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_WindowID windowID,
  36.139 +                                                   int x, int y);
  36.140  
  36.141 -/*
  36.142 - * Create a cursor using the specified data and mask (in MSB format).
  36.143 +/**
  36.144 + * \fn SDL_Cursor *SDL_CreateCursor (const Uint8 * data, const Uint8 * mask, int w, int h, int hot_x, int hot_y)
  36.145 + *
  36.146 + * \brief Create a cursor for the currently selected mouse, using the
  36.147 + *        specified bitmap data and mask (in MSB format).
  36.148 + *
  36.149   * The cursor width must be a multiple of 8 bits.
  36.150   *
  36.151   * The cursor is created in black and white according to the following:
  36.152 @@ -78,34 +155,46 @@
  36.153   *  0     0       Transparent
  36.154   *  1     0       Inverted color if possible, black if not.
  36.155   *
  36.156 - * Cursors created with this function must be freed with SDL_FreeCursor().
  36.157 + * \sa SDL_FreeCursor()
  36.158   */
  36.159 -extern DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor
  36.160 -		(Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);
  36.161 +extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
  36.162 +                                                     const Uint8 * mask,
  36.163 +                                                     int w, int h, int hot_x,
  36.164 +                                                     int hot_y);
  36.165  
  36.166 -/*
  36.167 - * Set the currently active cursor to the specified one.
  36.168 - * If the cursor is currently visible, the change will be immediately 
  36.169 - * represented on the display.
  36.170 +/**
  36.171 + * \fn void SDL_SetCursor(SDL_Cursor * cursor)
  36.172 + *
  36.173 + * \brief Set the active cursor for the currently selected mouse.
  36.174 + *
  36.175 + * \note The cursor must have been created for the selected mouse.
  36.176   */
  36.177 -extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor *cursor);
  36.178 +extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
  36.179  
  36.180 -/*
  36.181 - * Returns the currently active cursor.
  36.182 +/**
  36.183 + * \fn SDL_Cursor *SDL_GetCursor(void)
  36.184 + *
  36.185 + * \brief Return the active cursor for the currently selected mouse.
  36.186   */
  36.187 -extern DECLSPEC SDL_Cursor * SDLCALL SDL_GetCursor(void);
  36.188 +extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
  36.189  
  36.190 -/*
  36.191 - * Deallocates a cursor created with SDL_CreateCursor().
  36.192 +/**
  36.193 + * \fn void SDL_FreeCursor(SDL_Cursor * cursor)
  36.194 + *
  36.195 + * \brief Frees a cursor created with SDL_CreateCursor().
  36.196 + *
  36.197 + * \sa SDL_CreateCursor()
  36.198   */
  36.199 -extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor *cursor);
  36.200 +extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
  36.201  
  36.202 -/*
  36.203 - * Toggle whether or not the cursor is shown on the screen.
  36.204 - * The cursor start off displayed, but can be turned off.
  36.205 - * SDL_ShowCursor() returns 1 if the cursor was being displayed
  36.206 - * before the call, or 0 if it was not.  You can query the current
  36.207 - * state by passing a 'toggle' value of -1.
  36.208 +/**
  36.209 + * \fn int SDL_ShowCursor(int toggle)
  36.210 + *
  36.211 + * \brief Toggle whether or not the cursor is shown for the currently selected mouse.
  36.212 + *
  36.213 + * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current state.
  36.214 + *
  36.215 + * \return 1 if the cursor is shown, or 0 if the cursor is hidden.
  36.216   */
  36.217  extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
  36.218  
  36.219 @@ -113,15 +202,11 @@
  36.220     Button 1:	Left mouse button
  36.221     Button 2:	Middle mouse button
  36.222     Button 3:	Right mouse button
  36.223 -   Button 4:	Mouse wheel up	 (may also be a real button)
  36.224 -   Button 5:	Mouse wheel down (may also be a real button)
  36.225   */
  36.226  #define SDL_BUTTON(X)		(1 << ((X)-1))
  36.227  #define SDL_BUTTON_LEFT		1
  36.228  #define SDL_BUTTON_MIDDLE	2
  36.229  #define SDL_BUTTON_RIGHT	3
  36.230 -#define SDL_BUTTON_WHEELUP	4
  36.231 -#define SDL_BUTTON_WHEELDOWN	5
  36.232  #define SDL_BUTTON_LMASK	SDL_BUTTON(SDL_BUTTON_LEFT)
  36.233  #define SDL_BUTTON_MMASK	SDL_BUTTON(SDL_BUTTON_MIDDLE)
  36.234  #define SDL_BUTTON_RMASK	SDL_BUTTON(SDL_BUTTON_RIGHT)
  36.235 @@ -129,8 +214,12 @@
  36.236  
  36.237  /* Ends C function definitions when using C++ */
  36.238  #ifdef __cplusplus
  36.239 +/* *INDENT-OFF* */
  36.240  }
  36.241 +/* *INDENT-ON* */
  36.242  #endif
  36.243  #include "close_code.h"
  36.244  
  36.245  #endif /* _SDL_mouse_h */
  36.246 +
  36.247 +/* vi: set ts=4 sw=4 expandtab: */
    37.1 --- a/include/SDL_mutex.h	Thu Jul 06 18:01:37 2006 +0000
    37.2 +++ b/include/SDL_mutex.h	Mon Jul 10 21:04:37 2006 +0000
    37.3 @@ -23,10 +23,11 @@
    37.4  #ifndef _SDL_mutex_h
    37.5  #define _SDL_mutex_h
    37.6  
    37.7 -/* Functions to provide thread synchronization primitives
    37.8 -
    37.9 -	These are independent of the other SDL routines.
   37.10 -*/
   37.11 +/**
   37.12 + * \file SDL_mutex.h
   37.13 + *
   37.14 + * Functions to provide thread synchronization primitives
   37.15 + */
   37.16  
   37.17  #include "SDL_stdinc.h"
   37.18  #include "SDL_error.h"
   37.19 @@ -34,7 +35,9 @@
   37.20  #include "begin_code.h"
   37.21  /* Set up for C function definitions, even when using C++ */
   37.22  #ifdef __cplusplus
   37.23 +/* *INDENT-OFF* */
   37.24  extern "C" {
   37.25 +/* *INDENT-ON* */
   37.26  #endif
   37.27  
   37.28  /* Synchronization functions which can time out return this value
   37.29 @@ -55,21 +58,21 @@
   37.30  typedef struct SDL_mutex SDL_mutex;
   37.31  
   37.32  /* Create a mutex, initialized unlocked */
   37.33 -extern DECLSPEC SDL_mutex * SDLCALL SDL_CreateMutex(void);
   37.34 +extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
   37.35  
   37.36  /* Lock the mutex  (Returns 0, or -1 on error) */
   37.37  #define SDL_LockMutex(m)	SDL_mutexP(m)
   37.38 -extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex *mutex);
   37.39 +extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
   37.40  
   37.41  /* Unlock the mutex  (Returns 0, or -1 on error)
   37.42     It is an error to unlock a mutex that has not been locked by
   37.43     the current thread, and doing so results in undefined behavior.
   37.44   */
   37.45  #define SDL_UnlockMutex(m)	SDL_mutexV(m)
   37.46 -extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex *mutex);
   37.47 +extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex * mutex);
   37.48  
   37.49  /* Destroy a mutex */
   37.50 -extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex *mutex);
   37.51 +extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
   37.52  
   37.53  
   37.54  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   37.55 @@ -81,21 +84,21 @@
   37.56  typedef struct SDL_semaphore SDL_sem;
   37.57  
   37.58  /* Create a semaphore, initialized with value, returns NULL on failure. */
   37.59 -extern DECLSPEC SDL_sem * SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
   37.60 +extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
   37.61  
   37.62  /* Destroy a semaphore */
   37.63 -extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem *sem);
   37.64 +extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
   37.65  
   37.66  /* This function suspends the calling thread until the semaphore pointed 
   37.67   * to by sem has a positive count. It then atomically decreases the semaphore
   37.68   * count.
   37.69   */
   37.70 -extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem *sem);
   37.71 +extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
   37.72  
   37.73  /* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds,
   37.74     SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
   37.75  */
   37.76 -extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem *sem);
   37.77 +extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
   37.78  
   37.79  /* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
   37.80     the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
   37.81 @@ -103,15 +106,15 @@
   37.82     On some platforms this function is implemented by looping with a delay
   37.83     of 1 ms, and so should be avoided if possible.
   37.84  */
   37.85 -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms);
   37.86 +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
   37.87  
   37.88  /* Atomically increases the semaphore's count (not blocking), returns 0,
   37.89     or -1 on error.
   37.90   */
   37.91 -extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem *sem);
   37.92 +extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
   37.93  
   37.94  /* Returns the current count of the semaphore */
   37.95 -extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem *sem);
   37.96 +extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
   37.97  
   37.98  
   37.99  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  37.100 @@ -123,27 +126,27 @@
  37.101  typedef struct SDL_cond SDL_cond;
  37.102  
  37.103  /* Create a condition variable */
  37.104 -extern DECLSPEC SDL_cond * SDLCALL SDL_CreateCond(void);
  37.105 +extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
  37.106  
  37.107  /* Destroy a condition variable */
  37.108 -extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond *cond);
  37.109 +extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
  37.110  
  37.111  /* Restart one of the threads that are waiting on the condition variable,
  37.112     returns 0 or -1 on error.
  37.113   */
  37.114 -extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond *cond);
  37.115 +extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
  37.116  
  37.117  /* Restart all threads that are waiting on the condition variable,
  37.118     returns 0 or -1 on error.
  37.119   */
  37.120 -extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond *cond);
  37.121 +extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
  37.122  
  37.123  /* Wait on the condition variable, unlocking the provided mutex.
  37.124     The mutex must be locked before entering this function!
  37.125     The mutex is re-locked once the condition variable is signaled.
  37.126     Returns 0 when it is signaled, or -1 on error.
  37.127   */
  37.128 -extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);
  37.129 +extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);
  37.130  
  37.131  /* Waits for at most 'ms' milliseconds, and returns 0 if the condition
  37.132     variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
  37.133 @@ -151,12 +154,17 @@
  37.134     On some platforms this function is implemented by looping with a delay
  37.135     of 1 ms, and so should be avoided if possible.
  37.136  */
  37.137 -extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms);
  37.138 +extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
  37.139 +                                                SDL_mutex * mutex, Uint32 ms);
  37.140  
  37.141  /* Ends C function definitions when using C++ */
  37.142  #ifdef __cplusplus
  37.143 +/* *INDENT-OFF* */
  37.144  }
  37.145 +/* *INDENT-ON* */
  37.146  #endif
  37.147  #include "close_code.h"
  37.148  
  37.149  #endif /* _SDL_mutex_h */
  37.150 +
  37.151 +/* vi: set ts=4 sw=4 expandtab: */
    38.1 --- a/include/SDL_opengl.h	Thu Jul 06 18:01:37 2006 +0000
    38.2 +++ b/include/SDL_opengl.h	Mon Jul 10 21:04:37 2006 +0000
    38.3 @@ -27,33 +27,35 @@
    38.4  #ifdef __WIN32__
    38.5  #define WIN32_LEAN_AND_MEAN
    38.6  #ifndef NOMINMAX
    38.7 -#define NOMINMAX	/* Don't defined min() and max() */
    38.8 +#define NOMINMAX                /* Don't defined min() and max() */
    38.9  #endif
   38.10  #include <windows.h>
   38.11  #endif
   38.12  #ifndef NO_SDL_GLEXT
   38.13 -#define __glext_h_  /* Don't let gl.h include glext.h */
   38.14 +#define __glext_h_              /* Don't let gl.h include glext.h */
   38.15  #endif
   38.16  #if defined(__MACOSX__)
   38.17 -#include <OpenGL/gl.h>	/* Header File For The OpenGL Library */
   38.18 -#include <OpenGL/glu.h>	/* Header File For The GLU Library */
   38.19 +#include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
   38.20 +#include <OpenGL/glu.h>         /* Header File For The GLU Library */
   38.21  #elif defined(__MACOS__)
   38.22 -#include <gl.h>		/* Header File For The OpenGL Library */
   38.23 -#include <glu.h>	/* Header File For The GLU Library */
   38.24 +#include <gl.h>                 /* Header File For The OpenGL Library */
   38.25 +#include <glu.h>                /* Header File For The GLU Library */
   38.26  #else
   38.27 -#include <GL/gl.h>	/* Header File For The OpenGL Library */
   38.28 -#include <GL/glu.h>	/* Header File For The GLU Library */
   38.29 +#include <GL/gl.h>              /* Header File For The OpenGL Library */
   38.30 +#include <GL/glu.h>             /* Header File For The GLU Library */
   38.31  #endif
   38.32  #ifndef NO_SDL_GLEXT
   38.33  #undef __glext_h_
   38.34  #endif
   38.35  
   38.36 -/* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials.
   38.37 -   It is included here because glext.h is not available on some systems.
   38.38 +/* This file is included because glext.h is not available on some systems.
   38.39     If you don't want this version included, simply define "NO_SDL_GLEXT"
   38.40 +   The latest version is available from:
   38.41 +	http://oss.sgi.com/projects/ogl-sample/registry/
   38.42   */
   38.43 -#ifndef NO_SDL_GLEXT
   38.44 -#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
   38.45 +#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
   38.46 +/* *INDENT-OFF* */
   38.47 +#ifndef __glext_h_
   38.48  #define __glext_h_
   38.49  
   38.50  #ifdef __cplusplus
   38.51 @@ -6548,4 +6550,5 @@
   38.52  #endif
   38.53  
   38.54  #endif
   38.55 +/* *INDENT-ON* */
   38.56  #endif /* NO_SDL_GLEXT */
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/include/SDL_pixels.h	Mon Jul 10 21:04:37 2006 +0000
    39.3 @@ -0,0 +1,348 @@
    39.4 +/*
    39.5 +    SDL - Simple DirectMedia Layer
    39.6 +    Copyright (C) 1997-2006 Sam Lantinga
    39.7 +
    39.8 +    This library is free software; you can redistribute it and/or
    39.9 +    modify it under the terms of the GNU Lesser General Public
   39.10 +    License as published by the Free Software Foundation; either
   39.11 +    version 2.1 of the License, or (at your option) any later version.
   39.12 +
   39.13 +    This library is distributed in the hope that it will be useful,
   39.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   39.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   39.16 +    Lesser General Public License for more details.
   39.17 +
   39.18 +    You should have received a copy of the GNU Lesser General Public
   39.19 +    License along with this library; if not, write to the Free Software
   39.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   39.21 +
   39.22 +    Sam Lantinga
   39.23 +    slouken@libsdl.org
   39.24 +*/
   39.25 +
   39.26 +/**
   39.27 + * \file SDL_pixels.h
   39.28 + *
   39.29 + * Header for the enumerated pixel format definitions
   39.30 + */
   39.31 +
   39.32 +#ifndef _SDL_pixels_h
   39.33 +#define _SDL_pixels_h
   39.34 +
   39.35 +#include "begin_code.h"
   39.36 +/* Set up for C function definitions, even when using C++ */
   39.37 +#ifdef __cplusplus
   39.38 +/* *INDENT-OFF* */
   39.39 +extern "C" {
   39.40 +/* *INDENT-ON* */
   39.41 +#endif
   39.42 +
   39.43 +enum
   39.44 +{                               /* Pixel type */
   39.45 +    SDL_PixelType_Unknown,
   39.46 +    SDL_PixelType_Index1,
   39.47 +    SDL_PixelType_Index4,
   39.48 +    SDL_PixelType_Index8,
   39.49 +    SDL_PixelType_Packed8,
   39.50 +    SDL_PixelType_Packed16,
   39.51 +    SDL_PixelType_Packed32,
   39.52 +    SDL_PixelType_ArrayU8,
   39.53 +    SDL_PixelType_ArrayU16,
   39.54 +    SDL_PixelType_ArrayU32,
   39.55 +    SDL_PixelType_ArrayF16,
   39.56 +    SDL_PixelType_ArrayF32,
   39.57 +};
   39.58 +
   39.59 +enum
   39.60 +{                               /* bitmap pixel order, high bit -> low bit */
   39.61 +    SDL_BitmapOrder_None,
   39.62 +    SDL_BitmapOrder_4321,
   39.63 +    SDL_BitmapOrder_1234,
   39.64 +};
   39.65 +enum
   39.66 +{                               /* packed component order, high bit -> low bit */
   39.67 +    SDL_PackedOrder_None,
   39.68 +    SDL_PackedOrder_XRGB,
   39.69 +    SDL_PackedOrder_RGBX,
   39.70 +    SDL_PackedOrder_ARGB,
   39.71 +    SDL_PackedOrder_RGBA,
   39.72 +    SDL_PackedOrder_XBGR,
   39.73 +    SDL_PackedOrder_BGRX,
   39.74 +    SDL_PackedOrder_ABGR,
   39.75 +    SDL_PackedOrder_BGRA,
   39.76 +};
   39.77 +enum
   39.78 +{                               /* array component order, low byte -> high byte */
   39.79 +    SDL_ArrayOrder_None,
   39.80 +    SDL_ArrayOrder_RGB,
   39.81 +    SDL_ArrayOrder_RGBA,
   39.82 +    SDL_ArrayOrder_ARGB,
   39.83 +    SDL_ArrayOrder_BGR,
   39.84 +    SDL_ArrayOrder_BGRA,
   39.85 +    SDL_ArrayOrder_ABGR,
   39.86 +};
   39.87 +
   39.88 +enum
   39.89 +{                               /* Packed component layout */
   39.90 +    SDL_PackedLayout_None,
   39.91 +    SDL_PackedLayout_332,
   39.92 +    SDL_PackedLayout_4444,
   39.93 +    SDL_PackedLayout_1555,
   39.94 +    SDL_PackedLayout_5551,
   39.95 +    SDL_PackedLayout_565,
   39.96 +    SDL_PackedLayout_8888,
   39.97 +    SDL_PackedLayout_2101010,
   39.98 +    SDL_PackedLayout_1010102,
   39.99 +};
  39.100 +
  39.101 +#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) \
  39.102 +    ((A) | ((B) << 8) | ((C) << 16) | ((D) << 24))
  39.103 +
  39.104 +#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
  39.105 +    ((1 << 31) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
  39.106 +     ((bits) << 8) | ((bytes) << 0))
  39.107 +
  39.108 +#define SDL_PIXELTYPE(X)	(((X) >> 24) & 0x0F)
  39.109 +#define SDL_PIXELORDER(X)	(((X) >> 20) & 0x0F)
  39.110 +#define SDL_PIXELLAYOUT(X)	(((X) >> 16) & 0x0F)
  39.111 +#define SDL_BITSPERPIXEL(X)	(((X) >> 8) & 0xFF)
  39.112 +#define SDL_BYTESPERPIXEL(X)	(((X) >> 0) & 0xFF)
  39.113 +
  39.114 +#define SDL_ISPIXELFORMAT_INDEXED(format)   \
  39.115 +    ((SDL_PIXELTYPE(format) == SDL_PixelType_Index1) || \
  39.116 +     (SDL_PIXELTYPE(format) == SDL_PixelType_Index4) || \
  39.117 +     (SDL_PIXELTYPE(format) == SDL_PixelType_Index8))
  39.118 +
  39.119 +#define SDL_ISPIXELFORMAT_FOURCC(format)    \
  39.120 +    ((format) && !((format) & 0x80000000))
  39.121 +
  39.122 +enum
  39.123 +{
  39.124 +    SDL_PixelFormat_Unknown,
  39.125 +    SDL_PixelFormat_Index1LSB =
  39.126 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_1234, 0,
  39.127 +                               1, 0),
  39.128 +    SDL_PixelFormat_Index1MSB =
  39.129 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_4321, 0,
  39.130 +                               1, 0),
  39.131 +    SDL_PixelFormat_Index4LSB =
  39.132 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_1234, 0,
  39.133 +                               2, 0),
  39.134 +    SDL_PixelFormat_Index4MSB =
  39.135 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_4321, 0,
  39.136 +                               2, 0),
  39.137 +    SDL_PixelFormat_Index8 =
  39.138 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index8, 0, 0, 8, 1),
  39.139 +    SDL_PixelFormat_RGB332 =
  39.140 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed8, SDL_PackedOrder_XRGB,
  39.141 +                               SDL_PackedLayout_332, 8, 1),
  39.142 +    SDL_PixelFormat_RGB444 =
  39.143 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
  39.144 +                               SDL_PackedLayout_4444, 12, 2),
  39.145 +    SDL_PixelFormat_RGB555 =
  39.146 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
  39.147 +                               SDL_PackedLayout_1555, 15, 2),
  39.148 +    SDL_PixelFormat_ARGB4444 =
  39.149 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
  39.150 +                               SDL_PackedLayout_4444, 16, 2),
  39.151 +    SDL_PixelFormat_ARGB1555 =
  39.152 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
  39.153 +                               SDL_PackedLayout_1555, 16, 2),
  39.154 +    SDL_PixelFormat_RGB565 =
  39.155 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
  39.156 +                               SDL_PackedLayout_565, 16, 2),
  39.157 +    SDL_PixelFormat_RGB24 =
  39.158 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_RGB, 0,
  39.159 +                               24, 3),
  39.160 +    SDL_PixelFormat_BGR24 =
  39.161 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_BGR, 0,
  39.162 +                               24, 3),
  39.163 +    SDL_PixelFormat_RGB888 =
  39.164 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XRGB,
  39.165 +                               SDL_PackedLayout_8888, 24, 4),
  39.166 +    SDL_PixelFormat_BGR888 =
  39.167 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XBGR,
  39.168 +                               SDL_PackedLayout_8888, 24, 4),
  39.169 +    SDL_PixelFormat_ARGB8888 =
  39.170 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
  39.171 +                               SDL_PackedLayout_8888, 32, 4),
  39.172 +    SDL_PixelFormat_RGBA8888 =
  39.173 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_RGBA,
  39.174 +                               SDL_PackedLayout_8888, 32, 4),
  39.175 +    SDL_PixelFormat_ABGR8888 =
  39.176 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ABGR,
  39.177 +                               SDL_PackedLayout_8888, 32, 4),
  39.178 +    SDL_PixelFormat_BGRA8888 =
  39.179 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
  39.180 +                               SDL_PackedLayout_8888, 32, 4),
  39.181 +    SDL_PixelFormat_ARGB2101010 =
  39.182 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
  39.183 +                               SDL_PackedLayout_2101010, 32, 4),
  39.184 +
  39.185 +    SDL_PixelFormat_YV12 =      /* Planar mode: Y + V + U  (3 planes) */
  39.186 +        SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
  39.187 +    SDL_PixelFormat_IYUV =      /* Planar mode: Y + U + V  (3 planes) */
  39.188 +        SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
  39.189 +    SDL_PixelFormat_YUY2 =      /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
  39.190 +        SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
  39.191 +    SDL_PixelFormat_UYVY =      /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
  39.192 +        SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
  39.193 +    SDL_PixelFormat_YVYU =      /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
  39.194 +        SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
  39.195 +};
  39.196 +
  39.197 +typedef struct SDL_Color
  39.198 +{
  39.199 +    Uint8 r;
  39.200 +    Uint8 g;
  39.201 +    Uint8 b;
  39.202 +    Uint8 unused;
  39.203 +} SDL_Color;
  39.204 +#define SDL_Colour SDL_Color
  39.205 +
  39.206 +typedef struct SDL_Palette SDL_Palette;
  39.207 +typedef int (*SDL_PaletteChangedFunc) (void *userdata, SDL_Palette * palette);
  39.208 +
  39.209 +typedef struct SDL_PaletteWatch
  39.210 +{
  39.211 +    SDL_PaletteChangedFunc callback;
  39.212 +    void *userdata;
  39.213 +    struct SDL_PaletteWatch *next;
  39.214 +} SDL_PaletteWatch;
  39.215 +
  39.216 +struct SDL_Palette
  39.217 +{
  39.218 +    int ncolors;
  39.219 +    SDL_Color *colors;
  39.220 +
  39.221 +    int refcount;
  39.222 +    SDL_PaletteWatch *watch;
  39.223 +};
  39.224 +
  39.225 +/* Everything in the pixel format structure is read-only */
  39.226 +typedef struct SDL_PixelFormat
  39.227 +{
  39.228 +    SDL_Palette *palette;
  39.229 +    Uint8 BitsPerPixel;
  39.230 +    Uint8 BytesPerPixel;
  39.231 +    Uint8 Rloss;
  39.232 +    Uint8 Gloss;
  39.233 +    Uint8 Bloss;
  39.234 +    Uint8 Aloss;
  39.235 +    Uint8 Rshift;
  39.236 +    Uint8 Gshift;
  39.237 +    Uint8 Bshift;
  39.238 +    Uint8 Ashift;
  39.239 +    Uint32 Rmask;
  39.240 +    Uint32 Gmask;
  39.241 +    Uint32 Bmask;
  39.242 +    Uint32 Amask;
  39.243 +
  39.244 +    /* RGB color key information */
  39.245 +    Uint32 colorkey;
  39.246 +    /* Alpha value information (per-surface alpha) */
  39.247 +    Uint8 alpha;
  39.248 +} SDL_PixelFormat;
  39.249 +
  39.250 +/**
  39.251 + * \fn SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask, Uint32 * Gmask, Uint32 * Bmask, Uint32 * Amask)
  39.252 + *
  39.253 + * \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
  39.254 + *
  39.255 + * \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
  39.256 + *
  39.257 + * \sa SDL_MasksToPixelFormatEnum()
  39.258 + */
  39.259 +extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
  39.260 +                                                            int *bpp,
  39.261 +                                                            Uint32 * Rmask,
  39.262 +                                                            Uint32 * Gmask,
  39.263 +                                                            Uint32 * Bmask,
  39.264 +                                                            Uint32 * Amask);
  39.265 +
  39.266 +/**
  39.267 + * \fn Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
  39.268 + *
  39.269 + * \brief Convert a bpp and RGBA masks to an enumerated pixel format.
  39.270 + *
  39.271 + * \return The pixel format, or SDL_PixelFormat_Unknown if the conversion wasn't possible.
  39.272 + *
  39.273 + * \sa SDL_PixelFormatEnumToMasks()
  39.274 + */
  39.275 +extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
  39.276 +                                                          Uint32 Rmask,
  39.277 +                                                          Uint32 Gmask,
  39.278 +                                                          Uint32 Bmask,
  39.279 +                                                          Uint32 Amask);
  39.280 +
  39.281 +/**
  39.282 + * \fn SDL_Palette *SDL_AllocPalette(int ncolors)
  39.283 + *
  39.284 + * \brief Create a palette structure with the specified number of color entries.
  39.285 + *
  39.286 + * \return A new palette, or NULL if there wasn't enough memory
  39.287 + *
  39.288 + * \note The palette entries are initialized to white.
  39.289 + *
  39.290 + * \sa SDL_FreePalette()
  39.291 + */
  39.292 +extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
  39.293 +
  39.294 +/**
  39.295 + * \fn int SDL_AddPaletteWatch(SDL_Palette *palette, SDL_PaletteChangedFunc callback, void *userdata)
  39.296 + *
  39.297 + * \brief Add a callback function which is called when the palette changes.
  39.298 + *
  39.299 + * \sa SDL_DelPaletteWatch()
  39.300 + */
  39.301 +extern DECLSPEC int SDLCALL SDL_AddPaletteWatch(SDL_Palette * palette,
  39.302 +                                                SDL_PaletteChangedFunc
  39.303 +                                                callback, void *userdata);
  39.304 +
  39.305 +/**
  39.306 + * \fn void SDL_DelPaletteWatch(SDL_Palette *palette, SDL_PaletteChangedFunc callback, void *userdata)
  39.307 + *
  39.308 + * \brief Remove a callback function previously added with SDL_AddPaletteWatch()
  39.309 + *
  39.310 + * \sa SDL_AddPaletteWatch()
  39.311 + */
  39.312 +extern DECLSPEC void SDLCALL SDL_DelPaletteWatch(SDL_Palette * palette,
  39.313 +                                                 SDL_PaletteChangedFunc
  39.314 +                                                 callback, void *userdata);
  39.315 +
  39.316 +/**
  39.317 + * \fn int SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Colors *colors, int firstcolor, int numcolors)
  39.318 + *
  39.319 + * \brief Set a range of colors in a palette.
  39.320 + *
  39.321 + * \param palette The palette to modify
  39.322 + * \param colors An array of colors to copy into the palette
  39.323 + * \param firstcolor The index of the first palette entry to modify
  39.324 + * \param ncolors The number of entries to modify
  39.325 + *
  39.326 + * \return 0 on success, or -1 if not all of the colors could be set
  39.327 + */
  39.328 +extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
  39.329 +                                                 const SDL_Color * colors,
  39.330 +                                                 int firstcolor, int ncolors);
  39.331 +
  39.332 +/**
  39.333 + * \fn void SDL_FreePalette(SDL_Palette *palette)
  39.334 + *
  39.335 + * \brief Free a palette created with SDL_AllocPalette()
  39.336 + *
  39.337 + * \sa SDL_AllocPalette()
  39.338 + */
  39.339 +extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
  39.340 +
  39.341 +/* Ends C function definitions when using C++ */
  39.342 +#ifdef __cplusplus
  39.343 +/* *INDENT-OFF* */
  39.344 +}
  39.345 +/* *INDENT-ON* */
  39.346 +#endif
  39.347 +#include "close_code.h"
  39.348 +
  39.349 +#endif /* _SDL_pixels_h */
  39.350 +
  39.351 +/* vi: set ts=4 sw=4 expandtab: */
    40.1 --- a/include/SDL_quit.h	Thu Jul 06 18:01:37 2006 +0000
    40.2 +++ b/include/SDL_quit.h	Mon Jul 10 21:04:37 2006 +0000
    40.3 @@ -20,7 +20,11 @@
    40.4      slouken@libsdl.org
    40.5  */
    40.6  
    40.7 -/* Include file for SDL quit event handling */
    40.8 +/**
    40.9 + * \file SDL_quit.h
   40.10 + *
   40.11 + * Include file for SDL quit event handling
   40.12 + */
   40.13  
   40.14  #ifndef _SDL_quit_h
   40.15  #define _SDL_quit_h
    41.1 --- a/include/SDL_rwops.h	Thu Jul 06 18:01:37 2006 +0000
    41.2 +++ b/include/SDL_rwops.h	Mon Jul 10 21:04:37 2006 +0000
    41.3 @@ -20,9 +20,12 @@
    41.4      slouken@libsdl.org
    41.5  */
    41.6  
    41.7 -/* This file provides a general interface for SDL to read and write
    41.8 -   data sources.  It can easily be extended to files, memory, etc.
    41.9 -*/
   41.10 +/**
   41.11 + * \file SDL_rwops.h
   41.12 + *
   41.13 + * This file provides a general interface for SDL to read and write
   41.14 + * data sources.  It can easily be extended to files, memory, etc.
   41.15 + */
   41.16  
   41.17  #ifndef _SDL_rwops_h
   41.18  #define _SDL_rwops_h
   41.19 @@ -33,77 +36,89 @@
   41.20  #include "begin_code.h"
   41.21  /* Set up for C function definitions, even when using C++ */
   41.22  #ifdef __cplusplus
   41.23 +/* *INDENT-OFF* */
   41.24  extern "C" {
   41.25 +/* *INDENT-ON* */
   41.26  #endif
   41.27  
   41.28  /* This is the read/write operation structure -- very basic */
   41.29  
   41.30 -typedef struct SDL_RWops {
   41.31 -	/* Seek to 'offset' relative to whence, one of stdio's whence values:
   41.32 -		SEEK_SET, SEEK_CUR, SEEK_END
   41.33 -	   Returns the final offset in the data source.
   41.34 -	 */
   41.35 -	int (SDLCALL *seek)(struct SDL_RWops *context, int offset, int whence);
   41.36 +typedef struct SDL_RWops
   41.37 +{
   41.38 +    /* Seek to 'offset' relative to whence, one of stdio's whence values:
   41.39 +       SEEK_SET, SEEK_CUR, SEEK_END
   41.40 +       Returns the final offset in the data source.
   41.41 +     */
   41.42 +    int (SDLCALL * seek) (struct SDL_RWops * context, int offset, int whence);
   41.43  
   41.44 -	/* Read up to 'num' objects each of size 'objsize' from the data
   41.45 -	   source to the area pointed at by 'ptr'.
   41.46 -	   Returns the number of objects read, or -1 if the read failed.
   41.47 -	 */
   41.48 -	int (SDLCALL *read)(struct SDL_RWops *context, void *ptr, int size, int maxnum);
   41.49 +    /* Read up to 'num' objects each of size 'objsize' from the data
   41.50 +       source to the area pointed at by 'ptr'.
   41.51 +       Returns the number of objects read, or -1 if the read failed.
   41.52 +     */
   41.53 +    int (SDLCALL * read) (struct SDL_RWops * context, void *ptr, int size,
   41.54 +                          int maxnum);
   41.55  
   41.56 -	/* Write exactly 'num' objects each of size 'objsize' from the area
   41.57 -	   pointed at by 'ptr' to data source.
   41.58 -	   Returns 'num', or -1 if the write failed.
   41.59 -	 */
   41.60 -	int (SDLCALL *write)(struct SDL_RWops *context, const void *ptr, int size, int num);
   41.61 +    /* Write exactly 'num' objects each of size 'objsize' from the area
   41.62 +       pointed at by 'ptr' to data source.
   41.63 +       Returns 'num', or -1 if the write failed.
   41.64 +     */
   41.65 +    int (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
   41.66 +                           int size, int num);
   41.67  
   41.68 -	/* Close and free an allocated SDL_FSops structure */
   41.69 -	int (SDLCALL *close)(struct SDL_RWops *context);
   41.70 +    /* Close and free an allocated SDL_FSops structure */
   41.71 +    int (SDLCALL * close) (struct SDL_RWops * context);
   41.72  
   41.73 -	Uint32 type;
   41.74 -	union {
   41.75 +    Uint32 type;
   41.76 +    union
   41.77 +    {
   41.78  #ifdef __WIN32__
   41.79 -	    struct {
   41.80 -		int    append;
   41.81 -		void*  h;
   41.82 -	    } win32io;
   41.83 +        struct
   41.84 +        {
   41.85 +            int append;
   41.86 +            void *h;
   41.87 +        } win32io;
   41.88  #endif
   41.89 -#ifdef HAVE_STDIO_H 
   41.90 -	    struct {
   41.91 -		int autoclose;
   41.92 -	 	FILE *fp;
   41.93 -	    } stdio;
   41.94 +#ifdef HAVE_STDIO_H
   41.95 +        struct
   41.96 +        {
   41.97 +            int autoclose;
   41.98 +            FILE *fp;
   41.99 +        } stdio;
  41.100  #endif
  41.101 -	    struct {
  41.102 -		Uint8 *base;
  41.103 -	 	Uint8 *here;
  41.104 -		Uint8 *stop;
  41.105 -	    } mem;
  41.106 -	    struct {
  41.107 -		void *data1;
  41.108 -	    } unknown;
  41.109 -	} hidden;
  41.110 +        struct
  41.111 +        {
  41.112 +            Uint8 *base;
  41.113 +            Uint8 *here;
  41.114 +            Uint8 *stop;
  41.115 +        } mem;
  41.116 +        struct
  41.117 +        {
  41.118 +            void *data1;
  41.119 +        } unknown;
  41.120 +    } hidden;
  41.121  
  41.122  } SDL_RWops;
  41.123  
  41.124  
  41.125  /* Functions to create SDL_RWops structures from various data sources */
  41.126  
  41.127 -extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFile(const char *file, const char *mode);
  41.128 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
  41.129 +                                                  const char *mode);
  41.130  
  41.131  #ifdef HAVE_STDIO_H
  41.132 -extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFP(FILE *fp, int autoclose);
  41.133 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, int autoclose);
  41.134  #endif
  41.135  
  41.136 -extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromMem(void *mem, int size);
  41.137 -extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromConstMem(const void *mem, int size);
  41.138 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
  41.139 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
  41.140 +                                                      int size);
  41.141  
  41.142 -extern DECLSPEC SDL_RWops * SDLCALL SDL_AllocRW(void);
  41.143 -extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops *area);
  41.144 +extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
  41.145 +extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
  41.146  
  41.147 -#define RW_SEEK_SET	0	/* Seek from the beginning of data */
  41.148 -#define RW_SEEK_CUR	1	/* Seek relative to current read point */
  41.149 -#define RW_SEEK_END	2	/* Seek relative to the end of data */
  41.150 +#define RW_SEEK_SET	0       /* Seek from the beginning of data */
  41.151 +#define RW_SEEK_CUR	1       /* Seek relative to current read point */
  41.152 +#define RW_SEEK_END	2       /* Seek relative to the end of data */
  41.153  
  41.154  /* Macros to easily read and write from an SDL_RWops structure */
  41.155  #define SDL_RWseek(ctx, offset, whence)	(ctx)->seek(ctx, offset, whence)
  41.156 @@ -114,26 +129,30 @@
  41.157  
  41.158  
  41.159  /* Read an item of the specified endianness and return in native format */
  41.160 -extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src);
  41.161 -extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src);
  41.162 -extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src);
  41.163 -extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src);
  41.164 -extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src);
  41.165 -extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src);
  41.166 +extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
  41.167 +extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
  41.168 +extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
  41.169 +extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
  41.170 +extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
  41.171 +extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
  41.172  
  41.173  /* Write an item of native format to the specified endianness */
  41.174 -extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value);
  41.175 -extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value);
  41.176 -extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value);
  41.177 -extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value);
  41.178 -extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value);
  41.179 -extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value);
  41.180 +extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
  41.181 +extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
  41.182 +extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
  41.183 +extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
  41.184 +extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
  41.185 +extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
  41.186  
  41.187  
  41.188  /* Ends C function definitions when using C++ */
  41.189  #ifdef __cplusplus
  41.190 +/* *INDENT-OFF* */
  41.191  }
  41.192 +/* *INDENT-ON* */
  41.193  #endif
  41.194  #include "close_code.h"
  41.195  
  41.196  #endif /* _SDL_rwops_h */
  41.197 +
  41.198 +/* vi: set ts=4 sw=4 expandtab: */
    42.1 --- a/include/SDL_stdinc.h	Thu Jul 06 18:01:37 2006 +0000
    42.2 +++ b/include/SDL_stdinc.h	Mon Jul 10 21:04:37 2006 +0000
    42.3 @@ -20,7 +20,11 @@
    42.4      slouken@libsdl.org
    42.5  */
    42.6  
    42.7 -/* This is a general header that includes C language support */
    42.8 +/**
    42.9 + * \file SDL_stdinc.h
   42.10 + *
   42.11 + * This is a general header that includes C language support
   42.12 + */
   42.13  
   42.14  #ifndef _SDL_stdinc_h
   42.15  #define _SDL_stdinc_h
   42.16 @@ -77,33 +81,66 @@
   42.17  #define SDL_TABLESIZE(table)	SDL_arraysize(table)
   42.18  
   42.19  /* Basic data types */
   42.20 -typedef enum SDL_bool {
   42.21 -	SDL_FALSE = 0,
   42.22 -	SDL_TRUE  = 1
   42.23 +typedef enum SDL_bool
   42.24 +{
   42.25 +    SDL_FALSE = 0,
   42.26 +    SDL_TRUE = 1
   42.27  } SDL_bool;
   42.28  
   42.29 -typedef int8_t		Sint8;
   42.30 -typedef uint8_t		Uint8;
   42.31 -typedef int16_t		Sint16;
   42.32 -typedef uint16_t	Uint16;
   42.33 -typedef int32_t		Sint32;
   42.34 -typedef uint32_t	Uint32;
   42.35 +/**
   42.36 + * \typedef Sint8
   42.37 + * \brief A signed 8-bit integer type.
   42.38 + */
   42.39 +typedef int8_t Sint8;
   42.40 +/**
   42.41 + * \typedef Uint8
   42.42 + * \brief An unsigned 8-bit integer type.
   42.43 + */
   42.44 +typedef uint8_t Uint8;
   42.45 +/**
   42.46 + * \typedef Sint16
   42.47 + * \brief A signed 16-bit integer type.
   42.48 + */
   42.49 +typedef int16_t Sint16;
   42.50 +/**
   42.51 + * \typedef Uint16
   42.52 + * \brief An unsigned 16-bit integer type.
   42.53 + */
   42.54 +typedef uint16_t Uint16;
   42.55 +/**
   42.56 + * \typedef Sint32
   42.57 + * \brief A signed 32-bit integer type.
   42.58 + */
   42.59 +typedef int32_t Sint32;
   42.60 +/**
   42.61 + * \typedef Uint32
   42.62 + * \brief An unsigned 32-bit integer type.
   42.63 + */
   42.64 +typedef uint32_t Uint32;
   42.65  
   42.66  #ifdef SDL_HAS_64BIT_TYPE
   42.67 -typedef int64_t		Sint64;
   42.68 -typedef uint64_t	Uint64;
   42.69 +/**
   42.70 + * \typedef Sint64
   42.71 + * \brief A signed 64-bit integer type.
   42.72 + * \warning On platforms without any sort of 64-bit datatype, this is equivalent to Sint32!
   42.73 + */
   42.74 +typedef int64_t Sint64;
   42.75 +/**
   42.76 + * \typedef Uint64
   42.77 + * \brief An unsigned 64-bit integer type.
   42.78 + * \warning On platforms without any sort of 64-bit datatype, this is equivalent to Uint32!
   42.79 + */
   42.80 +typedef uint64_t Uint64;
   42.81  #else
   42.82  /* This is really just a hack to prevent the compiler from complaining */
   42.83 -typedef struct {
   42.84 -	Uint32 hi;
   42.85 -	Uint32 lo;
   42.86 -} Uint64, Sint64;
   42.87 +typdef Sint32 Sint64;
   42.88 +typdef Uint32 Uint32;
   42.89  #endif
   42.90  
   42.91  /* Make sure the types really have the right sizes */
   42.92  #define SDL_COMPILE_TIME_ASSERT(name, x)               \
   42.93         typedef int SDL_dummy_ ## name[(x) * 2 - 1]
   42.94 -
   42.95 +#ifndef DOXYGEN_SHOULD_IGNORE_THIS
   42.96  SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
   42.97  SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
   42.98  SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
   42.99 @@ -112,6 +149,7 @@
  42.100  SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
  42.101  SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
  42.102  SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
  42.103 +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
  42.104  
  42.105  /* Check to make sure enums are the size of ints, for structure packing.
  42.106     For both Watcom C/C++ and Borland C/C++ the compiler option that makes
  42.107 @@ -123,35 +161,39 @@
  42.108  #pragma enumsalwaysint on
  42.109  #endif
  42.110  
  42.111 -typedef enum {
  42.112 -	DUMMY_ENUM_VALUE
  42.113 +#ifndef DOXYGEN_SHOULD_IGNORE_THIS
  42.114 +typedef enum
  42.115 +{
  42.116 +    DUMMY_ENUM_VALUE
  42.117  } SDL_DUMMY_ENUM;
  42.118  
  42.119  SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
  42.120 -
  42.121 +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
  42.122  
  42.123  #include "begin_code.h"
  42.124  /* Set up for C function definitions, even when using C++ */
  42.125  #ifdef __cplusplus
  42.126 +/* *INDENT-OFF* */
  42.127  extern "C" {
  42.128 +/* *INDENT-ON* */
  42.129  #endif
  42.130  
  42.131  #ifdef HAVE_MALLOC
  42.132  #define SDL_malloc	malloc
  42.133  #else
  42.134 -extern DECLSPEC void * SDLCALL SDL_malloc(size_t size);
  42.135 +extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
  42.136  #endif
  42.137  
  42.138  #ifdef HAVE_CALLOC
  42.139  #define SDL_calloc	calloc
  42.140  #else
  42.141 -extern DECLSPEC void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
  42.142 +extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
  42.143  #endif
  42.144  
  42.145  #ifdef HAVE_REALLOC
  42.146  #define SDL_realloc	realloc
  42.147  #else
  42.148 -extern DECLSPEC void * SDLCALL SDL_realloc(void *mem, size_t size);
  42.149 +extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
  42.150  #endif
  42.151  
  42.152  #ifdef HAVE_FREE
  42.153 @@ -173,11 +215,11 @@
  42.154  # elif defined(__DMC__)
  42.155  #  include <stdlib.h>
  42.156  # elif defined(__AIX__)
  42.157 -  #pragma alloca
  42.158 +#pragma alloca
  42.159  # elif defined(__MRC__)
  42.160 -   void *alloca (unsigned);
  42.161 +void *alloca(unsigned);
  42.162  # else
  42.163 -   char *alloca ();
  42.164 +char *alloca();
  42.165  # endif
  42.166  #endif
  42.167  #ifdef HAVE_ALLOCA
  42.168 @@ -191,7 +233,7 @@
  42.169  #ifdef HAVE_GETENV
  42.170  #define SDL_getenv	getenv
  42.171  #else
  42.172 -extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
  42.173 +extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
  42.174  #endif
  42.175  
  42.176  #ifdef HAVE_PUTENV
  42.177 @@ -204,7 +246,8 @@
  42.178  #define SDL_qsort	qsort
  42.179  #else
  42.180  extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
  42.181 -           int (*compare)(const void *, const void *));
  42.182 +                                       int (*compare) (const void *,
  42.183 +                                                       const void *));
  42.184  #endif
  42.185  
  42.186  #ifdef HAVE_ABS
  42.187 @@ -231,8 +274,10 @@
  42.188  #ifdef HAVE_MEMSET
  42.189  #define SDL_memset      memset
  42.190  #else
  42.191 -extern DECLSPEC void * SDLCALL SDL_memset(void *dst, int c, size_t len);
  42.192 +extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
  42.193  #endif
  42.194 +#define SDL_zero(x)	SDL_memset(&(x), 0, sizeof((x)))
  42.195 +#define SDL_zerop(x)	SDL_memset((x), 0, sizeof(*(x)))
  42.196  
  42.197  #if defined(__GNUC__) && defined(i386)
  42.198  #define SDL_memset4(dst, val, len)				\
  42.199 @@ -288,7 +333,8 @@
  42.200  #elif defined(HAVE_BCOPY)
  42.201  #define SDL_memcpy(d, s, n)	bcopy((s), (d), (n))
  42.202  #else
  42.203 -extern DECLSPEC void * SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
  42.204 +extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src,
  42.205 +                                         size_t len);
  42.206  #endif
  42.207  #endif
  42.208  
  42.209 @@ -335,7 +381,8 @@
  42.210  } while(0)
  42.211  #endif
  42.212  #ifndef SDL_revcpy
  42.213 -extern DECLSPEC void * SDLCALL SDL_revcpy(void *dst, const void *src, size_t len);
  42.214 +extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src,
  42.215 +                                         size_t len);
  42.216  #endif
  42.217  
  42.218  #ifdef HAVE_MEMMOVE
  42.219 @@ -356,7 +403,8 @@
  42.220  #ifdef HAVE_MEMCMP
  42.221  #define SDL_memcmp      memcmp
  42.222  #else
  42.223 -extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
  42.224 +extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2,
  42.225 +                                       size_t len);
  42.226  #endif
  42.227  
  42.228  #ifdef HAVE_STRLEN
  42.229 @@ -368,37 +416,39 @@
  42.230  #ifdef HAVE_STRLCPY
  42.231  #define SDL_strlcpy     strlcpy
  42.232  #else
  42.233 -extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
  42.234 +extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src,
  42.235 +                                           size_t maxlen);
  42.236  #endif
  42.237  
  42.238  #ifdef HAVE_STRLCAT
  42.239  #define SDL_strlcat    strlcat
  42.240  #else
  42.241 -extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
  42.242 +extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src,
  42.243 +                                           size_t maxlen);
  42.244  #endif
  42.245  
  42.246  #ifdef HAVE_STRDUP
  42.247  #define SDL_strdup     strdup
  42.248  #else
  42.249 -extern DECLSPEC char * SDLCALL SDL_strdup(const char *string);
  42.250 +extern DECLSPEC char *SDLCALL SDL_strdup(const char *string);
  42.251  #endif
  42.252  
  42.253  #ifdef HAVE__STRREV
  42.254  #define SDL_strrev      _strrev
  42.255  #else
  42.256 -extern DECLSPEC char * SDLCALL SDL_strrev(char *string);
  42.257 +extern DECLSPEC char *SDLCALL SDL_strrev(char *string);
  42.258  #endif
  42.259  
  42.260  #ifdef HAVE__STRUPR
  42.261  #define SDL_strupr      _strupr
  42.262  #else
  42.263 -extern DECLSPEC char * SDLCALL SDL_strupr(char *string);
  42.264 +extern DECLSPEC char *SDLCALL SDL_strupr(char *string);
  42.265  #endif
  42.266  
  42.267  #ifdef HAVE__STRLWR
  42.268  #define SDL_strlwr      _strlwr
  42.269  #else
  42.270 -extern DECLSPEC char * SDLCALL SDL_strlwr(char *string);
  42.271 +extern DECLSPEC char *SDLCALL SDL_strlwr(char *string);
  42.272  #endif
  42.273  
  42.274  #ifdef HAVE_STRCHR
  42.275 @@ -406,7 +456,7 @@
  42.276  #elif defined(HAVE_INDEX)
  42.277  #define SDL_strchr      index
  42.278  #else
  42.279 -extern DECLSPEC char * SDLCALL SDL_strchr(const char *string, int c);
  42.280 +extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c);
  42.281  #endif
  42.282  
  42.283  #ifdef HAVE_STRRCHR
  42.284 @@ -414,13 +464,14 @@
  42.285  #elif defined(HAVE_RINDEX)
  42.286  #define SDL_strrchr     rindex
  42.287  #else
  42.288 -extern DECLSPEC char * SDLCALL SDL_strrchr(const char *string, int c);
  42.289 +extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c);
  42.290  #endif
  42.291  
  42.292  #ifdef HAVE_STRSTR
  42.293  #define SDL_strstr      strstr
  42.294  #else
  42.295 -extern DECLSPEC char * SDLCALL SDL_strstr(const char *haystack, const char *needle);
  42.296 +extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack,
  42.297 +                                         const char *needle);
  42.298  #endif
  42.299  
  42.300  #ifdef HAVE_ITOA
  42.301 @@ -432,7 +483,7 @@
  42.302  #ifdef HAVE__LTOA
  42.303  #define SDL_ltoa        _ltoa
  42.304  #else
  42.305 -extern DECLSPEC char * SDLCALL SDL_ltoa(long value, char *string, int radix);
  42.306 +extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix);
  42.307  #endif
  42.308  
  42.309  #ifdef HAVE__UITOA
  42.310 @@ -444,19 +495,22 @@
  42.311  #ifdef HAVE__ULTOA
  42.312  #define SDL_ultoa       _ultoa
  42.313  #else
  42.314 -extern DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *string, int radix);
  42.315 +extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string,
  42.316 +                                        int radix);
  42.317  #endif
  42.318  
  42.319  #ifdef HAVE_STRTOL
  42.320  #define SDL_strtol      strtol
  42.321  #else
  42.322 -extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, int base);
  42.323 +extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp,
  42.324 +                                        int base);
  42.325  #endif
  42.326  
  42.327  #ifdef HAVE_STRTOUL
  42.328  #define SDL_strtoul      strtoul
  42.329  #else
  42.330 -extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string, char **endp, int base);
  42.331 +extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string,
  42.332 +                                                  char **endp, int base);
  42.333  #endif
  42.334  
  42.335  #ifdef SDL_HAS_64BIT_TYPE
  42.336 @@ -464,25 +518,29 @@
  42.337  #ifdef HAVE__I64TOA
  42.338  #define SDL_lltoa       _i64toa
  42.339  #else
  42.340 -extern DECLSPEC char* SDLCALL SDL_lltoa(Sint64 value, char *string, int radix);
  42.341 +extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string,
  42.342 +                                        int radix);
  42.343  #endif
  42.344  
  42.345  #ifdef HAVE__UI64TOA
  42.346  #define SDL_ulltoa      _ui64toa
  42.347  #else
  42.348 -extern DECLSPEC char* SDLCALL SDL_ulltoa(Uint64 value, char *string, int radix);
  42.349 +extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string,
  42.350 +                                         int radix);
  42.351  #endif
  42.352  
  42.353  #ifdef HAVE_STRTOLL
  42.354  #define SDL_strtoll     strtoll
  42.355  #else
  42.356 -extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base);
  42.357 +extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp,
  42.358 +                                           int base);
  42.359  #endif
  42.360  
  42.361  #ifdef HAVE_STRTOULL
  42.362  #define SDL_strtoull     strtoull
  42.363  #else
  42.364 -extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, int base);
  42.365 +extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp,
  42.366 +                                            int base);
  42.367  #endif
  42.368  
  42.369  #endif /* SDL_HAS_64BIT_TYPE */
  42.370 @@ -514,7 +572,8 @@
  42.371  #ifdef HAVE_STRNCMP
  42.372  #define SDL_strncmp     strncmp
  42.373  #else
  42.374 -extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
  42.375 +extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2,
  42.376 +                                        size_t maxlen);
  42.377  #endif
  42.378  
  42.379  #ifdef HAVE_STRCASECMP
  42.380 @@ -522,7 +581,8 @@
  42.381  #elif defined(HAVE__STRICMP)
  42.382  #define SDL_strcasecmp  _stricmp
  42.383  #else
  42.384 -extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
  42.385 +extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1,
  42.386 +                                           const char *str2);
  42.387  #endif
  42.388  
  42.389  #ifdef HAVE_STRNCASECMP
  42.390 @@ -530,25 +590,29 @@
  42.391  #elif defined(HAVE__STRNICMP)
  42.392  #define SDL_strncasecmp _strnicmp
  42.393  #else
  42.394 -extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);
  42.395 +extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1,
  42.396 +                                            const char *str2, size_t maxlen);
  42.397  #endif
  42.398  
  42.399  #ifdef HAVE_SSCANF
  42.400  #define SDL_sscanf      sscanf
  42.401  #else
  42.402 -extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
  42.403 +extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt,
  42.404 +                                       ...);
  42.405  #endif
  42.406  
  42.407  #ifdef HAVE_SNPRINTF
  42.408  #define SDL_snprintf    snprintf
  42.409  #else
  42.410 -extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
  42.411 +extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen,
  42.412 +                                         const char *fmt, ...);
  42.413  #endif
  42.414  
  42.415  #ifdef HAVE_VSNPRINTF
  42.416  #define SDL_vsnprintf   vsnprintf
  42.417  #else
  42.418 -extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
  42.419 +extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen,
  42.420 +                                          const char *fmt, va_list ap);
  42.421  #endif
  42.422  
  42.423  /* The SDL implementation of iconv() returns these error codes */
  42.424 @@ -561,17 +625,25 @@
  42.425  #define SDL_iconv_t     iconv_t
  42.426  #define SDL_iconv_open  iconv_open
  42.427  #define SDL_iconv_close iconv_close
  42.428 -extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
  42.429 +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
  42.430 +                                         size_t * inbytesleft, char **outbuf,
  42.431 +                                         size_t * outbytesleft);
  42.432  #else
  42.433  typedef struct _SDL_iconv_t *SDL_iconv_t;
  42.434 -extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);
  42.435 +extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
  42.436 +                                                   const char *fromcode);
  42.437  extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
  42.438 -extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
  42.439 +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
  42.440 +                                         size_t * inbytesleft, char **outbuf,
  42.441 +                                         size_t * outbytesleft);
  42.442  #endif
  42.443  /* This function converts a string between encodings in one pass, returning a
  42.444     string that must be freed with SDL_free() or NULL on error.
  42.445  */
  42.446 -extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, char *inbuf, size_t inbytesleft);
  42.447 +extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
  42.448 +                                               const char *fromcode,
  42.449 +                                               char *inbuf,
  42.450 +                                               size_t inbytesleft);
  42.451  #define SDL_iconv_utf8_ascii(S)		SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)
  42.452  #define SDL_iconv_utf8_latin1(S)	SDL_iconv_string("LATIN1", "UTF-8", S, SDL_strlen(S)+1)
  42.453  #define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
  42.454 @@ -579,8 +651,12 @@
  42.455  
  42.456  /* Ends C function definitions when using C++ */
  42.457  #ifdef __cplusplus
  42.458 +/* *INDENT-OFF* */
  42.459  }
  42.460 +/* *INDENT-ON* */
  42.461  #endif
  42.462  #include "close_code.h"
  42.463  
  42.464  #endif /* _SDL_stdinc_h */
  42.465 +
  42.466 +/* vi: set ts=4 sw=4 expandtab: */
    43.1 --- a/include/SDL_syswm.h	Thu Jul 06 18:01:37 2006 +0000
    43.2 +++ b/include/SDL_syswm.h	Mon Jul 10 21:04:37 2006 +0000
    43.3 @@ -20,19 +20,26 @@
    43.4      slouken@libsdl.org
    43.5  */
    43.6  
    43.7 -/* Include file for SDL custom system window manager hooks */
    43.8 +/**
    43.9 + * \file SDL_syswm.h
   43.10 + *
   43.11 + * Include file for SDL custom system window manager hooks
   43.12 + */
   43.13  
   43.14  #ifndef _SDL_syswm_h
   43.15  #define _SDL_syswm_h
   43.16  
   43.17  #include "SDL_stdinc.h"
   43.18  #include "SDL_error.h"
   43.19 +#include "SDL_video.h"
   43.20  #include "SDL_version.h"
   43.21  
   43.22  #include "begin_code.h"
   43.23  /* Set up for C function definitions, even when using C++ */
   43.24  #ifdef __cplusplus
   43.25 +/* *INDENT-OFF* */
   43.26  extern "C" {
   43.27 +/* *INDENT-ON* */
   43.28  #endif
   43.29  
   43.30  /* Your application has access to a special type of event 'SDL_SYSWMEVENT',
   43.31 @@ -42,7 +49,6 @@
   43.32  */
   43.33  #ifdef SDL_PROTOTYPES_ONLY
   43.34  struct SDL_SysWMinfo;
   43.35 -typedef struct SDL_SysWMinfo SDL_SysWMinfo;
   43.36  #else
   43.37  
   43.38  /* This is the structure for custom window manager events */
   43.39 @@ -61,150 +67,179 @@
   43.40  #endif
   43.41  
   43.42  /* These are the various supported subsystems under UNIX */
   43.43 -typedef enum {
   43.44 -	SDL_SYSWM_X11
   43.45 +typedef enum
   43.46 +{
   43.47 +    SDL_SYSWM_X11
   43.48  } SDL_SYSWM_TYPE;
   43.49  
   43.50  /* The UNIX custom event structure */
   43.51 -struct SDL_SysWMmsg {
   43.52 -	SDL_version version;
   43.53 -	SDL_SYSWM_TYPE subsystem;
   43.54 -	union {
   43.55 -	    XEvent xevent;
   43.56 -	} event;
   43.57 +struct SDL_SysWMmsg
   43.58 +{
   43.59 +    SDL_version version;
   43.60 +    SDL_SYSWM_TYPE subsystem;
   43.61 +    union
   43.62 +    {
   43.63 +        XEvent xevent;
   43.64 +    } event;
   43.65  };
   43.66  
   43.67  /* The UNIX custom window manager information structure.
   43.68     When this structure is returned, it holds information about which
   43.69     low level system it is using, and will be one of SDL_SYSWM_TYPE.
   43.70   */
   43.71 -typedef struct SDL_SysWMinfo {
   43.72 -	SDL_version version;
   43.73 -	SDL_SYSWM_TYPE subsystem;
   43.74 -	union {
   43.75 -	    struct {
   43.76 -	    	Display *display;	/* The X11 display */
   43.77 -	    	Window window;		/* The X11 display window */
   43.78 -		/* These locking functions should be called around
   43.79 -                   any X11 functions using the display variable.
   43.80 -                   They lock the event thread, so should not be
   43.81 -		   called around event functions or from event filters.
   43.82 -		 */
   43.83 -		void (*lock_func)(void);
   43.84 -		void (*unlock_func)(void);
   43.85 +struct SDL_SysWMinfo
   43.86 +{
   43.87 +    SDL_version version;
   43.88 +    SDL_SYSWM_TYPE subsystem;
   43.89 +    union
   43.90 +    {
   43.91 +        struct
   43.92 +        {
   43.93 +            Display *display;   /* The X11 display */
   43.94 +            Window window;      /* The X11 display window */
   43.95 +            /* These locking functions should be called around
   43.96 +               any X11 functions using the display variable.
   43.97 +               They lock the event thread, so should not be
   43.98 +               called around event functions or from event filters.
   43.99 +             */
  43.100 +            void (*lock_func) (void);
  43.101 +            void (*unlock_func) (void);
  43.102  
  43.103 -		/* Introduced in SDL 1.0.2 */
  43.104 -	    	Window fswindow;	/* The X11 fullscreen window */
  43.105 -	    	Window wmwindow;	/* The X11 managed input window */
  43.106 -	    } x11;
  43.107 -	} info;
  43.108 -} SDL_SysWMinfo;
  43.109 +            /* Introduced in SDL 1.0.2 */
  43.110 +            Window fswindow;    /* The X11 fullscreen window */
  43.111 +            Window wmwindow;    /* The X11 managed input window */
  43.112 +        } x11;
  43.113 +    } info;
  43.114 +};
  43.115  
  43.116  #elif defined(SDL_VIDEO_DRIVER_NANOX)
  43.117  #include <microwin/nano-X.h>
  43.118  
  43.119  /* The generic custom event structure */
  43.120 -struct SDL_SysWMmsg {
  43.121 -	SDL_version version;
  43.122 -	int data;
  43.123 +struct SDL_SysWMmsg
  43.124 +{
  43.125 +    SDL_version version;
  43.126 +    int data;
  43.127  };
  43.128  
  43.129  /* The windows custom window manager information structure */
  43.130 -typedef struct SDL_SysWMinfo {
  43.131 -	SDL_version version ;
  43.132 -	GR_WINDOW_ID window ;	/* The display window */
  43.133 -} SDL_SysWMinfo;
  43.134 +struct SDL_SysWMinfo
  43.135 +{
  43.136 +    SDL_version version;
  43.137 +    GR_WINDOW_ID window;        /* The display window */
  43.138 +};
  43.139  
  43.140 -#elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI)
  43.141 +#elif defined(SDL_VIDEO_DRIVER_WIN32)
  43.142  #define WIN32_LEAN_AND_MEAN
  43.143  #include <windows.h>
  43.144  
  43.145  /* The windows custom event structure */
  43.146 -struct SDL_SysWMmsg {
  43.147 -	SDL_version version;
  43.148 -	HWND hwnd;			/* The window for the message */
  43.149 -	UINT msg;			/* The type of message */
  43.150 -	WPARAM wParam;			/* WORD message parameter */
  43.151 -	LPARAM lParam;			/* LONG message parameter */
  43.152 +struct SDL_SysWMmsg
  43.153 +{
  43.154 +    SDL_version version;
  43.155 +    HWND hwnd;                  /* The window for the message */
  43.156 +    UINT msg;                   /* The type of message */
  43.157 +    WPARAM wParam;              /* WORD message parameter */
  43.158 +    LPARAM lParam;              /* LONG message parameter */
  43.159  };
  43.160  
  43.161  /* The windows custom window manager information structure */
  43.162 -typedef struct SDL_SysWMinfo {
  43.163 -	SDL_version version;
  43.164 -	HWND window;			/* The Win32 display window */
  43.165 -	HGLRC hglrc;			/* The OpenGL context, if any */
  43.166 -} SDL_SysWMinfo;
  43.167 +struct SDL_SysWMinfo
  43.168 +{
  43.169 +    SDL_version version;
  43.170 +    HWND window;                /* The Win32 display window */
  43.171 +    HGLRC hglrc;                /* The OpenGL context, if any */
  43.172 +};
  43.173  
  43.174  #elif defined(SDL_VIDEO_DRIVER_RISCOS)
  43.175  
  43.176  /* RISC OS custom event structure */
  43.177 -struct SDL_SysWMmsg {
  43.178 -	SDL_version version;
  43.179 -	int eventCode;		/* The window for the message */
  43.180 -	int pollBlock[64];
  43.181 +struct SDL_SysWMmsg
  43.182 +{
  43.183 +    SDL_version version;
  43.184 +    int eventCode;              /* The window for the message */
  43.185 +    int pollBlock[64];
  43.186  };
  43.187  
  43.188  /* The RISC OS custom window manager information structure */
  43.189 -typedef struct SDL_SysWMinfo {
  43.190 -	SDL_version version;
  43.191 -	int wimpVersion;    /* Wimp version running under */
  43.192 -	int taskHandle;     /* The RISC OS task handle */
  43.193 -	int window;		/* The RISC OS display window */
  43.194 -} SDL_SysWMinfo;
  43.195 +struct SDL_SysWMinfo
  43.196 +{
  43.197 +    SDL_version version;
  43.198 +    int wimpVersion;            /* Wimp version running under */
  43.199 +    int taskHandle;             /* The RISC OS task handle */
  43.200 +    int window;                 /* The RISC OS display window */
  43.201 +};
  43.202  
  43.203  #elif defined(SDL_VIDEO_DRIVER_PHOTON)
  43.204  #include <sys/neutrino.h>
  43.205  #include <Ph.h>
  43.206  
  43.207  /* The QNX custom event structure */
  43.208 -struct SDL_SysWMmsg {
  43.209 -	SDL_version version;
  43.210 -	int data;
  43.211 +struct SDL_SysWMmsg
  43.212 +{
  43.213 +    SDL_version version;
  43.214 +    int data;
  43.215  };
  43.216  
  43.217  /* The QNX custom window manager information structure */
  43.218 -typedef struct SDL_SysWMinfo {
  43.219 -	SDL_version version;
  43.220 -	int data;
  43.221 -} SDL_SysWMinfo;
  43.222 +struct SDL_SysWMinfo
  43.223 +{
  43.224 +    SDL_version version;
  43.225 +    int data;
  43.226 +};
  43.227  
  43.228  #else
  43.229  
  43.230  /* The generic custom event structure */
  43.231 -struct SDL_SysWMmsg {
  43.232 -	SDL_version version;
  43.233 -	int data;
  43.234 +struct SDL_SysWMmsg
  43.235 +{
  43.236 +    SDL_version version;
  43.237 +    int data;
  43.238  };
  43.239  
  43.240  /* The generic custom window manager information structure */
  43.241 -typedef struct SDL_SysWMinfo {
  43.242 -	SDL_version version;
  43.243 -	int data;
  43.244 -} SDL_SysWMinfo;
  43.245 +struct SDL_SysWMinfo
  43.246 +{
  43.247 +    SDL_version version;
  43.248 +    int data;
  43.249 +};
  43.250  
  43.251  #endif /* video driver type */
  43.252  
  43.253  #endif /* SDL_PROTOTYPES_ONLY */
  43.254  
  43.255 +typedef struct SDL_SysWMinfo SDL_SysWMinfo;
  43.256 +
  43.257  /* Function prototypes */
  43.258 -/*
  43.259 - * This function gives you custom hooks into the window manager information.
  43.260 - * It fills the structure pointed to by 'info' with custom information and
  43.261 - * returns 1 if the function is implemented.  If it's not implemented, or
  43.262 - * the version member of the 'info' structure is invalid, it returns 0. 
  43.263 +/**
  43.264 + * \fn SDL_bool SDL_GetWindowWMInfo (SDL_WindowID windowID, SDL_SysWMinfo * info)
  43.265 + *
  43.266 + * \brief This function allows access to driver-dependent window information.
  43.267 + *
  43.268 + * \param windowID The window about which information is being requested
  43.269 + * \param info This structure must be initialized with the SDL version, and is then filled in with information about the given window.
  43.270 + *
  43.271 + * \return SDL_TRUE if the function is implemented and the version member of the 'info' struct is valid, SDL_FALSE otherwise.
  43.272   *
  43.273   * You typically use this function like this:
  43.274 + * \code
  43.275   * SDL_SysWMInfo info;
  43.276   * SDL_VERSION(&info.version);
  43.277 - * if ( SDL_GetWMInfo(&info) ) { ... }
  43.278 + * if ( SDL_GetWindowWMInfo(&info) ) { ... }
  43.279 + * \endcode
  43.280   */
  43.281 -extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo *info);
  43.282 +extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_WindowID windowID,
  43.283 +                                                     SDL_SysWMinfo * info);
  43.284  
  43.285  
  43.286  /* Ends C function definitions when using C++ */
  43.287  #ifdef __cplusplus
  43.288 +/* *INDENT-OFF* */
  43.289  }
  43.290 +/* *INDENT-ON* */
  43.291  #endif
  43.292  #include "close_code.h"
  43.293  
  43.294  #endif /* _SDL_syswm_h */
  43.295 +
  43.296 +/* vi: set ts=4 sw=4 expandtab: */
    44.1 --- a/include/SDL_thread.h	Thu Jul 06 18:01:37 2006 +0000
    44.2 +++ b/include/SDL_thread.h	Mon Jul 10 21:04:37 2006 +0000
    44.3 @@ -23,10 +23,11 @@
    44.4  #ifndef _SDL_thread_h
    44.5  #define _SDL_thread_h
    44.6  
    44.7 -/* Header for the SDL thread management routines 
    44.8 -
    44.9 -	These are independent of the other SDL routines.
   44.10 -*/
   44.11 +/**
   44.12 + * \file SDL_thread.h
   44.13 + *
   44.14 + * Header for the SDL thread management routines 
   44.15 + */
   44.16  
   44.17  #include "SDL_stdinc.h"
   44.18  #include "SDL_error.h"
   44.19 @@ -37,7 +38,9 @@
   44.20  #include "begin_code.h"
   44.21  /* Set up for C function definitions, even when using C++ */
   44.22  #ifdef __cplusplus
   44.23 +/* *INDENT-OFF* */
   44.24  extern "C" {
   44.25 +/* *INDENT-ON* */
   44.26  #endif
   44.27  
   44.28  /* The SDL thread structure, defined in SDL_thread.c */
   44.29 @@ -61,25 +64,39 @@
   44.30  */
   44.31  #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
   44.32  #ifndef _WIN32_WCE
   44.33 -#include <process.h> /* This has _beginthread() and _endthread() defined! */
   44.34 +#include <process.h>            /* This has _beginthread() and _endthread() defined! */
   44.35  #endif
   44.36  
   44.37  #ifdef __OS2__
   44.38 -typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg); 
   44.39 -typedef void (*pfnSDL_CurrentEndThread)(void);
   44.40 +typedef int (*pfnSDL_CurrentBeginThread) (void (*func) (void *), void *,
   44.41 +                                          unsigned, void *arg);
   44.42 +typedef void (*pfnSDL_CurrentEndThread) (void);
   44.43  #elif __GNUC__
   44.44 -typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
   44.45 -        unsigned (__stdcall *func)(void *), void *arg, 
   44.46 -        unsigned, unsigned *threadID);
   44.47 -typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
   44.48 +typedef unsigned long (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
   44.49 +                                                             unsigned
   44.50 +                                                             (__stdcall *
   44.51 +                                                              func) (void *),
   44.52 +                                                             void *arg,
   44.53 +                                                             unsigned,
   44.54 +                                                             unsigned
   44.55 +                                                             *threadID);
   44.56 +typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
   44.57  #else
   44.58 -typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
   44.59 -        unsigned (__stdcall *func)(void *), void *arg, 
   44.60 -        unsigned, unsigned *threadID);
   44.61 -typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
   44.62 +typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
   44.63 +                                                        unsigned (__stdcall *
   44.64 +                                                                  func) (void
   44.65 +                                                                         *),
   44.66 +                                                        void *arg, unsigned,
   44.67 +                                                        unsigned *threadID);
   44.68 +typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
   44.69  #endif
   44.70  
   44.71 -extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread);
   44.72 +extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *),
   44.73 +                                                     void *data,
   44.74 +                                                     pfnSDL_CurrentBeginThread
   44.75 +                                                     pfnBeginThread,
   44.76 +                                                     pfnSDL_CurrentEndThread
   44.77 +                                                     pfnEndThread);
   44.78  
   44.79  #ifdef __OS2__
   44.80  #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread)
   44.81 @@ -89,7 +106,8 @@
   44.82  #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthreadex, _endthreadex)
   44.83  #endif
   44.84  #else
   44.85 -extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data);
   44.86 +extern DECLSPEC SDL_Thread *SDLCALL
   44.87 +SDL_CreateThread(int (SDLCALL * fn) (void *), void *data);
   44.88  #endif
   44.89  
   44.90  /* Get the 32-bit thread identifier for the current thread */
   44.91 @@ -98,22 +116,26 @@
   44.92  /* Get the 32-bit thread identifier for the specified thread,
   44.93     equivalent to SDL_ThreadID() if the specified thread is NULL.
   44.94   */
   44.95 -extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread *thread);
   44.96 +extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread * thread);
   44.97  
   44.98  /* Wait for a thread to finish.
   44.99     The return code for the thread function is placed in the area
  44.100     pointed to by 'status', if 'status' is not NULL.
  44.101   */
  44.102 -extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status);
  44.103 +extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
  44.104  
  44.105  /* Forcefully kill a thread without worrying about its state */
  44.106 -extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread *thread);
  44.107 +extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread * thread);
  44.108  
  44.109  
  44.110  /* Ends C function definitions when using C++ */
  44.111  #ifdef __cplusplus
  44.112 +/* *INDENT-OFF* */
  44.113  }
  44.114 +/* *INDENT-ON* */
  44.115  #endif
  44.116  #include "close_code.h"
  44.117  
  44.118  #endif /* _SDL_thread_h */
  44.119 +
  44.120 +/* vi: set ts=4 sw=4 expandtab: */
    45.1 --- a/include/SDL_timer.h	Thu Jul 06 18:01:37 2006 +0000
    45.2 +++ b/include/SDL_timer.h	Mon Jul 10 21:04:37 2006 +0000
    45.3 @@ -23,7 +23,11 @@
    45.4  #ifndef _SDL_timer_h
    45.5  #define _SDL_timer_h
    45.6  
    45.7 -/* Header for the SDL time management routines */
    45.8 +/**
    45.9 + * \file SDL_timer.h
   45.10 + *
   45.11 + * Header for the SDL time management routines
   45.12 + */
   45.13  
   45.14  #include "SDL_stdinc.h"
   45.15  #include "SDL_error.h"
   45.16 @@ -31,25 +35,27 @@
   45.17  #include "begin_code.h"
   45.18  /* Set up for C function definitions, even when using C++ */
   45.19  #ifdef __cplusplus
   45.20 +/* *INDENT-OFF* */
   45.21  extern "C" {
   45.22 +/* *INDENT-ON* */
   45.23  #endif
   45.24  
   45.25  /* This is the OS scheduler timeslice, in milliseconds */
   45.26  #define SDL_TIMESLICE		10
   45.27  
   45.28  /* This is the maximum resolution of the SDL timer on all platforms */
   45.29 -#define TIMER_RESOLUTION	10	/* Experimentally determined */
   45.30 +#define TIMER_RESOLUTION	10      /* Experimentally determined */
   45.31  
   45.32  /* Get the number of milliseconds since the SDL library initialization.
   45.33   * Note that this value wraps if the program runs for more than ~49 days.
   45.34 - */ 
   45.35 + */
   45.36  extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
   45.37  
   45.38  /* Wait a specified number of milliseconds before returning */
   45.39  extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
   45.40  
   45.41  /* Function prototype for the timer callback function */
   45.42 -typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
   45.43 +typedef Uint32(SDLCALL * SDL_TimerCallback) (Uint32 interval);
   45.44  
   45.45  /* Set a callback to run after the specified number of milliseconds has
   45.46   * elapsed. The callback function is passed the current timer interval
   45.47 @@ -79,7 +85,8 @@
   45.48   *
   45.49   * This function returns 0 if successful, or -1 if there was an error.
   45.50   */
   45.51 -extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
   45.52 +extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval,
   45.53 +                                         SDL_TimerCallback callback);
   45.54  
   45.55  /* New timer API, supports multiple timers
   45.56   * Written by Stephane Peter <megastep@lokigames.com>
   45.57 @@ -91,7 +98,7 @@
   45.58   * passed in, the periodic alarm continues, otherwise a new alarm is
   45.59   * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
   45.60   */
   45.61 -typedef Uint32 (SDLCALL *SDL_NewTimerCallback)(Uint32 interval, void *param);
   45.62 +typedef Uint32(SDLCALL * SDL_NewTimerCallback) (Uint32 interval, void *param);
   45.63  
   45.64  /* Definition of the timer ID type */
   45.65  typedef struct _SDL_TimerID *SDL_TimerID;
   45.66 @@ -99,7 +106,9 @@
   45.67  /* Add a new timer to the pool of timers already running.
   45.68     Returns a timer ID, or NULL when an error occurs.
   45.69   */
   45.70 -extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
   45.71 +extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
   45.72 +                                                 SDL_NewTimerCallback
   45.73 +                                                 callback, void *param);
   45.74  
   45.75  /* Remove one of the multiple timers knowing its ID.
   45.76   * Returns a boolean value indicating success.
   45.77 @@ -108,8 +117,12 @@
   45.78  
   45.79  /* Ends C function definitions when using C++ */
   45.80  #ifdef __cplusplus
   45.81 +/* *INDENT-OFF* */
   45.82  }
   45.83 +/* *INDENT-ON* */
   45.84  #endif
   45.85  #include "close_code.h"
   45.86  
   45.87  #endif /* _SDL_timer_h */
   45.88 +
   45.89 +/* vi: set ts=4 sw=4 expandtab: */
    46.1 --- a/include/SDL_version.h	Thu Jul 06 18:01:37 2006 +0000
    46.2 +++ b/include/SDL_version.h	Mon Jul 10 21:04:37 2006 +0000
    46.3 @@ -20,7 +20,11 @@
    46.4      slouken@libsdl.org
    46.5  */
    46.6  
    46.7 -/* This header defines the current SDL version */
    46.8 +/**
    46.9 + * \file SDL_version.h
   46.10 + *
   46.11 + * This header defines the current SDL version
   46.12 + */
   46.13  
   46.14  #ifndef _SDL_version_h
   46.15  #define _SDL_version_h
   46.16 @@ -30,29 +34,58 @@
   46.17  #include "begin_code.h"
   46.18  /* Set up for C function definitions, even when using C++ */
   46.19  #ifdef __cplusplus
   46.20 +/* *INDENT-OFF* */
   46.21  extern "C" {
   46.22 +/* *INDENT-ON* */
   46.23  #endif
   46.24  
   46.25 +/**
   46.26 + * \struct SDL_version
   46.27 + * \brief Information the version of SDL in use.
   46.28 + *
   46.29 + * Represents the library's version as three levels: major revision
   46.30 + *  (increments with massive changes, additions, and enhancements),
   46.31 + *  minor revision (increments with backwards-compatible changes to the
   46.32 + *  major revision), and patchlevel (increments with fixes to the minor
   46.33 + *  revision).
   46.34 + *
   46.35 + * \sa SDL_VERSION
   46.36 + * \sa SDL_GetVersion
   46.37 + */
   46.38 +typedef struct SDL_version
   46.39 +{
   46.40 +    Uint8 major;        /**< major version */
   46.41 +    Uint8 minor;        /**< minor version */
   46.42 +    Uint8 patch;        /**< update version */
   46.43 +} SDL_version;
   46.44 +
   46.45  /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
   46.46  */
   46.47  #define SDL_MAJOR_VERSION	1
   46.48 -#define SDL_MINOR_VERSION	2
   46.49 -#define SDL_PATCHLEVEL		11
   46.50 +#define SDL_MINOR_VERSION	3
   46.51 +#define SDL_PATCHLEVEL		0
   46.52  
   46.53 -typedef struct SDL_version {
   46.54 -	Uint8 major;
   46.55 -	Uint8 minor;
   46.56 -	Uint8 patch;
   46.57 -} SDL_version;
   46.58 -
   46.59 -/* This macro can be used to fill a version structure with the compile-time
   46.60 - * version of the SDL library.
   46.61 +/**
   46.62 + * \def SDL_VERSION(x)
   46.63 + * \brief Macro to determine SDL version program was compiled against.
   46.64 + *
   46.65 + * This macro fills in a SDL_version structure with the version of the
   46.66 + *  library you compiled against. This is determined by what header the
   46.67 + *  compiler uses. Note that if you dynamically linked the library, you might
   46.68 + *  have a slightly newer or older version at runtime. That version can be
   46.69 + *  determined with SDL_GetVersion(), which, unlike SDL_VERSION,
   46.70 + *  is not a macro.
   46.71 + *
   46.72 + * \param x A pointer to a SDL_version struct to initialize.
   46.73 + *
   46.74 + * \sa SDL_version
   46.75 + * \sa SDL_GetVersion
   46.76   */
   46.77 -#define SDL_VERSION(X)							\
   46.78 +#define SDL_VERSION(x)							\
   46.79  {									\
   46.80 -	(X)->major = SDL_MAJOR_VERSION;					\
   46.81 -	(X)->minor = SDL_MINOR_VERSION;					\
   46.82 -	(X)->patch = SDL_PATCHLEVEL;					\
   46.83 +	(x)->major = SDL_MAJOR_VERSION;					\
   46.84 +	(x)->minor = SDL_MINOR_VERSION;					\
   46.85 +	(x)->patch = SDL_PATCHLEVEL;					\
   46.86  }
   46.87  
   46.88  /* This macro turns the version numbers into a numeric value:
   46.89 @@ -70,16 +103,42 @@
   46.90  #define SDL_VERSION_ATLEAST(X, Y, Z) \
   46.91  	(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
   46.92  
   46.93 -/* This function gets the version of the dynamically linked SDL library.
   46.94 -   it should NOT be used to fill a version structure, instead you should
   46.95 -   use the SDL_Version() macro.
   46.96 +/**
   46.97 + * \fn void SDL_GetVersion(SDL_version *ver)
   46.98 + * \brief Get the version of SDL that is linked against your program.
   46.99 + *
  46.100 + * If you are using a shared library (DLL) version of SDL, then it is
  46.101 + *  possible that it will be different than the version you compiled against.
  46.102 + *
  46.103 + * This is a real function; the macro SDL_VERSION tells you what version
  46.104 + *  of SDL you compiled against:
  46.105 + *
  46.106 + * \code
  46.107 + * SDL_version compiled;
  46.108 + * SDL_version linked;
  46.109 + *
  46.110 + * SDL_VERSION(&compiled);
  46.111 + * SDL_GetVersion(&linked);
  46.112 + * printf("We compiled against SDL version %d.%d.%d ...\n",
  46.113 + *           compiled.major, compiled.minor, compiled.patch);
  46.114 + * printf("But we linked against SDL version %d.%d.%d.\n",
  46.115 + *           linked.major, linked.minor, linked.patch);
  46.116 + * \endcode
  46.117 + *
  46.118 + * This function may be called safely at any time, even before SDL_Init().
  46.119 + *
  46.120 + * \sa SDL_VERSION
  46.121   */
  46.122 -extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(