1. pygame
  2. Untitled project
  3. pygame

Source

pygame / doc / src / sdlbase.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE module SYSTEM "api.dtd">

<module name="pygame2.sdl.base">
  <show>0</show>
  <alias>pygame2.sdl</alias>
  <short>basic SDL wrapper module</short>
  <desc>
    Basic Pygame2 SDL wrapper functions.
  </desc>

  <func name="get_compiled_version">
    <call>get_compiled_version () -> (int, int, int)</call>
    <desc>
      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.
    </desc>
  </func>
  <func name="get_error">
    <call>get_error () -> str</call>
    <desc>
      Gets the last SDL error message 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.
    </desc>
  </func>
  <func name="get_version">
    <call>get_version () -> (int, int, int)</call>
    <desc>
      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.
    </desc>
  </func>
  <func name="init">
    <call>init (flags) -> bool</call>
    <desc>
      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`.
    </desc>
  </func>
  <func name="init_subsystem">
    <call>init_subsystem (flags) -> bool</call>
    <desc>
      Initializes one or more SDL subsystems.

      In case a specific part of SDL was not initialized using
      :func:`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:`init` beforehand to initialize anything. In
      case it was not done before, :func:`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`.
    </desc>
  </func>
  <func name="quit">
    <call>quit () -> None</call>
    <desc>
      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.
    </desc>
  </func>
  <func name="quit_subsystem">
    <call>quit_subsystem (flags) -> None</call>
    <desc>
      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.
    </desc>
  </func>
  <func name="was_init">
    <call>was_init ([flags]) -> long</call>
    <desc>
      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.
    </desc>
  </func>
</module>