""" A thin wrapper package around the OpenAL library. """ import os import sys import ctypes from pygame2.dll import DLL dll = DLL("OpenAL", {"win32": ["OpenAL", "OpenAL32", "soft_oal"], "darwin": ["OpenAL"], "DEFAULT": ["openal"]} ) openaltype = dll.get_decorator() def get_dll_file(): """Gets the file name of the loaded OpenAL library.""" return dll.libfile
""" import sys import ctypes from pygame2.dll import DLL from pygame2.compat import byteify, stringify __all__ = ["init", "init_subsystem", "quit", "quit_subsystem", "was_init", "SDL_INIT_TIMER", "SDL_INIT_AUDIO", "SDL_INIT_VIDEO", "SDL_INIT_JOYSTICK", "SDL_INIT_HAPTIC", "SDL_INIT_NOPARACHUTE", "SDL_INIT_EVERYTHING", "get_error", "set_error", "clear_error", "SDLError" ] dll = DLL("SDL 2", ["SDL2", "SDL2-2.0"]) sdltype = dll.get_decorator() SDL_INIT_TIMER = 0x00000001 SDL_INIT_AUDIO = 0x00000010 SDL_INIT_VIDEO = 0x00000020 SDL_INIT_JOYSTICK = 0x00000200 SDL_INIT_HAPTIC = 0x00001000 SDL_INIT_NOPARACHUTE = 0x00100000 SDL_INIT_EVERYTHING = 0x0000FFFF SDL_FALSE = 0 SDL_TRUE = 1 def get_dll_file(): """Gets the file name of the loaded SDL2 library."""
""" A thin wrapper package around the vorbisfile library. """ import ctypes from pygame2.dll import DLL from pygame2.ogg import OggError __all__ = ["OggVorbis_File", "clear", "fopen", "pcm_total", "read", "info" ] dll = DLL("vorbisfile", {"win32": ["libvorbisfile", "vorbisfile"], "DEFAULT": ["vorbisfile"] }) vfiletype = dll.get_decorator() OV_FALSE = -1 OV_EOF = -2 OV_HOLE = -3 OV_EREAD = -128 OV_EFAULT = -129 OV_EIMPL = -130 OV_EINVAL = -131 OV_ENOTVORBIS = -132 OV_EBADHEADER = -133 OV_EVERSION = -134 OV_ENOTAUDIO = -135 OV_EBADPACKET = -136 OV_EBADLINK = -137
__all__ = ["init", "quit", "load", "load_rw", "load_typed_rw", "load_texture", "load_texture_rw", "load_texture_typed_rw", "is_ico", "is_cur", "is_bmp", "is_gif", "is_jpg", "is_lbm", "is_pcx", "is_pnm", "is_png", "is_pnm", "is_tif", "is_webp", "is_xcf", "is_xpm", "is_xv", "load_bmp_rw", "load_cur_rw", "load_gif_rw", "load_ico_rw", "load_jpg_rw", "load_lbm_rw", "load_pcx_rw", "load_pnm_rw", "load_png_rw", "load_tga_rw", "load_tif_rw", "load_webp_rw", "load_xcf_rw", "load_xpm_rw", "load_xv_rw", "IMG_INIT_JPG", "IMG_INIT_PNG", "IMG_INIT_TIF", "IMG_INIT_WEBP", ] dll = DLL("SDL2_image", ["SDL2_image", "SDL2_image-1.2"]) sdlimgtype = dll.get_decorator() SDL_Surface_p = ctypes.POINTER(SDL_Surface) SDL_RWops_p = ctypes.POINTER(SDL_RWops) SDL_Renderer_p = ctypes.POINTER(SDL_Renderer) SDL_Texture_p = ctypes.POINTER(SDL_Texture) IMG_INIT_JPG = 0x00000001 IMG_INIT_PNG = 0x00000002 IMG_INIT_TIF = 0x00000004 IMG_INIT_WEBP = 0x00000008 def _check(ret): """Checks the return value of a ctypes function and raises a SDLError,