summaryrefslogtreecommitdiffstats
path: root/venv/Lib/site-packages/pygame/__init__.pyi
blob: e2a06f841262b06ec7c5f428cdcf166077bc76bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from typing import Any, Tuple, Callable, Union, Optional, overload, Type

# Most useful stuff
from pygame.constants import *
import pygame.surface
import pygame.rect
import pygame.color
import pygame.event
import pygame.bufferproxy
import pygame.draw
import pygame.display
import pygame.font
import pygame.image
import pygame.key
import pygame.mixer
import pygame.mouse
import pygame.time
import pygame.version

# Advanced stuff
import pygame.cursors
import pygame.joystick
import pygame.mask
import pygame.sprite
import pygame.transform
import pygame.bufferproxy
import pygame.pixelarray
import pygame.pixelcopy
import pygame.sndarray
import pygame.surfarray
import pygame.math
import pygame.fastevent

# Other
import pygame.scrap

# This classes are auto imported with pygame, so I put their declaration here
class Rect(pygame.rect.Rect): ...
class Surface(pygame.surface.Surface): ...
class Color(pygame.color.Color): ...
class PixelArray(pygame.pixelarray.PixelArray): ...
class Vector2(pygame.math.Vector2): ...
class Vector3(pygame.math.Vector3): ...

def init() -> Tuple[int, int]: ...
def quit() -> None: ...
def get_init() -> bool: ...

class error(RuntimeError):
    RuntimeError

def get_error() -> str: ...
def set_error(error_msg: str) -> None: ...
def get_sdl_version() -> Tuple[int, int, int]: ...
def get_sdl_byteorder() -> int: ...
def encode_string(
    obj: Union[str, bytes],
    encoding: Optional[str] = "unicode_escape",
    errors: Optional[str] = "backslashreplace",
    etype: Optional[Type[Exception]] = UnicodeEncodeError,
) -> bytes: ...
@overload
def encode_file_path(
    obj: Union[str, bytes], etype: Optional[Type[Exception]] = UnicodeEncodeError
) -> bytes: ...
@overload
def encode_file_path(
    obj: Any, etype: Optional[Type[Exception]] = UnicodeEncodeError
) -> bytes: ...
def register_quit(callable: Callable) -> None: ...
def __getattr__(name) -> Any: ...  # don't error on missing stubs