SDL.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*
  2. SDL - Simple DirectMedia Layer
  3. Copyright (C) 1997-2010 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. [email protected]
  17. */
  18. /**
  19. * \file SDL.h
  20. *
  21. * Main include header for the SDL library
  22. */
  23. /**
  24. * \mainpage Simple DirectMedia Layer (SDL)
  25. *
  26. * http://www.libsdl.org/
  27. *
  28. * \section intro_sec Introduction
  29. *
  30. * This is the Simple DirectMedia Layer, a general API that provides low
  31. * level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
  32. * and 2D framebuffer across multiple platforms.
  33. *
  34. * The current version supports Windows, Windows CE, Mac OS X, Linux,
  35. * FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, and QNX. The code contains
  36. * support for other operating systems but those are not officially supported.
  37. *
  38. * SDL is written in C, but works with C++ natively, and has bindings to
  39. * several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
  40. * Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
  41. * Pike, Pliant, Python, Ruby, and Smalltalk.
  42. *
  43. * This library is distributed under GNU LGPL version 2, which can be
  44. * found in the file "COPYING". This license allows you to use SDL
  45. * freely in commercial programs as long as you link with the dynamic
  46. * library.
  47. *
  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.
  50. * The header files and test programs are well commented and always up to date.
  51. * More documentation is available in HTML format in "docs/index.html", and
  52. * a documentation wiki is available online at:
  53. * http://www.libsdl.org/cgi/docwiki.cgi
  54. *
  55. * The test programs in the "test" subdirectory are in the public domain.
  56. *
  57. * Frequently asked questions are answered online:
  58. * http://www.libsdl.org/faq.php
  59. *
  60. * If you need help with the library, or just want to discuss SDL related
  61. * issues, you can join the developers mailing list:
  62. * http://www.libsdl.org/mailing-list.php
  63. *
  64. * Enjoy!
  65. * Sam Lantinga ([email protected])
  66. */
  67. #ifndef _SDL_H
  68. #define _SDL_H
  69. #include "SDL_main.h"
  70. #include "SDL_stdinc.h"
  71. #include "SDL_atomic.h"
  72. #include "SDL_audio.h"
  73. #include "SDL_clipboard.h"
  74. #include "SDL_cpuinfo.h"
  75. #include "SDL_endian.h"
  76. #include "SDL_error.h"
  77. #include "SDL_events.h"
  78. #include "SDL_loadso.h"
  79. #include "SDL_mutex.h"
  80. #include "SDL_power.h"
  81. #include "SDL_rwops.h"
  82. #include "SDL_thread.h"
  83. #include "SDL_timer.h"
  84. #include "SDL_version.h"
  85. #include "SDL_video.h"
  86. #include "SDL_compat.h"
  87. #include "begin_code.h"
  88. /* Set up for C function definitions, even when using C++ */
  89. #ifdef __cplusplus
  90. /* *INDENT-OFF* */
  91. extern "C" {
  92. /* *INDENT-ON* */
  93. #endif
  94. /* As of version 0.5, SDL is loaded dynamically into the application */
  95. /**
  96. * \name SDL_INIT_*
  97. *
  98. * These are the flags which may be passed to SDL_Init(). You should
  99. * specify the subsystems which you will be using in your application.
  100. */
  101. /*@{*/
  102. #define SDL_INIT_TIMER 0x00000001
  103. #define SDL_INIT_AUDIO 0x00000010
  104. #define SDL_INIT_VIDEO 0x00000020
  105. #define SDL_INIT_JOYSTICK 0x00000200
  106. #define SDL_INIT_HAPTIC 0x00001000
  107. #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
  108. #define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */
  109. #define SDL_INIT_EVERYTHING 0x0000FFFF
  110. /*@}*/
  111. /**
  112. * This function initializes the subsystems specified by \c flags
  113. * Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
  114. * signal handlers for some commonly ignored fatal signals (like SIGSEGV).
  115. */
  116. extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
  117. /**
  118. * This function initializes specific SDL subsystems
  119. */
  120. extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
  121. /**
  122. * This function cleans up specific SDL subsystems
  123. */
  124. extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
  125. /**
  126. * This function returns a mask of the specified subsystems which have
  127. * previously been initialized.
  128. *
  129. * If \c flags is 0, it returns a mask of all initialized subsystems.
  130. */
  131. extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
  132. /**
  133. * This function cleans up all initialized subsystems. You should
  134. * call it upon all exit conditions.
  135. */
  136. extern DECLSPEC void SDLCALL SDL_Quit(void);
  137. /* Ends C function definitions when using C++ */
  138. #ifdef __cplusplus
  139. /* *INDENT-OFF* */
  140. }
  141. /* *INDENT-ON* */
  142. #endif
  143. #include "close_code.h"
  144. #endif /* _SDL_H */
  145. /* vi: set ts=4 sw=4 expandtab: */