SDL.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. SDL - Simple DirectMedia Layer
  3. Copyright (C) 1997-2012 Sam Lantinga
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. Sam Lantinga
  16. slouken@libsdl.org
  17. */
  18. /** @file SDL.h
  19. * Main include header for the SDL library
  20. */
  21. #ifndef _SDL_H
  22. #define _SDL_H
  23. #include "SDL_main.h"
  24. #include "SDL_stdinc.h"
  25. #include "SDL_audio.h"
  26. #include "SDL_cdrom.h"
  27. #include "SDL_cpuinfo.h"
  28. #include "SDL_endian.h"
  29. #include "SDL_error.h"
  30. #include "SDL_events.h"
  31. #include "SDL_loadso.h"
  32. #include "SDL_mutex.h"
  33. #include "SDL_rwops.h"
  34. #include "SDL_thread.h"
  35. #include "SDL_timer.h"
  36. #include "SDL_video.h"
  37. #include "SDL_version.h"
  38. #include "begin_code.h"
  39. /* Set up for C function definitions, even when using C++ */
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. /** @file SDL.h
  44. * @note As of version 0.5, SDL is loaded dynamically into the application
  45. */
  46. /** @name SDL_INIT Flags
  47. * These are the flags which may be passed to SDL_Init() -- you should
  48. * specify the subsystems which you will be using in your application.
  49. */
  50. /*@{*/
  51. #define SDL_INIT_TIMER 0x00000001
  52. #define SDL_INIT_AUDIO 0x00000010
  53. #define SDL_INIT_VIDEO 0x00000020
  54. #define SDL_INIT_CDROM 0x00000100
  55. #define SDL_INIT_JOYSTICK 0x00000200
  56. #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
  57. #define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */
  58. #define SDL_INIT_EVERYTHING 0x0000FFFF
  59. /*@}*/
  60. /** This function loads the SDL dynamically linked library and initializes
  61. * the subsystems specified by 'flags' (and those satisfying dependencies)
  62. * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
  63. * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
  64. */
  65. extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
  66. /** This function initializes specific SDL subsystems */
  67. extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
  68. /** This function cleans up specific SDL subsystems */
  69. extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
  70. /** This function returns mask of the specified subsystems which have
  71. * been initialized.
  72. * If 'flags' is 0, it returns a mask of all initialized subsystems.
  73. */
  74. extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
  75. /** This function cleans up all initialized subsystems and unloads the
  76. * dynamically linked library. You should call it upon all exit conditions.
  77. */
  78. extern DECLSPEC void SDLCALL SDL_Quit(void);
  79. /* Ends C function definitions when using C++ */
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #include "close_code.h"
  84. #endif /* _SDL_H */