from .language import *
import io
import numpy
import pygame.gfxdraw
from _typeshed import Incomplete
from abc import ABC
from typing import Any, Sequence

ORIGIN: Final[tuple[int, int]]

class Positions:
    @staticmethod
    def convert(pos: Any) -> tuple: ...
    @staticmethod
    def is_same(pos1: object, pos2: object) -> bool: ...
    @staticmethod
    def add(*positions: tuple) -> tuple: ...
    @staticmethod
    def subtract(position: tuple, *positions: tuple) -> tuple: ...

class Coordinates:
    @staticmethod
    def convert(pos: Any) -> tuple[int, int]: ...
    @staticmethod
    def is_same(pos1: object, pos2: object) -> bool: ...
    @staticmethod
    def add(*positions: tuple) -> tuple[int, int]: ...
    @staticmethod
    def subtract(position: tuple, *positions: tuple) -> tuple[int, int]: ...
    @staticmethod
    def get_in_diamond_shaped(_x: int, _y: int, _radius: int) -> list[tuple[int, int]]: ...

int_f: Incomplete
number: Incomplete
color_liked: Incomplete
ImageSurface = pygame.Surface
PoI: Incomplete
PG_Event = pygame.event.Event
PG_TUPLE = Union[tuple[int, int, int, int], tuple[tuple[int, int], tuple[int, int]]]
MOUSE_BUTTON_DOWN: Incomplete
MOUSE_BUTTON_UP: Incomplete
JOYSTICK_BUTTON_DOWN: Incomplete

class Numbers:
    @staticmethod
    def get_random_int(start: int, end: int) -> int: ...
    @staticmethod
    def keep_int_in_range(_number: int, min_value: int, max_value: int) -> int: ...
    @staticmethod
    def keep_number_in_range(_number: number, min_value: number, max_value: number) -> number: ...
    @staticmethod
    def convert_percentage(percentage: Union[str, float, int]) -> float: ...

class Colors:
    WHITE: Final[tuple[int, int, int, int]]
    GRAY: Final[tuple[int, int, int, int]]
    LIGHT_GRAY: Final[tuple[int, int, int, int]]
    BLACK: Final[tuple[int, int, int, int]]
    RED: Final[tuple[int, int, int, int]]
    ORANGE: Final[tuple[int, int, int, int]]
    YELLOW: Final[tuple[int, int, int, int]]
    GREEN: Final[tuple[int, int, int, int]]
    BLUE: Final[tuple[int, int, int, int]]
    INDIGO: Final[tuple[int, int, int, int]]
    VIOLET: Final[tuple[int, int, int, int]]
    TRANSPARENT: Final[tuple[int, int, int, int]]
    @classmethod
    def get(cls, color: color_liked) -> tuple[int, int, int, int]: ...

class Keys:
    DOWN: Final[int]
    UP: Final[int]
    ESCAPE: Final[int]
    SPACE: Final[int]
    BACKSPACE: Final[int]
    DELETE: Final[int]
    LEFT_CTRL: Final[int]
    ARROW_UP: Final[int]
    ARROW_DOWN: Final[int]
    ARROW_LEFT: Final[int]
    ARROW_RIGHT: Final[int]
    RETURN: Final[int]
    BACKQUOTE: Final[int]
    F3: Final[int]
    @classmethod
    def get_pressed(cls, key_name: strint) -> bool: ...
    @staticmethod
    def get_key_code(key_name: str) -> int: ...
    @classmethod
    def get_clipboard(cls) -> str: ...

class Draw:
    @staticmethod
    def rect(_surface: ImageSurface, color: tuple[int, int, int, int], rect: PG_TUPLE, thickness: int = ...) -> None: ...
    @staticmethod
    def circle(_surface: ImageSurface, color: tuple[int, int, int, int], center_pos: tuple[int, int], radius: int, thickness: int = ...) -> None: ...
    @staticmethod
    def aaline(_surface: ImageSurface, color: tuple[int, int, int, int], start_pos: tuple[int, int], end_pos: tuple[int, int], blend: int = ...) -> None: ...
    @staticmethod
    def line(_surface: ImageSurface, color: tuple[int, int, int, int], start_pos: tuple[int, int], end_pos: tuple[int, int], width: int = ...) -> None: ...
    @staticmethod
    def polygon(_surface: ImageSurface, _color: tuple[int, int, int, int], _points: tuple[tuple[int, int], ...], thickness: int = ...) -> None: ...

class Surfaces:
    NULL: Final[ImageSurface]
    @staticmethod
    def new(size: tuple[int, int], surface_flags: int = ...) -> ImageSurface: ...
    @staticmethod
    def transparent(size: tuple[int, int]) -> ImageSurface: ...
    @staticmethod
    def colored(size: tuple[int, int], color: color_liked) -> ImageSurface: ...
    @classmethod
    def from_array(cls, surface_array: numpy.ndarray, swap_axes: bool = ...) -> ImageSurface: ...
    @staticmethod
    def to_array(_surface: ImageSurface, with_alpha: bool = ..., swap_axes: bool = ...) -> numpy.ndarray: ...
    @classmethod
    def texture_is_missing(cls, size: tuple[int, int]) -> ImageSurface: ...
    @classmethod
    def is_not_null(cls, _surface: Optional[ImageSurface]) -> bool: ...

class Filters:
    @staticmethod
    def glassmorphism_effect(_surface: ImageSurface, _rect: Optional[PG_TUPLE] = ..., whiteness: int = ...) -> ImageSurface: ...
    @staticmethod
    def apply_glassmorphism_effect_to(_surface: ImageSurface, whiteness: int = ...) -> None: ...
    @staticmethod
    def add_darkness(img: ImageSurface, value: int) -> ImageSurface: ...
    @staticmethod
    def subtract_darkness(img: ImageSurface, value: int) -> ImageSurface: ...

class Images:
    @classmethod
    def generate_path_according_to_prefix(cls, path: str) -> str: ...
    @classmethod
    def quickly_load(cls, path: PoI, convert_alpha: bool = ...) -> ImageSurface: ...
    @classmethod
    def load(cls, path: PoI, size: tuple = ..., alpha: int = ..., convert_alpha: bool = ...) -> ImageSurface: ...
    @staticmethod
    def load_animated(path: str) -> list: ...
    @staticmethod
    def resize(img: ImageSurface, size: tuple) -> ImageSurface: ...
    @staticmethod
    def smoothly_resize(img: ImageSurface, size: tuple) -> ImageSurface: ...
    @classmethod
    def smoothly_resize_and_crop_to_fit(cls, img: ImageSurface, size: tuple[int, int]) -> ImageSurface: ...
    @staticmethod
    def flip(img: ImageSurface, horizontal: bool, vertical: bool) -> ImageSurface: ...
    @staticmethod
    def rotate(img: ImageSurface, angle: int) -> ImageSurface: ...
    @classmethod
    def crop_bounding(cls, img: ImageSurface) -> ImageSurface: ...
    @staticmethod
    def save(_surface: ImageSurface, path: str) -> None: ...
    @staticmethod
    def fromBytesIO(_bytes: io.BytesIO) -> ImageSurface: ...

class Controller:
    class __JoystickController:
        @classmethod
        def get_init(cls) -> bool: ...
        @classmethod
        def get_button(cls, buttonId: int) -> bool: ...
        @classmethod
        def get_axis(cls, buttonId: int) -> float: ...
        @classmethod
        def is_active(cls) -> bool: ...
        @classmethod
        def update(cls) -> None: ...
    class __MouseController:
        x: int
        y: int
        @classmethod
        def set_custom_icon(cls, path: str = ...) -> None: ...
        @classmethod
        def get_moving_speed(cls) -> int: ...
        @classmethod
        def get_x_moved(cls) -> int: ...
        @classmethod
        def get_y_moved(cls) -> int: ...
        @classmethod
        def get_pos(cls) -> tuple[int, int]: ...
        @classmethod
        def set_pos(cls, pos: tuple) -> None: ...
        @staticmethod
        def get_pressed(button_id: int) -> bool: ...
        @classmethod
        def get_pressed_previously(cls, button_id: int) -> bool: ...
        @classmethod
        def get_pressed_since(cls, button_id: int) -> bool: ...
        @classmethod
        def is_in_rect(cls, _x: int, _y: int, _width: int, _height: int) -> bool: ...
        @classmethod
        def update(cls) -> None: ...
        @classmethod
        def finish_up(cls) -> None: ...
        @classmethod
        def draw_custom_icon(cls, _surface: ImageSurface) -> None: ...
    joystick: Incomplete
    mouse: Incomplete
    NEED_TO_TAKE_SCREENSHOT: bool
    @classmethod
    def get_events(cls) -> tuple: ...
    @classmethod
    def get_event(cls, event_type: str) -> bool: ...
    @classmethod
    def finish_up(cls) -> None: ...
    @classmethod
    def update(cls) -> None: ...

class Display:
    @classmethod
    def get_fps(cls) -> int: ...
    @classmethod
    def get_delta_time(cls) -> float: ...
    @classmethod
    def flip(cls) -> None: ...
    @staticmethod
    def set_caption(title: str) -> None: ...
    @staticmethod
    def set_icon(path: str) -> None: ...
    @classmethod
    def get_width(cls) -> int: ...
    @classmethod
    def get_height(cls) -> int: ...
    @classmethod
    def get_size(cls) -> tuple[int, int]: ...
    @classmethod
    def init(cls, flags: int = ...) -> ImageSurface: ...
    @classmethod
    def get_window(cls) -> ImageSurface: ...
    @classmethod
    def blit(cls, surface_to_draw: ImageSurface, pos: Sequence) -> None: ...

class Videos(ABC):
    @classmethod
    def convert(cls, input_path: str, output_path: str) -> None: ...
    @classmethod
    def convert_from_video_to_audio(cls, input_path: str, output_path: str) -> None: ...
    @classmethod
    def split_audio(cls, input_path: str, audio_type: str = ...) -> str: ...
PG_Sound = pygame.mixer.Sound
PG_Channel = pygame.mixer.Channel
LINPG_RESERVED_BACKGROUND_MUSIC_CHANNEL: Optional[PG_Channel]
LINPG_RESERVED_SOUND_EFFECTS_CHANNEL: Optional[PG_Channel]
LINPG_RESERVED_ENVIRONMENTAL_SOUND_CHANNEL: Optional[PG_Channel]

class AbstractSoundManager(ABC):
    def __init__(self, channel_id: int) -> None: ...
    @property
    def channel_id(self) -> int: ...
    def get_channel_id(self) -> int: ...

class SoundManagement(AbstractSoundManager):
    def __init__(self, channel_id: int) -> None: ...
    def add(self, path: str) -> None: ...
    def clear(self) -> None: ...
    def play(self, sound_id: int = ...) -> None: ...
    def stop(self) -> None: ...
    @property
    def volume(self) -> float: ...
    def get_volume(self) -> float: ...
    def set_volume(self, volume: number) -> None: ...

class Sound:
    @staticmethod
    def load(path: str, volume: Optional[float] = ...) -> PG_Sound: ...
    @classmethod
    def load_from_video(cls, path: str, volume: Optional[float] = ..., cache_key: Optional[str] = ...) -> PG_Sound: ...
    @classmethod
    def load_from_directory(cls, folder_path: str) -> tuple[PG_Sound, ...]: ...
    @staticmethod
    def play(sound: PG_Sound, channel_id: int) -> None: ...
    @staticmethod
    def fade_out(time: int) -> None: ...
    @staticmethod
    def find_channel(force: bool = ...) -> PG_Channel: ...
    @staticmethod
    def get_num_channels() -> int: ...
    @classmethod
    def get_channel(cls, channel_id: int) -> PG_Channel: ...

class Music:
    @staticmethod
    def load(path: str) -> None: ...
    @staticmethod
    def load_from_video(path: str) -> str: ...
    @staticmethod
    def unload() -> None: ...
    @staticmethod
    def restart() -> None: ...
    @staticmethod
    def play(loops: int = ..., start: float = ..., fade_ms: int = ...) -> None: ...
    @staticmethod
    def stop() -> None: ...
    @staticmethod
    def fade_out(time: int) -> None: ...
    @staticmethod
    def get_pos() -> int: ...
    @staticmethod
    def set_pos(time: float) -> None: ...
    @staticmethod
    def get_volume() -> float: ...
    @staticmethod
    def set_volume(volume: float) -> None: ...
    @staticmethod
    def get_busy() -> bool: ...

class Volume:
    @classmethod
    def get_global_value(cls) -> int: ...
    @classmethod
    def get_background_music(cls) -> int: ...
    @classmethod
    def get_effects(cls) -> int: ...
    @classmethod
    def get_environment(cls) -> int: ...

class Media:
    @staticmethod
    def get_busy() -> bool: ...
    @staticmethod
    def pause() -> None: ...
    @staticmethod
    def unpause() -> None: ...
    @staticmethod
    def unload() -> None: ...
    @staticmethod
    def fade_out(time: int) -> None: ...

class FontGenerator:
    def __init__(self) -> None: ...
    @property
    def bold(self) -> bool: ...
    @property
    def italic(self) -> bool: ...
    @property
    def size(self) -> int: ...
    def update(self, size: int_f, ifBold: bool = ..., ifItalic: bool = ...) -> None: ...
    def estimate_text_width(self, text: strint) -> int: ...
    def estimate_text_height(self, text: strint) -> int: ...
    def check_for_update(self, _size: int, ifBold: bool = ..., ifItalic: bool = ...) -> None: ...
    def render(self, txt: strint, color: color_liked, background_color: Optional[color_liked] = ...) -> ImageSurface: ...

class Font:
    @classmethod
    def set_global_font(cls, key: str, size: int, ifBold: bool = ..., ifItalic: bool = ...) -> None: ...
    @classmethod
    def get_global_font(cls, key: str) -> FontGenerator: ...
    @classmethod
    def get_global_font_size(cls, key: str) -> int: ...
    @classmethod
    def render_global_font(cls, key: str, txt: str, color: color_liked, background_color: color_liked = ...) -> ImageSurface: ...
    @classmethod
    def remove_global_font(cls, key: str) -> None: ...
    @staticmethod
    def create(size: int_f, ifBold: bool = ..., ifItalic: bool = ...) -> FontGenerator: ...
    @classmethod
    def render(cls, txt: strint, color: color_liked, size: int_f, ifBold: bool = ..., ifItalic: bool = ..., background_color: color_liked = ...) -> ImageSurface: ...

class ArtisticFont:
    @staticmethod
    def render_description_box(txt: strint, color: color_liked, size: int, padding: int, background_color: color_liked, ifBold: bool = ..., ifItalic: bool = ..., outline_color: color_liked = ..., thickness: int = ...) -> ImageSurface: ...
    @staticmethod
    def render_with_outline(_text: strint, color: color_liked, size: int, outline_thickness: int = ..., outline_color: color_liked = ..., ifBold: bool = ..., ifItalic: bool = ...) -> ImageSurface: ...
