Commit 1cbfd5b6 authored by Sam Lantinga's avatar Sam Lantinga

Partial fix for bug #859

Header file update from Ken for improved doxygen output

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404127
parent 4483fc99
......@@ -25,50 +25,51 @@
*
* Main include header for the SDL library
*/
/**
* \mainpage Simple DirectMedia Layer (SDL)
http://www.libsdl.org/
* \section intro_sec Introduction
This is the Simple DirectMedia Layer, a general API that provides low
level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
and 2D framebuffer across multiple platforms.
The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
The code contains support for AIX, OSF/Tru64, RISC OS, and SymbianOS,
but these are not officially supported.
SDL is written in C, but works with C++ natively, and has bindings to
several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
Pike, Pliant, Python, Ruby, and Smalltalk.
This library is distributed under GNU LGPL version 2, which can be
found in the file "COPYING". This license allows you to use SDL
freely in commercial programs as long as you link with the dynamic
library.
The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
The header files and test programs are well commented and always up to date.
More documentation is available in HTML format in "docs/index.html", and
a documentation wiki is available online at:
http://www.libsdl.org/cgi/docwiki.cgi
The test programs in the "test" subdirectory are in the public domain.
Frequently asked questions are answered online:
http://www.libsdl.org/faq.php
If you need help with the library, or just want to discuss SDL related
issues, you can join the developers mailing list:
http://www.libsdl.org/mailing-list.php
Enjoy!
Sam Lantinga (slouken@libsdl.org)
*
* http://www.libsdl.org/
*
* \section intro_sec Introduction
*
* This is the Simple DirectMedia Layer, a general API that provides low
* level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
* and 2D framebuffer across multiple platforms.
*
* The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
* Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
* The code contains support for AIX, OSF/Tru64, RISC OS, and SymbianOS,
* but these are not officially supported.
*
* SDL is written in C, but works with C++ natively, and has bindings to
* several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
* Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
* Pike, Pliant, Python, Ruby, and Smalltalk.
*
* This library is distributed under GNU LGPL version 2, which can be
* found in the file "COPYING". This license allows you to use SDL
* freely in commercial programs as long as you link with the dynamic
* library.
*
* The best way to learn how to use SDL is to check out the header files in
* the "include" subdirectory and the programs in the "test" subdirectory.
* The header files and test programs are well commented and always up to date.
* More documentation is available in HTML format in "docs/index.html", and
* a documentation wiki is available online at:
* http://www.libsdl.org/cgi/docwiki.cgi
*
* The test programs in the "test" subdirectory are in the public domain.
*
* Frequently asked questions are answered online:
* http://www.libsdl.org/faq.php
*
* If you need help with the library, or just want to discuss SDL related
* issues, you can join the developers mailing list:
* http://www.libsdl.org/mailing-list.php
*
* Enjoy!
* Sam Lantinga (slouken@libsdl.org)
*/
#ifndef _SDL_H
......@@ -102,23 +103,28 @@ extern "C" {
/* As of version 0.5, SDL is loaded dynamically into the application */
/* These are the flags which may be passed to SDL_Init() -- you should
specify the subsystems which you will be using in your application.
*/
/**
* \name SDL_INIT_*
*
* These are the flags which may be passed to SDL_Init(). You should
* specify the subsystems which you will be using in your application.
*/
/*@{*/
#define SDL_INIT_TIMER 0x00000001
#define SDL_INIT_AUDIO 0x00000010
#define SDL_INIT_VIDEO 0x00000020
#define SDL_INIT_JOYSTICK 0x00000200
#define SDL_INIT_HAPTIC 0x00001000
#define SDL_INIT_NOPARACHUTE 0x00100000 /* Don't catch fatal signals */
#define SDL_INIT_EVENTTHREAD 0x01000000 /* Not supported on all OS's */
#define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
#define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */
#define SDL_INIT_EVERYTHING 0x0000FFFF
/*@}*/
/**
* This function loads the SDL dynamically linked library and initializes
* the subsystems specified by 'flags' (and those satisfying dependencies)
* Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
* signal handlers for some commonly ignored fatal signals (like SIGSEGV)
* the subsystems specified by \c flags (and those satisfying dependencies).
* Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
* signal handlers for some commonly ignored fatal signals (like SIGSEGV).
*/
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
......@@ -127,14 +133,17 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
*/
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
/** This function cleans up specific SDL subsystems */
/**
* This function cleans up specific SDL subsystems
*/
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
/**
This function returns mask of the specified subsystems which have
been initialized.
If 'flags' is 0, it returns a mask of all initialized subsystems.
*/
* This function returns mask of the specified subsystems which have
* been initialized.
*
* If \c flags is 0, it returns a mask of all initialized subsystems.
*/
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
/**
......
......@@ -26,6 +26,16 @@
* \file SDL_atomic.h
*
* Atomic operations.
*
* These operations may, or may not, actually be implemented using
* processor specific atomic operations. When possible they are
* implemented as true processor specific atomic operations. When that
* is not possible the are implemented using locks that *do* use the
* available atomic operations.
*
* At the very minimum spin locks must be implemented. Without spin
* locks it is not possible (AFAICT) to emulate the rest of the atomic
* operations.
*/
#ifndef _SDL_atomic_h_
......@@ -43,176 +53,139 @@ extern "C" {
/* *INDENT-ON* */
#endif
/**
* These operations may, or may not, actually be implemented using
* processor specific atomic operations. When possible they are
* implemented as true processor specific atomic operations. When that
* is not possible the are implemented using locks that *do* use the
* available atomic operations.
*
* At the very minimum spin locks must be implemented. Without spin
* locks it is not possible (AFAICT) to emulate the rest of the atomic
* operations.
*/
/* Function prototypes */
/**
* SDL AtomicLock.
* \name SDL AtomicLock
*
* The spin lock functions and type are required and can not be
* emulated because they are used in the emulation code.
*/
/*@{*/
typedef volatile Uint32 SDL_SpinLock;
/**
* \fn void SDL_AtomicLock(SDL_SpinLock *lock);
*
* \brief Lock a spin lock by setting it to a none zero value.
*
* \param lock points to the lock.
*
* \param lock Points to the lock.
*/
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
/**
* \fn void SDL_AtomicUnlock(SDL_SpinLock *lock);
*
* \brief Unlock a spin lock by setting it to 0. Always returns immediately
*
* \param lock points to the lock.
*
* \param lock Points to the lock.
*/
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
/* 32 bit atomic operations */
/*@}*//*SDL AtomicLock*/
/**
* \fn SDL_bool SDL_AtomicTestThenSet32(volatile Uint32 * ptr);
*
* \brief Check to see if *ptr == 0 and set it to 1.
* \name 32 bit atomic operations
*/
/*@{*/
/**
* \brief Check to see if \c *ptr == 0 and set it to 1.
*
* \return SDL_True if the value pointed to by ptr was zero and
* \return SDL_True if the value pointed to by \c ptr was zero and
* SDL_False if it was not zero
*
* \param ptr points to the value to be tested and set.
*
* \param ptr Points to the value to be tested and set.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet32(volatile Uint32 * ptr);
/**
* \fn void SDL_AtomicClear32(volatile Uint32 * ptr);
*
* \brief set the value pointed to by ptr to be zero.
*
* \param ptr address of the value to be set to zero
* \brief Set the value pointed to by \c ptr to be zero.
*
* \param ptr Address of the value to be set to zero
*/
extern DECLSPEC void SDLCALL SDL_AtomicClear32(volatile Uint32 * ptr);
/**
* \fn Uint32 SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
*
* \brief fetch the current value of *ptr and then increment that
* \brief Fetch the current value of \c *ptr and then increment that
* value in place.
*
* \return the value before it was incremented.
*
* \param ptr address of the value to fetch and increment
* \return The value before it was incremented.
*
* \param ptr Address of the value to fetch and increment
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenIncrement32(volatile Uint32 * ptr);
/**
* \fn Uint32 SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
*
* \brief fetch *ptr and then decrement the value in place.
*
* \return the value before it was decremented.
* \brief Fetch \c *ptr and then decrement the value in place.
*
* \param ptr address of the value to fetch and drement
* \return The value before it was decremented.
*
* \param ptr Address of the value to fetch and drement
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenDecrement32(volatile Uint32 * ptr);
/**
* \fn Uint32 SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
* \brief Fetch the current value at \c ptr and then add \c value to \c *ptr.
*
* \brief fetch the current value at ptr and then add value to *ptr.
*
* \return *ptr before the addition took place.
*
* \param ptr the address of data we are changing.
* \param value the value to add to *ptr.
* \return \c *ptr before the addition took place.
*
* \param ptr The address of data we are changing.
* \param value The value to add to \c *ptr.
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenAdd32(volatile Uint32 * ptr, Uint32 value);
/**
* \fn Uint32 SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
*
* \brief Fetch *ptr and then subtract value from it.
* \brief Fetch \c *ptr and then subtract \c value from it.
*
* \return *ptr before the subtraction took place.
*
* \param ptr the address of the data being changed.
* \param value the value to subtract from *ptr.
* \return \c *ptr before the subtraction took place.
*
* \param ptr The address of the data being changed.
* \param value The value to subtract from \c *ptr.
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicFetchThenSubtract32(volatile Uint32 * ptr, Uint32 value);
/**
* \fn Uint32 SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
*
* \brief Add one to the data pointed to by ptr and return that value.
* \brief Add one to the data pointed to by \c ptr and return that value.
*
* \return the incremented value.
*
* \param ptr address of the data to increment.
* \return The incremented value.
*
* \param ptr The address of the data to increment.
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicIncrementThenFetch32(volatile Uint32 * ptr);
/**
* \fn Uint32 SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
*
* \brief Subtract one from data pointed to by ptr and return the new value.
* \brief Subtract one from data pointed to by \c ptr and return the new value.
*
* \return The decremented value.
*
* \param ptr The address of the data to decrement.
*
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicDecrementThenFetch32(volatile Uint32 * ptr);
/**
* \fn Uint32 SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
*
* \brief Add value to the data pointed to by ptr and return result.
* \brief Add \c value to the data pointed to by \c ptr and return result.
*
* \return The sum of *ptr and value.
* \return The sum of \c *ptr and \c value.
*
* \param ptr The address of the data to be modified.
* \param value The value to be added.
*
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicAddThenFetch32(volatile Uint32 * ptr, Uint32 value);
/**
* \fn Uint32 SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value);
* \brief Subtract \c value from the data pointed to by \c ptr and return the result.
*
* \brief Subtract value from the data pointed to by ptr and return the result.
*
* \return the difference between *ptr and value.
* \return The difference between \c *ptr and \c value.
*
* \param ptr The address of the data to be modified.
* \param value The value to be subtracted.
*
*/
extern DECLSPEC Uint32 SDLCALL SDL_AtomicSubtractThenFetch32(volatile Uint32 * ptr, Uint32 value);
/* 64 bit atomic operations */
/*@}*//*32 bit atomic operations*/
/**
* \name 64 bit atomic operations
*/
/*@{*/
#ifdef SDL_HAS_64BIT_TYPE
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTestThenSet64(volatile Uint64 * ptr);
......@@ -227,6 +200,8 @@ extern DECLSPEC Uint64 SDLCALL SDL_AtomicAddThenFetch64(volatile Uint64 * ptr, U
extern DECLSPEC Uint64 SDLCALL SDL_AtomicSubtractThenFetch64(volatile Uint64 * ptr, Uint64 value);
#endif /* SDL_HAS_64BIT_TYPE */
/*@}*//*64 bit atomic operations*/
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
......
This diff is collapsed.
......@@ -20,13 +20,26 @@
slouken@libsdl.org
*/
/* This file contains functions for backwards compatibility with SDL 1.2 */
/**
* \defgroup Compatibility SDL 1.2 Compatibility API
*/
/*@{*/
/*
#define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
SDL 1.3/2.0
*/
/**
* \file SDL_compat.h
*
* This file contains functions for backwards compatibility with SDL 1.2.
*/
/**
* \def SDL_NO_COMPAT
*
* #define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
* SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
* SDL 1.3/2.0.
*/
/*@}*/
#ifdef SDL_NO_COMPAT
#define _SDL_compat_h
......@@ -46,7 +59,16 @@ extern "C" {
/* *INDENT-ON* */
#endif
#define SDL_SWSURFACE 0x00000000 /* Not used */
/**
* \addtogroup Compatibility
*/
/*@{*/
/**
* \name Surface flags
*/
/*@{*/
#define SDL_SWSURFACE 0x00000000 /**< \note Not used */
#define SDL_SRCALPHA 0x00010000
#define SDL_SRCCOLORKEY 0x00020000
#define SDL_ANYFORMAT 0x00100000
......@@ -56,10 +78,11 @@ extern "C" {
#define SDL_RESIZABLE 0x01000000
#define SDL_NOFRAME 0x02000000
#define SDL_OPENGL 0x04000000
#define SDL_HWSURFACE 0x08000001 /* Not used */
#define SDL_ASYNCBLIT 0x08000000 /* Not used */
#define SDL_RLEACCELOK 0x08000000 /* Not used */
#define SDL_HWACCEL 0x08000000 /* Not used */
#define SDL_HWSURFACE 0x08000001 /**< \note Not used */
#define SDL_ASYNCBLIT 0x08000000 /**< \note Not used */
#define SDL_RLEACCELOK 0x08000000 /**< \note Not used */
#define SDL_HWACCEL 0x08000000 /**< \note Not used */
/*@}*//*Surface flags*/
#define SDL_APPMOUSEFOCUS 0x01
#define SDL_APPINPUTFOCUS 0x02
......@@ -103,35 +126,51 @@ typedef struct SDL_VideoInfo
int current_h;
} SDL_VideoInfo;
/* The most common video overlay formats.
For an explanation of these pixel formats, see:
http://www.webartz.com/fourcc/indexyuv.htm
For information on the relationship between color spaces, see:
http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
/**
* \name Overlay formats
*
* The most common video overlay formats.
*
* For an explanation of these pixel formats, see:
* http://www.webartz.com/fourcc/indexyuv.htm
*
* For information on the relationship between color spaces, see:
* http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
*/
/*@{*/
#define SDL_YV12_OVERLAY 0x32315659 /**< Planar mode: Y + V + U (3 planes) */
#define SDL_IYUV_OVERLAY 0x56555949 /**< Planar mode: Y + U + V (3 planes) */
#define SDL_YUY2_OVERLAY 0x32595559 /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
#define SDL_UYVY_OVERLAY 0x59565955 /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
#define SDL_YVYU_OVERLAY 0x55595659 /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
/*@}*//*Overlay formats*/
/**
* The YUV hardware video overlay.
*/
#define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */
#define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */
#define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
#define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
#define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
/* The YUV hardware video overlay */
typedef struct SDL_Overlay
{
Uint32 format; /* Read-only */
int w, h; /* Read-only */
int planes; /* Read-only */
Uint16 *pitches; /* Read-only */
Uint8 **pixels; /* Read-write */
/* Hardware-specific surface info */
Uint32 format; /**< Read-only */
int w, h; /**< Read-only */
int planes; /**< Read-only */
Uint16 *pitches; /**< Read-only */
Uint8 **pixels; /**< Read-write */
/**
* \name Hardware-specific surface info
*/
/*@{*/
struct private_yuvhwfuncs *hwfuncs;
struct private_yuvhwdata *hwdata;
/*@}*//*Hardware-specific surface info*/
/* Special flags */
Uint32 hw_overlay:1; /* Flag: This overlay hardware accelerated? */
/**
* \name Special flags
*/
/*@{*/
Uint32 hw_overlay:1; /**< Flag: This overlay hardware accelerated? */
Uint32 UnusedBits:31;
/*@}*//*Special flags*/
} SDL_Overlay;
typedef enum
......@@ -143,9 +182,17 @@ typedef enum
struct SDL_SysWMinfo;
/* Obsolete or renamed key codes */
/**
* \name Obsolete or renamed key codes
*/
/*@{*/
/* These key constants were renamed for clarity or consistency. */
/**
* \name Renamed keys
*
* These key constants were renamed for clarity or consistency.
*/
/*@{*/
#define SDLK_0 '0'
#define SDLK_1 '1'
#define SDLK_2 '2'
......@@ -214,19 +261,35 @@ struct SDL_SysWMinfo;
#define SDLK_NUMLOCK SDLK_NUMLOCKCLEAR
#define SDLK_SCROLLOCK SDLK_SCROLLLOCK
#define SDLK_PRINT SDLK_PRINTSCREEN
/*@}*//*Renamed keys*/
/* The META modifier is equivalent to the GUI modifier from the USB standard */
/**
* \name META modifier
*
* The META modifier is equivalent to the GUI modifier from the USB standard.
*/
/*@{*/
#define KMOD_LMETA KMOD_LGUI
#define KMOD_RMETA KMOD_RGUI
#define KMOD_META KMOD_GUI
/* These keys don't appear in the USB specification (or at least not under those names). I'm unsure if the following assignments make sense or if these codes should be defined as actual additional SDLK_ constants. */
/*@}*//*META modifier*/
/**
* \name Not in USB
*
* These keys don't appear in the USB specification (or at least not under
* those names). I'm unsure if the following assignments make sense or if these
* codes should be defined as actual additional SDLK_ constants.
*/
/*@{*/
#define SDLK_LSUPER SDLK_LMETA
#define SDLK_RSUPER SDLK_RMETA
#define SDLK_COMPOSE SDLK_APPLICATION
#define SDLK_BREAK SDLK_STOP
#define SDLK_EURO SDLK_2
/*@}*//*Not in USB*/
/*@}*//*Obsolete or renamed key codes*/
#define SDL_SetModuleHandle(x)
#define SDL_AllocSurface SDL_CreateRGBSurface
......@@ -287,6 +350,8 @@ extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
/*@}*//*Compatibility*/
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
......
......@@ -25,7 +25,13 @@
#include "SDL_platform.h"
/* Add any platform that doesn't build using the configure system */
/**
* \file SDL_config.h.default
*
* SDL_config.h for any platform that doesn't build using the configure system.
*/
/* Add any platform that doesn't build using the configure system. */
#if defined(__NINTENDODS__)
#include "SDL_config_nintendods.h"
#elif defined(__IPHONEOS__)
......
......@@ -23,7 +23,11 @@
#ifndef _SDL_config_h
#define _SDL_config_h
/* This is a set of defines to configure the SDL features */
/**
* \file SDL_config.h.in
*
* This is a set of defines to configure the SDL features
*/
/* General platform specific identifiers */
#include "SDL_platform.h"
......
......@@ -25,7 +25,11 @@
#include "SDL_platform.h"
/* This is the minimal configuration that can be used to build SDL */
/**
* \file SDL_config_minimal.h
*
* This is the minimal configuration that can be used to build SDL.
*/
#include <stdarg.h>
......
......@@ -23,7 +23,7 @@
/**
* \file SDL_cpuinfo.h
*
* CPU feature detection for SDL
* CPU feature detection for SDL.
*/
#ifndef _SDL_cpuinfo_h
......@@ -39,35 +39,43 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* This function returns true if the CPU has the RDTSC instruction
/**
* This function returns true if the CPU has the RDTSC instruction.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
/* This function returns true if the CPU has MMX features
/**
* This function returns true if the CPU has MMX features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
/* This function returns true if the CPU has MMX Ext. features
/**
* This function returns true if the CPU has MMX Ext.\ features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
/* This function returns true if the CPU has 3DNow features
/**
* This function returns true if the CPU has 3DNow!\ features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
/* This function returns true if the CPU has 3DNow! Ext. features
/**
* This function returns true if the CPU has 3DNow!\ Ext.\ features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
/* This function returns true if the CPU has SSE features
/**
* This function returns true if the CPU has SSE features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
/* This function returns true if the CPU has SSE2 features
/**
* This function returns true if the CPU has SSE2 features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
/* This function returns true if the CPU has AltiVec features
/**
* This function returns true if the CPU has AltiVec features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
......
......@@ -31,9 +31,13 @@
#include "SDL_stdinc.h"
/* The two types of endianness */
/**
* \name The two types of endianness
*/
/*@{*/
#define SDL_LIL_ENDIAN 1234
#define SDL_BIG_ENDIAN 4321
/*@}*/
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
#if defined(__hppa__) || \
......@@ -56,11 +60,14 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* Use inline functions for compilers that support them, and static
functions for those that do not. Because these functions become
static for compilers that do not support inline functions, this
header should only be included in files that actually use them.
*/
/**
* \file SDL_endian.h
*
* Uses inline functions for compilers that support them, and static
* functions for those that do not. Because these functions become
* static for compilers that do not support inline functions, this
* header should only be included in files that actually use them.
*/
#if defined(__GNUC__) && defined(__i386__) && \
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
static __inline__ Uint16
......@@ -184,10 +191,11 @@ SDL_Swap64(Uint64 x)
}
#endif
#else
/* This is mainly to keep compilers from complaining in SDL code.
If there is no real 64-bit datatype, then compilers will complain about
the fake 64-bit datatype that SDL provides when it compiles user code.
*/
/**
* This is mainly to keep compilers from complaining in SDL code.
* If there is no real 64-bit datatype, then compilers will complain about
* the fake 64-bit datatype that SDL provides when it compiles user code.
*/
#define SDL_Swap64(X) (X)
#endif /* SDL_HAS_64BIT_TYPE */
......@@ -206,7 +214,11 @@ SDL_SwapFloat(float x)
}
/* Byteswap item from the specified endianness to the native endianness */
/**
* \name Swap to native
* Byteswap item from the specified endianness to the native endianness.
*/
/*@{*/
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#define SDL_SwapLE16(X) (X)
#define SDL_SwapLE32(X) (X)
......@@ -226,6 +238,7 @@ SDL_SwapFloat(float x)
#define SDL_SwapBE64(X) (X)
#define SDL_SwapFloatBE(X) (X)
#endif
/*@}*//*Swap to native*/
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
......
......@@ -22,7 +22,8 @@
/**
* \file SDL_error.h
* Simple error message routines for SDL
*
* Simple error message routines for SDL.
*/
#ifndef _SDL_error_h
......@@ -43,7 +44,13 @@ extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
extern DECLSPEC char *SDLCALL SDL_GetError(void);
extern DECLSPEC void SDLCALL SDL_ClearError(void);
/* Private error message function - used internally */
/**
* \name Internal error functions
*
* \internal
* Private error message function - used internally.
*/
/*@{*/
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
typedef enum
......@@ -56,7 +63,7 @@ typedef enum
SDL_LASTERROR
} SDL_errorcode;
extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
/*@}*//*Internal error functions*/
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
......
This diff is collapsed.
This diff is collapsed.
......@@ -40,10 +40,13 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* In order to use these functions, SDL_Init() must have been called
with the SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
for joysticks, and load appropriate drivers.
*/
/**
* \file SDL_joystick.h
*
* In order to use these functions, SDL_Init() must have been called
* with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
* for joysticks, and load appropriate drivers.
*/
/* The joystick structure used to identify an SDL joystick */
struct _SDL_Joystick;
......@@ -51,87 +54,94 @@ typedef struct _SDL_Joystick SDL_Joystick;
/* Function prototypes */
/*
/**
* Count the number of joysticks attached to the system
*/
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
/*
/**
* Get the implementation dependent name of a joystick.
* This can be called before any joysticks are opened.
* If no name can be found, this function returns NULL.
*/
extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index);
/*
* Open a joystick for use - the index passed as an argument refers to
* the N'th joystick on the system. This index is the value which will
* identify this joystick in future joystick events.
/**
* Open a joystick for use.
* The index passed as an argument refers tothe N'th joystick on the system.
* This index is the value which will identify this joystick in future joystick
* events.
*
* This function returns a joystick identifier, or NULL if an error occurred.
* \return A joystick identifier, or NULL if an error occurred.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
/*
/**
* Returns 1 if the joystick has been opened, or 0 if it has not.
*/
extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
/*
/**
* Get the device index of an opened joystick.
*/
extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick);
/*
* Get the number of general axis controls on a joystick
/**
* Get the number of general axis controls on a joystick.
*/
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
/*
* Get the number of trackballs on a joystick
/**
* Get the number of trackballs on a joystick.
*
* Joystick trackballs have only relative motion events associated
* with them and their state cannot be polled.
*/
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
/*
* Get the number of POV hats on a joystick
/**
* Get the number of POV hats on a joystick.
*/
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
/*
* Get the number of buttons on a joystick
/**
* Get the number of buttons on a joystick.
*/
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
/*
/**
* Update the current state of the open joysticks.
*
* This is called automatically by the event loop if any joystick
* events are enabled.
*/
extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
/*
/**
* Enable/disable joystick event polling.
*
* If joystick events are disabled, you must call SDL_JoystickUpdate()
* yourself and check the state of the joystick when you want joystick
* information.
* The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
*
* The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
*/
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
/*
* Get the current state of an axis control on a joystick
/**
* Get the current state of an axis control on a joystick.
*
* The state is a value ranging from -32768 to 32767.
*
* The axis indices start at index 0.
*/
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
int axis);
/*
* Get the current state of a POV hat on a joystick
* The return value is one of the following positions:
/**
* \name Hat positions
*/
/*@{*/
#define SDL_HAT_CENTERED 0x00
#define SDL_HAT_UP 0x01
#define SDL_HAT_RIGHT 0x02
......@@ -141,29 +151,47 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
/*
/*@}*/
/**
* Get the current state of a POV hat on a joystick.
*
* The hat indices start at index 0.
*
* \return The return value is one of the following positions:
* - ::SDL_HAT_CENTERED
* - ::SDL_HAT_UP
* - ::SDL_HAT_RIGHT
* - ::SDL_HAT_DOWN
* - ::SDL_HAT_LEFT
* - ::SDL_HAT_RIGHTUP
* - ::SDL_HAT_RIGHTDOWN
* - ::SDL_HAT_LEFTUP
* - ::SDL_HAT_LEFTDOWN
*/
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
int hat);
/*
* Get the ball axis change since the last poll
* This returns 0, or -1 if you passed it invalid parameters.
/**
* Get the ball axis change since the last poll.
*
* \return 0, or -1 if you passed it invalid parameters.
*
* The ball indices start at index 0.
*/
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
int ball, int *dx, int *dy);
/*
* Get the current state of a button on a joystick
/**
* Get the current state of a button on a joystick.
*
* The button indices start at index 0.
*/
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
int button);
/*
* Close a joystick previously opened with SDL_JoystickOpen()
/**
* Close a joystick previously opened with SDL_JoystickOpen().
*/
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
......
......@@ -42,8 +42,6 @@ extern "C" {
#endif
/**
* \struct SDL_keysym
*
* \brief The SDL keysym structure, used in key events.
*/
typedef struct SDL_keysym
......@@ -51,14 +49,12 @@ typedef struct SDL_keysym
SDL_scancode scancode; /**< SDL physical key code - see ::SDL_scancode for details */
SDLKey sym; /**< SDL virtual key code - see ::SDLKey for details */
Uint16 mod; /**< current key modifiers */
Uint32 unicode; /**< OBSOLETE, use SDL_TextInputEvent instead */
Uint32 unicode; /**< \deprecated use SDL_TextInputEvent instead */
} SDL_keysym;
/* Function prototypes */
/**
* \fn int SDL_GetNumKeyboards(void)
*
* \brief Get the number of keyboard input devices available.
*
* \sa SDL_SelectKeyboard()
......@@ -66,8 +62,6 @@ typedef struct SDL_keysym
extern DECLSPEC int SDLCALL SDL_GetNumKeyboards(void);
/**
* \fn int SDL_SelectKeyboard(int index)
*
* \brief Set the index of the currently selected keyboard.
*
* \return The index of the previously selected keyboard.
......@@ -79,30 +73,28 @@ extern DECLSPEC int SDLCALL SDL_GetNumKeyboards(void);
extern DECLSPEC int SDLCALL SDL_SelectKeyboard(int index);
/**
* \fn Uint8 *SDL_GetKeyboardState(int *numkeys)
*
* \brief Get a snapshot of the current state of the selected keyboard.
*
* \param numkeys if non-NULL, receives the length of the returned array.
*
* \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values.
*
* Example:
* \b Example:
* \code
* Uint8 *state = SDL_GetKeyboardState(NULL);
* if ( state[SDL_SCANCODE_RETURN)] ) ... <RETURN> is pressed.
* if ( state[SDL_SCANCODE_RETURN] ) {
* printf("<RETURN> is pressed.\n");
* }
* \endcode
*/
extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
/**
* \fn SDLMod SDL_GetModState(void)
*
* \brief Get the current key modifier state for the selected keyboard.
*/
extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
/**
* \fn void SDL_SetModState(SDLMod modstate)
*
* \brief Set the current key modifier state for the selected keyboard.
*
* \note This does not change the keyboard state, only the key modifier flags.
......@@ -110,9 +102,8 @@ extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
/**
* \fn SDLKey SDL_GetKeyFromScancode(SDL_scancode scancode)
*
* \brief Get the key code corresponding to the given scancode according to the current keyboard layout.
* \brief Get the key code corresponding to the given scancode according to the
* current keyboard layout.
*
* See ::SDLKey for details.
*
......@@ -121,9 +112,8 @@ extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_scancode scancode);
/**
* \fn SDL_scancode SDL_GetScancodeFromKey(SDLKey key)
*
* \brief Get the scancode corresponding to the given key code according to the current keyboard layout.
* \brief Get the scancode corresponding to the given key code according to the
* current keyboard layout.
*
* See ::SDL_scancode for details.
*
......@@ -132,11 +122,12 @@ extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_scancode scancode);
extern DECLSPEC SDL_scancode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
/**
* \fn const char *SDL_GetScancodeName(SDL_scancode scancode)
*
* \brief Get a human-readable name for a scancode.
*
* \return A pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it. If the scancode doesn't have a name, this function returns "".
* \return A pointer to a UTF-8 string that stays valid at least until the next
* call to this function. If you need it around any longer, you must
* copy it. If the scancode doesn't have a name, this function returns
* an empty string ("").
*
* \sa SDL_scancode
*/
......@@ -144,19 +135,18 @@ extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_scancode
scancode);
/**
* \fn const char *SDL_GetKeyName(SDLKey key)
*
* \brief Get a human-readable name for a key.
*
* \return A pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it. If the key doesn't have a name, this function returns "".
* \return A pointer to a UTF-8 string that stays valid at least until the next
* call to this function. If you need it around any longer, you must
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
* \sa SDLKey
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
/**
* \fn void SDL_StartTextInput(void)
*
* \brief Start accepting Unicode text input events.
*
* \sa SDL_StopTextInput()
......@@ -165,8 +155,6 @@ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
/**
* \fn void SDL_StopTextInput(void)
*
* \brief Stop receiving any text input events.
*
* \sa SDL_StartTextInput()
......@@ -174,8 +162,6 @@ extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
/**
* \fn void SDL_SetTextInputRect(SDL_Rect *rect)
*
* \brief Set the rectangle used to type Unicode text inputs.
*
* \sa SDL_StartTextInput()
......
......@@ -22,6 +22,8 @@
/**
* \file SDL_keysym.h
*
* Defines constants which identify keyboard keys and modifiers.
*/
#ifndef _SDL_keysym_h
......@@ -31,8 +33,6 @@
#include "SDL_scancode.h"
/**
* \typedef SDLKey
*
* \brief The SDL virtual key representation.
*
* Values of this type are used to represent keyboard keys using the current
......@@ -246,9 +246,7 @@ enum
};
/**
* \enum SDLMod
*
* \brief Enumeration of valid key mods (possibly OR'd together)
* \brief Enumeration of valid key mods (possibly OR'd together).
*/
typedef enum
{
......
......@@ -26,13 +26,13 @@
* System dependent library loading routines
*
* Some things to keep in mind:
* - These functions only work on C function names. Other languages may
* \li These functions only work on C function names. Other languages may
* have name mangling and intrinsic language support that varies from
* compiler to compiler.
* - Make sure you declare your function pointers with the same calling
* \li Make sure you declare your function pointers with the same calling
* convention as the actual library function. Your code will crash
* mysteriously if you do not do this.
* - Avoid namespace collisions. If you load a symbol from the library,
* \li Avoid namespace collisions. If you load a symbol from the library,
* it is not defined whether or not it goes into the global symbol
* namespace for the application. If it does and it conflicts with
* symbols in your code or other shared libraries, you will not get
......@@ -53,20 +53,24 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* This function dynamically loads a shared object and returns a pointer
/**
* This function dynamically loads a shared object and returns a pointer
* to the object handle (or NULL if there was an error).
* The 'sofile' parameter is a system dependent name of the object file.
*/
extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
/* Given an object handle, this function looks up the address of the
/**
* Given an object handle, this function looks up the address of the
* named function in the shared object and returns it. This address
* is no longer valid after calling SDL_UnloadObject().
*/
extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
const char *name);
/* Unload a shared object from memory */
/**
* Unload a shared object from memory.
*/
extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
/* Ends C function definitions when using C++ */
......
......@@ -25,7 +25,11 @@
#include "SDL_stdinc.h"
/* Redefine main() on some platforms so that it is called by SDL */
/**
* \file SDL_main.h
*
* Redefine main() on some platforms so that it is called by SDL.
*/
#if defined(__WIN32__) || \
(defined(__MWERKS__) && !defined(__BEOS__)) || \
......@@ -37,18 +41,26 @@
#define C_LINKAGE
#endif /* __cplusplus */
/* The application's main() function must be called with C linkage,
and should be declared like this:
#ifdef __cplusplus
extern "C"
#endif
int main(int argc, char *argv[])
{
}
/**
* \file SDL_main.h
*
* The application's main() function must be called with C linkage,
* and should be declared like this:
* \code
* #ifdef __cplusplus
* extern "C"
* #endif
* int main(int argc, char *argv[])
* {
* }
* \endcode
*/
#define main SDL_main
/* The prototype for the application's main() function */
/**
* The prototype for the application's main() function
*/
extern C_LINKAGE int SDL_main(int argc, char *argv[]);
......@@ -62,7 +74,9 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* This can be called to set the application class at startup */
/**
* This can be called to set the application class at startup
*/
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
void *hInst);
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
......
......@@ -23,7 +23,7 @@
/**
* \file SDL_mouse.h
*
* Include file for SDL mouse event handling
* Include file for SDL mouse event handling.
*/
#ifndef _SDL_mouse_h
......@@ -46,8 +46,6 @@ typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
/* Function prototypes */
/**
* \fn int SDL_GetNumMice(void)
*
* \brief Get the number of mouse input devices available.
*
* \sa SDL_SelectMouse()
......@@ -55,8 +53,6 @@ typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
extern DECLSPEC int SDLCALL SDL_GetNumMice(void);
/**
* \fn char* SDL_GetMouseName(int index)
*
* \brief Gets the name of a mouse with the given index.
*
* \param index is the index of the mouse, which name is to be returned.
......@@ -66,8 +62,6 @@ extern DECLSPEC int SDLCALL SDL_GetNumMice(void);
extern DECLSPEC char *SDLCALL SDL_GetMouseName(int index);
/**
* \fn int SDL_SelectMouse(int index)
*
* \brief Set the index of the currently selected mouse.
*
* \return The index of the previously selected mouse.
......@@ -79,16 +73,12 @@ extern DECLSPEC char *SDLCALL SDL_GetMouseName(int index);
extern DECLSPEC int SDLCALL SDL_SelectMouse(int index);
/**
* \fn SDL_WindowID SDL_GetMouseFocusWindow(int index)
*
* \brief Get the window which currently has focus for the currently selected mouse.
* \brief Get the window which currently has focus for the specified mouse.
*/
extern DECLSPEC SDL_WindowID SDLCALL SDL_GetMouseFocusWindow(int index);
/**
* \fn int SDL_SetRelativeMouseMode(int index, SDL_bool enabled)
*
* \brief Set relative mouse mode for the currently selected mouse.
* \brief Set relative mouse mode for the specified mouse.
*
* \param enabled Whether or not to enable relative mode
*
......@@ -107,18 +97,14 @@ extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(int index,
SDL_bool enabled);
/**
* \fn SDL_bool SDL_GetRelativeMouseMode(int index)
*
* \brief Query whether relative mouse mode is enabled for the currently selected mouse.
* \brief Query whether relative mouse mode is enabled for the specified mouse.
*
* \sa SDL_SetRelativeMouseMode()
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(int index);
/**
* \fn Uint8 SDL_GetMouseState(int index, int *x, int *y)
*
* \brief Retrieve the current state of the currently selected mouse.
* \brief Retrieve the current state of the specified mouse.
*
* The current button state is returned as a button bitmask, which can
* be tested using the SDL_BUTTON(X) macros, and x and y are set to the
......@@ -128,9 +114,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(int index);
extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int index, int *x, int *y);
/**
* \fn Uint8 SDL_GetRelativeMouseState(int index, int *x, int *y)
*
* \brief Retrieve the state of the currently selected mouse.
* \brief Retrieve the state of the specified mouse.
*
* The current button state is returned as a button bitmask, which can
* be tested using the SDL_BUTTON(X) macros, and x and y are set to the
......@@ -140,8 +124,6 @@ extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int index, int *x,
int *y);
/**
* \fn void SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y)
*
* \brief Moves the currently selected mouse to the given position within the window.
*
* \param windowID The window to move the mouse into, or 0 for the current mouse focus
......@@ -154,19 +136,20 @@ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_WindowID windowID,
int x, int y);
/**
* \fn SDL_Cursor *SDL_CreateCursor (const Uint8 * data, const Uint8 * mask, int w, int h, int hot_x, int hot_y)
*
* \brief Create a cursor for the currently selected mouse, using the
* specified bitmap data and mask (in MSB format).
*
* The cursor width must be a multiple of 8 bits.
*
* The cursor is created in black and white according to the following:
* data mask resulting pixel on screen
* 0 1 White
* 1 1 Black
* 0 0 Transparent
* 1 0 Inverted color if possible, black if not.
* <table>
* <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>
* <tr><td> 0 </td><td> 1 </td><td> White </td></tr>
* <tr><td> 1 </td><td> 1 </td><td> Black </td></tr>
* <tr><td> 0 </td><td> 0 </td><td> Transparent </td></tr>
* <tr><td> 1 </td><td> 0 </td><td> Inverted color if possible, black
if not. </td></tr>
* </table>
*
* \sa SDL_FreeCursor()
*/
......@@ -176,8 +159,6 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
int hot_y);
/**
* \fn void SDL_SetCursor(SDL_Cursor * cursor)
*
* \brief Set the active cursor for the currently selected mouse.
*
* \note The cursor must have been created for the selected mouse.
......@@ -185,15 +166,11 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
/**
* \fn SDL_Cursor *SDL_GetCursor(void)
*
* \brief Return the active cursor for the currently selected mouse.
*/
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
/**
* \fn void SDL_FreeCursor(SDL_Cursor * cursor)
*
* \brief Frees a cursor created with SDL_CreateCursor().
*
* \sa SDL_CreateCursor()
......@@ -201,53 +178,54 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
/**
* \fn int SDL_ShowCursor(int toggle)
*
* \brief Toggle whether or not the cursor is shown for the currently selected mouse.
* \brief Toggle whether or not the cursor is shown for the currently selected
* mouse.
*
* \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current state.
* \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current
* state.
*
* \return 1 if the cursor is shown, or 0 if the cursor is hidden.
*/
extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
/* Used as a mask when testing buttons in buttonstate
Button 1: Left mouse button
Button 2: Middle mouse button
Button 3: Right mouse button
*/
/**
* \fn int SDL_GetCursorsNumber(int index)
*
* \brief Gets the number of cursors a pointing device supports.
*
* Useful for tablet users. Useful only under Windows.
*
* \param index is the index of the pointing device, which number of cursors we
* want to receive.
*
* \return the number of cursors supported by the pointing device. On Windows
* if a device is a tablet it returns a number >=1. Normal mice always return 1.
* if a device is a tablet it returns a number >=1. Normal mice always
* return 1.
*
* On Linux every device reports one cursor.
*/
extern DECLSPEC int SDLCALL SDL_GetCursorsNumber(int index);
/**
* \fn int SDL_GetCurrentCursor(int index)
*
* \brief Returns the index of the current cursor used by a specific pointing
* device. Useful only under Windows.
* device.
*
* Useful only under Windows.
*
* \param index is the index of the pointing device, which cursor index we want
* to receive.
*
* \return the index of the cursor currently used by a specific pointing device.
* Always 0 under Linux. On Windows if the device isn't a tablet it returns 0.
* If the device is the tablet it returns the cursor index.
* 0 - stylus, 1 - eraser, 2 - cursor.
* \return the index of the cursor currently used by a specific pointing
* device. Always 0 under Linux. On Windows if the device isn't a
* tablet it returns 0. If the device is the tablet it returns the
* cursor index. 0 - stylus, 1 - eraser, 2 - cursor.
*/
extern DECLSPEC int SDLCALL SDL_GetCurrentCursor(int index);
/**
* Used as a mask when testing buttons in buttonstate.
* - Button 1: Left mouse button
* - Button 2: Middle mouse button
* - Button 3: Right mouse button
*/
#define SDL_BUTTON(X) (1 << ((X)-1))
#define SDL_BUTTON_LEFT 1
#define SDL_BUTTON_MIDDLE 2
......
......@@ -26,7 +26,7 @@
/**
* \file SDL_mutex.h
*
* Functions to provide thread synchronization primitives
* Functions to provide thread synchronization primitives.
*/
#include "SDL_stdinc.h"
......@@ -40,123 +40,176 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* Synchronization functions which can time out return this value
if they time out.
*/
/**
* Synchronization functions which can time out return this value
* if they time out.
*/
#define SDL_MUTEX_TIMEDOUT 1
/* This is the timeout value which corresponds to never time out */
/**
* This is the timeout value which corresponds to never time out.
*/
#define SDL_MUTEX_MAXWAIT (~(Uint32)0)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Mutex functions */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* \name Mutex functions
*/
/*@{*/
/* The SDL mutex structure, defined in SDL_mutex.c */
struct SDL_mutex;
typedef struct SDL_mutex SDL_mutex;
/* Create a mutex, initialized unlocked */
/**
* Create a mutex, initialized unlocked.
*/
extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
/* Lock the mutex (Returns 0, or -1 on error) */
/**
* Lock the mutex.
*
* \return 0, or -1 on error.
*/
#define SDL_LockMutex(m) SDL_mutexP(m)
extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
/* Unlock the mutex (Returns 0, or -1 on error)
It is an error to unlock a mutex that has not been locked by
the current thread, and doing so results in undefined behavior.
/**
* Unlock the mutex.
*
* \return 0, or -1 on error.
*
* \warning It is an error to unlock a mutex that has not been locked by
* the current thread, and doing so results in undefined behavior.
*/
#define SDL_UnlockMutex(m) SDL_mutexV(m)
extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex * mutex);
/* Destroy a mutex */
/**
* Destroy a mutex.
*/
extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
/*@}*//*Mutex functions*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Semaphore functions */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* \name Semaphore functions
*/
/*@{*/
/* The SDL semaphore structure, defined in SDL_sem.c */
struct SDL_semaphore;
typedef struct SDL_semaphore SDL_sem;
/* Create a semaphore, initialized with value, returns NULL on failure. */
/**
* Create a semaphore, initialized with value, returns NULL on failure.
*/
extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
/* Destroy a semaphore */
/**
* Destroy a semaphore.
*/
extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
/* This function suspends the calling thread until the semaphore pointed
* to by sem has a positive count. It then atomically decreases the semaphore
* count.
/**
* This function suspends the calling thread until the semaphore pointed
* to by \c sem has a positive count. It then atomically decreases the
* semaphore count.
*/
extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
/* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds,
SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
*/
/**
* Non-blocking variant of SDL_SemWait().
*
* \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would
* block, and -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
/* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
the allotted time, and -1 on error.
On some platforms this function is implemented by looping with a delay
of 1 ms, and so should be avoided if possible.
*/
/**
* Variant of SDL_SemWait() with a timeout in milliseconds.
*
* \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not
* succeed in the allotted time, and -1 on error.
*
* \warning On some platforms this function is implemented by looping with a
* delay of 1 ms, and so should be avoided if possible.
*/
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
/* Atomically increases the semaphore's count (not blocking), returns 0,
or -1 on error.
/**
* Atomically increases the semaphore's count (not blocking).
*
* \return 0, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
/* Returns the current count of the semaphore */
/**
* Returns the current count of the semaphore.
*/
extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
/*@}*//*Semaphore functions*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Condition variable functions */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* \name Condition variable functions
*/
/*@{*/
/* The SDL condition variable structure, defined in SDL_cond.c */
struct SDL_cond;
typedef struct SDL_cond SDL_cond;
/* Create a condition variable */
/**
* Create a condition variable.
*/
extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
/* Destroy a condition variable */
/**
* Destroy a condition variable.
*/
extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
/* Restart one of the threads that are waiting on the condition variable,
returns 0 or -1 on error.
/**
* Restart one of the threads that are waiting on the condition variable.
*
* \return 0 or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
/* Restart all threads that are waiting on the condition variable,
returns 0 or -1 on error.
/**
* Restart all threads that are waiting on the condition variable.
* \return 0 or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
/* Wait on the condition variable, unlocking the provided mutex.
The mutex must be locked before entering this function!
The mutex is re-locked once the condition variable is signaled.
Returns 0 when it is signaled, or -1 on error.
/**
* Wait on the condition variable, unlocking the provided mutex.
*
* \warning The mutex must be locked before entering this function!
*
* The mutex is re-locked once the condition variable is signaled.
*
* \return 0 when it is signaled, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);
/* Waits for at most 'ms' milliseconds, and returns 0 if the condition
variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
signaled in the allotted time, and -1 on error.
On some platforms this function is implemented by looping with a delay
of 1 ms, and so should be avoided if possible.
*/
/**
* Waits for at most \c ms milliseconds, and returns 0 if the condition
* variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not
* signaled in the allotted time, and -1 on error.
*
* \warning On some platforms this function is implemented by looping with a
* delay of 1 ms, and so should be avoided if possible.
*/
extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
SDL_mutex * mutex, Uint32 ms);
/*@}*//*Condition variable functions*/
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
......
......@@ -20,7 +20,11 @@
slouken@libsdl.org
*/
/* This is a simple file to encapsulate the OpenGL API headers */
/**
* \file SDL_opengl.h
*
* This is a simple file to encapsulate the OpenGL API headers.
*/
#ifndef _SDL_opengl_h
#define _SDL_opengl_h
......@@ -49,11 +53,23 @@
#undef __glext_h_
#endif
/* This file is included because glext.h is not available on some systems.
If you don't want this version included, simply define "NO_SDL_GLEXT"
The latest version is available from:
http://www.opengl.org/registry/
/**
* \file SDL_opengl.h
*
* This file is included because glext.h is not available on some systems.
* If you don't want this version included, simply define ::NO_SDL_GLEXT.
*
* The latest version is available from:
* http://www.opengl.org/registry/
*/
/**
* \def NO_SDL_GLEXT
*
* Define this if you have your own version of glext.h and want to disable the
* version included in SDL_opengl.h.
*/
#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
/* *INDENT-OFF* */
#ifndef __glext_h_
......
......@@ -20,10 +20,13 @@
slouken@libsdl.org
*/
/*
This is a simple file to encapsulate the OpenGL ES API headers.
Headers copied from The Kronos Group website.
http://www.khronos.org/opengles/
/**
* \file SDL_opengles.h
*
* This is a simple file to encapsulate the OpenGL ES API headers.
*
* Headers copied from The Kronos Group website.
* http://www.khronos.org/opengles/
*/
#ifndef __gles_h_
......
......@@ -23,7 +23,7 @@
/**
* \file SDL_pixels.h
*
* Header for the enumerated pixel format definitions
* Header for the enumerated pixel format definitions.
*/
#ifndef _SDL_pixels_h
......@@ -37,12 +37,19 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* Transparency definitions: These define alpha as the opacity of a surface */
/**
* \name Transparency definitions
*
* These define alpha as the opacity of a surface.
*/
/*@{*/
#define SDL_ALPHA_OPAQUE 255
#define SDL_ALPHA_TRANSPARENT 0
/*@}*/
/** Pixel type. */
enum
{ /* Pixel type */
{
SDL_PIXELTYPE_UNKNOWN,
SDL_PIXELTYPE_INDEX1,
SDL_PIXELTYPE_INDEX4,
......@@ -57,14 +64,17 @@ enum
SDL_PIXELTYPE_ARRAYF32
};
/** Bitmap pixel order, high bit -> low bit. */
enum
{ /* bitmap pixel order, high bit -> low bit */
{
SDL_BITMAPORDER_NONE,
SDL_BITMAPORDER_4321,
SDL_BITMAPORDER_1234
};
/** Packed component order, high bit -> low bit. */
enum
{ /* packed component order, high bit -> low bit */
{
SDL_PACKEDORDER_NONE,
SDL_PACKEDORDER_XRGB,
SDL_PACKEDORDER_RGBX,
......@@ -75,8 +85,10 @@ enum
SDL_PACKEDORDER_ABGR,
SDL_PACKEDORDER_BGRA
};
/** Array component order, low byte -> high byte. */
enum
{ /* array component order, low byte -> high byte */
{
SDL_ARRAYORDER_NONE,
SDL_ARRAYORDER_RGB,
SDL_ARRAYORDER_RGBA,
......@@ -86,8 +98,9 @@ enum
SDL_ARRAYORDER_ABGR
};
/** Packed component layout. */
enum
{ /* Packed component layout */
{
SDL_PACKEDLAYOUT_NONE,
SDL_PACKEDLAYOUT_332,
SDL_PACKEDLAYOUT_4444,
......@@ -201,15 +214,15 @@ enum
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
SDL_PIXELFORMAT_YV12 = /* Planar mode: Y + V + U (3 planes) */
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /* Planar mode: Y + U + V (3 planes) */
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
SDL_PIXELFORMAT_YUY2 = /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
SDL_PIXELFORMAT_YUY2 = /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
SDL_PIXELFORMAT_UYVY = /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
SDL_PIXELFORMAT_YVYU = /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U')
};
......@@ -241,7 +254,9 @@ struct SDL_Palette
SDL_PaletteWatch *watch;
};
/* Everything in the pixel format structure is read-only */
/**
* \note Everything in the pixel format structure is read-only.
*/
typedef struct SDL_PixelFormat
{
SDL_Palette *palette;
......@@ -262,8 +277,6 @@ typedef struct SDL_PixelFormat
} SDL_PixelFormat;
/**
* \fn SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask, Uint32 * Gmask, Uint32 * Bmask, Uint32 * Amask)
*
* \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
*
* \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
......@@ -278,11 +291,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
Uint32 * Amask);
/**
* \fn Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
*
* \brief Convert a bpp and RGBA masks to an enumerated pixel format.
*
* \return The pixel format, or SDL_PixelFormat_Unknown if the conversion wasn't possible.
* \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion
* wasn't possible.
*
* \sa SDL_PixelFormatEnumToMasks()
*/
......@@ -293,11 +305,10 @@ extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
Uint32 Amask);
/**
* \fn SDL_Palette *SDL_AllocPalette(int ncolors)
*
* \brief Create a palette structure with the specified number of color entries.
* \brief Create a palette structure with the specified number of color
* entries.
*
* \return A new palette, or NULL if there wasn't enough memory
* \return A new palette, or NULL if there wasn't enough memory.
*
* \note The palette entries are initialized to white.
*
......@@ -306,8 +317,6 @@ extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
/**
* \fn int SDL_AddPaletteWatch(SDL_Palette *palette, SDL_PaletteChangedFunc callback, void *userdata)
*
* \brief Add a callback function which is called when the palette changes.
*
* \sa SDL_DelPaletteWatch()
......@@ -317,9 +326,8 @@ extern DECLSPEC int SDLCALL SDL_AddPaletteWatch(SDL_Palette * palette,
callback, void *userdata);
/**
* \fn void SDL_DelPaletteWatch(SDL_Palette *palette, SDL_PaletteChangedFunc callback, void *userdata)
*
* \brief Remove a callback function previously added with SDL_AddPaletteWatch()
* \brief Remove a callback function previously added with
* SDL_AddPaletteWatch().
*
* \sa SDL_AddPaletteWatch()
*/
......@@ -328,35 +336,28 @@ extern DECLSPEC void SDLCALL SDL_DelPaletteWatch(SDL_Palette * palette,
callback, void *userdata);
/**
* \fn int SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Colors *colors, int firstcolor, int numcolors)
*
* \brief Set a range of colors in a palette.
*
* \param palette The palette to modify
* \param colors An array of colors to copy into the palette
* \param firstcolor The index of the first palette entry to modify
* \param ncolors The number of entries to modify
* \param palette The palette to modify.
* \param colors An array of colors to copy into the palette.
* \param firstcolor The index of the first palette entry to modify.
* \param ncolors The number of entries to modify.
*
* \return 0 on success, or -1 if not all of the colors could be set
* \return 0 on success, or -1 if not all of the colors could be set.
*/
extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
const SDL_Color * colors,
int firstcolor, int ncolors);
/**
* \fn void SDL_FreePalette(SDL_Palette *palette)
*
* \brief Free a palette created with SDL_AllocPalette()
* \brief Free a palette created with SDL_AllocPalette().
*
* \sa SDL_AllocPalette()
*/
extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
/**
* \fn Uint32 SDL_MapRGB(const SDL_PixelFormat *format,
* Uint8 r, Uint8 g, Uint8 b)
*
* \brief Maps an RGB triple to an opaque pixel value for a given pixel format
* \brief Maps an RGB triple to an opaque pixel value for a given pixel format.
*
* \sa SDL_MapRGBA
*/
......@@ -364,10 +365,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
Uint8 r, Uint8 g, Uint8 b);
/**
* \fn Uint32 SDL_MapRGBA(const SDL_PixelFormat *fmt,
* Uint8 r, Uint8 g, Uint8 b, Uint8 a)
*
* \brief Maps an RGBA quadruple to a pixel value for a given pixel format
* \brief Maps an RGBA quadruple to a pixel value for a given pixel format.
*
* \sa SDL_MapRGB
*/
......@@ -376,10 +374,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
Uint8 a);
/**
* \fn void SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat * format,
* Uint8 * r, Uint8 * g, Uint8 * b)
*
* \brief Maps a pixel value into the RGB components for a given pixel format
* \brief Maps a pixel value into the RGB components for a given pixel format.
*
* \sa SDL_GetRGBA
*/
......@@ -388,10 +383,7 @@ extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
Uint8 * r, Uint8 * g, Uint8 * b);
/**
* \fn void SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat * format,
* Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a)
*
* \brief Maps a pixel value into the RGBA components for a given pixel format
* \brief Maps a pixel value into the RGBA components for a given pixel format.
*
* \sa SDL_GetRGB
*/
......
......@@ -20,7 +20,11 @@
slouken@libsdl.org
*/
/* Try to get a standard set of platform defines */
/**
* \file SDL_platform.h
*
* Try to get a standard set of platform defines.
*/
#ifndef _SDL_platform_h
#define _SDL_platform_h
......@@ -133,7 +137,6 @@ extern "C" {
#endif
/**
* \fn const char *SDL_GetPlatform(void)
* \brief Gets the name of the platform.
*/
extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
......
......@@ -26,7 +26,7 @@
/**
* \file SDL_power.h
*
* Header for the SDL power management routines
* Header for the SDL power management routines.
*/
#include "SDL_stdinc.h"
......@@ -40,8 +40,6 @@ extern "C" {
#endif
/**
* \enum SDL_PowerState
*
* \brief The basic state for the system's power supply.
*/
typedef enum
......@@ -55,8 +53,6 @@ typedef enum
/**
* \fn int SDL_GetPowerInfo(void)
*
* \brief Get the current power supply details.
*
* \param secs Seconds of battery life left. You can pass a NULL here if
......
......@@ -23,7 +23,7 @@
/**
* \file SDL_quit.h
*
* Include file for SDL quit event handling
* Include file for SDL quit event handling.
*/
#ifndef _SDL_quit_h
......@@ -32,22 +32,27 @@
#include "SDL_stdinc.h"
#include "SDL_error.h"
/*
An SDL_QUITEVENT is generated when the user tries to close the application
window. If it is ignored or filtered out, the window will remain open.
If it is not ignored or filtered, it is queued normally and the window
is allowed to close. When the window is closed, screen updates will
complete, but have no effect.
SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
and SIGTERM (system termination request), if handlers do not already
exist, that generate SDL_QUITEVENT events as well. There is no way
to determine the cause of an SDL_QUITEVENT, but setting a signal
handler in your application will override the default generation of
quit events for that signal.
*/
/**
* \file SDL_quit.h
*
* An ::SDL_QUIT event is generated when the user tries to close the application
* window. If it is ignored or filtered out, the window will remain open.
* If it is not ignored or filtered, it is queued normally and the window
* is allowed to close. When the window is closed, screen updates will
* complete, but have no effect.
*
* SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
* and SIGTERM (system termination request), if handlers do not already
* exist, that generate ::SDL_QUIT events as well. There is no way
* to determine the cause of an ::SDL_QUIT event, but setting a signal
* handler in your application will override the default generation of
* quit events for that signal.
*
* \sa SDL_Quit()
*/
/* There are no functions directly affecting the quit event */
#define SDL_QuitRequested() \
(SDL_PumpEvents(), SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUITMASK))
......
......@@ -23,7 +23,7 @@
/**
* \file SDL_rect.h
*
* Header file for SDL_rect definition and management functions
* Header file for SDL_rect definition and management functions.
*/
#ifndef _SDL_rect_h
......@@ -43,8 +43,6 @@ extern "C" {
#endif
/**
* \struct SDL_Rect
*
* \brief A rectangle, with the origin at the upper left.
*
* \sa SDL_RectEmpty
......@@ -60,23 +58,17 @@ typedef struct SDL_Rect
} SDL_Rect;
/**
* \def SDL_RectEmpty()
*
* \brief Returns true if the rectangle has no area.
*/
#define SDL_RectEmpty(X) (((X)->w <= 0) || ((X)->h <= 0))
/**
* \def SDL_RectEquals()
*
* \brief Returns true if the two rectangles are equal.
*/
#define SDL_RectEquals(A, B) (((A)->x == (B)->x) && ((A)->y == (B)->y) && \
((A)->w == (B)->w) && ((A)->h == (B)->h))
/**
* \fn SDL_bool SDL_HasIntersection(const SDL_Rect * A, const SDL_Rect * B);
*
* \brief Determine whether two rectangles intersect.
*
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
......@@ -85,8 +77,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
const SDL_Rect * B);
/**
* \fn SDL_bool SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
*
* \brief Calculate the intersection of two rectangles.
*
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
......@@ -96,17 +86,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
SDL_Rect * result);
/**
* \fn void SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
*
* \brief Calculate the union of two rectangles
* \brief Calculate the union of two rectangles.
*/
extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
const SDL_Rect * B,
SDL_Rect * result);
/**
* \fn SDL_bool SDL_IntersectRectAndLine(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)
*
* \brief Calculate the intersection of a rectangle and line segment.
*
* \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
......
......@@ -41,33 +41,42 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* This is the read/write operation structure -- very basic */
/**
* This is the read/write operation structure -- very basic.
*/
typedef struct SDL_RWops
{
/* Seek to 'offset' relative to whence, one of stdio's whence values:
RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
Returns the final offset in the data source.
/**
* Seek to \c offset relative to \c whence, one of stdio's whence values:
* RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
*
* \return the final offset in the data source.
*/
long (SDLCALL * seek) (struct SDL_RWops * context, long offset,
int whence);
/* Read up to 'num' objects each of size 'objsize' from the data
source to the area pointed at by 'ptr'.
Returns the number of objects read, or 0 at error or end of file.
/**
* Read up to \c num objects each of size \c objsize from the data
* source to the area pointed at by \c ptr.
*
* \return the number of objects read, or 0 at error or end of file.
*/
size_t(SDLCALL * read) (struct SDL_RWops * context, void *ptr,
size_t size, size_t maxnum);
/* Write exactly 'num' objects each of size 'objsize' from the area
pointed at by 'ptr' to data source.
Returns the number of objects written, or 0 at error or end of file.
/**
* Write exactly \c num objects each of size \c objsize from the area
* pointed at by \c ptr to data source.
*
* \return the number of objects written, or 0 at error or end of file.
*/
size_t(SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
size_t size, size_t num);
/* Close and free an allocated SDL_RWops structure.
Returns 0 if successful or -1 on write error when flushing data.
/**
* Close and free an allocated SDL_RWops structure.
*
* \return 0 if successful or -1 on write error when flushing data.
*/
int (SDLCALL * close) (struct SDL_RWops * context);
......@@ -109,7 +118,12 @@ typedef struct SDL_RWops
} SDL_RWops;
/* Functions to create SDL_RWops structures from various data sources */
/**
* \name RWFrom functions
*
* Functions to create SDL_RWops structures from various data sources.
*/
/*@{*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
const char *mode);
......@@ -123,36 +137,57 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
int size);
/*@}*//*RWFrom functions*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
#define RW_SEEK_SET 0 /* Seek from the beginning of data */
#define RW_SEEK_CUR 1 /* Seek relative to current read point */
#define RW_SEEK_END 2 /* Seek relative to the end of data */
#define RW_SEEK_SET 0 /**< Seek from the beginning of data */
#define RW_SEEK_CUR 1 /**< Seek relative to current read point */
#define RW_SEEK_END 2 /**< Seek relative to the end of data */
/* Macros to easily read and write from an SDL_RWops structure */
/**
* \name Read/write macros
*
* Macros to easily read and write from an SDL_RWops structure.
*/
/*@{*/
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
#define SDL_RWclose(ctx) (ctx)->close(ctx)
/*@}*//*Read/write macros*/
/* Read an item of the specified endianness and return in native format */
/**
* \name Read endian functions
*
* Read an item of the specified endianness and return in native format.
*/
/*@{*/
extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
/*@}*//*Read endian functions*/
/* Write an item of native format to the specified endianness */
/**
* \name Write endian functions
*
* Write an item of native format to the specified endianness.
*/
/*@{*/
extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
/*@}*//*Write endian functions*/
/* Ends C function definitions when using C++ */
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
/**
* \file SDL_stdinc.h
*
* This is a general header that includes C language support
* This is a general header that includes C language support.
*/
#ifndef _SDL_stdinc_h
......@@ -79,12 +79,19 @@
# include <iconv.h>
#endif
/* The number of elements in an array */
/**
* The number of elements in an array.
*/
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
#define SDL_TABLESIZE(table) SDL_arraysize(table)
/* Use proper C++ casts when compiled as C++ to be compatible with the option
-Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above. */
/**
* \name Cast operators
*
* Use proper C++ casts when compiled as C++ to be compatible with the option
* -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
*/
/*@{*/
#ifdef __cplusplus
#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
#define SDL_static_cast(type, expression) static_cast<type>(expression)
......@@ -92,8 +99,13 @@
#define SDL_reinterpret_cast(type, expression) ((type)(expression))
#define SDL_static_cast(type, expression) ((type)(expression))
#endif
/*@}*//*Cast operators*/
/**
* \name Basic data types
*/
/*@{*/
/* Basic data types */
typedef enum
{
SDL_FALSE = 0,
......@@ -101,45 +113,37 @@ typedef enum
} SDL_bool;
/**
* \typedef Sint8
* \brief A signed 8-bit integer type.
*/
typedef int8_t Sint8;
/**
* \typedef Uint8
* \brief An unsigned 8-bit integer type.
*/
typedef uint8_t Uint8;
/**
* \typedef Sint16
* \brief A signed 16-bit integer type.
*/
typedef int16_t Sint16;
/**
* \typedef Uint16
* \brief An unsigned 16-bit integer type.
*/
typedef uint16_t Uint16;
/**
* \typedef Sint32
* \brief A signed 32-bit integer type.
*/
typedef int32_t Sint32;
/**
* \typedef Uint32
* \brief An unsigned 32-bit integer type.
*/
typedef uint32_t Uint32;
#ifdef SDL_HAS_64BIT_TYPE
/**
* \typedef Sint64
* \brief A signed 64-bit integer type.
* \warning On platforms without any sort of 64-bit datatype, this is equivalent to Sint32!
*/
typedef int64_t Sint64;
/**
* \typedef Uint64
* \brief An unsigned 64-bit integer type.
* \warning On platforms without any sort of 64-bit datatype, this is equivalent to Uint32!
*/
......@@ -150,9 +154,12 @@ typedef Sint32 Sint64;
typedef Uint32 Uint64;
#endif
/* Make sure the types really have the right sizes */
/*@}*//*Basic data types*/
#define SDL_COMPILE_TIME_ASSERT(name, x) \
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
/** \cond */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
......@@ -167,6 +174,7 @@ SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
#endif
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
/** \endcond */
/* Check to make sure enums are the size of ints, for structure packing.
For both Watcom C/C++ and Borland C/C++ the compiler option that makes
......@@ -178,6 +186,7 @@ SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
#pragma enumsalwaysint on
#endif
/** \cond */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifndef __NINTENDODS__ /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
typedef enum
......@@ -188,6 +197,7 @@ typedef enum
SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
#endif
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
/** \endcond */
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
......@@ -748,9 +758,10 @@ extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
size_t * inbytesleft, char **outbuf,
size_t * outbytesleft);
/* This function converts a string between encodings in one pass, returning a
string that must be freed with SDL_free() or NULL on error.
*/
/**
* This function converts a string between encodings in one pass, returning a
* string that must be freed with SDL_free() or NULL on error.
*/
extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
const char *fromcode,
const char *inbuf,
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
/**
* \file SDL_syswm.h
*
* Include file for SDL custom system window manager hooks
* Include file for SDL custom system window manager hooks.
*/
#ifndef _SDL_syswm_h
......@@ -42,11 +42,14 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* Your application has access to a special type of event 'SDL_SYSWMEVENT',
which contains window-manager specific information and arrives whenever
an unhandled window event occurs. This event is ignored by default, but
you can enable it with SDL_EventState()
*/
/**
* \file SDL_syswm.h
*
* Your application has access to a special type of event ::SDL_SYSWMEVENT,
* which contains window-manager specific information and arrives whenever
* an unhandled window event occurs. This event is ignored by default, but
* you can enable it with SDL_EventState().
*/
#ifdef SDL_PROTOTYPES_ONLY
struct SDL_SysWMinfo;
#else
......@@ -66,13 +69,17 @@ struct SDL_SysWMinfo;
#undef Cursor
#endif
/* These are the various supported subsystems under UNIX */
/**
* These are the various supported subsystems under UNIX.
*/
typedef enum
{
SDL_SYSWM_X11
} SDL_SYSWM_TYPE;
/* The UNIX custom event structure */
/**
* The UNIX custom event structure.
*/
struct SDL_SysWMmsg
{
SDL_version version;
......@@ -83,9 +90,11 @@ struct SDL_SysWMmsg
} event;
};
/* The UNIX custom window manager information structure.
When this structure is returned, it holds information about which
low level system it is using, and will be one of SDL_SYSWM_TYPE.
/**
* The UNIX custom window manager information structure.
*
* When this structure is returned, it holds information about which
* low level system it is using, and will be one of SDL_SYSWM_TYPE.
*/
struct SDL_SysWMinfo
{
......@@ -95,19 +104,26 @@ struct SDL_SysWMinfo
{
struct
{
Display *display; /* The X11 display */
Window window; /* The X11 display window */
/* These locking functions should be called around
any X11 functions using the display variable.
They lock the event thread, so should not be
called around event functions or from event filters.
Display *display; /**< The X11 display */
Window window; /**< The X11 display window */
/**
* These locking functions should be called around
* any X11 functions using the display variable.
* They lock the event thread, so should not be
* called around event functions or from event filters.
*/
/*@{*/
void (*lock_func) (void);
void (*unlock_func) (void);
/*@}*/
/* Introduced in SDL 1.0.2 */
Window fswindow; /* The X11 fullscreen window */
Window wmwindow; /* The X11 managed input window */
/**
* Introduced in SDL 1.0.2.
*/
/*@{*/
Window fswindow; /**< The X11 fullscreen window */
Window wmwindow; /**< The X11 managed input window */
/*@}*/
} x11;
} info;
};
......@@ -116,40 +132,48 @@ struct SDL_SysWMinfo
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
/* The windows custom event structure */
/**
* The windows custom event structure.
*/
struct SDL_SysWMmsg
{
SDL_version version;
HWND hwnd; /* The window for the message */
UINT msg; /* The type of message */
WPARAM wParam; /* WORD message parameter */
LPARAM lParam; /* LONG message parameter */
HWND hwnd; /**< The window for the message */
UINT msg; /**< The type of message */
WPARAM wParam; /**< WORD message parameter */
LPARAM lParam; /**< LONG message parameter */
};
/* The windows custom window manager information structure */
/**
* The windows custom window manager information structure.
*/
struct SDL_SysWMinfo
{
SDL_version version;
HWND window; /* The Win32 display window */
HWND window; /**< The Win32 display window */
};
#elif defined(SDL_VIDEO_DRIVER_RISCOS)
/* RISC OS custom event structure */
/**
* RISC OS custom event structure.
*/
struct SDL_SysWMmsg
{
SDL_version version;
int eventCode; /* The window for the message */
int eventCode; /**< The window for the message */
int pollBlock[64];
};
/* The RISC OS custom window manager information structure */
/**
* The RISC OS custom window manager information structure.
*/
struct SDL_SysWMinfo
{
SDL_version version;
int wimpVersion; /* Wimp version running under */
int taskHandle; /* The RISC OS task handle */
int window; /* The RISC OS display window */
int wimpVersion; /**< Wimp version running under */
int taskHandle; /**< The RISC OS task handle */
int window; /**< The RISC OS display window */
};
#elif defined(SDL_VIDEO_DRIVER_PHOTON) || defined(SDL_VIDEO_DRIVER_QNXGF)
......@@ -159,14 +183,18 @@ struct SDL_SysWMinfo
#endif /* SDL_VIDEO_OPENGL_ES */
#include <Ph.h>
/* The QNX custom event structure */
/**
* The QNX custom event structure.
*/
struct SDL_SysWMmsg
{
SDL_version version;
int data;
};
/* The QNX Photon custom window manager information structure */
/**
* The QNX Photon custom window manager information structure.
*/
struct SDL_SysWMinfo
{
SDL_version version;
......@@ -175,14 +203,18 @@ struct SDL_SysWMinfo
#else
/* The generic custom event structure */
/**
* The generic custom event structure.
*/
struct SDL_SysWMmsg
{
SDL_version version;
int data;
};
/* The generic custom window manager information structure */
/**
* The generic custom window manager information structure.
*/
struct SDL_SysWMinfo
{
SDL_version version;
......@@ -197,14 +229,14 @@ typedef struct SDL_SysWMinfo SDL_SysWMinfo;
/* Function prototypes */
/**
* \fn SDL_bool SDL_GetWindowWMInfo (SDL_WindowID windowID, SDL_SysWMinfo * info)
*
* \brief This function allows access to driver-dependent window information.
*
* \param windowID The window about which information is being requested
* \param info This structure must be initialized with the SDL version, and is then filled in with information about the given window.
* \param info This structure must be initialized with the SDL version, and is
* then filled in with information about the given window.
*
* \return SDL_TRUE if the function is implemented and the version member of the 'info' struct is valid, SDL_FALSE otherwise.
* \return SDL_TRUE if the function is implemented and the version member of
* the \c info struct is valid, SDL_FALSE otherwise.
*
* You typically use this function like this:
* \code
......
This diff is collapsed.
This diff is collapsed.
......@@ -20,5 +20,11 @@
slouken@libsdl.org
*/
/**
* \file SDL_types.h
*
* \deprecated
*/
/* DEPRECATED */
#include "SDL_stdinc.h"
......@@ -23,7 +23,7 @@
/**
* \file SDL_version.h
*
* This header defines the current SDL version
* This header defines the current SDL version.
*/
#ifndef _SDL_version_h
......@@ -41,7 +41,6 @@ extern "C" {
#endif
/**
* \struct SDL_version
* \brief Information the version of SDL in use.
*
* Represents the library's version as three levels: major revision
......@@ -67,14 +66,13 @@ typedef struct SDL_version
#define SDL_PATCHLEVEL 0
/**
* \def SDL_VERSION(x)
* \brief Macro to determine SDL version program was compiled against.
*
* This macro fills in a SDL_version structure with the version of the
* library you compiled against. This is determined by what header the
* compiler uses. Note that if you dynamically linked the library, you might
* have a slightly newer or older version at runtime. That version can be
* determined with SDL_GetVersion(), which, unlike SDL_VERSION,
* determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
* is not a macro.
*
* \param x A pointer to a SDL_version struct to initialize.
......@@ -89,29 +87,36 @@ typedef struct SDL_version
(x)->patch = SDL_PATCHLEVEL; \
}
/* This macro turns the version numbers into a numeric value:
/**
* This macro turns the version numbers into a numeric value:
* \verbatim
(1,2,3) -> (1203)
This assumes that there will never be more than 100 patchlevels
*/
\endverbatim
*
* This assumes that there will never be more than 100 patchlevels.
*/
#define SDL_VERSIONNUM(X, Y, Z) \
((X)*1000 + (Y)*100 + (Z))
/* This is the version number macro for the current SDL version */
/**
* This is the version number macro for the current SDL version.
*/
#define SDL_COMPILEDVERSION \
SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */
/**
* This macro will evaluate to true if compiled with SDL at least X.Y.Z.
*/
#define SDL_VERSION_ATLEAST(X, Y, Z) \
(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
/**
* \fn void SDL_GetVersion(SDL_version *ver)
* \brief Get the version of SDL that is linked against your program.
*
* If you are using a shared library (DLL) version of SDL, then it is
* possible that it will be different than the version you compiled against.
*
* This is a real function; the macro SDL_VERSION tells you what version
* This is a real function; the macro SDL_VERSION() tells you what version
* of SDL you compiled against:
*
* \code
......@@ -133,7 +138,6 @@ typedef struct SDL_version
extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
/**
* \fn int SDL_GetRevision(void)
* \brief Get the code revision of SDL that is linked against your program.
*/
extern DECLSPEC int SDLCALL SDL_GetRevision(void);
......
This diff is collapsed.
......@@ -20,10 +20,13 @@
slouken@libsdl.org
*/
/* This file sets things up for C dynamic library function definitions,
static inlined functions, and structures aligned at 4-byte alignment.
If you don't like ugly C preprocessor code, don't look at this file. :)
*/
/**
* \file begin_code.h
*
* This file sets things up for C dynamic library function definitions,
* static inlined functions, and structures aligned at 4-byte alignment.
* If you don't like ugly C preprocessor code, don't look at this file. :)
*/
/* This shouldn't be nested -- included it around code only. */
#ifdef _begin_code_h
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment