bro
This commit is contained in:
1 parent
de41a02749
commit
9af09cebd3
764 files changed
+54218
-78859
No files matched your search
@@ -1,55 +1,51 @@
|
||||
from typing import Any, ClassVar, TypeAlias, final
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
List,
|
||||
Optional,
|
||||
Sequence,
|
||||
SupportsInt,
|
||||
Tuple,
|
||||
Union,
|
||||
final,
|
||||
overload,
|
||||
)
|
||||
|
||||
from pygame.typing import SequenceLike
|
||||
from typing_extensions import deprecated # added in 3.13
|
||||
|
||||
class _GenericEvent:
|
||||
# Just exists to avoid duplication of data for Event
|
||||
# and (deprecated) EventType
|
||||
|
||||
@property
|
||||
def type(self) -> int: ...
|
||||
__dict__: dict[str, Any]
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
@final
|
||||
class Event:
|
||||
type: int
|
||||
dict: Dict[str, Any]
|
||||
__dict__: Dict[str, Any]
|
||||
__hash__: None # type: ignore
|
||||
def __init__(
|
||||
self, type: int, dict: dict[str, Any] = ..., **kwargs: Any
|
||||
self, type: int, dict: Dict[str, Any] = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
# this is at the bottom because mypy complains if this declaration comes
|
||||
# before any uses of the dict[] typehinting because of the same naming
|
||||
@property
|
||||
def dict(self) -> dict[str, Any]: ...
|
||||
|
||||
@final
|
||||
class Event(_GenericEvent):
|
||||
pass
|
||||
|
||||
@final
|
||||
@deprecated("Use `Event` instead (EventType is an old alias)")
|
||||
class EventType(_GenericEvent):
|
||||
pass
|
||||
|
||||
_EventTypes: TypeAlias = int | SequenceLike[int]
|
||||
_EventTypes = Union[SupportsInt, Tuple[SupportsInt, ...], Sequence[SupportsInt]]
|
||||
|
||||
def pump() -> None: ...
|
||||
def get(
|
||||
eventtype: _EventTypes | None = None,
|
||||
pump: bool = True,
|
||||
exclude: _EventTypes | None = None,
|
||||
) -> list[Event]: ...
|
||||
eventtype: Optional[_EventTypes] = None,
|
||||
pump: Any = True,
|
||||
exclude: Optional[_EventTypes] = None,
|
||||
) -> List[Event]: ...
|
||||
def poll() -> Event: ...
|
||||
def wait(timeout: int = 0) -> Event: ...
|
||||
def peek(eventtype: _EventTypes | None = None, pump: bool = True) -> bool: ...
|
||||
def clear(eventtype: _EventTypes | None = None, pump: bool = True) -> None: ...
|
||||
def event_name(type: int, /) -> str: ...
|
||||
def set_blocked(type: _EventTypes | None, /) -> None: ...
|
||||
def set_allowed(type: _EventTypes | None, /) -> None: ...
|
||||
def get_blocked(type: _EventTypes, /) -> bool: ...
|
||||
def set_grab(grab: bool, /) -> None: ...
|
||||
def peek(eventtype: Optional[_EventTypes] = None, pump: Any = True) -> bool: ...
|
||||
def clear(eventtype: Optional[_EventTypes] = None, pump: Any = True) -> None: ...
|
||||
def event_name(type: int) -> str: ...
|
||||
def set_blocked(type: Optional[_EventTypes]) -> None: ...
|
||||
def set_allowed(type: Optional[_EventTypes]) -> None: ...
|
||||
def get_blocked(type: _EventTypes) -> bool: ...
|
||||
def set_grab(grab: bool) -> None: ...
|
||||
def get_grab() -> bool: ...
|
||||
def post(event: Event, /) -> bool: ...
|
||||
def set_keyboard_grab(grab: bool) -> None: ...
|
||||
def get_keyboard_grab() -> bool: ...
|
||||
def post(event: Event) -> bool: ...
|
||||
def custom_type() -> int: ...
|
||||
|
||||
EventType = Event
|
||||
Reference in new issue
Block a user