include/SDL.h
changeset 7191 75360622e65f
parent 7022 d9f3d2e3bd07
child 7360 b86947ea2749
equal deleted inserted replaced
7190:11612d544fcd 7191:75360622e65f
    19   3. This notice may not be removed or altered from any source distribution.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    20 */
    21 
    21 
    22 /**
    22 /**
    23  *  \file SDL.h
    23  *  \file SDL.h
    24  *  
    24  *
    25  *  Main include header for the SDL library
    25  *  Main include header for the SDL library
    26  */
    26  */
    27 
    27 
    28 /**
    28 /**
    29  *  \mainpage Simple DirectMedia Layer (SDL)
    29  *  \mainpage Simple DirectMedia Layer (SDL)
    30  *  
    30  *
    31  *  http://www.libsdl.org/
    31  *  http://www.libsdl.org/
    32  *  
    32  *
    33  *  \section intro_sec Introduction
    33  *  \section intro_sec Introduction
    34  *  
    34  *
    35  *  This is the Simple DirectMedia Layer, a general API that provides low
    35  *  This is the Simple DirectMedia Layer, a general API that provides low
    36  *  level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
    36  *  level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
    37  *  and 2D framebuffer across multiple platforms.
    37  *  and 2D framebuffer across multiple platforms.
    38  *  
    38  *
    39  *  SDL is written in C, but works with C++ natively, and has bindings to
    39  *  SDL is written in C, but works with C++ natively, and has bindings to
    40  *  several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
    40  *  several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
    41  *  Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
    41  *  Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
    42  *  Pike, Pliant, Python, Ruby, and Smalltalk.
    42  *  Pike, Pliant, Python, Ruby, and Smalltalk.
    43  *  
    43  *
    44  *  This library is distributed under the zlib license, which can be
    44  *  This library is distributed under the zlib license, which can be
    45  *  found in the file  "COPYING".  This license allows you to use SDL
    45  *  found in the file  "COPYING".  This license allows you to use SDL
    46  *  freely for any purpose as long as you retain the copyright notice.
    46  *  freely for any purpose as long as you retain the copyright notice.
    47  *  
    47  *
    48  *  The best way to learn how to use SDL is to check out the header files in
    48  *  The best way to learn how to use SDL is to check out the header files in
    49  *  the "include" subdirectory and the programs in the "test" subdirectory.
    49  *  the "include" subdirectory and the programs in the "test" subdirectory.
    50  *  The header files and test programs are well commented and always up to date.
    50  *  The header files and test programs are well commented and always up to date.
    51  *  More documentation and FAQs are available online at:
    51  *  More documentation and FAQs are available online at:
    52  *  	http://wiki.libsdl.org/
    52  *      http://wiki.libsdl.org/
    53  *  
    53  *
    54  *  If you need help with the library, or just want to discuss SDL related
    54  *  If you need help with the library, or just want to discuss SDL related
    55  *  issues, you can join the developers mailing list:
    55  *  issues, you can join the developers mailing list:
    56  *  	http://www.libsdl.org/mailing-list.php
    56  *      http://www.libsdl.org/mailing-list.php
    57  *  
    57  *
    58  *  Enjoy!
    58  *  Enjoy!
    59  *  	Sam Lantinga				(slouken@libsdl.org)
    59  *      Sam Lantinga                (slouken@libsdl.org)
    60  */
    60  */
    61 
    61 
    62 #ifndef _SDL_H
    62 #ifndef _SDL_H
    63 #define _SDL_H
    63 #define _SDL_H
    64 
    64 
    90 #include "SDL_video.h"
    90 #include "SDL_video.h"
    91 
    91 
    92 #include "begin_code.h"
    92 #include "begin_code.h"
    93 /* Set up for C function definitions, even when using C++ */
    93 /* Set up for C function definitions, even when using C++ */
    94 #ifdef __cplusplus
    94 #ifdef __cplusplus
    95 /* *INDENT-OFF* */
       
    96 extern "C" {
    95 extern "C" {
    97 /* *INDENT-ON* */
       
    98 #endif
    96 #endif
    99 
    97 
   100 /* As of version 0.5, SDL is loaded dynamically into the application */
    98 /* As of version 0.5, SDL is loaded dynamically into the application */
   101 
    99 
   102 /**
   100 /**
   103  *  \name SDL_INIT_*
   101  *  \name SDL_INIT_*
   104  *  
   102  *
   105  *  These are the flags which may be passed to SDL_Init().  You should
   103  *  These are the flags which may be passed to SDL_Init().  You should
   106  *  specify the subsystems which you will be using in your application.
   104  *  specify the subsystems which you will be using in your application.
   107  */
   105  */
   108 /*@{*/
   106 /*@{*/
   109 #define SDL_INIT_TIMER          0x00000001
   107 #define SDL_INIT_TIMER          0x00000001
   110 #define SDL_INIT_AUDIO          0x00000010
   108 #define SDL_INIT_AUDIO          0x00000010
   111 #define SDL_INIT_VIDEO          0x00000020
   109 #define SDL_INIT_VIDEO          0x00000020
   112 #define SDL_INIT_JOYSTICK       0x00000200
   110 #define SDL_INIT_JOYSTICK       0x00000200
   113 #define SDL_INIT_HAPTIC         0x00001000
   111 #define SDL_INIT_HAPTIC         0x00001000
   114 #define SDL_INIT_GAMECONTROLLER 0x00002000		/**< turn on game controller also implicitly does JOYSTICK */
   112 #define SDL_INIT_GAMECONTROLLER 0x00002000      /**< turn on game controller also implicitly does JOYSTICK */
   115 #define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
   113 #define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
   116 #define SDL_INIT_EVERYTHING ( \
   114 #define SDL_INIT_EVERYTHING ( \
   117                 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | \
   115                 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | \
   118                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
   116                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
   119             )
   117             )
   137 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
   135 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
   138 
   136 
   139 /**
   137 /**
   140  *  This function returns a mask of the specified subsystems which have
   138  *  This function returns a mask of the specified subsystems which have
   141  *  previously been initialized.
   139  *  previously been initialized.
   142  *  
   140  *
   143  *  If \c flags is 0, it returns a mask of all initialized subsystems.
   141  *  If \c flags is 0, it returns a mask of all initialized subsystems.
   144  */
   142  */
   145 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
   143 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
   146 
   144 
   147 /**
   145 /**
   150  */
   148  */
   151 extern DECLSPEC void SDLCALL SDL_Quit(void);
   149 extern DECLSPEC void SDLCALL SDL_Quit(void);
   152 
   150 
   153 /* Ends C function definitions when using C++ */
   151 /* Ends C function definitions when using C++ */
   154 #ifdef __cplusplus
   152 #ifdef __cplusplus
   155 /* *INDENT-OFF* */
       
   156 }
   153 }
   157 /* *INDENT-ON* */
       
   158 #endif
   154 #endif
   159 #include "close_code.h"
   155 #include "close_code.h"
   160 
   156 
   161 #endif /* _SDL_H */
   157 #endif /* _SDL_H */
   162 
   158