Module Functions
----------------
.. function:: get_compiled_version () -> (int, int, int)

  Gets the SDL version pygame2 was compiled against as three-value tuple.

  This version is built at compile time. It can be used to detect
  which features may not be available through Pygame, if it is used
  as precompiled package using a different version of the SDL
  library.



.. function:: get_error () -> :exc:`pygame2.Error`

  Gets the last :exc:`pygame2.Error` occured.

  SDL maintains an internal error message. This message will usually
  be given to you when a :exc:`pygame2.Error` is raised.

  You will rarely need to call this function.



.. function:: get_version () -> (int, int, int)

  Gets the SDL version pygame2 currently uses as three-value tuple.

  This version is detected at runtime. It can be used to detect
  which features may not be available through Pygame, if it is used
  as precompiled package using a different version of the SDL library.



.. function:: init (flags) -> bool

  Initializes the underlying SDL library.

  Initializes the underlying SDL library using the passed SDL
  flags. The flags indicate, which subsystems of SDL should be
  initialized and can be a bitwise combination of the initialization
  constants of the :mod:`pygame2.sdl.constants` module.

  In case an error occured, False will be returned. The detailled
  error can be received using :func:`get_error`.



.. function:: init_subsystem (flags) -> bool

  Initializes one or more SDL subsystems.

  In case a specific part of SDL was not initialized using
  :func:`pygame2.sdl.init`, this function can be used to initialize it at
  a later time.

  In contrast to the original SDL library, you do not need to call
  :func:`pygame2.sdl.init` beforehand to initialize anything. In
  case it was not done before, :func:`pygame2.sdl.init` will be
  called implicitly with the passed *flags*.

  In case an error occured, False will be returned. The detailled
  error can be received using :func:`get_error`.



.. function:: quit () -> None

  Shuts down all subsystems of the underlying SDL library.

  After calling this function, you should not invoke any SDL related
  class, method or function as they are likely to fail or might give
  unpredictable results.



.. function:: quit_subsystem (flags) -> None

  Shuts down one or more subsystems of the underlying SDL library.

  After calling this function, you should not invoke any class,
  method or function related to the specified subsystems as they are
  likely to fail or might give unpredictable results.



.. function:: was_init ([flags]) -> long

  Gets a bitwise OR'ed combination of the initialized SDL subsystems.

  Returns a bitwise combination of the currently initialized SDL
  subsystems. If *flags* is passed, only the listed subsystems in
  *flags* will be passed and the initialized ones of those returned.




