kraken-engine 1.2.1__cp313-cp313-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4137 @@
1
+ from __future__ import annotations
2
+ import collections.abc
3
+ import enum
4
+ import typing
5
+ from . import collision
6
+ from . import color
7
+ from . import draw
8
+ from . import ease
9
+ from . import event
10
+ from . import gamepad
11
+ from . import input
12
+ from . import key
13
+ from . import line
14
+ from . import math
15
+ from . import mouse
16
+ from . import rect
17
+ from . import renderer
18
+ from . import time
19
+ from . import transform
20
+ from . import window
21
+ __all__: list[str] = ['AUDIO_DEVICE_ADDED', 'AUDIO_DEVICE_FORMAT_CHANGED', 'AUDIO_DEVICE_REMOVED', 'Align', 'Anchor', 'Animation', 'AnimationController', 'Audio', 'AudioStream', 'BOTTOM_LEFT', 'BOTTOM_MID', 'BOTTOM_RIGHT', 'CAMERA_DEVICE_ADDED', 'CAMERA_DEVICE_APPROVED', 'CAMERA_DEVICE_DENIED', 'CAMERA_DEVICE_REMOVED', 'CENTER', 'CLIPBOARD_UPDATE', 'C_BACK', 'C_DPAD_DOWN', 'C_DPAD_LEFT', 'C_DPAD_RIGHT', 'C_DPAD_UP', 'C_EAST', 'C_GUIDE', 'C_LSHOULDER', 'C_LSTICK', 'C_LTRIGGER', 'C_LX', 'C_LY', 'C_NORTH', 'C_PS3', 'C_PS4', 'C_PS5', 'C_RSHOULDER', 'C_RSTICK', 'C_RTRIGGER', 'C_RX', 'C_RY', 'C_SOUTH', 'C_STANDARD', 'C_START', 'C_SWITCH_JOYCON_LEFT', 'C_SWITCH_JOYCON_PAIR', 'C_SWITCH_JOYCON_RIGHT', 'C_SWITCH_PRO', 'C_WEST', 'C_XBOX_360', 'C_XBOX_ONE', 'Camera', 'Circle', 'Color', 'DID_ENTER_BACKGROUND', 'DID_ENTER_FOREGROUND', 'DISPLAY_ADDED', 'DISPLAY_CONTENT_SCALE_CHANGED', 'DISPLAY_CURRENT_MODE_CHANGED', 'DISPLAY_DESKTOP_MODE_CHANGED', 'DISPLAY_MOVED', 'DISPLAY_ORIENTATION', 'DISPLAY_REMOVED', 'DROP_BEGIN', 'DROP_COMPLETE', 'DROP_FILE', 'DROP_POSITION', 'DROP_TEXT', 'EasingAnimation', 'Event', 'EventType', 'FINGER_CANCELED', 'FINGER_DOWN', 'FINGER_MOTION', 'FINGER_UP', 'Font', 'FontHint', 'Frame', 'GAMEPAD_ADDED', 'GAMEPAD_AXIS_MOTION', 'GAMEPAD_BUTTON_DOWN', 'GAMEPAD_BUTTON_UP', 'GAMEPAD_REMAPPED', 'GAMEPAD_REMOVED', 'GAMEPAD_SENSOR_UPDATE', 'GAMEPAD_STEAM_HANDLE_UPDATED', 'GAMEPAD_TOUCHPAD_DOWN', 'GAMEPAD_TOUCHPAD_MOTION', 'GAMEPAD_TOUCHPAD_UP', 'GAMEPAD_UPDATE_COMPLETE', 'GamepadAxis', 'GamepadButton', 'GamepadType', 'InputAction', 'KEYBOARD_ADDED', 'KEYBOARD_REMOVED', 'KEYMAP_CHANGED', 'KEY_DOWN', 'KEY_UP', 'K_0', 'K_1', 'K_2', 'K_3', 'K_4', 'K_5', 'K_6', 'K_7', 'K_8', 'K_9', 'K_AGAIN', 'K_AMPERSAND', 'K_APPLICATION', 'K_ASTERISK', 'K_AT', 'K_BACKSLASH', 'K_BACKSPACE', 'K_CALL', 'K_CAPS', 'K_CARET', 'K_CHANNEL_DEC', 'K_CHANNEL_INC', 'K_COLON', 'K_COMMA', 'K_COPY', 'K_CUT', 'K_DBLQUOTE', 'K_DEL', 'K_DOLLAR', 'K_DOWN', 'K_END', 'K_ENDCALL', 'K_EQ', 'K_ESC', 'K_EXCLAIM', 'K_EXECUTE', 'K_F1', 'K_F10', 'K_F11', 'K_F12', 'K_F13', 'K_F14', 'K_F15', 'K_F2', 'K_F3', 'K_F4', 'K_F5', 'K_F6', 'K_F7', 'K_F8', 'K_F9', 'K_FIND', 'K_GRAVE', 'K_GT', 'K_HASH', 'K_HELP', 'K_HOME', 'K_INS', 'K_KP_0', 'K_KP_1', 'K_KP_2', 'K_KP_3', 'K_KP_4', 'K_KP_5', 'K_KP_6', 'K_KP_7', 'K_KP_8', 'K_KP_9', 'K_KP_DIV', 'K_KP_ENTER', 'K_KP_MINUS', 'K_KP_MULT', 'K_KP_PERIOD', 'K_KP_PLUS', 'K_LALT', 'K_LBRACE', 'K_LBRACKET', 'K_LCTRL', 'K_LEFT', 'K_LGUI', 'K_LPAREN', 'K_LSHIFT', 'K_LT', 'K_MEDIA_EJECT', 'K_MEDIA_FF', 'K_MEDIA_NEXT', 'K_MEDIA_PAUSE', 'K_MEDIA_PLAY', 'K_MEDIA_PLAY_PAUSE', 'K_MEDIA_PREV', 'K_MEDIA_REC', 'K_MEDIA_REWIND', 'K_MEDIA_SELECT', 'K_MEDIA_STOP', 'K_MENU', 'K_MINUS', 'K_MODE', 'K_MUTE', 'K_NUMLOCK', 'K_PASTE', 'K_PAUSE', 'K_PERCENT', 'K_PERIOD', 'K_PGDOWN', 'K_PGUP', 'K_PIPE', 'K_PLUS', 'K_POWER', 'K_PRTSCR', 'K_QUESTION', 'K_RALT', 'K_RBRACE', 'K_RBRACKET', 'K_RCTRL', 'K_RETURN', 'K_RGUI', 'K_RIGHT', 'K_RPAREN', 'K_RSHIFT', 'K_SCRLK', 'K_SELECT', 'K_SEMICOLON', 'K_SGLQUOTE', 'K_SLASH', 'K_SLEEP', 'K_SOFTLEFT', 'K_SOFTRIGHT', 'K_SPACE', 'K_STOP', 'K_TAB', 'K_TILDE', 'K_UNDERSCORE', 'K_UNDO', 'K_UNKNOWN', 'K_UP', 'K_VOLDOWN', 'K_VOLUP', 'K_WAKE', 'K_a', 'K_b', 'K_c', 'K_d', 'K_e', 'K_f', 'K_g', 'K_h', 'K_i', 'K_j', 'K_k', 'K_l', 'K_m', 'K_n', 'K_o', 'K_p', 'K_q', 'K_r', 'K_s', 'K_t', 'K_u', 'K_v', 'K_w', 'K_x', 'K_y', 'K_z', 'Keycode', 'LOCALE_CHANGED', 'LOW_MEMORY', 'Line', 'MID_LEFT', 'MID_RIGHT', 'MOUSE_ADDED', 'MOUSE_BUTTON_DOWN', 'MOUSE_BUTTON_UP', 'MOUSE_MOTION', 'MOUSE_REMOVED', 'MOUSE_WHEEL', 'M_LEFT', 'M_MIDDLE', 'M_RIGHT', 'M_SIDE1', 'M_SIDE2', 'Mask', 'MouseButton', 'PEN_AXIS', 'PEN_BUTTON_DOWN', 'PEN_BUTTON_UP', 'PEN_DOWN', 'PEN_MOTION', 'PEN_PROXIMITY_IN', 'PEN_PROXIMITY_OUT', 'PEN_UP', 'P_DISTANCE', 'P_PRESSURE', 'P_ROTATION', 'P_SLIDER', 'P_TANGENTIAL_PRESSURE', 'P_TILT_X', 'P_TILT_Y', 'PenAxis', 'PixelArray', 'PolarCoordinate', 'Polygon', 'QUIT', 'RENDER_DEVICE_LOST', 'RENDER_DEVICE_RESET', 'RENDER_TARGETS_RESET', 'Rect', 'SENSOR_UPDATE', 'SYSTEM_THEME_CHANGED', 'S_0', 'S_1', 'S_2', 'S_3', 'S_4', 'S_5', 'S_6', 'S_7', 'S_8', 'S_9', 'S_AGAIN', 'S_APOSTROPHE', 'S_APPLICATION', 'S_BACKSLASH', 'S_BACKSPACE', 'S_CALL', 'S_CAPS', 'S_CHANNEL_DEC', 'S_CHANNEL_INC', 'S_COMMA', 'S_COPY', 'S_CUT', 'S_DEL', 'S_DOWN', 'S_END', 'S_ENDCALL', 'S_EQ', 'S_ESC', 'S_EXECUTE', 'S_F1', 'S_F10', 'S_F11', 'S_F12', 'S_F13', 'S_F14', 'S_F15', 'S_F2', 'S_F3', 'S_F4', 'S_F5', 'S_F6', 'S_F7', 'S_F8', 'S_F9', 'S_FIND', 'S_GRAVE', 'S_HELP', 'S_HOME', 'S_INS', 'S_KP_0', 'S_KP_1', 'S_KP_2', 'S_KP_3', 'S_KP_4', 'S_KP_5', 'S_KP_6', 'S_KP_7', 'S_KP_8', 'S_KP_9', 'S_KP_DIV', 'S_KP_ENTER', 'S_KP_MINUS', 'S_KP_MULT', 'S_KP_PERIOD', 'S_KP_PLUS', 'S_LALT', 'S_LBRACKET', 'S_LCTRL', 'S_LEFT', 'S_LGUI', 'S_LSHIFT', 'S_MEDIA_EJECT', 'S_MEDIA_FAST_FORWARD', 'S_MEDIA_NEXT', 'S_MEDIA_PAUSE', 'S_MEDIA_PLAY', 'S_MEDIA_PLAY_PAUSE', 'S_MEDIA_PREV', 'S_MEDIA_REC', 'S_MEDIA_REWIND', 'S_MEDIA_SELECT', 'S_MEDIA_STOP', 'S_MENU', 'S_MINUS', 'S_MODE', 'S_MUTE', 'S_NUMLOCK', 'S_PASTE', 'S_PAUSE', 'S_PERIOD', 'S_PGDOWN', 'S_PGUP', 'S_POWER', 'S_PRTSCR', 'S_RALT', 'S_RBRACKET', 'S_RCTRL', 'S_RETURN', 'S_RGUI', 'S_RIGHT', 'S_RSHIFT', 'S_SCRLK', 'S_SELECT', 'S_SEMICOLON', 'S_SLASH', 'S_SLEEP', 'S_SOFTLEFT', 'S_SOFTRIGHT', 'S_SPACE', 'S_STOP', 'S_TAB', 'S_UNDO', 'S_UP', 'S_VOLDOWN', 'S_VOLUP', 'S_WAKE', 'S_a', 'S_b', 'S_c', 'S_d', 'S_e', 'S_f', 'S_g', 'S_h', 'S_i', 'S_j', 'S_k', 'S_l', 'S_m', 'S_n', 'S_o', 'S_p', 'S_q', 'S_r', 'S_s', 'S_t', 'S_u', 'S_v', 'S_w', 'S_x', 'S_y', 'S_z', 'Scancode', 'ShaderState', 'SheetStrip', 'TERMINATING', 'TEXT_EDITING', 'TEXT_EDITING_CANDIDATES', 'TEXT_INPUT', 'TOP_LEFT', 'TOP_MID', 'TOP_RIGHT', 'Text', 'Texture', 'Tile', 'TileLayer', 'TileMap', 'Timer', 'Vec2', 'WILL_ENTER_BACKGROUND', 'WILL_ENTER_FOREGROUND', 'WINDOW_CLOSE_REQUESTED', 'WINDOW_DESTROYED', 'WINDOW_DISPLAY_CHANGED', 'WINDOW_DISPLAY_SCALE_CHANGED', 'WINDOW_ENTER_FULLSCREEN', 'WINDOW_EXPOSED', 'WINDOW_FOCUS_GAINED', 'WINDOW_FOCUS_LOST', 'WINDOW_HDR_STATE_CHANGED', 'WINDOW_HIDDEN', 'WINDOW_HIT_TEST', 'WINDOW_ICCPROF_CHANGED', 'WINDOW_LEAVE_FULLSCREEN', 'WINDOW_MAXIMIZED', 'WINDOW_MINIMIZED', 'WINDOW_MOUSE_ENTER', 'WINDOW_MOUSE_LEAVE', 'WINDOW_MOVED', 'WINDOW_OCCLUDED', 'WINDOW_RESIZED', 'WINDOW_RESTORED', 'WINDOW_SAFE_AREA_CHANGED', 'WINDOW_SHOWN', 'collision', 'color', 'draw', 'ease', 'event', 'gamepad', 'init', 'input', 'key', 'line', 'math', 'mouse', 'quit', 'rect', 'renderer', 'time', 'transform', 'window']
22
+ class Align(enum.IntEnum):
23
+ CENTER: typing.ClassVar[Align] # value = <Align.CENTER: 1>
24
+ LEFT: typing.ClassVar[Align] # value = <Align.LEFT: 0>
25
+ RIGHT: typing.ClassVar[Align] # value = <Align.RIGHT: 2>
26
+ @classmethod
27
+ def __new__(cls, value):
28
+ ...
29
+ def __format__(self, format_spec):
30
+ """
31
+ Convert to a string according to format_spec.
32
+ """
33
+ class Anchor(enum.IntEnum):
34
+ BOTTOM_LEFT: typing.ClassVar[Anchor] # value = <Anchor.BOTTOM_LEFT: 6>
35
+ BOTTOM_MID: typing.ClassVar[Anchor] # value = <Anchor.BOTTOM_MID: 7>
36
+ BOTTOM_RIGHT: typing.ClassVar[Anchor] # value = <Anchor.BOTTOM_RIGHT: 8>
37
+ CENTER: typing.ClassVar[Anchor] # value = <Anchor.CENTER: 4>
38
+ MID_LEFT: typing.ClassVar[Anchor] # value = <Anchor.MID_LEFT: 3>
39
+ MID_RIGHT: typing.ClassVar[Anchor] # value = <Anchor.MID_RIGHT: 5>
40
+ TOP_LEFT: typing.ClassVar[Anchor] # value = <Anchor.TOP_LEFT: 0>
41
+ TOP_MID: typing.ClassVar[Anchor] # value = <Anchor.TOP_MID: 1>
42
+ TOP_RIGHT: typing.ClassVar[Anchor] # value = <Anchor.TOP_RIGHT: 2>
43
+ @classmethod
44
+ def __new__(cls, value):
45
+ ...
46
+ def __format__(self, format_spec):
47
+ """
48
+ Convert to a string according to format_spec.
49
+ """
50
+ class Animation:
51
+ """
52
+
53
+ A complete animation sequence with frames and playback settings.
54
+
55
+ Contains a sequence of frames and the frames per second (FPS) rate for playback timing.
56
+
57
+ """
58
+ @property
59
+ def fps(self) -> int:
60
+ """
61
+ The frames per second rate for animation playback.
62
+ """
63
+ @property
64
+ def frames(self) -> list[Frame]:
65
+ """
66
+ The list of frames in the animation sequence.
67
+ """
68
+ class AnimationController:
69
+ """
70
+
71
+ Manages and controls sprite animations with multiple animation sequences.
72
+
73
+ The AnimationController handles loading animations from sprite sheets or image folders,
74
+ managing playback state, and providing frame-by-frame animation control.
75
+
76
+ """
77
+ def __init__(self) -> None:
78
+ ...
79
+ def is_finished(self) -> bool:
80
+ """
81
+ Check if the animation completed a full loop during the last update.
82
+
83
+ Returns True if the animation looped back to the beginning during the most recent
84
+ frame update. This method is const and can be called multiple times per frame
85
+ with consistent results.
86
+
87
+ Returns:
88
+ bool: True if the animation completed a loop during the last update.
89
+ """
90
+ def load_sprite_sheet(self, file_path: str, frame_size: Vec2, strips: collections.abc.Sequence[SheetStrip]) -> None:
91
+ """
92
+ Load one or more animations from a sprite sheet texture.
93
+
94
+ Divides the sprite sheet into horizontal strips, where each strip represents a different
95
+ animation. Each strip is divided into equal-sized frames based on the specified frame size.
96
+ Frames are read left-to-right within each strip, and strips are read top-to-bottom.
97
+
98
+ Args:
99
+ file_path (str): Path to the sprite sheet image file.
100
+ frame_size (Vec2): Size of each frame as (width, height).
101
+ strips (list[SheetStrip]): List of strip definitions, each containing:
102
+ - name (str): Unique identifier for the animation
103
+ - frame_count (int): Number of frames in this strip/animation
104
+ - fps (int): Frames per second for playback timing
105
+
106
+ Raises:
107
+ ValueError: If frame size is not positive, no strips provided, frame count is not
108
+ positive, or frame count exceeds sprite sheet width.
109
+ RuntimeError: If sprite sheet dimensions are not divisible by frame dimensions,
110
+ duplicate animation names exist, or strip index exceeds sprite sheet height.
111
+ """
112
+ def pause(self) -> None:
113
+ """
114
+ Pause the animation playback.
115
+
116
+ Stops animation frame advancement while preserving the current frame position.
117
+ """
118
+ def play(self, name: str) -> None:
119
+ """
120
+ Play an animation from the beginning.
121
+
122
+ Switches to the specified animation, rewinds it to frame 0, and starts playback.
123
+
124
+ Args:
125
+ name (str): The name of the animation to play.
126
+
127
+ Raises:
128
+ ValueError: If the specified animation name is not found.
129
+ """
130
+ def play_from(self, frame_index: typing.SupportsInt) -> None:
131
+ """
132
+ Start playing the current animation from a specific frame.
133
+
134
+ Sets the animation to the specified frame index and resumes playback. Useful for
135
+ starting animations mid-sequence or implementing custom animation logic.
136
+
137
+ Args:
138
+ frame_index (int): The frame index to start from (0-based).
139
+
140
+ Raises:
141
+ IndexError: If the frame index is out of range for the current animation.
142
+ """
143
+ def resume(self) -> None:
144
+ """
145
+ Resume paused animation playback.
146
+
147
+ Resumes animation frame advancement if the playback speed is greater than 0.
148
+ Does nothing if the animation is already playing or playback speed is 0.
149
+ """
150
+ def rewind(self) -> None:
151
+ """
152
+ Reset the animation to the beginning.
153
+
154
+ Sets the animation back to frame 0 and resets loop detection state.
155
+ """
156
+ def set(self, name: str) -> None:
157
+ """
158
+ Set the current active animation by name without affecting playback state.
159
+
160
+ Switches to the specified animation while preserving the current frame index and
161
+ playback state (paused/playing). Useful for seamless animation transitions.
162
+
163
+ Args:
164
+ name (str): The name of the animation to activate.
165
+
166
+ Raises:
167
+ ValueError: If the specified animation name is not found.
168
+ """
169
+ @property
170
+ def current_animation_name(self) -> str:
171
+ """
172
+ The name of the currently active animation.
173
+
174
+ Returns:
175
+ str: The name of the current animation, or empty string if none is set.
176
+ """
177
+ @property
178
+ def current_frame(self) -> Frame:
179
+ """
180
+ The current animation frame being displayed.
181
+
182
+ Returns:
183
+ Frame: The current frame with texture and rectangle data.
184
+
185
+ Raises:
186
+ RuntimeError: If no animation is currently set or the animation has no frames.
187
+ """
188
+ @property
189
+ def frame_index(self) -> int:
190
+ """
191
+ The current frame index in the animation sequence.
192
+
193
+ Returns the integer frame index (0-based) of the currently displayed frame.
194
+
195
+ Returns:
196
+ int: The current frame index.
197
+ """
198
+ @property
199
+ def looping(self) -> bool:
200
+ """
201
+ Whether the animation should loop when it reaches the end.
202
+
203
+ Returns:
204
+ bool: True if the animation is set to loop, False otherwise.
205
+ """
206
+ @looping.setter
207
+ def looping(self, arg1: bool) -> None:
208
+ ...
209
+ @property
210
+ def playback_speed(self) -> float:
211
+ """
212
+ The playback speed multiplier for animation timing.
213
+
214
+ A value of 1.0 represents normal speed, 2.0 is double speed, 0.5 is half speed.
215
+ Setting to 0 will pause the animation.
216
+
217
+ Returns:
218
+ float: The current playback speed multiplier.
219
+ """
220
+ @playback_speed.setter
221
+ def playback_speed(self, arg1: typing.SupportsFloat) -> None:
222
+ ...
223
+ @property
224
+ def progress(self) -> float:
225
+ """
226
+ The normalized progress through the current animation.
227
+
228
+ Returns a value between 0.0 (start) and 1.0 (end) representing how far through
229
+ the animation sequence the playback has progressed. Useful for UI progress bars
230
+ or triggering events at specific points in the animation.
231
+
232
+ Returns:
233
+ float: The animation progress as a value between 0.0 and 1.0.
234
+ """
235
+ class Audio:
236
+ """
237
+
238
+ A decoded audio object that supports multiple simultaneous playbacks.
239
+
240
+ Audio objects decode the entire file into memory for low-latency playback. They support
241
+ multiple concurrent playbacks of the same sound. Use this for short sound effects that may need to overlap.
242
+
243
+ """
244
+ def __init__(self, file_path: str, volume: typing.SupportsFloat = 1.0) -> None:
245
+ """
246
+ Create an Audio object from a file path with optional volume.
247
+
248
+ Args:
249
+ file_path (str): Path to the audio file to load.
250
+ volume (float, optional): Initial volume level (0.0 to 1.0+). Defaults to 1.0.
251
+
252
+ Raises:
253
+ RuntimeError: If the audio file cannot be loaded or decoded.
254
+ """
255
+ def play(self, fade_in_ms: typing.SupportsInt = 0, loop: bool = False) -> None:
256
+ """
257
+ Play the audio with optional fade-in time and loop setting.
258
+
259
+ Creates a new voice for playback, allowing multiple simultaneous plays of the same audio.
260
+ Each play instance is independent and can have different fade and loop settings.
261
+
262
+ Args:
263
+ fade_in_ms (int, optional): Fade-in duration in milliseconds. Defaults to 0.
264
+ loop (bool, optional): Whether to loop the audio continuously. Defaults to False.
265
+
266
+ Raises:
267
+ RuntimeError: If audio playback initialization fails.
268
+ """
269
+ def stop(self, fade_out_ms: typing.SupportsInt = 0) -> None:
270
+ """
271
+ Stop all active playbacks of this audio.
272
+
273
+ Stops all currently playing voices associated with this Audio object. If a fade-out
274
+ time is specified, all voices will fade out over that duration before stopping.
275
+
276
+ Args:
277
+ fade_out_ms (int, optional): Fade-out duration in milliseconds. Defaults to 0.
278
+ """
279
+ @property
280
+ def volume(self) -> float:
281
+ """
282
+ The volume level for new and existing playbacks.
283
+
284
+ Setting this property affects all currently playing voices and sets the default
285
+ volume for future playbacks. Volume can exceed 1.0 for amplification.
286
+
287
+ Type:
288
+ float: Volume level (0.0 = silent, 1.0 = original volume, >1.0 = amplified).
289
+ """
290
+ @volume.setter
291
+ def volume(self, arg1: typing.SupportsFloat) -> None:
292
+ ...
293
+ class AudioStream:
294
+ """
295
+
296
+ A streaming audio object for single-instance playback of large audio files.
297
+
298
+ AudioStream objects stream audio data from disk during playback, using minimal memory.
299
+ They support only one playback instance at a time, making them ideal for background
300
+ music, long audio tracks, or when memory usage is a concern.
301
+
302
+ """
303
+ def __init__(self, file_path: str, volume: typing.SupportsFloat = 1.0) -> None:
304
+ """
305
+ Create an AudioStream object from a file path with optional volume.
306
+
307
+ Args:
308
+ file_path (str): Path to the audio file to stream.
309
+ volume (float, optional): Initial volume level (0.0 to 1.0+). Defaults to 1.0.
310
+
311
+ Raises:
312
+ RuntimeError: If the audio file cannot be opened for streaming.
313
+ """
314
+ def pause(self) -> None:
315
+ """
316
+ Pause the audio stream playback.
317
+
318
+ The stream position is preserved and can be resumed with resume().
319
+ """
320
+ def play(self, fade_in_ms: typing.SupportsInt = 0, loop: bool = False, start_time_seconds: typing.SupportsFloat = 0.0) -> None:
321
+ """
322
+ Play the audio stream with optional fade-in time, loop setting, and start position.
323
+
324
+ Starts playback from the specified time position. If the stream is already
325
+ playing, it will restart from the specified position.
326
+
327
+ Args:
328
+ fade_in_ms (int, optional): Fade-in duration in milliseconds. Defaults to 0.
329
+ loop (bool, optional): Whether to loop the audio continuously. Defaults to False.
330
+ start_time_seconds (float, optional): Time position in seconds to start playback from. Defaults to 0.0.
331
+ """
332
+ def resume(self) -> None:
333
+ """
334
+ Resume paused audio stream playback.
335
+
336
+ Continues playback from the current stream position.
337
+ """
338
+ def rewind(self) -> None:
339
+ """
340
+ Rewind the audio stream to the beginning.
341
+
342
+ Sets the playback position back to the start of the audio file. Does not affect
343
+ the current play state (playing/paused).
344
+ """
345
+ def seek(self, time_seconds: typing.SupportsFloat) -> None:
346
+ """
347
+ Seek to a specific time position in the audio stream.
348
+
349
+ Sets the playback position to the specified time in seconds. Does not affect
350
+ the current play state (playing/paused).
351
+
352
+ Args:
353
+ time_seconds (float): The time position in seconds to seek to.
354
+ """
355
+ def set_looping(self, loop: bool) -> None:
356
+ """
357
+ Set whether the audio stream loops continuously.
358
+
359
+ Args:
360
+ loop (bool): True to enable looping, False to disable.
361
+ """
362
+ def stop(self, fade_out_ms: typing.SupportsInt = 0) -> None:
363
+ """
364
+ Stop the audio stream playback.
365
+
366
+ Args:
367
+ fade_out_ms (int, optional): Fade-out duration in milliseconds. If 0, stops immediately.
368
+ If > 0, fades out over the specified duration. Defaults to 0.
369
+ """
370
+ @property
371
+ def current_time(self) -> float:
372
+ """
373
+ The current playback time position in seconds.
374
+ """
375
+ @property
376
+ def volume(self) -> float:
377
+ """
378
+ The volume level of the audio stream.
379
+
380
+ Volume can exceed 1.0 for amplification.
381
+
382
+ Type:
383
+ float: Volume level (0.0 = silent, 1.0 = original volume, >1.0 = amplified).
384
+ """
385
+ @volume.setter
386
+ def volume(self, arg1: typing.SupportsFloat) -> None:
387
+ ...
388
+ class Camera:
389
+ """
390
+
391
+ Represents a 2D camera used for rendering.
392
+
393
+ Controls the viewport's translation, allowing you to move the view of the world.
394
+
395
+ """
396
+ @typing.overload
397
+ def __init__(self) -> None:
398
+ """
399
+ Create a camera at the default position (0, 0).
400
+
401
+ Returns:
402
+ Camera: A new camera instance.
403
+ """
404
+ @typing.overload
405
+ def __init__(self, pos: Vec2) -> None:
406
+ """
407
+ Create a camera at the given position.
408
+
409
+ Args:
410
+ pos (Vec2): The camera's initial position.
411
+ """
412
+ @typing.overload
413
+ def __init__(self, x: typing.SupportsFloat, y: typing.SupportsFloat) -> None:
414
+ """
415
+ Create a camera at the given position.
416
+
417
+ Args:
418
+ x (float): The x-coordinate of the camera's initial position.
419
+ y (float): The y-coordinate of the camera's initial position.
420
+ """
421
+ def set(self) -> None:
422
+ """
423
+ Set this camera as the active one for rendering.
424
+
425
+ Only one camera can be active at a time.
426
+ """
427
+ @property
428
+ def pos(self) -> Vec2:
429
+ """
430
+ Get or set the camera's position.
431
+
432
+ Returns:
433
+ Vec2: The camera's current position.
434
+
435
+ You can also assign a Vec2 or a (x, y) sequence to set the position.
436
+ """
437
+ @pos.setter
438
+ def pos(self, arg1: Vec2) -> None:
439
+ ...
440
+ class Circle:
441
+ """
442
+
443
+ Represents a circle shape with position and radius.
444
+
445
+ Supports collision detection with points, rectangles, other circles, and lines.
446
+
447
+ """
448
+ __hash__: typing.ClassVar[None] = None
449
+ def __eq__(self, other: Circle) -> bool:
450
+ """
451
+ Check if two circles are equal.
452
+ """
453
+ def __getitem__(self, index: typing.SupportsInt) -> float:
454
+ """
455
+ Get component by index: 0 = x, 1 = y, 2 = radius.
456
+ """
457
+ @typing.overload
458
+ def __init__(self, pos: Vec2, radius: typing.SupportsFloat) -> None:
459
+ """
460
+ Create a circle at a given position and radius.
461
+
462
+ Args:
463
+ pos (Vec2): Center position of the circle.
464
+ radius (float): Radius of the circle.
465
+ """
466
+ @typing.overload
467
+ def __init__(self, arg0: collections.abc.Sequence) -> None:
468
+ """
469
+ Create a circle from a nested sequence: ([x, y], radius).
470
+ """
471
+ def __iter__(self) -> collections.abc.Iterator:
472
+ """
473
+ Return an iterator over (x, y, radius).
474
+ """
475
+ def __len__(self) -> int:
476
+ """
477
+ Always returns 3 for (x, y, radius).
478
+ """
479
+ def __ne__(self, other: Circle) -> bool:
480
+ """
481
+ Check if two circles are not equal.
482
+ """
483
+ def as_rect(self) -> Rect:
484
+ """
485
+ Return the smallest rectangle that fully contains the circle.
486
+ """
487
+ def copy(self) -> Circle:
488
+ """
489
+ Return a copy of the circle.
490
+ """
491
+ @property
492
+ def area(self) -> float:
493
+ """
494
+ Return the area of the circle.
495
+ """
496
+ @property
497
+ def circumference(self) -> float:
498
+ """
499
+ Return the circumference of the circle.
500
+ """
501
+ @property
502
+ def pos(self) -> Vec2:
503
+ """
504
+ The center position of the circle as a Vec2.
505
+ """
506
+ @pos.setter
507
+ def pos(self, arg0: Vec2) -> None:
508
+ ...
509
+ @property
510
+ def radius(self) -> float:
511
+ """
512
+ The radius of the circle.
513
+ """
514
+ @radius.setter
515
+ def radius(self, arg0: typing.SupportsFloat) -> None:
516
+ ...
517
+ class Color:
518
+ """
519
+
520
+ Represents an RGBA color.
521
+
522
+ Each channel (r, g, b, a) is an 8-bit unsigned integer.
523
+
524
+ """
525
+ __hash__: typing.ClassVar[None] = None
526
+ def __eq__(self, other: Color) -> bool:
527
+ """
528
+ Check if two Color objects are equal (all RGBA components match).
529
+
530
+ Args:
531
+ other (Color): The color to compare with.
532
+
533
+ Returns:
534
+ bool: True if colors are identical, False otherwise.
535
+ """
536
+ def __getitem__(self, index: typing.SupportsInt) -> int:
537
+ """
538
+ Access color channels by index.
539
+
540
+ Args:
541
+ index (int): Channel index (0=r, 1=g, 2=b, 3=a).
542
+
543
+ Returns:
544
+ int: Channel value (0-255).
545
+
546
+ Raises:
547
+ IndexError: If index is not in range [0, 3].
548
+ """
549
+ @typing.overload
550
+ def __init__(self) -> None:
551
+ """
552
+ Create a Color with default values (0, 0, 0, 255).
553
+ """
554
+ @typing.overload
555
+ def __init__(self, r: typing.SupportsInt, g: typing.SupportsInt, b: typing.SupportsInt, a: typing.SupportsInt = 255) -> None:
556
+ """
557
+ Create a Color from RGBA components.
558
+
559
+ Args:
560
+ r (int): Red value [0-255].
561
+ g (int): Green value [0-255].
562
+ b (int): Blue value [0-255].
563
+ a (int, optional): Alpha value [0-255]. Defaults to 255.
564
+ """
565
+ @typing.overload
566
+ def __init__(self, hex: str) -> None:
567
+ """
568
+ Create a Color from a hex string.
569
+
570
+ Args:
571
+ hex (str): Hex color string (with or without '#' prefix).
572
+ """
573
+ @typing.overload
574
+ def __init__(self, sequence: collections.abc.Sequence) -> None:
575
+ """
576
+ Create a Color from a sequence of RGB(A) integers.
577
+
578
+ Args:
579
+ sequence (list or tuple): A sequence of 3 or 4 integers [0-255].
580
+ - 3 values: RGB (alpha defaults to 255)
581
+ - 4 values: RGBA
582
+ """
583
+ def __iter__(self) -> collections.abc.Iterator:
584
+ """
585
+ Return an iterator over color channels.
586
+
587
+ Yields:
588
+ int: The r, g, b, a values in that order (0-255 each).
589
+
590
+ Example:
591
+ for channel in color:
592
+ print(channel) # Prints r, g, b, a values
593
+ """
594
+ def __len__(self) -> int:
595
+ """
596
+ Return the number of color channels.
597
+
598
+ Returns:
599
+ int: Always returns 4 (for r, g, b, a channels).
600
+ """
601
+ def __mul__(self, scalar: typing.SupportsFloat) -> Color:
602
+ """
603
+ Multiply RGB color channels by a scalar value.
604
+
605
+ Multiplies each RGB component by the scalar. Results are clamped to [0, 255].
606
+ The alpha channel is preserved unchanged.
607
+ Negative scalars invert the color before applying the absolute value.
608
+
609
+ Args:
610
+ scalar (float): Scalar multiplier (any positive or negative value).
611
+
612
+ Returns:
613
+ Color: New Color with scaled RGB values and original alpha.
614
+ """
615
+ def __ne__(self, other: Color) -> bool:
616
+ """
617
+ Check if two Color objects are not equal.
618
+
619
+ Args:
620
+ other (Color): The color to compare with.
621
+
622
+ Returns:
623
+ bool: True if any component differs, False otherwise.
624
+ """
625
+ def __neg__(self) -> Color:
626
+ """
627
+ Unary negation operator to invert the color.
628
+
629
+ Returns the inverted color by flipping RGB channels (255 - value).
630
+ The alpha channel is preserved unchanged.
631
+
632
+ Returns:
633
+ Color: New Color with inverted RGB values and original alpha.
634
+ """
635
+ def __repr__(self) -> str:
636
+ """
637
+ Return a string suitable for debugging and recreation.
638
+
639
+ Returns:
640
+ str: String in format "Color(r, g, b, a)" that can recreate the object.
641
+ """
642
+ def __rmul__(self, scalar: typing.SupportsFloat) -> Color:
643
+ """
644
+ Multiply RGB color channels by a scalar value (reverse multiplication).
645
+
646
+ Allows scalar * color syntax in addition to color * scalar.
647
+ Results are clamped to [0, 255]. The alpha channel is preserved unchanged.
648
+ Negative scalars invert the color before applying the absolute value.
649
+
650
+ Args:
651
+ scalar (float): Scalar multiplier (any positive or negative value).
652
+
653
+ Returns:
654
+ Color: New Color with scaled RGB values and original alpha.
655
+ """
656
+ def __setitem__(self, index: typing.SupportsInt, value: typing.SupportsInt) -> None:
657
+ """
658
+ Set a color channel by index.
659
+
660
+ Args:
661
+ index (int): Channel index (0=r, 1=g, 2=b, 3=a).
662
+ value (int): New channel value (0-255).
663
+
664
+ Raises:
665
+ IndexError: If index is not in range [0, 3].
666
+ """
667
+ def __str__(self) -> str:
668
+ """
669
+ Return a human-readable string representation.
670
+
671
+ Returns:
672
+ str: String in format "(r, g, b, a)" with integer values.
673
+ """
674
+ def __truediv__(self, scalar: typing.SupportsFloat) -> Color:
675
+ """
676
+ Divide RGB color channels by a scalar value.
677
+
678
+ Divides each RGB component by the scalar. Results are clamped to [0, 255].
679
+ The alpha channel is preserved unchanged.
680
+ Negative scalars invert the color before applying the absolute value.
681
+
682
+ Args:
683
+ scalar (float): Scalar divisor (any positive or negative value except 0).
684
+
685
+ Returns:
686
+ Color: New Color with divided RGB values and original alpha.
687
+
688
+ Raises:
689
+ ValueError: If scalar is zero.
690
+ """
691
+ def copy(self) -> Color:
692
+ """
693
+ Create a copy of the color.
694
+
695
+ Returns:
696
+ Color: A new Color object with the same RGBA values.
697
+ """
698
+ @property
699
+ def a(self) -> int:
700
+ """
701
+ Alpha (transparency) channel value.
702
+
703
+ Type: int
704
+ Range: 0-255 (8-bit unsigned integer)
705
+ Note: 0 = fully transparent, 255 = fully opaque
706
+ """
707
+ @a.setter
708
+ def a(self, arg0: typing.SupportsInt) -> None:
709
+ ...
710
+ @property
711
+ def b(self) -> int:
712
+ """
713
+ Blue channel value.
714
+
715
+ Type: int
716
+ Range: 0-255 (8-bit unsigned integer)
717
+ """
718
+ @b.setter
719
+ def b(self, arg0: typing.SupportsInt) -> None:
720
+ ...
721
+ @property
722
+ def g(self) -> int:
723
+ """
724
+ Green channel value.
725
+
726
+ Type: int
727
+ Range: 0-255 (8-bit unsigned integer)
728
+ """
729
+ @g.setter
730
+ def g(self, arg0: typing.SupportsInt) -> None:
731
+ ...
732
+ @property
733
+ def hex(self) -> str:
734
+ """
735
+ Get or set the color as a hex string.
736
+
737
+ When getting, returns an 8-digit hex string in the format "#RRGGBBAA".
738
+ When setting, accepts various hex formats (see from_hex for details).
739
+
740
+ Example:
741
+ color.hex = "#FF00FF" # Set to magenta
742
+ print(color.hex) # Returns "#FF00FFFF"
743
+ """
744
+ @hex.setter
745
+ def hex(self, arg1: str) -> None:
746
+ ...
747
+ @property
748
+ def hsv(self) -> tuple[float, float, float, float]:
749
+ """
750
+ Get or set the color as an HSV tuple.
751
+
752
+ When getting, returns a tuple of (hue, saturation, value, alpha).
753
+ When setting, accepts a tuple of 3 or 4 values.
754
+
755
+ Values:
756
+ hue (float): Hue angle in degrees (0-360)
757
+ saturation (float): Saturation level (0-1)
758
+ value (float): Brightness/value level (0-1)
759
+ alpha (float): Alpha transparency (0-1), optional
760
+
761
+ Example:
762
+ color.hsv = (120, 1.0, 1.0) # Pure green
763
+ color.hsv = (240, 0.5, 0.8, 0.9) # Light blue with transparency
764
+ h, s, v, a = color.hsv # Get HSV values
765
+ """
766
+ @hsv.setter
767
+ def hsv(self, arg1: collections.abc.Sequence) -> None:
768
+ ...
769
+ @property
770
+ def r(self) -> int:
771
+ """
772
+ Red channel value.
773
+
774
+ Type: int
775
+ Range: 0-255 (8-bit unsigned integer)
776
+ """
777
+ @r.setter
778
+ def r(self, arg0: typing.SupportsInt) -> None:
779
+ ...
780
+ class EasingAnimation:
781
+ """
782
+
783
+ A class for animating values over time using easing functions.
784
+
785
+ This class supports pausing, resuming, reversing, and checking progress.
786
+
787
+ """
788
+ def __init__(self, start: Vec2, end: Vec2, duration: typing.SupportsFloat, ease_func: collections.abc.Callable[[typing.SupportsFloat], float]) -> None:
789
+ """
790
+ Create an EasingAnimation.
791
+
792
+ Args:
793
+ start (Vec2): Starting position.
794
+ end (Vec2): Ending position.
795
+ duration (float): Time in seconds for full animation.
796
+ ease_func (Callable): Easing function that maps [0, 1] → [0, 1].
797
+ """
798
+ def pause(self) -> None:
799
+ """
800
+ Pause the animation's progression.
801
+ """
802
+ def restart(self) -> None:
803
+ """
804
+ Restart the animation from the beginning.
805
+ """
806
+ def resume(self) -> None:
807
+ """
808
+ Resume the animation from its current state.
809
+ """
810
+ def reverse(self) -> None:
811
+ """
812
+ Reverse the direction of the animation.
813
+ """
814
+ def step(self) -> Vec2:
815
+ """
816
+ Advance the animation get its current position.
817
+
818
+ Returns:
819
+ Vec2: Interpolated position.
820
+ """
821
+ @property
822
+ def is_done(self) -> bool:
823
+ """
824
+ Check whether the animation has finished.
825
+ """
826
+ class Event:
827
+ """
828
+
829
+ Represents a single input event such as keyboard, mouse, or gamepad activity.
830
+
831
+ Attributes:
832
+ type (int): Event type. Additional fields are accessed dynamically.
833
+
834
+ """
835
+ def __getattr__(self, arg0: str) -> typing.Any:
836
+ """
837
+ Dynamically access event attributes.
838
+
839
+ Examples:
840
+ event.key
841
+ event.button
842
+ event.pos
843
+
844
+ Raises:
845
+ AttributeError: If the requested attribute doesn't exist.
846
+ """
847
+ @property
848
+ def type(self) -> int:
849
+ """
850
+ The event type (e.g., KEY_DOWN, MOUSE_BUTTON_UP).
851
+ """
852
+ class EventType(enum.IntEnum):
853
+ AUDIO_DEVICE_ADDED: typing.ClassVar[EventType] # value = <EventType.AUDIO_DEVICE_ADDED: 4352>
854
+ AUDIO_DEVICE_FORMAT_CHANGED: typing.ClassVar[EventType] # value = <EventType.AUDIO_DEVICE_FORMAT_CHANGED: 4354>
855
+ AUDIO_DEVICE_REMOVED: typing.ClassVar[EventType] # value = <EventType.AUDIO_DEVICE_REMOVED: 4353>
856
+ CAMERA_DEVICE_ADDED: typing.ClassVar[EventType] # value = <EventType.CAMERA_DEVICE_ADDED: 5120>
857
+ CAMERA_DEVICE_APPROVED: typing.ClassVar[EventType] # value = <EventType.CAMERA_DEVICE_APPROVED: 5122>
858
+ CAMERA_DEVICE_DENIED: typing.ClassVar[EventType] # value = <EventType.CAMERA_DEVICE_DENIED: 5123>
859
+ CAMERA_DEVICE_REMOVED: typing.ClassVar[EventType] # value = <EventType.CAMERA_DEVICE_REMOVED: 5121>
860
+ CLIPBOARD_UPDATE: typing.ClassVar[EventType] # value = <EventType.CLIPBOARD_UPDATE: 2304>
861
+ DID_ENTER_BACKGROUND: typing.ClassVar[EventType] # value = <EventType.DID_ENTER_BACKGROUND: 260>
862
+ DID_ENTER_FOREGROUND: typing.ClassVar[EventType] # value = <EventType.DID_ENTER_FOREGROUND: 262>
863
+ DISPLAY_ADDED: typing.ClassVar[EventType] # value = <EventType.DISPLAY_ADDED: 338>
864
+ DISPLAY_CONTENT_SCALE_CHANGED: typing.ClassVar[EventType] # value = <EventType.DISPLAY_CONTENT_SCALE_CHANGED: 343>
865
+ DISPLAY_CURRENT_MODE_CHANGED: typing.ClassVar[EventType] # value = <EventType.DISPLAY_CURRENT_MODE_CHANGED: 342>
866
+ DISPLAY_DESKTOP_MODE_CHANGED: typing.ClassVar[EventType] # value = <EventType.DISPLAY_DESKTOP_MODE_CHANGED: 341>
867
+ DISPLAY_MOVED: typing.ClassVar[EventType] # value = <EventType.DISPLAY_MOVED: 340>
868
+ DISPLAY_ORIENTATION: typing.ClassVar[EventType] # value = <EventType.DISPLAY_ORIENTATION: 337>
869
+ DISPLAY_REMOVED: typing.ClassVar[EventType] # value = <EventType.DISPLAY_REMOVED: 339>
870
+ DROP_BEGIN: typing.ClassVar[EventType] # value = <EventType.DROP_BEGIN: 4098>
871
+ DROP_COMPLETE: typing.ClassVar[EventType] # value = <EventType.DROP_COMPLETE: 4099>
872
+ DROP_FILE: typing.ClassVar[EventType] # value = <EventType.DROP_FILE: 4096>
873
+ DROP_POSITION: typing.ClassVar[EventType] # value = <EventType.DROP_POSITION: 4100>
874
+ DROP_TEXT: typing.ClassVar[EventType] # value = <EventType.DROP_TEXT: 4097>
875
+ FINGER_CANCELED: typing.ClassVar[EventType] # value = <EventType.FINGER_CANCELED: 1795>
876
+ FINGER_DOWN: typing.ClassVar[EventType] # value = <EventType.FINGER_DOWN: 1792>
877
+ FINGER_MOTION: typing.ClassVar[EventType] # value = <EventType.FINGER_MOTION: 1794>
878
+ FINGER_UP: typing.ClassVar[EventType] # value = <EventType.FINGER_UP: 1793>
879
+ GAMEPAD_ADDED: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_ADDED: 1619>
880
+ GAMEPAD_AXIS_MOTION: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_AXIS_MOTION: 1616>
881
+ GAMEPAD_BUTTON_DOWN: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_BUTTON_DOWN: 1617>
882
+ GAMEPAD_BUTTON_UP: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_BUTTON_UP: 1618>
883
+ GAMEPAD_REMAPPED: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_REMAPPED: 1621>
884
+ GAMEPAD_REMOVED: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_REMOVED: 1620>
885
+ GAMEPAD_SENSOR_UPDATE: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_SENSOR_UPDATE: 1625>
886
+ GAMEPAD_STEAM_HANDLE_UPDATED: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_STEAM_HANDLE_UPDATED: 1627>
887
+ GAMEPAD_TOUCHPAD_DOWN: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_TOUCHPAD_DOWN: 1622>
888
+ GAMEPAD_TOUCHPAD_MOTION: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_TOUCHPAD_MOTION: 1623>
889
+ GAMEPAD_TOUCHPAD_UP: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_TOUCHPAD_UP: 1624>
890
+ GAMEPAD_UPDATE_COMPLETE: typing.ClassVar[EventType] # value = <EventType.GAMEPAD_UPDATE_COMPLETE: 1626>
891
+ KEYBOARD_ADDED: typing.ClassVar[EventType] # value = <EventType.KEYBOARD_ADDED: 773>
892
+ KEYBOARD_REMOVED: typing.ClassVar[EventType] # value = <EventType.KEYBOARD_REMOVED: 774>
893
+ KEYMAP_CHANGED: typing.ClassVar[EventType] # value = <EventType.KEYMAP_CHANGED: 772>
894
+ KEY_DOWN: typing.ClassVar[EventType] # value = <EventType.KEY_DOWN: 768>
895
+ KEY_UP: typing.ClassVar[EventType] # value = <EventType.KEY_UP: 769>
896
+ LOCALE_CHANGED: typing.ClassVar[EventType] # value = <EventType.LOCALE_CHANGED: 263>
897
+ LOW_MEMORY: typing.ClassVar[EventType] # value = <EventType.LOW_MEMORY: 258>
898
+ MOUSE_ADDED: typing.ClassVar[EventType] # value = <EventType.MOUSE_ADDED: 1028>
899
+ MOUSE_BUTTON_DOWN: typing.ClassVar[EventType] # value = <EventType.MOUSE_BUTTON_DOWN: 1025>
900
+ MOUSE_BUTTON_UP: typing.ClassVar[EventType] # value = <EventType.MOUSE_BUTTON_UP: 1026>
901
+ MOUSE_MOTION: typing.ClassVar[EventType] # value = <EventType.MOUSE_MOTION: 1024>
902
+ MOUSE_REMOVED: typing.ClassVar[EventType] # value = <EventType.MOUSE_REMOVED: 1029>
903
+ MOUSE_WHEEL: typing.ClassVar[EventType] # value = <EventType.MOUSE_WHEEL: 1027>
904
+ PEN_AXIS: typing.ClassVar[EventType] # value = <EventType.PEN_AXIS: 4871>
905
+ PEN_BUTTON_DOWN: typing.ClassVar[EventType] # value = <EventType.PEN_BUTTON_DOWN: 4868>
906
+ PEN_BUTTON_UP: typing.ClassVar[EventType] # value = <EventType.PEN_BUTTON_UP: 4869>
907
+ PEN_DOWN: typing.ClassVar[EventType] # value = <EventType.PEN_DOWN: 4866>
908
+ PEN_MOTION: typing.ClassVar[EventType] # value = <EventType.PEN_MOTION: 4870>
909
+ PEN_PROXIMITY_IN: typing.ClassVar[EventType] # value = <EventType.PEN_PROXIMITY_IN: 4864>
910
+ PEN_PROXIMITY_OUT: typing.ClassVar[EventType] # value = <EventType.PEN_PROXIMITY_OUT: 4865>
911
+ PEN_UP: typing.ClassVar[EventType] # value = <EventType.PEN_UP: 4867>
912
+ QUIT: typing.ClassVar[EventType] # value = <EventType.QUIT: 256>
913
+ RENDER_DEVICE_LOST: typing.ClassVar[EventType] # value = <EventType.RENDER_DEVICE_LOST: 8194>
914
+ RENDER_DEVICE_RESET: typing.ClassVar[EventType] # value = <EventType.RENDER_DEVICE_RESET: 8193>
915
+ RENDER_TARGETS_RESET: typing.ClassVar[EventType] # value = <EventType.RENDER_TARGETS_RESET: 8192>
916
+ SENSOR_UPDATE: typing.ClassVar[EventType] # value = <EventType.SENSOR_UPDATE: 4608>
917
+ SYSTEM_THEME_CHANGED: typing.ClassVar[EventType] # value = <EventType.SYSTEM_THEME_CHANGED: 264>
918
+ TERMINATING: typing.ClassVar[EventType] # value = <EventType.TERMINATING: 257>
919
+ TEXT_EDITING: typing.ClassVar[EventType] # value = <EventType.TEXT_EDITING: 770>
920
+ TEXT_EDITING_CANDIDATES: typing.ClassVar[EventType] # value = <EventType.TEXT_EDITING_CANDIDATES: 775>
921
+ TEXT_INPUT: typing.ClassVar[EventType] # value = <EventType.TEXT_INPUT: 771>
922
+ WILL_ENTER_BACKGROUND: typing.ClassVar[EventType] # value = <EventType.WILL_ENTER_BACKGROUND: 259>
923
+ WILL_ENTER_FOREGROUND: typing.ClassVar[EventType] # value = <EventType.WILL_ENTER_FOREGROUND: 261>
924
+ WINDOW_CLOSE_REQUESTED: typing.ClassVar[EventType] # value = <EventType.WINDOW_CLOSE_REQUESTED: 528>
925
+ WINDOW_DESTROYED: typing.ClassVar[EventType] # value = <EventType.WINDOW_DESTROYED: 537>
926
+ WINDOW_DISPLAY_CHANGED: typing.ClassVar[EventType] # value = <EventType.WINDOW_DISPLAY_CHANGED: 531>
927
+ WINDOW_DISPLAY_SCALE_CHANGED: typing.ClassVar[EventType] # value = <EventType.WINDOW_DISPLAY_SCALE_CHANGED: 532>
928
+ WINDOW_ENTER_FULLSCREEN: typing.ClassVar[EventType] # value = <EventType.WINDOW_ENTER_FULLSCREEN: 535>
929
+ WINDOW_EXPOSED: typing.ClassVar[EventType] # value = <EventType.WINDOW_EXPOSED: 516>
930
+ WINDOW_FOCUS_GAINED: typing.ClassVar[EventType] # value = <EventType.WINDOW_FOCUS_GAINED: 526>
931
+ WINDOW_FOCUS_LOST: typing.ClassVar[EventType] # value = <EventType.WINDOW_FOCUS_LOST: 527>
932
+ WINDOW_HDR_STATE_CHANGED: typing.ClassVar[EventType] # value = <EventType.WINDOW_HDR_STATE_CHANGED: 538>
933
+ WINDOW_HIDDEN: typing.ClassVar[EventType] # value = <EventType.WINDOW_HIDDEN: 515>
934
+ WINDOW_HIT_TEST: typing.ClassVar[EventType] # value = <EventType.WINDOW_HIT_TEST: 529>
935
+ WINDOW_ICCPROF_CHANGED: typing.ClassVar[EventType] # value = <EventType.WINDOW_ICCPROF_CHANGED: 530>
936
+ WINDOW_LEAVE_FULLSCREEN: typing.ClassVar[EventType] # value = <EventType.WINDOW_LEAVE_FULLSCREEN: 536>
937
+ WINDOW_MAXIMIZED: typing.ClassVar[EventType] # value = <EventType.WINDOW_MAXIMIZED: 522>
938
+ WINDOW_MINIMIZED: typing.ClassVar[EventType] # value = <EventType.WINDOW_MINIMIZED: 521>
939
+ WINDOW_MOUSE_ENTER: typing.ClassVar[EventType] # value = <EventType.WINDOW_MOUSE_ENTER: 524>
940
+ WINDOW_MOUSE_LEAVE: typing.ClassVar[EventType] # value = <EventType.WINDOW_MOUSE_LEAVE: 525>
941
+ WINDOW_MOVED: typing.ClassVar[EventType] # value = <EventType.WINDOW_MOVED: 517>
942
+ WINDOW_OCCLUDED: typing.ClassVar[EventType] # value = <EventType.WINDOW_OCCLUDED: 534>
943
+ WINDOW_RESIZED: typing.ClassVar[EventType] # value = <EventType.WINDOW_RESIZED: 518>
944
+ WINDOW_RESTORED: typing.ClassVar[EventType] # value = <EventType.WINDOW_RESTORED: 523>
945
+ WINDOW_SAFE_AREA_CHANGED: typing.ClassVar[EventType] # value = <EventType.WINDOW_SAFE_AREA_CHANGED: 533>
946
+ WINDOW_SHOWN: typing.ClassVar[EventType] # value = <EventType.WINDOW_SHOWN: 514>
947
+ @classmethod
948
+ def __new__(cls, value):
949
+ ...
950
+ def __format__(self, format_spec):
951
+ """
952
+ Convert to a string according to format_spec.
953
+ """
954
+ class Font:
955
+ """
956
+
957
+ A font typeface for rendering text.
958
+
959
+ This class wraps an SDL_ttf font and manages font properties like size,
960
+ style, and alignment. You can load fonts from a file path or use one of
961
+ the built-in typefaces:
962
+
963
+ - "kraken-clean": A clean sans-serif font bundled with the engine.
964
+ - "kraken-retro": A pixel/retro font bundled with the engine. Point size is
965
+ rounded to the nearest multiple of 8 for crisp rendering.
966
+
967
+ Note:
968
+ A window/renderer must be created before using fonts. Typically you should
969
+ call kn.window.create(...) first, which initializes the font engine.
970
+
971
+ """
972
+ def __init__(self, file_dir: str, pt_size: typing.SupportsInt) -> None:
973
+ """
974
+ Create a Font.
975
+
976
+ Args:
977
+ file_dir (str): Path to a .ttf font file, or one of the built-in names
978
+ "kraken-clean" or "kraken-retro".
979
+ pt_size (int): The point size. Values below 8 are clamped to 8. For
980
+ "kraken-retro", the size is rounded to the nearest multiple
981
+ of 8 to preserve pixel alignment.
982
+
983
+ Raises:
984
+ RuntimeError: If the font fails to load.
985
+ """
986
+ @property
987
+ def alignment(self) -> Align:
988
+ """
989
+ Get or set the text alignment for wrapped text.
990
+
991
+ Valid values: Align.LEFT, Align.CENTER, Align.RIGHT
992
+ """
993
+ @alignment.setter
994
+ def alignment(self, arg1: Align) -> None:
995
+ ...
996
+ @property
997
+ def bold(self) -> bool:
998
+ """
999
+ Get or set whether bold text style is enabled.
1000
+ """
1001
+ @bold.setter
1002
+ def bold(self, arg1: bool) -> None:
1003
+ ...
1004
+ @property
1005
+ def hinting(self) -> FontHint:
1006
+ """
1007
+ Get or set the font hinting mode.
1008
+
1009
+ Valid values: FontHinting.NORMAL, FontHinting.MONO, FontHinting.LIGHT,
1010
+ FontHinting.LIGHT_SUBPIXEL, FontHinting.NONE
1011
+ """
1012
+ @hinting.setter
1013
+ def hinting(self, arg1: FontHint) -> None:
1014
+ ...
1015
+ @property
1016
+ def italic(self) -> bool:
1017
+ """
1018
+ Get or set whether italic text style is enabled.
1019
+ """
1020
+ @italic.setter
1021
+ def italic(self, arg1: bool) -> None:
1022
+ ...
1023
+ @property
1024
+ def pt_size(self) -> int:
1025
+ """
1026
+ Get or set the point size of the font. Values below 8 are clamped to 8.
1027
+ """
1028
+ @pt_size.setter
1029
+ def pt_size(self, arg1: typing.SupportsInt) -> None:
1030
+ ...
1031
+ @property
1032
+ def strikethrough(self) -> bool:
1033
+ """
1034
+ Get or set whether strikethrough text style is enabled.
1035
+ """
1036
+ @strikethrough.setter
1037
+ def strikethrough(self, arg1: bool) -> None:
1038
+ ...
1039
+ @property
1040
+ def underline(self) -> bool:
1041
+ """
1042
+ Get or set whether underline text style is enabled.
1043
+ """
1044
+ @underline.setter
1045
+ def underline(self, arg1: bool) -> None:
1046
+ ...
1047
+ class FontHint(enum.IntEnum):
1048
+ """
1049
+
1050
+ Font hinting modes for controlling how fonts are rendered.
1051
+
1052
+ Hinting is the process of fitting font outlines to the pixel grid to improve
1053
+ readability at small sizes.
1054
+
1055
+ """
1056
+ LIGHT: typing.ClassVar[FontHint] # value = <FontHint.LIGHT: 2>
1057
+ LIGHT_SUBPIXEL: typing.ClassVar[FontHint] # value = <FontHint.LIGHT_SUBPIXEL: 3>
1058
+ MONO: typing.ClassVar[FontHint] # value = <FontHint.MONO: 1>
1059
+ NONE: typing.ClassVar[FontHint] # value = <FontHint.NONE: 4>
1060
+ NORMAL: typing.ClassVar[FontHint] # value = <FontHint.NORMAL: 0>
1061
+ @classmethod
1062
+ def __new__(cls, value):
1063
+ ...
1064
+ def __format__(self, format_spec):
1065
+ """
1066
+ Convert to a string according to format_spec.
1067
+ """
1068
+ class Frame:
1069
+ """
1070
+
1071
+ A single animation frame containing texture and rectangle data.
1072
+
1073
+ Represents one frame of an animation with its associated texture and the rectangle
1074
+ defining which portion of the texture to display.
1075
+
1076
+ """
1077
+ @property
1078
+ def src(self) -> Rect:
1079
+ """
1080
+ The rectangle defining the frame bounds within the texture.
1081
+ """
1082
+ @property
1083
+ def tex(self) -> Texture:
1084
+ """
1085
+ The texture containing the frame image.
1086
+ """
1087
+ class GamepadAxis(enum.IntEnum):
1088
+ C_LTRIGGER: typing.ClassVar[GamepadAxis] # value = <GamepadAxis.C_LTRIGGER: 4>
1089
+ C_LX: typing.ClassVar[GamepadAxis] # value = <GamepadAxis.C_LX: 0>
1090
+ C_LY: typing.ClassVar[GamepadAxis] # value = <GamepadAxis.C_LY: 1>
1091
+ C_RTRIGGER: typing.ClassVar[GamepadAxis] # value = <GamepadAxis.C_RTRIGGER: 5>
1092
+ C_RX: typing.ClassVar[GamepadAxis] # value = <GamepadAxis.C_RX: 2>
1093
+ C_RY: typing.ClassVar[GamepadAxis] # value = <GamepadAxis.C_RY: 3>
1094
+ @classmethod
1095
+ def __new__(cls, value):
1096
+ ...
1097
+ def __format__(self, format_spec):
1098
+ """
1099
+ Convert to a string according to format_spec.
1100
+ """
1101
+ class GamepadButton(enum.IntEnum):
1102
+ C_BACK: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_BACK: 4>
1103
+ C_DPAD_DOWN: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_DPAD_DOWN: 12>
1104
+ C_DPAD_LEFT: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_DPAD_LEFT: 13>
1105
+ C_DPAD_RIGHT: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_DPAD_RIGHT: 14>
1106
+ C_DPAD_UP: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_DPAD_UP: 11>
1107
+ C_EAST: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_EAST: 1>
1108
+ C_GUIDE: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_GUIDE: 5>
1109
+ C_LSHOULDER: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_LSHOULDER: 9>
1110
+ C_LSTICK: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_LSTICK: 7>
1111
+ C_NORTH: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_NORTH: 3>
1112
+ C_RSHOULDER: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_RSHOULDER: 10>
1113
+ C_RSTICK: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_RSTICK: 8>
1114
+ C_SOUTH: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_SOUTH: 0>
1115
+ C_START: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_START: 6>
1116
+ C_WEST: typing.ClassVar[GamepadButton] # value = <GamepadButton.C_WEST: 2>
1117
+ @classmethod
1118
+ def __new__(cls, value):
1119
+ ...
1120
+ def __format__(self, format_spec):
1121
+ """
1122
+ Convert to a string according to format_spec.
1123
+ """
1124
+ class GamepadType(enum.IntEnum):
1125
+ C_PS3: typing.ClassVar[GamepadType] # value = <GamepadType.C_PS3: 4>
1126
+ C_PS4: typing.ClassVar[GamepadType] # value = <GamepadType.C_PS4: 5>
1127
+ C_PS5: typing.ClassVar[GamepadType] # value = <GamepadType.C_PS5: 6>
1128
+ C_STANDARD: typing.ClassVar[GamepadType] # value = <GamepadType.C_STANDARD: 1>
1129
+ C_SWITCH_JOYCON_LEFT: typing.ClassVar[GamepadType] # value = <GamepadType.C_SWITCH_JOYCON_LEFT: 8>
1130
+ C_SWITCH_JOYCON_PAIR: typing.ClassVar[GamepadType] # value = <GamepadType.C_SWITCH_JOYCON_PAIR: 10>
1131
+ C_SWITCH_JOYCON_RIGHT: typing.ClassVar[GamepadType] # value = <GamepadType.C_SWITCH_JOYCON_RIGHT: 9>
1132
+ C_SWITCH_PRO: typing.ClassVar[GamepadType] # value = <GamepadType.C_SWITCH_PRO: 7>
1133
+ C_XBOX_360: typing.ClassVar[GamepadType] # value = <GamepadType.C_XBOX_360: 2>
1134
+ C_XBOX_ONE: typing.ClassVar[GamepadType] # value = <GamepadType.C_XBOX_ONE: 3>
1135
+ @classmethod
1136
+ def __new__(cls, value):
1137
+ ...
1138
+ def __format__(self, format_spec):
1139
+ """
1140
+ Convert to a string according to format_spec.
1141
+ """
1142
+ class InputAction:
1143
+ """
1144
+
1145
+ Represents a single input trigger such as a key, mouse button, or gamepad control.
1146
+
1147
+ """
1148
+ @typing.overload
1149
+ def __init__(self, scancode: Scancode) -> None:
1150
+ """
1151
+ Create an input action from a scancode.
1152
+
1153
+ Args:
1154
+ scancode (Scancode): Keyboard scancode.
1155
+ """
1156
+ @typing.overload
1157
+ def __init__(self, keycode: Keycode) -> None:
1158
+ """
1159
+ Create an input action from a keycode.
1160
+
1161
+ Args:
1162
+ keycode (Keycode): Keyboard keycode.
1163
+ """
1164
+ @typing.overload
1165
+ def __init__(self, mouse_button: MouseButton) -> None:
1166
+ """
1167
+ Create an input action from a mouse button.
1168
+
1169
+ Args:
1170
+ mouse_button (MouseButton): Mouse button code.
1171
+ """
1172
+ @typing.overload
1173
+ def __init__(self, gamepad_button: GamepadButton, slot: typing.SupportsInt = 0) -> None:
1174
+ """
1175
+ Create an input action from a gamepad button.
1176
+
1177
+ Args:
1178
+ gamepad_button (GamepadButton): Gamepad button code.
1179
+ slot (int, optional): Gamepad slot (default is 0).
1180
+ """
1181
+ @typing.overload
1182
+ def __init__(self, gamepad_axis: GamepadAxis, is_positive: bool, slot: typing.SupportsInt = 0) -> None:
1183
+ """
1184
+ Create an input action from a gamepad axis direction.
1185
+
1186
+ Args:
1187
+ gamepad_axis (GamepadAxis): Gamepad axis code.
1188
+ is_positive (bool): True for positive direction, False for negative.
1189
+ slot (int, optional): Gamepad slot (default is 0).
1190
+ """
1191
+ class Keycode(enum.IntEnum):
1192
+ K_0: typing.ClassVar[Keycode] # value = <Keycode.K_0: 48>
1193
+ K_1: typing.ClassVar[Keycode] # value = <Keycode.K_1: 49>
1194
+ K_2: typing.ClassVar[Keycode] # value = <Keycode.K_2: 50>
1195
+ K_3: typing.ClassVar[Keycode] # value = <Keycode.K_3: 51>
1196
+ K_4: typing.ClassVar[Keycode] # value = <Keycode.K_4: 52>
1197
+ K_5: typing.ClassVar[Keycode] # value = <Keycode.K_5: 53>
1198
+ K_6: typing.ClassVar[Keycode] # value = <Keycode.K_6: 54>
1199
+ K_7: typing.ClassVar[Keycode] # value = <Keycode.K_7: 55>
1200
+ K_8: typing.ClassVar[Keycode] # value = <Keycode.K_8: 56>
1201
+ K_9: typing.ClassVar[Keycode] # value = <Keycode.K_9: 57>
1202
+ K_AGAIN: typing.ClassVar[Keycode] # value = <Keycode.K_AGAIN: 1073741945>
1203
+ K_AMPERSAND: typing.ClassVar[Keycode] # value = <Keycode.K_AMPERSAND: 38>
1204
+ K_APPLICATION: typing.ClassVar[Keycode] # value = <Keycode.K_APPLICATION: 1073741925>
1205
+ K_ASTERISK: typing.ClassVar[Keycode] # value = <Keycode.K_ASTERISK: 42>
1206
+ K_AT: typing.ClassVar[Keycode] # value = <Keycode.K_AT: 64>
1207
+ K_BACKSLASH: typing.ClassVar[Keycode] # value = <Keycode.K_BACKSLASH: 92>
1208
+ K_BACKSPACE: typing.ClassVar[Keycode] # value = <Keycode.K_BACKSPACE: 8>
1209
+ K_CALL: typing.ClassVar[Keycode] # value = <Keycode.K_CALL: 1073742113>
1210
+ K_CAPS: typing.ClassVar[Keycode] # value = <Keycode.K_CAPS: 1073741881>
1211
+ K_CARET: typing.ClassVar[Keycode] # value = <Keycode.K_CARET: 94>
1212
+ K_CHANNEL_DEC: typing.ClassVar[Keycode] # value = <Keycode.K_CHANNEL_DEC: 1073742085>
1213
+ K_CHANNEL_INC: typing.ClassVar[Keycode] # value = <Keycode.K_CHANNEL_INC: 1073742084>
1214
+ K_COLON: typing.ClassVar[Keycode] # value = <Keycode.K_COLON: 58>
1215
+ K_COMMA: typing.ClassVar[Keycode] # value = <Keycode.K_COMMA: 44>
1216
+ K_COPY: typing.ClassVar[Keycode] # value = <Keycode.K_COPY: 1073741948>
1217
+ K_CUT: typing.ClassVar[Keycode] # value = <Keycode.K_CUT: 1073741947>
1218
+ K_DBLQUOTE: typing.ClassVar[Keycode] # value = <Keycode.K_DBLQUOTE: 34>
1219
+ K_DEL: typing.ClassVar[Keycode] # value = <Keycode.K_DEL: 127>
1220
+ K_DOLLAR: typing.ClassVar[Keycode] # value = <Keycode.K_DOLLAR: 36>
1221
+ K_DOWN: typing.ClassVar[Keycode] # value = <Keycode.K_DOWN: 1073741905>
1222
+ K_END: typing.ClassVar[Keycode] # value = <Keycode.K_END: 1073741901>
1223
+ K_ENDCALL: typing.ClassVar[Keycode] # value = <Keycode.K_ENDCALL: 1073742114>
1224
+ K_EQ: typing.ClassVar[Keycode] # value = <Keycode.K_EQ: 61>
1225
+ K_ESC: typing.ClassVar[Keycode] # value = <Keycode.K_ESC: 27>
1226
+ K_EXCLAIM: typing.ClassVar[Keycode] # value = <Keycode.K_EXCLAIM: 33>
1227
+ K_EXECUTE: typing.ClassVar[Keycode] # value = <Keycode.K_EXECUTE: 1073741940>
1228
+ K_F1: typing.ClassVar[Keycode] # value = <Keycode.K_F1: 1073741882>
1229
+ K_F10: typing.ClassVar[Keycode] # value = <Keycode.K_F10: 1073741891>
1230
+ K_F11: typing.ClassVar[Keycode] # value = <Keycode.K_F11: 1073741892>
1231
+ K_F12: typing.ClassVar[Keycode] # value = <Keycode.K_F12: 1073741893>
1232
+ K_F13: typing.ClassVar[Keycode] # value = <Keycode.K_F13: 1073741928>
1233
+ K_F14: typing.ClassVar[Keycode] # value = <Keycode.K_F14: 1073741929>
1234
+ K_F15: typing.ClassVar[Keycode] # value = <Keycode.K_F15: 1073741930>
1235
+ K_F2: typing.ClassVar[Keycode] # value = <Keycode.K_F2: 1073741883>
1236
+ K_F3: typing.ClassVar[Keycode] # value = <Keycode.K_F3: 1073741884>
1237
+ K_F4: typing.ClassVar[Keycode] # value = <Keycode.K_F4: 1073741885>
1238
+ K_F5: typing.ClassVar[Keycode] # value = <Keycode.K_F5: 1073741886>
1239
+ K_F6: typing.ClassVar[Keycode] # value = <Keycode.K_F6: 1073741887>
1240
+ K_F7: typing.ClassVar[Keycode] # value = <Keycode.K_F7: 1073741888>
1241
+ K_F8: typing.ClassVar[Keycode] # value = <Keycode.K_F8: 1073741889>
1242
+ K_F9: typing.ClassVar[Keycode] # value = <Keycode.K_F9: 1073741890>
1243
+ K_FIND: typing.ClassVar[Keycode] # value = <Keycode.K_FIND: 1073741950>
1244
+ K_GRAVE: typing.ClassVar[Keycode] # value = <Keycode.K_GRAVE: 96>
1245
+ K_GT: typing.ClassVar[Keycode] # value = <Keycode.K_GT: 62>
1246
+ K_HASH: typing.ClassVar[Keycode] # value = <Keycode.K_HASH: 35>
1247
+ K_HELP: typing.ClassVar[Keycode] # value = <Keycode.K_HELP: 1073741941>
1248
+ K_HOME: typing.ClassVar[Keycode] # value = <Keycode.K_HOME: 1073741898>
1249
+ K_INS: typing.ClassVar[Keycode] # value = <Keycode.K_INS: 1073741897>
1250
+ K_KP_0: typing.ClassVar[Keycode] # value = <Keycode.K_KP_0: 1073741922>
1251
+ K_KP_1: typing.ClassVar[Keycode] # value = <Keycode.K_KP_1: 1073741913>
1252
+ K_KP_2: typing.ClassVar[Keycode] # value = <Keycode.K_KP_2: 1073741914>
1253
+ K_KP_3: typing.ClassVar[Keycode] # value = <Keycode.K_KP_3: 1073741915>
1254
+ K_KP_4: typing.ClassVar[Keycode] # value = <Keycode.K_KP_4: 1073741916>
1255
+ K_KP_5: typing.ClassVar[Keycode] # value = <Keycode.K_KP_5: 1073741917>
1256
+ K_KP_6: typing.ClassVar[Keycode] # value = <Keycode.K_KP_6: 1073741918>
1257
+ K_KP_7: typing.ClassVar[Keycode] # value = <Keycode.K_KP_7: 1073741919>
1258
+ K_KP_8: typing.ClassVar[Keycode] # value = <Keycode.K_KP_8: 1073741920>
1259
+ K_KP_9: typing.ClassVar[Keycode] # value = <Keycode.K_KP_9: 1073741921>
1260
+ K_KP_DIV: typing.ClassVar[Keycode] # value = <Keycode.K_KP_DIV: 1073741908>
1261
+ K_KP_ENTER: typing.ClassVar[Keycode] # value = <Keycode.K_KP_ENTER: 1073741912>
1262
+ K_KP_MINUS: typing.ClassVar[Keycode] # value = <Keycode.K_KP_MINUS: 1073741910>
1263
+ K_KP_MULT: typing.ClassVar[Keycode] # value = <Keycode.K_KP_MULT: 1073741909>
1264
+ K_KP_PERIOD: typing.ClassVar[Keycode] # value = <Keycode.K_KP_PERIOD: 1073741923>
1265
+ K_KP_PLUS: typing.ClassVar[Keycode] # value = <Keycode.K_KP_PLUS: 1073741911>
1266
+ K_LALT: typing.ClassVar[Keycode] # value = <Keycode.K_LALT: 1073742050>
1267
+ K_LBRACE: typing.ClassVar[Keycode] # value = <Keycode.K_LBRACE: 123>
1268
+ K_LBRACKET: typing.ClassVar[Keycode] # value = <Keycode.K_LBRACKET: 91>
1269
+ K_LCTRL: typing.ClassVar[Keycode] # value = <Keycode.K_LCTRL: 1073742048>
1270
+ K_LEFT: typing.ClassVar[Keycode] # value = <Keycode.K_LEFT: 1073741904>
1271
+ K_LGUI: typing.ClassVar[Keycode] # value = <Keycode.K_LGUI: 1073742051>
1272
+ K_LPAREN: typing.ClassVar[Keycode] # value = <Keycode.K_LPAREN: 40>
1273
+ K_LSHIFT: typing.ClassVar[Keycode] # value = <Keycode.K_LSHIFT: 1073742049>
1274
+ K_LT: typing.ClassVar[Keycode] # value = <Keycode.K_LT: 60>
1275
+ K_MEDIA_EJECT: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_EJECT: 1073742094>
1276
+ K_MEDIA_FF: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_FF: 1073742089>
1277
+ K_MEDIA_NEXT: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_NEXT: 1073742091>
1278
+ K_MEDIA_PAUSE: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_PAUSE: 1073742087>
1279
+ K_MEDIA_PLAY: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_PLAY: 1073742086>
1280
+ K_MEDIA_PLAY_PAUSE: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_PLAY_PAUSE: 1073742095>
1281
+ K_MEDIA_PREV: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_PREV: 1073742092>
1282
+ K_MEDIA_REC: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_REC: 1073742088>
1283
+ K_MEDIA_REWIND: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_REWIND: 1073742090>
1284
+ K_MEDIA_SELECT: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_SELECT: 1073742096>
1285
+ K_MEDIA_STOP: typing.ClassVar[Keycode] # value = <Keycode.K_MEDIA_STOP: 1073742093>
1286
+ K_MENU: typing.ClassVar[Keycode] # value = <Keycode.K_MENU: 1073741942>
1287
+ K_MINUS: typing.ClassVar[Keycode] # value = <Keycode.K_MINUS: 45>
1288
+ K_MODE: typing.ClassVar[Keycode] # value = <Keycode.K_MODE: 1073742081>
1289
+ K_MUTE: typing.ClassVar[Keycode] # value = <Keycode.K_MUTE: 1073741951>
1290
+ K_NUMLOCK: typing.ClassVar[Keycode] # value = <Keycode.K_NUMLOCK: 1073741907>
1291
+ K_PASTE: typing.ClassVar[Keycode] # value = <Keycode.K_PASTE: 1073741949>
1292
+ K_PAUSE: typing.ClassVar[Keycode] # value = <Keycode.K_PAUSE: 1073741896>
1293
+ K_PERCENT: typing.ClassVar[Keycode] # value = <Keycode.K_PERCENT: 37>
1294
+ K_PERIOD: typing.ClassVar[Keycode] # value = <Keycode.K_PERIOD: 46>
1295
+ K_PGDOWN: typing.ClassVar[Keycode] # value = <Keycode.K_PGDOWN: 1073741902>
1296
+ K_PGUP: typing.ClassVar[Keycode] # value = <Keycode.K_PGUP: 1073741899>
1297
+ K_PIPE: typing.ClassVar[Keycode] # value = <Keycode.K_PIPE: 124>
1298
+ K_PLUS: typing.ClassVar[Keycode] # value = <Keycode.K_PLUS: 43>
1299
+ K_POWER: typing.ClassVar[Keycode] # value = <Keycode.K_POWER: 1073741926>
1300
+ K_PRTSCR: typing.ClassVar[Keycode] # value = <Keycode.K_PRTSCR: 1073741894>
1301
+ K_QUESTION: typing.ClassVar[Keycode] # value = <Keycode.K_QUESTION: 63>
1302
+ K_RALT: typing.ClassVar[Keycode] # value = <Keycode.K_RALT: 1073742054>
1303
+ K_RBRACE: typing.ClassVar[Keycode] # value = <Keycode.K_RBRACE: 125>
1304
+ K_RBRACKET: typing.ClassVar[Keycode] # value = <Keycode.K_RBRACKET: 93>
1305
+ K_RCTRL: typing.ClassVar[Keycode] # value = <Keycode.K_RCTRL: 1073742052>
1306
+ K_RETURN: typing.ClassVar[Keycode] # value = <Keycode.K_RETURN: 13>
1307
+ K_RGUI: typing.ClassVar[Keycode] # value = <Keycode.K_RGUI: 1073742055>
1308
+ K_RIGHT: typing.ClassVar[Keycode] # value = <Keycode.K_RIGHT: 1073741903>
1309
+ K_RPAREN: typing.ClassVar[Keycode] # value = <Keycode.K_RPAREN: 41>
1310
+ K_RSHIFT: typing.ClassVar[Keycode] # value = <Keycode.K_RSHIFT: 1073742053>
1311
+ K_SCRLK: typing.ClassVar[Keycode] # value = <Keycode.K_SCRLK: 1073741895>
1312
+ K_SELECT: typing.ClassVar[Keycode] # value = <Keycode.K_SELECT: 1073741943>
1313
+ K_SEMICOLON: typing.ClassVar[Keycode] # value = <Keycode.K_SEMICOLON: 59>
1314
+ K_SGLQUOTE: typing.ClassVar[Keycode] # value = <Keycode.K_SGLQUOTE: 39>
1315
+ K_SLASH: typing.ClassVar[Keycode] # value = <Keycode.K_SLASH: 47>
1316
+ K_SLEEP: typing.ClassVar[Keycode] # value = <Keycode.K_SLEEP: 1073742082>
1317
+ K_SOFTLEFT: typing.ClassVar[Keycode] # value = <Keycode.K_SOFTLEFT: 1073742111>
1318
+ K_SOFTRIGHT: typing.ClassVar[Keycode] # value = <Keycode.K_SOFTRIGHT: 1073742112>
1319
+ K_SPACE: typing.ClassVar[Keycode] # value = <Keycode.K_SPACE: 32>
1320
+ K_STOP: typing.ClassVar[Keycode] # value = <Keycode.K_STOP: 1073741944>
1321
+ K_TAB: typing.ClassVar[Keycode] # value = <Keycode.K_TAB: 9>
1322
+ K_TILDE: typing.ClassVar[Keycode] # value = <Keycode.K_TILDE: 126>
1323
+ K_UNDERSCORE: typing.ClassVar[Keycode] # value = <Keycode.K_UNDERSCORE: 95>
1324
+ K_UNDO: typing.ClassVar[Keycode] # value = <Keycode.K_UNDO: 1073741946>
1325
+ K_UNKNOWN: typing.ClassVar[Keycode] # value = <Keycode.K_UNKNOWN: 0>
1326
+ K_UP: typing.ClassVar[Keycode] # value = <Keycode.K_UP: 1073741906>
1327
+ K_VOLDOWN: typing.ClassVar[Keycode] # value = <Keycode.K_VOLDOWN: 1073741953>
1328
+ K_VOLUP: typing.ClassVar[Keycode] # value = <Keycode.K_VOLUP: 1073741952>
1329
+ K_WAKE: typing.ClassVar[Keycode] # value = <Keycode.K_WAKE: 1073742083>
1330
+ K_a: typing.ClassVar[Keycode] # value = <Keycode.K_a: 97>
1331
+ K_b: typing.ClassVar[Keycode] # value = <Keycode.K_b: 98>
1332
+ K_c: typing.ClassVar[Keycode] # value = <Keycode.K_c: 99>
1333
+ K_d: typing.ClassVar[Keycode] # value = <Keycode.K_d: 100>
1334
+ K_e: typing.ClassVar[Keycode] # value = <Keycode.K_e: 101>
1335
+ K_f: typing.ClassVar[Keycode] # value = <Keycode.K_f: 102>
1336
+ K_g: typing.ClassVar[Keycode] # value = <Keycode.K_g: 103>
1337
+ K_h: typing.ClassVar[Keycode] # value = <Keycode.K_h: 104>
1338
+ K_i: typing.ClassVar[Keycode] # value = <Keycode.K_i: 105>
1339
+ K_j: typing.ClassVar[Keycode] # value = <Keycode.K_j: 106>
1340
+ K_k: typing.ClassVar[Keycode] # value = <Keycode.K_k: 107>
1341
+ K_l: typing.ClassVar[Keycode] # value = <Keycode.K_l: 108>
1342
+ K_m: typing.ClassVar[Keycode] # value = <Keycode.K_m: 109>
1343
+ K_n: typing.ClassVar[Keycode] # value = <Keycode.K_n: 110>
1344
+ K_o: typing.ClassVar[Keycode] # value = <Keycode.K_o: 111>
1345
+ K_p: typing.ClassVar[Keycode] # value = <Keycode.K_p: 112>
1346
+ K_q: typing.ClassVar[Keycode] # value = <Keycode.K_q: 113>
1347
+ K_r: typing.ClassVar[Keycode] # value = <Keycode.K_r: 114>
1348
+ K_s: typing.ClassVar[Keycode] # value = <Keycode.K_s: 115>
1349
+ K_t: typing.ClassVar[Keycode] # value = <Keycode.K_t: 116>
1350
+ K_u: typing.ClassVar[Keycode] # value = <Keycode.K_u: 117>
1351
+ K_v: typing.ClassVar[Keycode] # value = <Keycode.K_v: 118>
1352
+ K_w: typing.ClassVar[Keycode] # value = <Keycode.K_w: 119>
1353
+ K_x: typing.ClassVar[Keycode] # value = <Keycode.K_x: 120>
1354
+ K_y: typing.ClassVar[Keycode] # value = <Keycode.K_y: 121>
1355
+ K_z: typing.ClassVar[Keycode] # value = <Keycode.K_z: 122>
1356
+ @classmethod
1357
+ def __new__(cls, value):
1358
+ ...
1359
+ def __format__(self, format_spec):
1360
+ """
1361
+ Convert to a string according to format_spec.
1362
+ """
1363
+ class Line:
1364
+ """
1365
+
1366
+ A 2D line segment defined by two points: A and B.
1367
+ You can access or modify points using `.a`, `.b`, or directly via `.ax`, `.ay`, `.bx`, `.by`.
1368
+
1369
+ """
1370
+ __hash__: typing.ClassVar[None] = None
1371
+ def __eq__(self, other: Line) -> bool:
1372
+ """
1373
+ Check if two lines are equal.
1374
+
1375
+ Args:
1376
+ other (Line): The other line to compare.
1377
+
1378
+ Returns:
1379
+ bool: True if all components are equal.
1380
+ """
1381
+ def __getitem__(self, arg0: typing.SupportsInt) -> float:
1382
+ """
1383
+ Get coordinate by index:
1384
+ 0 = ax, 1 = ay, 2 = bx, 3 = by
1385
+
1386
+ Raises:
1387
+ IndexError: If index is not 0-3.
1388
+ """
1389
+ @typing.overload
1390
+ def __init__(self) -> None:
1391
+ """
1392
+ Create a default line with all values set to 0.
1393
+ """
1394
+ @typing.overload
1395
+ def __init__(self, ax: typing.SupportsFloat, ay: typing.SupportsFloat, bx: typing.SupportsFloat, by: typing.SupportsFloat) -> None:
1396
+ """
1397
+ Create a line from two coordinate points.
1398
+
1399
+ Args:
1400
+ ax (float): X-coordinate of point A.
1401
+ ay (float): Y-coordinate of point A.
1402
+ bx (float): X-coordinate of point B.
1403
+ by (float): Y-coordinate of point B.
1404
+ """
1405
+ @typing.overload
1406
+ def __init__(self, ax: typing.SupportsFloat, ay: typing.SupportsFloat, b: Vec2) -> None:
1407
+ """
1408
+ Create a line from A coordinates and a Vec2 B point.
1409
+
1410
+ Args:
1411
+ ax (float): X-coordinate of point A.
1412
+ ay (float): Y-coordinate of point A.
1413
+ b (Vec2): Point B.
1414
+ """
1415
+ @typing.overload
1416
+ def __init__(self, a: Vec2, bx: typing.SupportsFloat, by: typing.SupportsFloat) -> None:
1417
+ """
1418
+ Create a line from a Vec2 A point and B coordinates.
1419
+
1420
+ Args:
1421
+ a (Vec2): Point A.
1422
+ bx (float): X-coordinate of point B.
1423
+ by (float): Y-coordinate of point B.
1424
+ """
1425
+ @typing.overload
1426
+ def __init__(self, a: Vec2, b: Vec2) -> None:
1427
+ """
1428
+ Create a line from two Vec2 points.
1429
+
1430
+ Args:
1431
+ a (Vec2): Point A.
1432
+ b (Vec2): Point B.
1433
+ """
1434
+ @typing.overload
1435
+ def __init__(self, arg0: collections.abc.Sequence) -> None:
1436
+ """
1437
+ Create a line from two 2-element sequences: [[ax, ay], [bx, by]].
1438
+
1439
+ Raises:
1440
+ ValueError: If either point is not a 2-element sequence.
1441
+ """
1442
+ def __iter__(self) -> collections.abc.Iterator:
1443
+ ...
1444
+ def __len__(self) -> int:
1445
+ """
1446
+ Return the number of components (always 4).
1447
+
1448
+ Returns:
1449
+ int: Always returns 4 (ax, ay, bx, by).
1450
+ """
1451
+ def __ne__(self, other: Line) -> bool:
1452
+ """
1453
+ Check if two lines are not equal.
1454
+
1455
+ Args:
1456
+ other (Line): The other line to compare.
1457
+
1458
+ Returns:
1459
+ bool: True if any component differs.
1460
+ """
1461
+ def copy(self) -> Line:
1462
+ """
1463
+ Return a copy of this line.
1464
+ """
1465
+ def move(self, offset: Vec2) -> None:
1466
+ """
1467
+ Move this line by a Vec2 or 2-element sequence.
1468
+
1469
+ Args:
1470
+ offset (Vec2 | list[float]): The amount to move.
1471
+ """
1472
+ @property
1473
+ def a(self) -> Vec2:
1474
+ """
1475
+ Get or set point A as a tuple or Vec2.
1476
+ """
1477
+ @a.setter
1478
+ def a(self, arg1: Vec2) -> None:
1479
+ ...
1480
+ @property
1481
+ def ax(self) -> float:
1482
+ """
1483
+ X-coordinate of point A.
1484
+ """
1485
+ @ax.setter
1486
+ def ax(self, arg0: typing.SupportsFloat) -> None:
1487
+ ...
1488
+ @property
1489
+ def ay(self) -> float:
1490
+ """
1491
+ Y-coordinate of point A.
1492
+ """
1493
+ @ay.setter
1494
+ def ay(self, arg0: typing.SupportsFloat) -> None:
1495
+ ...
1496
+ @property
1497
+ def b(self) -> Vec2:
1498
+ """
1499
+ Get or set point B as a tuple or Vec2.
1500
+ """
1501
+ @b.setter
1502
+ def b(self, arg1: Vec2) -> None:
1503
+ ...
1504
+ @property
1505
+ def bx(self) -> float:
1506
+ """
1507
+ X-coordinate of point B.
1508
+ """
1509
+ @bx.setter
1510
+ def bx(self, arg0: typing.SupportsFloat) -> None:
1511
+ ...
1512
+ @property
1513
+ def by(self) -> float:
1514
+ """
1515
+ Y-coordinate of point B.
1516
+ """
1517
+ @by.setter
1518
+ def by(self, arg0: typing.SupportsFloat) -> None:
1519
+ ...
1520
+ @property
1521
+ def length(self) -> float:
1522
+ """
1523
+ The Euclidean length of the line segment.
1524
+ """
1525
+ class Mask:
1526
+ """
1527
+
1528
+ A collision mask for pixel-perfect collision detection.
1529
+
1530
+ A Mask represents a 2D bitmap, typically used for precise collision detection based on
1531
+ non-transparent pixels.
1532
+
1533
+ """
1534
+ @typing.overload
1535
+ def __init__(self) -> None:
1536
+ """
1537
+ Create an empty mask with size (0, 0).
1538
+ """
1539
+ @typing.overload
1540
+ def __init__(self, size: Vec2, filled: bool = False) -> None:
1541
+ """
1542
+ Create a mask with specified size.
1543
+
1544
+ Args:
1545
+ size (Vec2): The size of the mask as (width, height).
1546
+ filled (bool): Whether to fill the mask with solid pixels. Defaults to False.
1547
+ """
1548
+ @typing.overload
1549
+ def __init__(self, pixel_array: PixelArray, threshold: typing.SupportsInt = 1) -> None:
1550
+ """
1551
+ Create a mask from a pixel array based on alpha threshold.
1552
+
1553
+ Args:
1554
+ pixel_array (PixelArray): The source pixel array to create the mask from.
1555
+ threshold (int): Alpha threshold value (0-255). Pixels with alpha >= threshold are solid.
1556
+
1557
+ Raises:
1558
+ RuntimeError: If the pixel array is invalid.
1559
+ """
1560
+ def add(self, other: Mask, offset: typing.Any = None) -> None:
1561
+ """
1562
+ Add another mask to this mask with an offset.
1563
+
1564
+ Performs a bitwise OR operation between the masks.
1565
+
1566
+ Args:
1567
+ other (Mask): The mask to add.
1568
+ offset (Vec2): Position offset for the other mask. Defaults to (0, 0).
1569
+ """
1570
+ def clear(self) -> None:
1571
+ """
1572
+ Clear the entire mask, setting all pixels to transparent.
1573
+ """
1574
+ def collide_mask(self, other: Mask, offset: typing.Any = None) -> bool:
1575
+ """
1576
+ Check collision between this mask and another mask with an offset.
1577
+
1578
+ Args:
1579
+ other (Mask): The other mask to test collision with.
1580
+ offset (Vec2): Position offset between the masks. Defaults to (0, 0).
1581
+
1582
+ Returns:
1583
+ bool: True if the masks collide, False otherwise.
1584
+ """
1585
+ def copy(self) -> Mask:
1586
+ """
1587
+ Create a copy of this mask.
1588
+
1589
+ Returns:
1590
+ Mask: A new Mask with the same dimensions and pixel data.
1591
+ """
1592
+ def fill(self) -> None:
1593
+ """
1594
+ Fill the entire mask with solid pixels.
1595
+ """
1596
+ def get_at(self, pos: Vec2) -> bool:
1597
+ """
1598
+ Get the pixel value at a specific position.
1599
+
1600
+ Args:
1601
+ pos (Vec2): The position to check.
1602
+
1603
+ Returns:
1604
+ bool: True if the pixel is solid (above threshold), False otherwise.
1605
+ """
1606
+ def get_bounding_rect(self) -> Rect:
1607
+ """
1608
+ Get the bounding rectangle that contains all solid pixels.
1609
+
1610
+ Returns:
1611
+ Rect: The smallest rectangle containing all solid pixels.
1612
+ Returns empty rect if mask has no solid pixels.
1613
+ """
1614
+ def get_center_of_mass(self) -> Vec2:
1615
+ """
1616
+ Calculate the center of mass of all solid pixels.
1617
+
1618
+ Returns:
1619
+ Vec2: The center of mass position. Returns (0, 0) if mask is empty.
1620
+ """
1621
+ def get_collision_points(self, other: Mask, offset: typing.Any = None) -> list[Vec2]:
1622
+ """
1623
+ Get all points where this mask collides with another mask.
1624
+
1625
+ Args:
1626
+ other (Mask): The other mask to test collision with.
1627
+ offset (Vec2): Position offset between the masks. Defaults to (0, 0).
1628
+
1629
+ Returns:
1630
+ list[Vec2]: A list of collision points.
1631
+ """
1632
+ def get_count(self) -> int:
1633
+ """
1634
+ Get the number of solid pixels in the mask.
1635
+
1636
+ Returns:
1637
+ int: The count of solid pixels.
1638
+ """
1639
+ def get_outline(self) -> list[Vec2]:
1640
+ """
1641
+ Get the outline points of the mask.
1642
+
1643
+ Returns a list of points that form the outline of all solid regions.
1644
+
1645
+ Returns:
1646
+ list[Vec2]: A list of outline points.
1647
+ """
1648
+ def get_overlap_area(self, other: Mask, offset: typing.Any = None) -> int:
1649
+ """
1650
+ Get the number of overlapping pixels between this mask and another.
1651
+
1652
+ Args:
1653
+ other (Mask): The other mask to check overlap with.
1654
+ offset (Vec2): Position offset between the masks. Defaults to (0, 0).
1655
+
1656
+ Returns:
1657
+ int: The number of overlapping solid pixels.
1658
+ """
1659
+ def get_overlap_mask(self, other: Mask, offset: typing.Any = None) -> Mask:
1660
+ """
1661
+ Get a mask representing the overlapping area between this mask and another.
1662
+
1663
+ Args:
1664
+ other (Mask): The other mask to check overlap with.
1665
+ offset (Vec2): Position offset between the masks. Defaults to (0, 0).
1666
+
1667
+ Returns:
1668
+ Mask: A new mask containing only the overlapping pixels.
1669
+ """
1670
+ def get_pixel_array(self, color: typing.Any = None) -> PixelArray:
1671
+ """
1672
+ Convert the mask to a pixel array with the specified color.
1673
+
1674
+ Solid pixels become the specified color, transparent pixels become transparent.
1675
+
1676
+ Args:
1677
+ color (Color): The color to use for solid pixels. Defaults to white (255, 255, 255, 255).
1678
+
1679
+ Returns:
1680
+ PixelArray: A new pixel array representation of the mask.
1681
+
1682
+ Raises:
1683
+ RuntimeError: If pixel array creation fails.
1684
+ """
1685
+ def get_rect(self) -> Rect:
1686
+ """
1687
+ Get the bounding rectangle of the mask starting at (0, 0).
1688
+ """
1689
+ def invert(self) -> None:
1690
+ """
1691
+ Invert all pixels in the mask.
1692
+
1693
+ Solid pixels become transparent and transparent pixels become solid.
1694
+ """
1695
+ def is_empty(self) -> bool:
1696
+ """
1697
+ Check if the mask contains no solid pixels.
1698
+
1699
+ Returns:
1700
+ bool: True if the mask is empty, False otherwise.
1701
+ """
1702
+ def set_at(self, pos: Vec2, value: bool) -> None:
1703
+ """
1704
+ Set the pixel value at a specific position.
1705
+
1706
+ Args:
1707
+ pos (Vec2): The position to set.
1708
+ value (bool): The pixel value (True for solid, False for transparent).
1709
+ """
1710
+ def subtract(self, other: Mask, offset: typing.Any = None) -> None:
1711
+ """
1712
+ Subtract another mask from this mask with an offset.
1713
+
1714
+ Removes pixels where the other mask has solid pixels.
1715
+
1716
+ Args:
1717
+ other (Mask): The mask to subtract.
1718
+ offset (Vec2): Position offset for the other mask. Defaults to (0, 0).
1719
+ """
1720
+ @property
1721
+ def height(self) -> int:
1722
+ """
1723
+ The height of the mask in pixels.
1724
+ """
1725
+ @property
1726
+ def size(self) -> Vec2:
1727
+ """
1728
+ The size of the mask as a Vec2.
1729
+ """
1730
+ @property
1731
+ def width(self) -> int:
1732
+ """
1733
+ The width of the mask in pixels.
1734
+ """
1735
+ class MouseButton(enum.IntEnum):
1736
+ M_LEFT: typing.ClassVar[MouseButton] # value = <MouseButton.M_LEFT: 1>
1737
+ M_MIDDLE: typing.ClassVar[MouseButton] # value = <MouseButton.M_MIDDLE: 2>
1738
+ M_RIGHT: typing.ClassVar[MouseButton] # value = <MouseButton.M_RIGHT: 3>
1739
+ M_SIDE1: typing.ClassVar[MouseButton] # value = <MouseButton.M_SIDE1: 4>
1740
+ M_SIDE2: typing.ClassVar[MouseButton] # value = <MouseButton.M_SIDE2: 5>
1741
+ @classmethod
1742
+ def __new__(cls, value):
1743
+ ...
1744
+ def __format__(self, format_spec):
1745
+ """
1746
+ Convert to a string according to format_spec.
1747
+ """
1748
+ class PenAxis(enum.IntEnum):
1749
+ P_DISTANCE: typing.ClassVar[PenAxis] # value = <PenAxis.P_DISTANCE: 3>
1750
+ P_PRESSURE: typing.ClassVar[PenAxis] # value = <PenAxis.P_PRESSURE: 0>
1751
+ P_ROTATION: typing.ClassVar[PenAxis] # value = <PenAxis.P_ROTATION: 4>
1752
+ P_SLIDER: typing.ClassVar[PenAxis] # value = <PenAxis.P_SLIDER: 5>
1753
+ P_TANGENTIAL_PRESSURE: typing.ClassVar[PenAxis] # value = <PenAxis.P_TANGENTIAL_PRESSURE: 6>
1754
+ P_TILT_X: typing.ClassVar[PenAxis] # value = <PenAxis.P_TILT_X: 1>
1755
+ P_TILT_Y: typing.ClassVar[PenAxis] # value = <PenAxis.P_TILT_Y: 2>
1756
+ @classmethod
1757
+ def __new__(cls, value):
1758
+ ...
1759
+ def __format__(self, format_spec):
1760
+ """
1761
+ Convert to a string according to format_spec.
1762
+ """
1763
+ class PixelArray:
1764
+ """
1765
+
1766
+ Represents a 2D pixel buffer for image manipulation and blitting operations.
1767
+
1768
+ A PixelArray is a 2D array of pixels that can be manipulated, drawn on, and used as a source
1769
+ for texture creation or blitting to other PixelArrays. Supports pixel-level operations,
1770
+ color key transparency, and alpha blending.
1771
+
1772
+ """
1773
+ @typing.overload
1774
+ def __init__(self, size: Vec2) -> None:
1775
+ """
1776
+ Create a new PixelArray with the specified dimensions.
1777
+
1778
+ Args:
1779
+ size (Vec2): The size of the pixel array as (width, height).
1780
+
1781
+ Raises:
1782
+ RuntimeError: If pixel array creation fails.
1783
+ """
1784
+ @typing.overload
1785
+ def __init__(self, file_path: str) -> None:
1786
+ """
1787
+ Create a PixelArray by loading an image from a file.
1788
+
1789
+ Args:
1790
+ file_path (str): Path to the image file to load.
1791
+
1792
+ Raises:
1793
+ RuntimeError: If the file cannot be loaded or doesn't exist.
1794
+ """
1795
+ @typing.overload
1796
+ def blit(self, pixel_array: PixelArray, pos: Vec2, anchor: Anchor = Anchor.CENTER, src: typing.Any = None) -> None:
1797
+ """
1798
+ Blit (copy) another pixel array onto this pixel array at the specified position with anchor alignment.
1799
+
1800
+ Args:
1801
+ pixel_array (PixelArray): The source pixel array to blit from.
1802
+ pos (Vec2): The position to blit to.
1803
+ anchor (Anchor, optional): The anchor point for positioning. Defaults to CENTER.
1804
+ src (Rect, optional): The source rectangle to blit from. Defaults to entire source pixel array.
1805
+
1806
+ Raises:
1807
+ RuntimeError: If the blit operation fails.
1808
+ """
1809
+ @typing.overload
1810
+ def blit(self, pixel_array: PixelArray, dst: Rect, src: typing.Any = None) -> None:
1811
+ """
1812
+ Blit (copy) another pixel array onto this pixel array with specified destination and source rectangles.
1813
+
1814
+ Args:
1815
+ pixel_array (PixelArray): The source pixel array to blit from.
1816
+ dst (Rect): The destination rectangle on this pixel array.
1817
+ src (Rect, optional): The source rectangle to blit from. Defaults to entire source pixel array.
1818
+
1819
+ Raises:
1820
+ RuntimeError: If the blit operation fails.
1821
+ """
1822
+ def copy(self) -> PixelArray:
1823
+ """
1824
+ Create a copy of this pixel array.
1825
+
1826
+ Returns:
1827
+ PixelArray: A new PixelArray that is an exact copy of this one.
1828
+
1829
+ Raises:
1830
+ RuntimeError: If pixel array copying fails.
1831
+ """
1832
+ def fill(self, color: Color) -> None:
1833
+ """
1834
+ Fill the entire pixel array with a solid color.
1835
+
1836
+ Args:
1837
+ color (Color): The color to fill the pixel array with.
1838
+ """
1839
+ def get_at(self, coord: Vec2) -> Color:
1840
+ """
1841
+ Get the color of a pixel at the specified coordinates.
1842
+
1843
+ Args:
1844
+ coord (Vec2): The coordinates of the pixel as (x, y).
1845
+
1846
+ Returns:
1847
+ Color: The color of the pixel at the specified coordinates.
1848
+
1849
+ Raises:
1850
+ IndexError: If coordinates are outside the pixel array bounds.
1851
+ """
1852
+ def get_rect(self) -> Rect:
1853
+ """
1854
+ Get a rectangle representing the pixel array bounds.
1855
+
1856
+ Returns:
1857
+ Rect: A rectangle with position (0, 0) and the pixel array's dimensions.
1858
+ """
1859
+ def set_at(self, coord: Vec2, color: Color) -> None:
1860
+ """
1861
+ Set the color of a pixel at the specified coordinates.
1862
+
1863
+ Args:
1864
+ coord (Vec2): The coordinates of the pixel as (x, y).
1865
+ color (Color): The color to set the pixel to.
1866
+
1867
+ Raises:
1868
+ IndexError: If coordinates are outside the pixel array bounds.
1869
+ """
1870
+ @property
1871
+ def alpha_mod(self) -> int:
1872
+ """
1873
+ The alpha modulation value for the pixel array.
1874
+
1875
+ Controls the overall transparency of the pixel array. Values range from 0 (fully transparent)
1876
+ to 255 (fully opaque).
1877
+
1878
+ Returns:
1879
+ int: The current alpha modulation value [0-255].
1880
+
1881
+ Raises:
1882
+ RuntimeError: If getting the alpha value fails.
1883
+ """
1884
+ @alpha_mod.setter
1885
+ def alpha_mod(self, arg1: typing.SupportsInt) -> None:
1886
+ ...
1887
+ @property
1888
+ def color_key(self) -> Color:
1889
+ """
1890
+ The color key for transparency.
1891
+
1892
+ When set, pixels of this color will be treated as transparent during blitting operations.
1893
+ Used for simple transparency effects.
1894
+
1895
+ Returns:
1896
+ Color: The current color key.
1897
+
1898
+ Raises:
1899
+ RuntimeError: If getting the color key fails.
1900
+ """
1901
+ @color_key.setter
1902
+ def color_key(self, arg1: Color) -> None:
1903
+ ...
1904
+ @property
1905
+ def height(self) -> int:
1906
+ """
1907
+ The height of the pixel array.
1908
+
1909
+ Returns:
1910
+ int: The pixel array height.
1911
+ """
1912
+ @property
1913
+ def size(self) -> Vec2:
1914
+ """
1915
+ The size of the pixel array as a Vec2.
1916
+
1917
+ Returns:
1918
+ Vec2: The pixel array size as (width, height).
1919
+ """
1920
+ @property
1921
+ def width(self) -> int:
1922
+ """
1923
+ The width of the pixel array.
1924
+
1925
+ Returns:
1926
+ int: The pixel array width.
1927
+ """
1928
+ class PolarCoordinate:
1929
+ """
1930
+
1931
+ Represents a polar coordinate with angle and radius components.
1932
+
1933
+ A polar coordinate system uses an angle (in radians) and radius to define a position
1934
+ relative to a fixed origin point.
1935
+
1936
+ """
1937
+ def __eq__(self, arg0: PolarCoordinate) -> bool:
1938
+ """
1939
+ Check if two PolarCoordinates are equal.
1940
+
1941
+ Args:
1942
+ other (PolarCoordinate): The other PolarCoordinate to compare.
1943
+
1944
+ Returns:
1945
+ bool: True if both angle and radius are equal.
1946
+ """
1947
+ def __getitem__(self, index: typing.SupportsInt) -> float:
1948
+ """
1949
+ Access polar coordinate components by index.
1950
+
1951
+ Args:
1952
+ index (int): Index (0=angle, 1=radius).
1953
+
1954
+ Returns:
1955
+ float: The component value.
1956
+
1957
+ Raises:
1958
+ IndexError: If index is not 0 or 1.
1959
+ """
1960
+ def __hash__(self) -> int:
1961
+ """
1962
+ Return a hash value for the PolarCoordinate.
1963
+
1964
+ Returns:
1965
+ int: Hash value based on angle and radius.
1966
+ """
1967
+ @typing.overload
1968
+ def __init__(self) -> None:
1969
+ """
1970
+ Create a PolarCoordinate with default values (0.0, 0.0).
1971
+ """
1972
+ @typing.overload
1973
+ def __init__(self, angle: typing.SupportsFloat, radius: typing.SupportsFloat) -> None:
1974
+ """
1975
+ Create a PolarCoordinate from angle and radius.
1976
+
1977
+ Args:
1978
+ angle (float): The angle in radians.
1979
+ radius (float): The radius/distance from origin.
1980
+ """
1981
+ @typing.overload
1982
+ def __init__(self, arg0: collections.abc.Sequence) -> None:
1983
+ """
1984
+ Create a PolarCoordinate from a sequence of two elements.
1985
+
1986
+ Args:
1987
+ sequence: A sequence (list, tuple) containing [angle, radius].
1988
+
1989
+ Raises:
1990
+ RuntimeError: If sequence doesn't contain exactly 2 elements.
1991
+ """
1992
+ def __iter__(self) -> collections.abc.Iterator:
1993
+ """
1994
+ Return an iterator over (angle, radius).
1995
+
1996
+ Returns:
1997
+ iterator: Iterator that yields angle first, then radius.
1998
+ """
1999
+ def __len__(self) -> int:
2000
+ """
2001
+ Return the number of components (always 2).
2002
+
2003
+ Returns:
2004
+ int: Always returns 2 (angle and radius).
2005
+ """
2006
+ def __ne__(self, arg0: PolarCoordinate) -> bool:
2007
+ """
2008
+ Check if two PolarCoordinates are not equal.
2009
+
2010
+ Args:
2011
+ other (PolarCoordinate): The other PolarCoordinate to compare.
2012
+
2013
+ Returns:
2014
+ bool: True if angle or radius are different.
2015
+ """
2016
+ def __repr__(self) -> str:
2017
+ """
2018
+ Return a string suitable for debugging and recreation.
2019
+
2020
+ Returns:
2021
+ str: String in format "PolarCoordinate(angle, radius)".
2022
+ """
2023
+ def __setitem__(self, index: typing.SupportsInt, value: typing.SupportsFloat) -> None:
2024
+ """
2025
+ Set polar coordinate components by index.
2026
+
2027
+ Args:
2028
+ index (int): Index (0=angle, 1=radius).
2029
+ value (float): The new value to set.
2030
+
2031
+ Raises:
2032
+ IndexError: If index is not 0 or 1.
2033
+ """
2034
+ def __str__(self) -> str:
2035
+ """
2036
+ Return a human-readable string representation.
2037
+
2038
+ Returns:
2039
+ str: String in format "(angle, radius)".
2040
+ """
2041
+ def to_cartesian(self) -> Vec2:
2042
+ """
2043
+ Convert polar coordinates to Cartesian coordinates.
2044
+
2045
+ Returns:
2046
+ Vec2: The equivalent Cartesian coordinates as a Vec2.
2047
+ """
2048
+ @property
2049
+ def angle(self) -> float:
2050
+ """
2051
+ The angle component in radians.
2052
+ """
2053
+ @angle.setter
2054
+ def angle(self, arg0: typing.SupportsFloat) -> None:
2055
+ ...
2056
+ @property
2057
+ def radius(self) -> float:
2058
+ """
2059
+ The radius component (distance from origin).
2060
+ """
2061
+ @radius.setter
2062
+ def radius(self, arg0: typing.SupportsFloat) -> None:
2063
+ ...
2064
+ class Polygon:
2065
+ """
2066
+
2067
+ Represents a polygon shape defined by a sequence of points.
2068
+
2069
+ A polygon is a closed shape made up of connected line segments. The points define
2070
+ the vertices of the polygon in order. Supports various geometric operations.
2071
+
2072
+ """
2073
+ def __getitem__(self, index: typing.SupportsInt) -> Vec2:
2074
+ """
2075
+ Get a point by index.
2076
+
2077
+ Args:
2078
+ index (int): The index of the point to retrieve.
2079
+
2080
+ Returns:
2081
+ Vec2: The point at the specified index.
2082
+
2083
+ Raises:
2084
+ IndexError: If index is out of range.
2085
+ """
2086
+ @typing.overload
2087
+ def __init__(self) -> None:
2088
+ """
2089
+ Create an empty polygon with no points.
2090
+ """
2091
+ @typing.overload
2092
+ def __init__(self, points: collections.abc.Sequence[Vec2]) -> None:
2093
+ """
2094
+ Create a polygon from a vector of Vec2 points.
2095
+
2096
+ Args:
2097
+ points (list[Vec2]): List of Vec2 points defining the polygon vertices.
2098
+ """
2099
+ def __iter__(self) -> collections.abc.Iterator:
2100
+ """
2101
+ Return an iterator over the polygon's points.
2102
+ """
2103
+ def __len__(self) -> int:
2104
+ """
2105
+ Return the number of points in the polygon.
2106
+
2107
+ Returns:
2108
+ int: The number of vertices.
2109
+ """
2110
+ def copy(self) -> Polygon:
2111
+ """
2112
+ Return a copy of the polygon.
2113
+
2114
+ Returns:
2115
+ Polygon: A new polygon with the same points.
2116
+ """
2117
+ def rotate(self, angle: typing.SupportsFloat, pivot: Vec2) -> None:
2118
+ """
2119
+ Rotate the polygon around a pivot point.
2120
+
2121
+ Args:
2122
+ angle (float): The rotation angle in radians.
2123
+ pivot (Vec2): The point to rotate around.
2124
+ """
2125
+ @typing.overload
2126
+ def scale(self, factor: typing.SupportsFloat, pivot: Vec2) -> None:
2127
+ """
2128
+ Scale the polygon uniformly from a pivot point.
2129
+
2130
+ Args:
2131
+ factor (float): The scaling factor.
2132
+ pivot (Vec2): The point to scale from.
2133
+ """
2134
+ @typing.overload
2135
+ def scale(self, factor: Vec2, pivot: Vec2) -> None:
2136
+ """
2137
+ Scale the polygon non-uniformly from a pivot point.
2138
+
2139
+ Args:
2140
+ factor (Vec2): The scaling factors for x and y.
2141
+ pivot (Vec2): The point to scale from.
2142
+ """
2143
+ def translate(self, offset: Vec2) -> None:
2144
+ """
2145
+ Move the polygon by an offset.
2146
+
2147
+ Args:
2148
+ offset (Vec2): The offset to move by.
2149
+ """
2150
+ @property
2151
+ def area(self) -> float:
2152
+ """
2153
+ Get the area of the polygon.
2154
+
2155
+ Returns:
2156
+ float: The area enclosed by the polygon.
2157
+ """
2158
+ @property
2159
+ def bounds(self) -> Rect:
2160
+ """
2161
+ Get the bounding rectangle of the polygon.
2162
+
2163
+ Returns:
2164
+ Rect: The smallest rectangle that contains the polygon.
2165
+ """
2166
+ @property
2167
+ def centroid(self) -> Vec2:
2168
+ """
2169
+ Get the centroid of the polygon.
2170
+
2171
+ Returns:
2172
+ Vec2: The center point of the polygon.
2173
+ """
2174
+ @property
2175
+ def perimeter(self) -> float:
2176
+ """
2177
+ Get the perimeter of the polygon.
2178
+
2179
+ Returns:
2180
+ float: The total distance around the polygon.
2181
+ """
2182
+ @property
2183
+ def points(self) -> list[Vec2]:
2184
+ """
2185
+ The list of Vec2 points that define the polygon vertices.
2186
+ """
2187
+ @points.setter
2188
+ def points(self, arg0: collections.abc.Sequence[Vec2]) -> None:
2189
+ ...
2190
+ class Rect:
2191
+ """
2192
+
2193
+ Represents a rectangle with position and size.
2194
+
2195
+ A Rect is defined by its top-left corner position (x, y) and dimensions (w, h).
2196
+ Supports various geometric operations, collision detection, and positioning methods.
2197
+
2198
+ """
2199
+ __hash__: typing.ClassVar[None] = None
2200
+ def __bool__(self) -> bool:
2201
+ """
2202
+ Check if the rectangle has positive area.
2203
+
2204
+ Returns:
2205
+ bool: True if both width and height are greater than 0.
2206
+ """
2207
+ def __eq__(self, other: Rect) -> bool:
2208
+ """
2209
+ Check if two rectangles are equal.
2210
+
2211
+ Args:
2212
+ other (Rect): The other rectangle to compare.
2213
+
2214
+ Returns:
2215
+ bool: True if all components (x, y, w, h) are equal.
2216
+ """
2217
+ def __getitem__(self, index: typing.SupportsInt) -> float:
2218
+ """
2219
+ Access rectangle components by index.
2220
+
2221
+ Args:
2222
+ index (int): Index (0=x, 1=y, 2=w, 3=h).
2223
+
2224
+ Returns:
2225
+ float: The component value.
2226
+
2227
+ Raises:
2228
+ IndexError: If index is not 0, 1, 2, or 3.
2229
+ """
2230
+ @typing.overload
2231
+ def __init__(self) -> None:
2232
+ """
2233
+ Create a Rect with default values (0, 0, 0, 0).
2234
+ """
2235
+ @typing.overload
2236
+ def __init__(self, x: typing.SupportsFloat, y: typing.SupportsFloat, w: typing.SupportsFloat, h: typing.SupportsFloat) -> None:
2237
+ """
2238
+ Create a Rect with specified position and dimensions.
2239
+
2240
+ Args:
2241
+ x (float): The x coordinate of the top-left corner.
2242
+ y (float): The y coordinate of the top-left corner.
2243
+ w (float): The width of the rectangle.
2244
+ h (float): The height of the rectangle.
2245
+ """
2246
+ @typing.overload
2247
+ def __init__(self, x: typing.SupportsFloat, y: typing.SupportsFloat, size: Vec2) -> None:
2248
+ """
2249
+ Create a Rect with specified position and size vector.
2250
+
2251
+ Args:
2252
+ x (float): The x coordinate of the top-left corner.
2253
+ y (float): The y coordinate of the top-left corner.
2254
+ size (Vec2): The size as a Vec2 (width, height).
2255
+ """
2256
+ @typing.overload
2257
+ def __init__(self, pos: Vec2, w: typing.SupportsFloat, h: typing.SupportsFloat) -> None:
2258
+ """
2259
+ Create a Rect with specified position vector and dimensions.
2260
+
2261
+ Args:
2262
+ pos (Vec2): The position as a Vec2 (x, y).
2263
+ w (float): The width of the rectangle.
2264
+ h (float): The height of the rectangle.
2265
+ """
2266
+ @typing.overload
2267
+ def __init__(self, pos: Vec2, size: Vec2) -> None:
2268
+ """
2269
+ Create a Rect with specified position and size vectors.
2270
+
2271
+ Args:
2272
+ pos (Vec2): The position as a Vec2 (x, y).
2273
+ size (Vec2): The size as a Vec2 (width, height).
2274
+ """
2275
+ @typing.overload
2276
+ def __init__(self, arg0: collections.abc.Sequence) -> None:
2277
+ """
2278
+ Create a Rect from a sequence of four elements.
2279
+
2280
+ Args:
2281
+ sequence: A sequence (list, tuple) containing [x, y, w, h].
2282
+
2283
+ Raises:
2284
+ RuntimeError: If sequence doesn't contain exactly 4 elements.
2285
+ """
2286
+ def __iter__(self) -> collections.abc.Iterator:
2287
+ """
2288
+ Return an iterator over (x, y, w, h).
2289
+
2290
+ Returns:
2291
+ iterator: Iterator that yields x, y, w, h in order.
2292
+ """
2293
+ def __len__(self) -> int:
2294
+ """
2295
+ Return the number of components (always 4).
2296
+
2297
+ Returns:
2298
+ int: Always returns 4 (x, y, w, h).
2299
+ """
2300
+ def __ne__(self, other: Rect) -> bool:
2301
+ """
2302
+ Check if two rectangles are not equal.
2303
+
2304
+ Args:
2305
+ other (Rect): The other rectangle to compare.
2306
+
2307
+ Returns:
2308
+ bool: True if any component differs.
2309
+ """
2310
+ def __repr__(self) -> str:
2311
+ """
2312
+ Return a string suitable for debugging and recreation.
2313
+
2314
+ Returns:
2315
+ str: String in format "Rect(x=..., y=..., w=..., h=...)".
2316
+ """
2317
+ def __str__(self) -> str:
2318
+ """
2319
+ Return a human-readable string representation.
2320
+
2321
+ Returns:
2322
+ str: String in format "[x, y, w, h]".
2323
+ """
2324
+ @typing.overload
2325
+ def clamp(self, other: Rect) -> None:
2326
+ """
2327
+ Clamp this rectangle to be within another rectangle.
2328
+
2329
+ Args:
2330
+ other (Rect): The rectangle to clamp within.
2331
+
2332
+ Raises:
2333
+ ValueError: If this rectangle is larger than the clamp area.
2334
+ """
2335
+ @typing.overload
2336
+ def clamp(self, min: Vec2, max: Vec2) -> None:
2337
+ """
2338
+ Clamp this rectangle to be within the specified bounds.
2339
+
2340
+ Args:
2341
+ min (Vec2): The minimum bounds as (min_x, min_y).
2342
+ max (Vec2): The maximum bounds as (max_x, max_y).
2343
+
2344
+ Raises:
2345
+ ValueError: If min >= max or rectangle is larger than the clamp area.
2346
+ """
2347
+ def copy(self) -> Rect:
2348
+ """
2349
+ Create a copy of this rectangle.
2350
+
2351
+ Returns:
2352
+ Rect: A new Rect with the same position and size.
2353
+ """
2354
+ def fit(self, other: Rect) -> None:
2355
+ """
2356
+ Scale this rectangle to fit inside another rectangle while maintaining aspect ratio.
2357
+
2358
+ Args:
2359
+ other (Rect): The rectangle to fit inside.
2360
+
2361
+ Raises:
2362
+ ValueError: If other rectangle has non-positive dimensions.
2363
+ """
2364
+ def inflate(self, offset: Vec2) -> None:
2365
+ """
2366
+ Inflate the rectangle by the given offset.
2367
+
2368
+ The rectangle grows in all directions. The position is adjusted to keep the center
2369
+ in the same place.
2370
+
2371
+ Args:
2372
+ offset (Vec2): The amount to inflate by as (dw, dh).
2373
+ """
2374
+ def move(self, offset: Vec2) -> None:
2375
+ """
2376
+ Move the rectangle by the given offset.
2377
+
2378
+ Args:
2379
+ offset (Vec2): The offset to move by as (dx, dy).
2380
+ """
2381
+ @typing.overload
2382
+ def scale_by(self, factor: typing.SupportsFloat) -> None:
2383
+ """
2384
+ Scale the rectangle by a uniform factor.
2385
+
2386
+ Args:
2387
+ factor (float): The scaling factor (must be > 0).
2388
+
2389
+ Raises:
2390
+ ValueError: If factor is <= 0.
2391
+ """
2392
+ @typing.overload
2393
+ def scale_by(self, factor: Vec2) -> None:
2394
+ """
2395
+ Scale the rectangle by different factors for width and height.
2396
+
2397
+ Args:
2398
+ factor (Vec2): The scaling factors as (scale_x, scale_y).
2399
+
2400
+ Raises:
2401
+ ValueError: If any factor is <= 0.
2402
+ """
2403
+ def scale_to(self, size: Vec2) -> None:
2404
+ """
2405
+ Scale the rectangle to the specified size.
2406
+
2407
+ Args:
2408
+ size (Vec2): The new size as (width, height).
2409
+
2410
+ Raises:
2411
+ ValueError: If width or height is <= 0.
2412
+ """
2413
+ @property
2414
+ def bottom(self) -> float:
2415
+ """
2416
+ The y coordinate of the bottom edge.
2417
+ """
2418
+ @bottom.setter
2419
+ def bottom(self, arg1: typing.SupportsFloat) -> None:
2420
+ ...
2421
+ @property
2422
+ def bottom_left(self) -> Vec2:
2423
+ """
2424
+ The position of the bottom-left corner as (x, y).
2425
+ """
2426
+ @bottom_left.setter
2427
+ def bottom_left(self, arg1: Vec2) -> None:
2428
+ ...
2429
+ @property
2430
+ def bottom_mid(self) -> Vec2:
2431
+ """
2432
+ The position of the bottom-middle point as (x, y).
2433
+ """
2434
+ @bottom_mid.setter
2435
+ def bottom_mid(self, arg1: Vec2) -> None:
2436
+ ...
2437
+ @property
2438
+ def bottom_right(self) -> Vec2:
2439
+ """
2440
+ The position of the bottom-right corner as (x, y).
2441
+ """
2442
+ @bottom_right.setter
2443
+ def bottom_right(self, arg1: Vec2) -> None:
2444
+ ...
2445
+ @property
2446
+ def center(self) -> Vec2:
2447
+ """
2448
+ The position of the center point as (x, y).
2449
+ """
2450
+ @center.setter
2451
+ def center(self, arg1: Vec2) -> None:
2452
+ ...
2453
+ @property
2454
+ def h(self) -> float:
2455
+ """
2456
+ The height of the rectangle.
2457
+ """
2458
+ @h.setter
2459
+ def h(self, arg0: typing.SupportsFloat) -> None:
2460
+ ...
2461
+ @property
2462
+ def left(self) -> float:
2463
+ """
2464
+ The x coordinate of the left edge.
2465
+ """
2466
+ @left.setter
2467
+ def left(self, arg1: typing.SupportsFloat) -> None:
2468
+ ...
2469
+ @property
2470
+ def mid_left(self) -> Vec2:
2471
+ """
2472
+ The position of the middle-left point as (x, y).
2473
+ """
2474
+ @mid_left.setter
2475
+ def mid_left(self, arg1: Vec2) -> None:
2476
+ ...
2477
+ @property
2478
+ def mid_right(self) -> Vec2:
2479
+ """
2480
+ The position of the middle-right point as (x, y).
2481
+ """
2482
+ @mid_right.setter
2483
+ def mid_right(self, arg1: Vec2) -> None:
2484
+ ...
2485
+ @property
2486
+ def right(self) -> float:
2487
+ """
2488
+ The x coordinate of the right edge.
2489
+ """
2490
+ @right.setter
2491
+ def right(self, arg1: typing.SupportsFloat) -> None:
2492
+ ...
2493
+ @property
2494
+ def size(self) -> Vec2:
2495
+ """
2496
+ The size of the rectangle as (width, height).
2497
+ """
2498
+ @size.setter
2499
+ def size(self, arg1: Vec2) -> None:
2500
+ ...
2501
+ @property
2502
+ def top(self) -> float:
2503
+ """
2504
+ The y coordinate of the top edge.
2505
+ """
2506
+ @top.setter
2507
+ def top(self, arg1: typing.SupportsFloat) -> None:
2508
+ ...
2509
+ @property
2510
+ def top_left(self) -> Vec2:
2511
+ """
2512
+ The position of the top-left corner as (x, y).
2513
+ """
2514
+ @top_left.setter
2515
+ def top_left(self, arg1: Vec2) -> None:
2516
+ ...
2517
+ @property
2518
+ def top_mid(self) -> Vec2:
2519
+ """
2520
+ The position of the top-middle point as (x, y).
2521
+ """
2522
+ @top_mid.setter
2523
+ def top_mid(self, arg1: Vec2) -> None:
2524
+ ...
2525
+ @property
2526
+ def top_right(self) -> Vec2:
2527
+ """
2528
+ The position of the top-right corner as (x, y).
2529
+ """
2530
+ @top_right.setter
2531
+ def top_right(self, arg1: Vec2) -> None:
2532
+ ...
2533
+ @property
2534
+ def w(self) -> float:
2535
+ """
2536
+ The width of the rectangle.
2537
+ """
2538
+ @w.setter
2539
+ def w(self, arg0: typing.SupportsFloat) -> None:
2540
+ ...
2541
+ @property
2542
+ def x(self) -> float:
2543
+ """
2544
+ The x coordinate of the top-left corner.
2545
+ """
2546
+ @x.setter
2547
+ def x(self, arg0: typing.SupportsFloat) -> None:
2548
+ ...
2549
+ @property
2550
+ def y(self) -> float:
2551
+ """
2552
+ The y coordinate of the top-left corner.
2553
+ """
2554
+ @y.setter
2555
+ def y(self, arg0: typing.SupportsFloat) -> None:
2556
+ ...
2557
+ class Scancode(enum.IntEnum):
2558
+ S_0: typing.ClassVar[Scancode] # value = <Scancode.S_0: 39>
2559
+ S_1: typing.ClassVar[Scancode] # value = <Scancode.S_1: 30>
2560
+ S_2: typing.ClassVar[Scancode] # value = <Scancode.S_2: 31>
2561
+ S_3: typing.ClassVar[Scancode] # value = <Scancode.S_3: 32>
2562
+ S_4: typing.ClassVar[Scancode] # value = <Scancode.S_4: 33>
2563
+ S_5: typing.ClassVar[Scancode] # value = <Scancode.S_5: 34>
2564
+ S_6: typing.ClassVar[Scancode] # value = <Scancode.S_6: 35>
2565
+ S_7: typing.ClassVar[Scancode] # value = <Scancode.S_7: 36>
2566
+ S_8: typing.ClassVar[Scancode] # value = <Scancode.S_8: 37>
2567
+ S_9: typing.ClassVar[Scancode] # value = <Scancode.S_9: 38>
2568
+ S_AGAIN: typing.ClassVar[Scancode] # value = <Scancode.S_AGAIN: 121>
2569
+ S_APOSTROPHE: typing.ClassVar[Scancode] # value = <Scancode.S_APOSTROPHE: 52>
2570
+ S_APPLICATION: typing.ClassVar[Scancode] # value = <Scancode.S_APPLICATION: 101>
2571
+ S_BACKSLASH: typing.ClassVar[Scancode] # value = <Scancode.S_BACKSLASH: 49>
2572
+ S_BACKSPACE: typing.ClassVar[Scancode] # value = <Scancode.S_BACKSPACE: 42>
2573
+ S_CALL: typing.ClassVar[Scancode] # value = <Scancode.S_CALL: 289>
2574
+ S_CAPS: typing.ClassVar[Scancode] # value = <Scancode.S_CAPS: 57>
2575
+ S_CHANNEL_DEC: typing.ClassVar[Scancode] # value = <Scancode.S_CHANNEL_DEC: 261>
2576
+ S_CHANNEL_INC: typing.ClassVar[Scancode] # value = <Scancode.S_CHANNEL_INC: 260>
2577
+ S_COMMA: typing.ClassVar[Scancode] # value = <Scancode.S_COMMA: 54>
2578
+ S_COPY: typing.ClassVar[Scancode] # value = <Scancode.S_COPY: 124>
2579
+ S_CUT: typing.ClassVar[Scancode] # value = <Scancode.S_CUT: 123>
2580
+ S_DEL: typing.ClassVar[Scancode] # value = <Scancode.S_DEL: 76>
2581
+ S_DOWN: typing.ClassVar[Scancode] # value = <Scancode.S_DOWN: 81>
2582
+ S_END: typing.ClassVar[Scancode] # value = <Scancode.S_END: 77>
2583
+ S_ENDCALL: typing.ClassVar[Scancode] # value = <Scancode.S_ENDCALL: 290>
2584
+ S_EQ: typing.ClassVar[Scancode] # value = <Scancode.S_EQ: 46>
2585
+ S_ESC: typing.ClassVar[Scancode] # value = <Scancode.S_ESC: 41>
2586
+ S_EXECUTE: typing.ClassVar[Scancode] # value = <Scancode.S_EXECUTE: 116>
2587
+ S_F1: typing.ClassVar[Scancode] # value = <Scancode.S_F1: 58>
2588
+ S_F10: typing.ClassVar[Scancode] # value = <Scancode.S_F10: 67>
2589
+ S_F11: typing.ClassVar[Scancode] # value = <Scancode.S_F11: 68>
2590
+ S_F12: typing.ClassVar[Scancode] # value = <Scancode.S_F12: 69>
2591
+ S_F13: typing.ClassVar[Scancode] # value = <Scancode.S_F13: 104>
2592
+ S_F14: typing.ClassVar[Scancode] # value = <Scancode.S_F14: 105>
2593
+ S_F15: typing.ClassVar[Scancode] # value = <Scancode.S_F15: 106>
2594
+ S_F2: typing.ClassVar[Scancode] # value = <Scancode.S_F2: 59>
2595
+ S_F3: typing.ClassVar[Scancode] # value = <Scancode.S_F3: 60>
2596
+ S_F4: typing.ClassVar[Scancode] # value = <Scancode.S_F4: 61>
2597
+ S_F5: typing.ClassVar[Scancode] # value = <Scancode.S_F5: 62>
2598
+ S_F6: typing.ClassVar[Scancode] # value = <Scancode.S_F6: 63>
2599
+ S_F7: typing.ClassVar[Scancode] # value = <Scancode.S_F7: 64>
2600
+ S_F8: typing.ClassVar[Scancode] # value = <Scancode.S_F8: 65>
2601
+ S_F9: typing.ClassVar[Scancode] # value = <Scancode.S_F9: 66>
2602
+ S_FIND: typing.ClassVar[Scancode] # value = <Scancode.S_FIND: 126>
2603
+ S_GRAVE: typing.ClassVar[Scancode] # value = <Scancode.S_GRAVE: 53>
2604
+ S_HELP: typing.ClassVar[Scancode] # value = <Scancode.S_HELP: 117>
2605
+ S_HOME: typing.ClassVar[Scancode] # value = <Scancode.S_HOME: 74>
2606
+ S_INS: typing.ClassVar[Scancode] # value = <Scancode.S_INS: 73>
2607
+ S_KP_0: typing.ClassVar[Scancode] # value = <Scancode.S_KP_0: 98>
2608
+ S_KP_1: typing.ClassVar[Scancode] # value = <Scancode.S_KP_1: 89>
2609
+ S_KP_2: typing.ClassVar[Scancode] # value = <Scancode.S_KP_2: 90>
2610
+ S_KP_3: typing.ClassVar[Scancode] # value = <Scancode.S_KP_3: 91>
2611
+ S_KP_4: typing.ClassVar[Scancode] # value = <Scancode.S_KP_4: 92>
2612
+ S_KP_5: typing.ClassVar[Scancode] # value = <Scancode.S_KP_5: 93>
2613
+ S_KP_6: typing.ClassVar[Scancode] # value = <Scancode.S_KP_6: 94>
2614
+ S_KP_7: typing.ClassVar[Scancode] # value = <Scancode.S_KP_7: 95>
2615
+ S_KP_8: typing.ClassVar[Scancode] # value = <Scancode.S_KP_8: 96>
2616
+ S_KP_9: typing.ClassVar[Scancode] # value = <Scancode.S_KP_9: 97>
2617
+ S_KP_DIV: typing.ClassVar[Scancode] # value = <Scancode.S_KP_DIV: 84>
2618
+ S_KP_ENTER: typing.ClassVar[Scancode] # value = <Scancode.S_KP_ENTER: 88>
2619
+ S_KP_MINUS: typing.ClassVar[Scancode] # value = <Scancode.S_KP_MINUS: 86>
2620
+ S_KP_MULT: typing.ClassVar[Scancode] # value = <Scancode.S_KP_MULT: 85>
2621
+ S_KP_PERIOD: typing.ClassVar[Scancode] # value = <Scancode.S_KP_PERIOD: 99>
2622
+ S_KP_PLUS: typing.ClassVar[Scancode] # value = <Scancode.S_KP_PLUS: 87>
2623
+ S_LALT: typing.ClassVar[Scancode] # value = <Scancode.S_LALT: 226>
2624
+ S_LBRACKET: typing.ClassVar[Scancode] # value = <Scancode.S_LBRACKET: 47>
2625
+ S_LCTRL: typing.ClassVar[Scancode] # value = <Scancode.S_LCTRL: 224>
2626
+ S_LEFT: typing.ClassVar[Scancode] # value = <Scancode.S_LEFT: 80>
2627
+ S_LGUI: typing.ClassVar[Scancode] # value = <Scancode.S_LGUI: 227>
2628
+ S_LSHIFT: typing.ClassVar[Scancode] # value = <Scancode.S_LSHIFT: 225>
2629
+ S_MEDIA_EJECT: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_EJECT: 270>
2630
+ S_MEDIA_FAST_FORWARD: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_FAST_FORWARD: 265>
2631
+ S_MEDIA_NEXT: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_NEXT: 267>
2632
+ S_MEDIA_PAUSE: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_PAUSE: 263>
2633
+ S_MEDIA_PLAY: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_PLAY: 262>
2634
+ S_MEDIA_PLAY_PAUSE: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_PLAY_PAUSE: 271>
2635
+ S_MEDIA_PREV: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_PREV: 268>
2636
+ S_MEDIA_REC: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_REC: 264>
2637
+ S_MEDIA_REWIND: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_REWIND: 266>
2638
+ S_MEDIA_SELECT: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_SELECT: 272>
2639
+ S_MEDIA_STOP: typing.ClassVar[Scancode] # value = <Scancode.S_MEDIA_STOP: 269>
2640
+ S_MENU: typing.ClassVar[Scancode] # value = <Scancode.S_MENU: 118>
2641
+ S_MINUS: typing.ClassVar[Scancode] # value = <Scancode.S_MINUS: 45>
2642
+ S_MODE: typing.ClassVar[Scancode] # value = <Scancode.S_MODE: 257>
2643
+ S_MUTE: typing.ClassVar[Scancode] # value = <Scancode.S_MUTE: 127>
2644
+ S_NUMLOCK: typing.ClassVar[Scancode] # value = <Scancode.S_NUMLOCK: 83>
2645
+ S_PASTE: typing.ClassVar[Scancode] # value = <Scancode.S_PASTE: 125>
2646
+ S_PAUSE: typing.ClassVar[Scancode] # value = <Scancode.S_PAUSE: 72>
2647
+ S_PERIOD: typing.ClassVar[Scancode] # value = <Scancode.S_PERIOD: 55>
2648
+ S_PGDOWN: typing.ClassVar[Scancode] # value = <Scancode.S_PGDOWN: 78>
2649
+ S_PGUP: typing.ClassVar[Scancode] # value = <Scancode.S_PGUP: 75>
2650
+ S_POWER: typing.ClassVar[Scancode] # value = <Scancode.S_POWER: 102>
2651
+ S_PRTSCR: typing.ClassVar[Scancode] # value = <Scancode.S_PRTSCR: 70>
2652
+ S_RALT: typing.ClassVar[Scancode] # value = <Scancode.S_RALT: 230>
2653
+ S_RBRACKET: typing.ClassVar[Scancode] # value = <Scancode.S_RBRACKET: 48>
2654
+ S_RCTRL: typing.ClassVar[Scancode] # value = <Scancode.S_RCTRL: 228>
2655
+ S_RETURN: typing.ClassVar[Scancode] # value = <Scancode.S_RETURN: 40>
2656
+ S_RGUI: typing.ClassVar[Scancode] # value = <Scancode.S_RGUI: 231>
2657
+ S_RIGHT: typing.ClassVar[Scancode] # value = <Scancode.S_RIGHT: 79>
2658
+ S_RSHIFT: typing.ClassVar[Scancode] # value = <Scancode.S_RSHIFT: 229>
2659
+ S_SCRLK: typing.ClassVar[Scancode] # value = <Scancode.S_SCRLK: 71>
2660
+ S_SELECT: typing.ClassVar[Scancode] # value = <Scancode.S_SELECT: 119>
2661
+ S_SEMICOLON: typing.ClassVar[Scancode] # value = <Scancode.S_SEMICOLON: 51>
2662
+ S_SLASH: typing.ClassVar[Scancode] # value = <Scancode.S_SLASH: 56>
2663
+ S_SLEEP: typing.ClassVar[Scancode] # value = <Scancode.S_SLEEP: 258>
2664
+ S_SOFTLEFT: typing.ClassVar[Scancode] # value = <Scancode.S_SOFTLEFT: 287>
2665
+ S_SOFTRIGHT: typing.ClassVar[Scancode] # value = <Scancode.S_SOFTRIGHT: 288>
2666
+ S_SPACE: typing.ClassVar[Scancode] # value = <Scancode.S_SPACE: 44>
2667
+ S_STOP: typing.ClassVar[Scancode] # value = <Scancode.S_STOP: 120>
2668
+ S_TAB: typing.ClassVar[Scancode] # value = <Scancode.S_TAB: 43>
2669
+ S_UNDO: typing.ClassVar[Scancode] # value = <Scancode.S_UNDO: 122>
2670
+ S_UP: typing.ClassVar[Scancode] # value = <Scancode.S_UP: 82>
2671
+ S_VOLDOWN: typing.ClassVar[Scancode] # value = <Scancode.S_VOLDOWN: 129>
2672
+ S_VOLUP: typing.ClassVar[Scancode] # value = <Scancode.S_VOLUP: 128>
2673
+ S_WAKE: typing.ClassVar[Scancode] # value = <Scancode.S_WAKE: 259>
2674
+ S_a: typing.ClassVar[Scancode] # value = <Scancode.S_a: 4>
2675
+ S_b: typing.ClassVar[Scancode] # value = <Scancode.S_b: 5>
2676
+ S_c: typing.ClassVar[Scancode] # value = <Scancode.S_c: 6>
2677
+ S_d: typing.ClassVar[Scancode] # value = <Scancode.S_d: 7>
2678
+ S_e: typing.ClassVar[Scancode] # value = <Scancode.S_e: 8>
2679
+ S_f: typing.ClassVar[Scancode] # value = <Scancode.S_f: 9>
2680
+ S_g: typing.ClassVar[Scancode] # value = <Scancode.S_g: 10>
2681
+ S_h: typing.ClassVar[Scancode] # value = <Scancode.S_h: 11>
2682
+ S_i: typing.ClassVar[Scancode] # value = <Scancode.S_i: 12>
2683
+ S_j: typing.ClassVar[Scancode] # value = <Scancode.S_j: 13>
2684
+ S_k: typing.ClassVar[Scancode] # value = <Scancode.S_k: 14>
2685
+ S_l: typing.ClassVar[Scancode] # value = <Scancode.S_l: 15>
2686
+ S_m: typing.ClassVar[Scancode] # value = <Scancode.S_m: 16>
2687
+ S_n: typing.ClassVar[Scancode] # value = <Scancode.S_n: 17>
2688
+ S_o: typing.ClassVar[Scancode] # value = <Scancode.S_o: 18>
2689
+ S_p: typing.ClassVar[Scancode] # value = <Scancode.S_p: 19>
2690
+ S_q: typing.ClassVar[Scancode] # value = <Scancode.S_q: 20>
2691
+ S_r: typing.ClassVar[Scancode] # value = <Scancode.S_r: 21>
2692
+ S_s: typing.ClassVar[Scancode] # value = <Scancode.S_s: 22>
2693
+ S_t: typing.ClassVar[Scancode] # value = <Scancode.S_t: 23>
2694
+ S_u: typing.ClassVar[Scancode] # value = <Scancode.S_u: 24>
2695
+ S_v: typing.ClassVar[Scancode] # value = <Scancode.S_v: 25>
2696
+ S_w: typing.ClassVar[Scancode] # value = <Scancode.S_w: 26>
2697
+ S_x: typing.ClassVar[Scancode] # value = <Scancode.S_x: 27>
2698
+ S_y: typing.ClassVar[Scancode] # value = <Scancode.S_y: 28>
2699
+ S_z: typing.ClassVar[Scancode] # value = <Scancode.S_z: 29>
2700
+ @classmethod
2701
+ def __new__(cls, value):
2702
+ ...
2703
+ def __format__(self, format_spec):
2704
+ """
2705
+ Convert to a string according to format_spec.
2706
+ """
2707
+ class ShaderState:
2708
+ """
2709
+ Encapsulates a GPU shader and its associated render state.
2710
+ """
2711
+ def __init__(self, fragment_file_path: str, uniform_buffer_count: typing.SupportsInt = 0, sampler_count: typing.SupportsInt = 1) -> None:
2712
+ """
2713
+ Creates a ShaderState from the specified fragment shader file.
2714
+
2715
+ Parameters:
2716
+ fragment_file_path (str): Path to the fragment shader file.
2717
+ uniform_buffer_count (int, optional): Number of uniform buffers used by the shader. Default is 0.
2718
+ sampler_count (int, optional): Number of samplers used by the shader. Default is 1.
2719
+ """
2720
+ def bind(self) -> None:
2721
+ """
2722
+ Binds this shader state to the current render pass, making it active for subsequent draw calls.
2723
+ """
2724
+ def set_uniform(self, binding: typing.SupportsInt, data: collections.abc.Buffer) -> None:
2725
+ """
2726
+ Sets uniform data for the fragment shader at the specified binding point.
2727
+
2728
+ Parameters:
2729
+ binding (int): The uniform buffer binding index.
2730
+ data (buffer): A buffer or bytes object containing the uniform data to upload.
2731
+ """
2732
+ def unbind(self) -> None:
2733
+ """
2734
+ Unbinds the current shader state, reverting to the default render state.
2735
+ """
2736
+ class SheetStrip:
2737
+ """
2738
+
2739
+ A descriptor for one horizontal strip (row) in a sprite sheet.
2740
+
2741
+ Defines a single animation within a sprite sheet by specifying the animation name,
2742
+ the number of frames to extract from the strip, and the playback speed in frames
2743
+ per second (FPS).
2744
+
2745
+ """
2746
+ def __init__(self, name: str, frame_count: typing.SupportsInt, fps: typing.SupportsInt) -> None:
2747
+ """
2748
+ Create a sprite sheet strip definition.
2749
+
2750
+ Args:
2751
+ name (str): Unique identifier for this animation.
2752
+ frame_count (int): Number of frames to extract from this strip/row.
2753
+ fps (int): Frames per second for playback timing.
2754
+ """
2755
+ @property
2756
+ def fps(self) -> int:
2757
+ """
2758
+ The playback speed in frames per second.
2759
+
2760
+ Determines how fast the animation plays. Higher values result in faster playback.
2761
+
2762
+ Type:
2763
+ int: The frames per second for this animation.
2764
+ """
2765
+ @fps.setter
2766
+ def fps(self, arg0: typing.SupportsInt) -> None:
2767
+ ...
2768
+ @property
2769
+ def frame_count(self) -> int:
2770
+ """
2771
+ The number of frames in this animation strip.
2772
+
2773
+ Specifies how many frames to extract from the horizontal strip in the sprite sheet,
2774
+ reading from left to right.
2775
+
2776
+ Type:
2777
+ int: The number of frames (must be positive).
2778
+ """
2779
+ @frame_count.setter
2780
+ def frame_count(self, arg0: typing.SupportsInt) -> None:
2781
+ ...
2782
+ @property
2783
+ def name(self) -> str:
2784
+ """
2785
+ The unique name identifier for this animation strip.
2786
+
2787
+ Type:
2788
+ str: The animation name used to reference this strip.
2789
+ """
2790
+ @name.setter
2791
+ def name(self, arg0: str) -> None:
2792
+ ...
2793
+ class Text:
2794
+ """
2795
+
2796
+ A text object for rendering text to the active renderer.
2797
+
2798
+ This class handles the rendered text instance. You must provide a Font object
2799
+ when creating a Text instance.
2800
+
2801
+ Note:
2802
+ A window/renderer must be created before using text. Typically you should
2803
+ call kn.window.create(...) first, which initializes the text engine.
2804
+
2805
+ """
2806
+ def __init__(self, font: Font) -> None:
2807
+ """
2808
+ Create a Text object.
2809
+
2810
+ Args:
2811
+ font (Font): The font to use for rendering this text.
2812
+
2813
+ Raises:
2814
+ RuntimeError: If text creation fails.
2815
+ """
2816
+ def draw(self, pos: typing.Any = None, anchor: Anchor = Anchor.TOP_LEFT) -> None:
2817
+ """
2818
+ Draw the text to the renderer at the specified position with alignment.
2819
+
2820
+ Args:
2821
+ pos (Vec2 | None): The position in pixels. Defaults to (0, 0).
2822
+ anchor (Anchor): The anchor point for alignment. Defaults to TopLeft.
2823
+ """
2824
+ def get_rect(self) -> Rect:
2825
+ """
2826
+ Get the bounding rectangle of the current text.
2827
+
2828
+ Returns:
2829
+ Rect: A rectangle with x=0, y=0, and width/height of the text.
2830
+ """
2831
+ def set_font(self, font: Font) -> None:
2832
+ """
2833
+ Set the font to use for rendering this text.
2834
+
2835
+ Args:
2836
+ font (Font): The font to use.
2837
+ """
2838
+ @property
2839
+ def color(self) -> Color:
2840
+ """
2841
+ Get or set the color of the rendered text.
2842
+ """
2843
+ @color.setter
2844
+ def color(self, arg1: Color) -> None:
2845
+ ...
2846
+ @property
2847
+ def height(self) -> int:
2848
+ """
2849
+ Get the height in pixels of the current text.
2850
+
2851
+ Returns:
2852
+ int: The text height.
2853
+ """
2854
+ @property
2855
+ def size(self) -> Vec2:
2856
+ """
2857
+ Get the size (width, height) of the current text as a Vec2.
2858
+
2859
+ Returns:
2860
+ Vec2: The text dimensions.
2861
+ """
2862
+ @property
2863
+ def text(self) -> str:
2864
+ """
2865
+ Get or set the text string to be rendered.
2866
+ """
2867
+ @text.setter
2868
+ def text(self, arg1: str) -> None:
2869
+ ...
2870
+ @property
2871
+ def width(self) -> int:
2872
+ """
2873
+ Get the width in pixels of the current text.
2874
+
2875
+ Returns:
2876
+ int: The text width.
2877
+ """
2878
+ @property
2879
+ def wrap_width(self) -> int:
2880
+ """
2881
+ Get or set the wrap width in pixels for text wrapping.
2882
+
2883
+ Set to 0 to disable wrapping. Negative values are clamped to 0.
2884
+ """
2885
+ @wrap_width.setter
2886
+ def wrap_width(self, arg1: typing.SupportsInt) -> None:
2887
+ ...
2888
+ class Texture:
2889
+ """
2890
+
2891
+ Represents a hardware-accelerated image that can be efficiently rendered.
2892
+
2893
+ Textures are optimized for fast rendering operations and support various effects
2894
+ like rotation, flipping, tinting, alpha blending, and different blend modes.
2895
+ They can be created from image files or pixel arrays.
2896
+
2897
+ """
2898
+ class Flip:
2899
+ """
2900
+
2901
+ Controls horizontal and vertical flipping of a texture during rendering.
2902
+
2903
+ Used to mirror textures along the horizontal and/or vertical axes without
2904
+ creating additional texture data.
2905
+
2906
+ """
2907
+ @property
2908
+ def h(self) -> bool:
2909
+ """
2910
+ Enable or disable horizontal flipping.
2911
+
2912
+ When True, the texture is mirrored horizontally (left-right flip).
2913
+ """
2914
+ @h.setter
2915
+ def h(self, arg0: bool) -> None:
2916
+ ...
2917
+ @property
2918
+ def v(self) -> bool:
2919
+ """
2920
+ Enable or disable vertical flipping.
2921
+
2922
+ When True, the texture is mirrored vertically (top-bottom flip).
2923
+ """
2924
+ @v.setter
2925
+ def v(self, arg0: bool) -> None:
2926
+ ...
2927
+ @typing.overload
2928
+ def __init__(self, file_path: str) -> None:
2929
+ """
2930
+ Create a Texture by loading an image from a file.
2931
+
2932
+ Args:
2933
+ file_path (str): Path to the image file to load.
2934
+
2935
+ Raises:
2936
+ ValueError: If file_path is empty.
2937
+ RuntimeError: If the file cannot be loaded or texture creation fails.
2938
+ """
2939
+ @typing.overload
2940
+ def __init__(self, pixel_array: PixelArray) -> None:
2941
+ """
2942
+ Create a Texture from an existing PixelArray.
2943
+
2944
+ Args:
2945
+ pixel_array (PixelArray): The pixel array to convert to a texture.
2946
+
2947
+ Raises:
2948
+ RuntimeError: If texture creation from pixel array fails.
2949
+ """
2950
+ def get_rect(self) -> Rect:
2951
+ """
2952
+ Get a rectangle representing the texture bounds.
2953
+
2954
+ Returns:
2955
+ Rect: A rectangle with position (0, 0) and the texture's dimensions.
2956
+ """
2957
+ def make_additive(self) -> None:
2958
+ """
2959
+ Set the texture to use additive blending mode.
2960
+
2961
+ In additive mode, the texture's colors are added to the destination,
2962
+ creating bright, glowing effects.
2963
+ """
2964
+ def make_multiply(self) -> None:
2965
+ """
2966
+ Set the texture to use multiply blending mode.
2967
+
2968
+ In multiply mode, the texture's colors are multiplied with the destination,
2969
+ creating darkening and shadow effects.
2970
+ """
2971
+ def make_normal(self) -> None:
2972
+ """
2973
+ Set the texture to use normal (alpha) blending mode.
2974
+
2975
+ This is the default blending mode for standard transparency effects.
2976
+ """
2977
+ @property
2978
+ def alpha(self) -> float:
2979
+ """
2980
+ Get or set the alpha modulation of the texture as a float between `0.0` and `1.0`.
2981
+ """
2982
+ @alpha.setter
2983
+ def alpha(self, arg1: typing.SupportsFloat) -> None:
2984
+ ...
2985
+ @property
2986
+ def angle(self) -> float:
2987
+ """
2988
+ The rotation angle in radians for rendering.
2989
+
2990
+ When the texture is drawn, it will be rotated by this angle about its center.
2991
+ """
2992
+ @angle.setter
2993
+ def angle(self, arg0: typing.SupportsFloat) -> None:
2994
+ ...
2995
+ @property
2996
+ def flip(self) -> Texture.Flip:
2997
+ """
2998
+ The flip settings for horizontal and vertical mirroring.
2999
+
3000
+ Controls whether the texture is flipped horizontally and/or vertically during rendering.
3001
+ """
3002
+ @flip.setter
3003
+ def flip(self, arg0: Texture.Flip) -> None:
3004
+ ...
3005
+ @property
3006
+ def size(self) -> Vec2:
3007
+ """
3008
+ Get the size of the texture.
3009
+
3010
+ Returns:
3011
+ Vec2: The texture size as (width, height).
3012
+ """
3013
+ @property
3014
+ def tint(self) -> Color:
3015
+ """
3016
+ Get or set the color tint applied to the texture during rendering.
3017
+ """
3018
+ @tint.setter
3019
+ def tint(self, arg1: Color) -> None:
3020
+ ...
3021
+ class Tile:
3022
+ """
3023
+
3024
+ Represents a single tile instance in a layer.
3025
+
3026
+ """
3027
+ @property
3028
+ def angle(self) -> float:
3029
+ """
3030
+ The rotation angle in degrees.
3031
+ """
3032
+ @property
3033
+ def anti_diag_flip(self) -> bool:
3034
+ """
3035
+ Whether the tile is flipped across the anti-diagonal.
3036
+ """
3037
+ @property
3038
+ def collider(self) -> Rect:
3039
+ """
3040
+ The fitted collider rectangle for the tile's opaque area.
3041
+ """
3042
+ @property
3043
+ def dst(self) -> Rect:
3044
+ """
3045
+ The destination rectangle on the map.
3046
+ """
3047
+ @property
3048
+ def h_flip(self) -> bool:
3049
+ """
3050
+ Whether the tile is flipped horizontally.
3051
+ """
3052
+ @property
3053
+ def layer(self) -> TileLayer:
3054
+ """
3055
+ Get the owning Layer.
3056
+
3057
+ Returns:
3058
+ Layer | None: The owning Layer if it still exists; otherwise None.
3059
+ """
3060
+ @property
3061
+ def src(self) -> Rect:
3062
+ """
3063
+ The source rectangle within the tileset texture.
3064
+ """
3065
+ @property
3066
+ def v_flip(self) -> bool:
3067
+ """
3068
+ Whether the tile is flipped vertically.
3069
+ """
3070
+ class TileLayer:
3071
+ """
3072
+
3073
+ A layer of a tile map.
3074
+
3075
+ Layers can be either tile layers or object layers and contain a list of tiles.
3076
+
3077
+ """
3078
+ class Type(enum.IntEnum):
3079
+ """
3080
+
3081
+ The type of a Layer.
3082
+
3083
+ """
3084
+ OBJECT: typing.ClassVar[TileLayer.Type] # value = <Type.OBJECT: 0>
3085
+ TILE: typing.ClassVar[TileLayer.Type] # value = <Type.TILE: 1>
3086
+ @classmethod
3087
+ def __new__(cls, value):
3088
+ ...
3089
+ def __format__(self, format_spec):
3090
+ """
3091
+ Convert to a string according to format_spec.
3092
+ """
3093
+ OBJECT: typing.ClassVar[TileLayer.Type] # value = <Type.OBJECT: 0>
3094
+ TILE: typing.ClassVar[TileLayer.Type] # value = <Type.TILE: 1>
3095
+ def get_from_area(self, area: Rect) -> list[Tile]:
3096
+ """
3097
+ Get all tiles whose destination rectangles fall within a query rect.
3098
+
3099
+ Args:
3100
+ area (Rect): The world-space rectangle to test.
3101
+
3102
+ Returns:
3103
+ list[Tile]: Tiles intersecting the given area.
3104
+ """
3105
+ def get_tile_at(self, column: typing.SupportsInt, row: typing.SupportsInt) -> pykraken._core.Tile | None:
3106
+ """
3107
+ Get the tile located at the specified grid coordinates.
3108
+
3109
+ Args:
3110
+ column (int): The tile column index.
3111
+ row (int): The tile row index.
3112
+
3113
+ Returns:
3114
+ Tile | None: The tile at the grid coordinate, or None if empty/out of range.
3115
+ """
3116
+ def render(self) -> None:
3117
+ """
3118
+ Render the layer.
3119
+ """
3120
+ @property
3121
+ def is_visible(self) -> bool:
3122
+ """
3123
+ Whether the layer is visible.
3124
+ """
3125
+ @property
3126
+ def name(self) -> str:
3127
+ """
3128
+ The name of the layer.
3129
+ """
3130
+ @property
3131
+ def tiles(self) -> list[Tile]:
3132
+ """
3133
+ The list of Tile instances contained in this layer.
3134
+ """
3135
+ @property
3136
+ def type(self) -> TileLayer.Type:
3137
+ """
3138
+ The layer type (OBJECT or TILE).
3139
+ """
3140
+ class TileMap:
3141
+ """
3142
+
3143
+ Loads and renders TMX tile maps.
3144
+
3145
+ Parses a Tiled TMX file, loads the tileset texture, and exposes layers and tiles for rendering and queries.
3146
+
3147
+ """
3148
+ @staticmethod
3149
+ def get_tile_collection(layers: collections.abc.Sequence[TileLayer]) -> list[Tile]:
3150
+ """
3151
+ Collect all tiles from the provided layers into a single list.
3152
+
3153
+ Args:
3154
+ layers (Sequence[Layer]): The layers to collect tiles from.
3155
+
3156
+ Returns:
3157
+ list[Tile]: A flat list of tiles from the given layers.
3158
+ """
3159
+ def __init__(self, tmx_path: str, border_size: typing.SupportsInt = 0) -> None:
3160
+ """
3161
+ Create a TileMap by loading a TMX file.
3162
+
3163
+ Args:
3164
+ tmx_path (str): Path to the TMX file.
3165
+ border_size (int): Optional border (in pixels) around each tile in the tileset; defaults to 0.
3166
+
3167
+ Raises:
3168
+ RuntimeError: If the TMX or TSX files cannot be loaded or parsed.
3169
+ """
3170
+ def get_layer(self, name: str, type: TileLayer.Type = TileLayer.Type.TILE) -> TileLayer:
3171
+ """
3172
+ Get a layer by name and type.
3173
+
3174
+ Args:
3175
+ name (str): The layer name.
3176
+ type (Layer.Type): The expected layer type (defaults to TILE).
3177
+
3178
+ Returns:
3179
+ Layer: The matching layer.
3180
+
3181
+ Raises:
3182
+ ValueError: If no matching layer is found or the type doesn't match.
3183
+ """
3184
+ def get_layers(self) -> list[TileLayer]:
3185
+ """
3186
+ Get all layers in the map.
3187
+
3188
+ Returns:
3189
+ list[Layer]: A list of all layers.
3190
+ """
3191
+ def render(self) -> None:
3192
+ """
3193
+ Render all visible layers.
3194
+ """
3195
+ class Timer:
3196
+ """
3197
+
3198
+ A timer for tracking countdown durations with pause/resume functionality.
3199
+
3200
+ The Timer class provides a simple countdown timer that can be started, paused,
3201
+ and resumed. It's useful for implementing time-based game mechanics like
3202
+ cooldowns, temporary effects, or timed events.
3203
+
3204
+ """
3205
+ def __init__(self, duration: typing.SupportsFloat) -> None:
3206
+ """
3207
+ Create a new Timer instance with the specified duration.
3208
+
3209
+ Args:
3210
+ duration (float): The countdown duration in seconds. Must be greater than 0.
3211
+
3212
+ Raises:
3213
+ RuntimeError: If duration is less than or equal to 0.
3214
+ """
3215
+ def pause(self) -> None:
3216
+ """
3217
+ Pause the timer countdown.
3218
+
3219
+ The timer will stop counting down but retain its current state. Use resume()
3220
+ to continue the countdown from where it was paused. Has no effect if the
3221
+ timer is not started or already paused.
3222
+ """
3223
+ def reset(self) -> None:
3224
+ """
3225
+ Reset the timer to its initial state.
3226
+
3227
+ Stops the timer and resets it back to its initial, unstarted state.
3228
+ The timer can be started again with `start()` after being reset.
3229
+ """
3230
+ def resume(self) -> None:
3231
+ """
3232
+ Resume a paused timer countdown.
3233
+
3234
+ Continues the countdown from where it was paused. Has no effect if the
3235
+ timer is not started or not currently paused.
3236
+ """
3237
+ def start(self) -> None:
3238
+ """
3239
+ Start or restart the timer countdown.
3240
+
3241
+ This begins the countdown from the full duration. If the timer was previously
3242
+ started, this will reset it back to the beginning.
3243
+ """
3244
+ @property
3245
+ def done(self) -> bool:
3246
+ """
3247
+ bool: True if the timer has finished counting down, False otherwise.
3248
+
3249
+ A timer is considered done when the elapsed time since start (excluding
3250
+ paused time) equals or exceeds the specified duration.
3251
+ """
3252
+ @property
3253
+ def elapsed_time(self) -> float:
3254
+ """
3255
+ float: The time elapsed since the timer was started, in seconds.
3256
+
3257
+ Returns 0.0 if the timer hasn't been started. This includes time spent
3258
+ while paused, giving you the total wall-clock time since start().
3259
+ """
3260
+ @property
3261
+ def progress(self) -> float:
3262
+ """
3263
+ float: The completion progress of the timer as a value between 0.0 and 1.0.
3264
+
3265
+ Returns 0.0 if the timer hasn't been started, and 1.0 when the timer
3266
+ is complete. Useful for progress bars and interpolated animations.
3267
+ """
3268
+ @property
3269
+ def time_remaining(self) -> float:
3270
+ """
3271
+ float: The remaining time in seconds before the timer completes.
3272
+
3273
+ Returns the full duration if the timer hasn't been started, or 0.0 if
3274
+ the timer has already finished.
3275
+ """
3276
+ class Vec2:
3277
+ """
3278
+
3279
+ Represents a 2D vector with x and y components.
3280
+
3281
+ Vec2 is used for positions, directions, velocities, and other 2D vector operations.
3282
+ Supports arithmetic operations, comparisons, and various mathematical functions.
3283
+
3284
+ """
3285
+ def __add__(self, other: Vec2) -> Vec2:
3286
+ """
3287
+ Add another Vec2 to this Vec2.
3288
+
3289
+ Args:
3290
+ other (Vec2): The Vec2 to add.
3291
+
3292
+ Returns:
3293
+ Vec2: A new Vec2 with the result of the addition.
3294
+ """
3295
+ def __bool__(self) -> bool:
3296
+ """
3297
+ Check if the vector is not zero.
3298
+
3299
+ Returns:
3300
+ bool: True if the vector is not zero, False if it is zero.
3301
+ """
3302
+ def __eq__(self, other: Vec2) -> bool:
3303
+ """
3304
+ Check if two Vec2s are equal (within tolerance).
3305
+
3306
+ Args:
3307
+ other (Vec2): The other Vec2 to compare.
3308
+
3309
+ Returns:
3310
+ bool: True if vectors are equal within tolerance.
3311
+ """
3312
+ def __ge__(self, other: Vec2) -> bool:
3313
+ """
3314
+ Check if this Vec2 is component-wise greater than or equal to another.
3315
+
3316
+ Args:
3317
+ other (Vec2): The other Vec2 to compare.
3318
+
3319
+ Returns:
3320
+ bool: True if not component-wise less than other.
3321
+ """
3322
+ def __getitem__(self, index: typing.SupportsInt) -> float:
3323
+ """
3324
+ Access vector components by index.
3325
+
3326
+ Args:
3327
+ index (int): Index (0=x, 1=y).
3328
+
3329
+ Returns:
3330
+ float: The component value.
3331
+
3332
+ Raises:
3333
+ IndexError: If index is not 0 or 1.
3334
+ """
3335
+ def __gt__(self, other: Vec2) -> bool:
3336
+ """
3337
+ Check if this Vec2 is component-wise greater than another.
3338
+
3339
+ Args:
3340
+ other (Vec2): The other Vec2 to compare.
3341
+
3342
+ Returns:
3343
+ bool: True if both x and y are greater than other's x and y.
3344
+ """
3345
+ def __hash__(self) -> int:
3346
+ """
3347
+ Return a hash value for the Vec2.
3348
+
3349
+ Returns:
3350
+ int: Hash value based on x and y components.
3351
+ """
3352
+ def __iadd__(self, other: Vec2) -> Vec2:
3353
+ """
3354
+ In-place addition (self += other).
3355
+
3356
+ Args:
3357
+ other (Vec2): The Vec2 to add.
3358
+
3359
+ Returns:
3360
+ Vec2: Reference to self after modification.
3361
+ """
3362
+ def __imul__(self, scalar: typing.SupportsFloat) -> Vec2:
3363
+ """
3364
+ In-place multiplication by a scalar value (self *= scalar).
3365
+
3366
+ Args:
3367
+ scalar (float): The scalar to multiply by.
3368
+
3369
+ Returns:
3370
+ Vec2: Reference to self after modification.
3371
+ """
3372
+ @typing.overload
3373
+ def __init__(self) -> None:
3374
+ """
3375
+ Create a zero vector (0, 0).
3376
+ """
3377
+ @typing.overload
3378
+ def __init__(self, value: typing.SupportsFloat) -> None:
3379
+ """
3380
+ Create a Vec2 with both x and y set to the same value.
3381
+
3382
+ Args:
3383
+ value (float): Value to set for both x and y components.
3384
+ """
3385
+ @typing.overload
3386
+ def __init__(self, x: typing.SupportsFloat, y: typing.SupportsFloat) -> None:
3387
+ """
3388
+ Create a Vec2 with given x and y values.
3389
+
3390
+ Args:
3391
+ x (float): The x component.
3392
+ y (float): The y component.
3393
+ """
3394
+ @typing.overload
3395
+ def __init__(self, arg0: collections.abc.Sequence) -> None:
3396
+ """
3397
+ Create a Vec2 from a sequence of two elements.
3398
+
3399
+ Args:
3400
+ sequence: A sequence (list, tuple) containing [x, y].
3401
+
3402
+ Raises:
3403
+ RuntimeError: If sequence doesn't contain exactly 2 elements.
3404
+ """
3405
+ def __isub__(self, other: Vec2) -> Vec2:
3406
+ """
3407
+ In-place subtraction (self -= other).
3408
+
3409
+ Args:
3410
+ other (Vec2): The Vec2 to subtract.
3411
+
3412
+ Returns:
3413
+ Vec2: Reference to self after modification.
3414
+ """
3415
+ def __iter__(self) -> collections.abc.Iterator:
3416
+ """
3417
+ Return an iterator over (x, y).
3418
+
3419
+ Returns:
3420
+ iterator: Iterator that yields x first, then y.
3421
+ """
3422
+ def __itruediv__(self, scalar: typing.SupportsFloat) -> Vec2:
3423
+ """
3424
+ In-place division by a scalar value (self /= scalar).
3425
+
3426
+ Args:
3427
+ scalar (float): The scalar to divide by.
3428
+
3429
+ Returns:
3430
+ Vec2: Reference to self after modification.
3431
+ """
3432
+ def __le__(self, other: Vec2) -> bool:
3433
+ """
3434
+ Check if this Vec2 is component-wise less than or equal to another.
3435
+
3436
+ Args:
3437
+ other (Vec2): The other Vec2 to compare.
3438
+
3439
+ Returns:
3440
+ bool: True if not component-wise greater than other.
3441
+ """
3442
+ def __len__(self) -> int:
3443
+ """
3444
+ Return the number of components (always 2).
3445
+
3446
+ Returns:
3447
+ int: Always returns 2 (x and y).
3448
+ """
3449
+ def __lt__(self, other: Vec2) -> bool:
3450
+ """
3451
+ Check if this Vec2 is component-wise less than another.
3452
+
3453
+ Args:
3454
+ other (Vec2): The other Vec2 to compare.
3455
+
3456
+ Returns:
3457
+ bool: True if both x and y are less than other's x and y.
3458
+ """
3459
+ def __mul__(self, scalar: typing.SupportsFloat) -> Vec2:
3460
+ """
3461
+ Multiply the vector by a scalar value.
3462
+
3463
+ Args:
3464
+ scalar (float): The scalar to multiply by.
3465
+
3466
+ Returns:
3467
+ Vec2: A new Vec2 with multiplied components.
3468
+ """
3469
+ def __ne__(self, other: Vec2) -> bool:
3470
+ """
3471
+ Check if two Vec2s are not equal.
3472
+
3473
+ Args:
3474
+ other (Vec2): The other Vec2 to compare.
3475
+
3476
+ Returns:
3477
+ bool: True if vectors are not equal.
3478
+ """
3479
+ def __neg__(self) -> Vec2:
3480
+ """
3481
+ Return the negation of this vector (-self).
3482
+
3483
+ Returns:
3484
+ Vec2: A new Vec2 with negated x and y components.
3485
+ """
3486
+ def __radd__(self, other: Vec2) -> Vec2:
3487
+ """
3488
+ Right-hand addition (other + self).
3489
+
3490
+ Args:
3491
+ other (Vec2): The Vec2 to add.
3492
+
3493
+ Returns:
3494
+ Vec2: A new Vec2 with the result of the addition.
3495
+ """
3496
+ def __repr__(self) -> str:
3497
+ """
3498
+ Return a string suitable for debugging and recreation.
3499
+
3500
+ Returns:
3501
+ str: String in format "Vec2(x, y)".
3502
+ """
3503
+ def __rmul__(self, scalar: typing.SupportsFloat) -> Vec2:
3504
+ """
3505
+ Right-hand multiplication (scalar * self).
3506
+
3507
+ Args:
3508
+ scalar (float): The scalar to multiply by.
3509
+
3510
+ Returns:
3511
+ Vec2: A new Vec2 with multiplied components.
3512
+ """
3513
+ def __rsub__(self, other: Vec2) -> Vec2:
3514
+ """
3515
+ Right-hand subtraction (other - self).
3516
+
3517
+ Args:
3518
+ other (Vec2): The Vec2 to subtract from.
3519
+
3520
+ Returns:
3521
+ Vec2: A new Vec2 with the result of the subtraction.
3522
+ """
3523
+ def __setitem__(self, index: typing.SupportsInt, value: typing.SupportsFloat) -> None:
3524
+ """
3525
+ Set vector components by index.
3526
+
3527
+ Args:
3528
+ index (int): Index (0=x, 1=y).
3529
+ value (float): The new value to set.
3530
+
3531
+ Raises:
3532
+ IndexError: If index is not 0 or 1.
3533
+ """
3534
+ def __str__(self) -> str:
3535
+ """
3536
+ Return a human-readable string representation.
3537
+
3538
+ Returns:
3539
+ str: String in format "<x, y>".
3540
+ """
3541
+ def __sub__(self, other: Vec2) -> Vec2:
3542
+ """
3543
+ Subtract another Vec2 from this Vec2.
3544
+
3545
+ Args:
3546
+ other (Vec2): The Vec2 to subtract.
3547
+
3548
+ Returns:
3549
+ Vec2: A new Vec2 with the result of the subtraction.
3550
+ """
3551
+ def __truediv__(self, scalar: typing.SupportsFloat) -> Vec2:
3552
+ """
3553
+ Divide the vector by a scalar value.
3554
+
3555
+ Args:
3556
+ scalar (float): The scalar to divide by.
3557
+
3558
+ Returns:
3559
+ Vec2: A new Vec2 with divided components.
3560
+ """
3561
+ def distance_squared_to(self, other: Vec2) -> float:
3562
+ """
3563
+ Calculate the squared distance to another vector.
3564
+
3565
+ Args:
3566
+ other (Vec2): The other vector.
3567
+
3568
+ Returns:
3569
+ float: The squared distance between the vectors.
3570
+ """
3571
+ def distance_to(self, other: Vec2) -> float:
3572
+ """
3573
+ Calculate the distance to another vector.
3574
+
3575
+ Args:
3576
+ other (Vec2): The other vector.
3577
+
3578
+ Returns:
3579
+ float: The Euclidean distance between the vectors.
3580
+ """
3581
+ def normalize(self) -> None:
3582
+ """
3583
+ Normalize the vector to unit length in-place.
3584
+
3585
+ If the vector is zero, it remains unchanged.
3586
+ """
3587
+ def rotate(self, radians: typing.SupportsFloat) -> None:
3588
+ """
3589
+ Rotate the vector by the given angle in radians.
3590
+
3591
+ Args:
3592
+ radians (float): The angle to rotate by in radians.
3593
+ """
3594
+ def scale_to_length(self, length: typing.SupportsFloat) -> None:
3595
+ """
3596
+ Scale the vector to the specified length in-place.
3597
+
3598
+ Args:
3599
+ length (float): The target length.
3600
+ """
3601
+ def to_polar(self) -> PolarCoordinate:
3602
+ """
3603
+ Convert to polar coordinates.
3604
+
3605
+ Returns:
3606
+ PolarCoordinate: A polar coordinate representation (angle, length).
3607
+ """
3608
+ @property
3609
+ def angle(self) -> float:
3610
+ """
3611
+ Get the angle of the vector in radians.
3612
+
3613
+ Returns:
3614
+ float: The angle from the positive x-axis to this vector.
3615
+ """
3616
+ @property
3617
+ def length(self) -> float:
3618
+ """
3619
+ Get the length (magnitude) of the vector.
3620
+
3621
+ Returns:
3622
+ float: The Euclidean length of the vector.
3623
+ """
3624
+ @property
3625
+ def length_squared(self) -> float:
3626
+ """
3627
+ Get the squared length of the vector.
3628
+
3629
+ Returns:
3630
+ float: The squared length of the vector.
3631
+ """
3632
+ @property
3633
+ def x(self) -> float:
3634
+ """
3635
+ The x component of the vector.
3636
+ """
3637
+ @x.setter
3638
+ def x(self, arg0: typing.SupportsFloat) -> None:
3639
+ ...
3640
+ @property
3641
+ def xx(self) -> Vec2:
3642
+ """
3643
+ Get a new Vec2 with both components set to x.
3644
+ """
3645
+ @property
3646
+ def xy(self) -> Vec2:
3647
+ """
3648
+ Get or set the (x, y) components as a new Vec2.
3649
+ """
3650
+ @xy.setter
3651
+ def xy(self, arg1: typing.SupportsFloat, arg2: typing.SupportsFloat) -> None:
3652
+ ...
3653
+ @property
3654
+ def y(self) -> float:
3655
+ """
3656
+ The y component of the vector.
3657
+ """
3658
+ @y.setter
3659
+ def y(self, arg0: typing.SupportsFloat) -> None:
3660
+ ...
3661
+ @property
3662
+ def yx(self) -> Vec2:
3663
+ """
3664
+ Get or set the (y, x) components as a new Vec2.
3665
+ """
3666
+ @yx.setter
3667
+ def yx(self, arg1: typing.SupportsFloat, arg2: typing.SupportsFloat) -> None:
3668
+ ...
3669
+ @property
3670
+ def yy(self) -> Vec2:
3671
+ """
3672
+ Get a new Vec2 with both components set to y.
3673
+ """
3674
+ def init() -> None:
3675
+ """
3676
+ Initialize the Kraken Engine.
3677
+
3678
+ This sets up internal systems and must be called before using any other features.
3679
+ """
3680
+ def quit() -> None:
3681
+ """
3682
+ Shut down the Kraken Engine and clean up resources.
3683
+
3684
+ Call this once you're done using the engine to avoid memory leaks.
3685
+ """
3686
+ AUDIO_DEVICE_ADDED: EventType # value = <EventType.AUDIO_DEVICE_ADDED: 4352>
3687
+ AUDIO_DEVICE_FORMAT_CHANGED: EventType # value = <EventType.AUDIO_DEVICE_FORMAT_CHANGED: 4354>
3688
+ AUDIO_DEVICE_REMOVED: EventType # value = <EventType.AUDIO_DEVICE_REMOVED: 4353>
3689
+ BOTTOM_LEFT: Anchor # value = <Anchor.BOTTOM_LEFT: 6>
3690
+ BOTTOM_MID: Anchor # value = <Anchor.BOTTOM_MID: 7>
3691
+ BOTTOM_RIGHT: Anchor # value = <Anchor.BOTTOM_RIGHT: 8>
3692
+ CAMERA_DEVICE_ADDED: EventType # value = <EventType.CAMERA_DEVICE_ADDED: 5120>
3693
+ CAMERA_DEVICE_APPROVED: EventType # value = <EventType.CAMERA_DEVICE_APPROVED: 5122>
3694
+ CAMERA_DEVICE_DENIED: EventType # value = <EventType.CAMERA_DEVICE_DENIED: 5123>
3695
+ CAMERA_DEVICE_REMOVED: EventType # value = <EventType.CAMERA_DEVICE_REMOVED: 5121>
3696
+ CENTER: Anchor # value = <Anchor.CENTER: 4>
3697
+ CLIPBOARD_UPDATE: EventType # value = <EventType.CLIPBOARD_UPDATE: 2304>
3698
+ C_BACK: GamepadButton # value = <GamepadButton.C_BACK: 4>
3699
+ C_DPAD_DOWN: GamepadButton # value = <GamepadButton.C_DPAD_DOWN: 12>
3700
+ C_DPAD_LEFT: GamepadButton # value = <GamepadButton.C_DPAD_LEFT: 13>
3701
+ C_DPAD_RIGHT: GamepadButton # value = <GamepadButton.C_DPAD_RIGHT: 14>
3702
+ C_DPAD_UP: GamepadButton # value = <GamepadButton.C_DPAD_UP: 11>
3703
+ C_EAST: GamepadButton # value = <GamepadButton.C_EAST: 1>
3704
+ C_GUIDE: GamepadButton # value = <GamepadButton.C_GUIDE: 5>
3705
+ C_LSHOULDER: GamepadButton # value = <GamepadButton.C_LSHOULDER: 9>
3706
+ C_LSTICK: GamepadButton # value = <GamepadButton.C_LSTICK: 7>
3707
+ C_LTRIGGER: GamepadAxis # value = <GamepadAxis.C_LTRIGGER: 4>
3708
+ C_LX: GamepadAxis # value = <GamepadAxis.C_LX: 0>
3709
+ C_LY: GamepadAxis # value = <GamepadAxis.C_LY: 1>
3710
+ C_NORTH: GamepadButton # value = <GamepadButton.C_NORTH: 3>
3711
+ C_PS3: GamepadType # value = <GamepadType.C_PS3: 4>
3712
+ C_PS4: GamepadType # value = <GamepadType.C_PS4: 5>
3713
+ C_PS5: GamepadType # value = <GamepadType.C_PS5: 6>
3714
+ C_RSHOULDER: GamepadButton # value = <GamepadButton.C_RSHOULDER: 10>
3715
+ C_RSTICK: GamepadButton # value = <GamepadButton.C_RSTICK: 8>
3716
+ C_RTRIGGER: GamepadAxis # value = <GamepadAxis.C_RTRIGGER: 5>
3717
+ C_RX: GamepadAxis # value = <GamepadAxis.C_RX: 2>
3718
+ C_RY: GamepadAxis # value = <GamepadAxis.C_RY: 3>
3719
+ C_SOUTH: GamepadButton # value = <GamepadButton.C_SOUTH: 0>
3720
+ C_STANDARD: GamepadType # value = <GamepadType.C_STANDARD: 1>
3721
+ C_START: GamepadButton # value = <GamepadButton.C_START: 6>
3722
+ C_SWITCH_JOYCON_LEFT: GamepadType # value = <GamepadType.C_SWITCH_JOYCON_LEFT: 8>
3723
+ C_SWITCH_JOYCON_PAIR: GamepadType # value = <GamepadType.C_SWITCH_JOYCON_PAIR: 10>
3724
+ C_SWITCH_JOYCON_RIGHT: GamepadType # value = <GamepadType.C_SWITCH_JOYCON_RIGHT: 9>
3725
+ C_SWITCH_PRO: GamepadType # value = <GamepadType.C_SWITCH_PRO: 7>
3726
+ C_WEST: GamepadButton # value = <GamepadButton.C_WEST: 2>
3727
+ C_XBOX_360: GamepadType # value = <GamepadType.C_XBOX_360: 2>
3728
+ C_XBOX_ONE: GamepadType # value = <GamepadType.C_XBOX_ONE: 3>
3729
+ DID_ENTER_BACKGROUND: EventType # value = <EventType.DID_ENTER_BACKGROUND: 260>
3730
+ DID_ENTER_FOREGROUND: EventType # value = <EventType.DID_ENTER_FOREGROUND: 262>
3731
+ DISPLAY_ADDED: EventType # value = <EventType.DISPLAY_ADDED: 338>
3732
+ DISPLAY_CONTENT_SCALE_CHANGED: EventType # value = <EventType.DISPLAY_CONTENT_SCALE_CHANGED: 343>
3733
+ DISPLAY_CURRENT_MODE_CHANGED: EventType # value = <EventType.DISPLAY_CURRENT_MODE_CHANGED: 342>
3734
+ DISPLAY_DESKTOP_MODE_CHANGED: EventType # value = <EventType.DISPLAY_DESKTOP_MODE_CHANGED: 341>
3735
+ DISPLAY_MOVED: EventType # value = <EventType.DISPLAY_MOVED: 340>
3736
+ DISPLAY_ORIENTATION: EventType # value = <EventType.DISPLAY_ORIENTATION: 337>
3737
+ DISPLAY_REMOVED: EventType # value = <EventType.DISPLAY_REMOVED: 339>
3738
+ DROP_BEGIN: EventType # value = <EventType.DROP_BEGIN: 4098>
3739
+ DROP_COMPLETE: EventType # value = <EventType.DROP_COMPLETE: 4099>
3740
+ DROP_FILE: EventType # value = <EventType.DROP_FILE: 4096>
3741
+ DROP_POSITION: EventType # value = <EventType.DROP_POSITION: 4100>
3742
+ DROP_TEXT: EventType # value = <EventType.DROP_TEXT: 4097>
3743
+ FINGER_CANCELED: EventType # value = <EventType.FINGER_CANCELED: 1795>
3744
+ FINGER_DOWN: EventType # value = <EventType.FINGER_DOWN: 1792>
3745
+ FINGER_MOTION: EventType # value = <EventType.FINGER_MOTION: 1794>
3746
+ FINGER_UP: EventType # value = <EventType.FINGER_UP: 1793>
3747
+ GAMEPAD_ADDED: EventType # value = <EventType.GAMEPAD_ADDED: 1619>
3748
+ GAMEPAD_AXIS_MOTION: EventType # value = <EventType.GAMEPAD_AXIS_MOTION: 1616>
3749
+ GAMEPAD_BUTTON_DOWN: EventType # value = <EventType.GAMEPAD_BUTTON_DOWN: 1617>
3750
+ GAMEPAD_BUTTON_UP: EventType # value = <EventType.GAMEPAD_BUTTON_UP: 1618>
3751
+ GAMEPAD_REMAPPED: EventType # value = <EventType.GAMEPAD_REMAPPED: 1621>
3752
+ GAMEPAD_REMOVED: EventType # value = <EventType.GAMEPAD_REMOVED: 1620>
3753
+ GAMEPAD_SENSOR_UPDATE: EventType # value = <EventType.GAMEPAD_SENSOR_UPDATE: 1625>
3754
+ GAMEPAD_STEAM_HANDLE_UPDATED: EventType # value = <EventType.GAMEPAD_STEAM_HANDLE_UPDATED: 1627>
3755
+ GAMEPAD_TOUCHPAD_DOWN: EventType # value = <EventType.GAMEPAD_TOUCHPAD_DOWN: 1622>
3756
+ GAMEPAD_TOUCHPAD_MOTION: EventType # value = <EventType.GAMEPAD_TOUCHPAD_MOTION: 1623>
3757
+ GAMEPAD_TOUCHPAD_UP: EventType # value = <EventType.GAMEPAD_TOUCHPAD_UP: 1624>
3758
+ GAMEPAD_UPDATE_COMPLETE: EventType # value = <EventType.GAMEPAD_UPDATE_COMPLETE: 1626>
3759
+ KEYBOARD_ADDED: EventType # value = <EventType.KEYBOARD_ADDED: 773>
3760
+ KEYBOARD_REMOVED: EventType # value = <EventType.KEYBOARD_REMOVED: 774>
3761
+ KEYMAP_CHANGED: EventType # value = <EventType.KEYMAP_CHANGED: 772>
3762
+ KEY_DOWN: EventType # value = <EventType.KEY_DOWN: 768>
3763
+ KEY_UP: EventType # value = <EventType.KEY_UP: 769>
3764
+ K_0: Keycode # value = <Keycode.K_0: 48>
3765
+ K_1: Keycode # value = <Keycode.K_1: 49>
3766
+ K_2: Keycode # value = <Keycode.K_2: 50>
3767
+ K_3: Keycode # value = <Keycode.K_3: 51>
3768
+ K_4: Keycode # value = <Keycode.K_4: 52>
3769
+ K_5: Keycode # value = <Keycode.K_5: 53>
3770
+ K_6: Keycode # value = <Keycode.K_6: 54>
3771
+ K_7: Keycode # value = <Keycode.K_7: 55>
3772
+ K_8: Keycode # value = <Keycode.K_8: 56>
3773
+ K_9: Keycode # value = <Keycode.K_9: 57>
3774
+ K_AGAIN: Keycode # value = <Keycode.K_AGAIN: 1073741945>
3775
+ K_AMPERSAND: Keycode # value = <Keycode.K_AMPERSAND: 38>
3776
+ K_APPLICATION: Keycode # value = <Keycode.K_APPLICATION: 1073741925>
3777
+ K_ASTERISK: Keycode # value = <Keycode.K_ASTERISK: 42>
3778
+ K_AT: Keycode # value = <Keycode.K_AT: 64>
3779
+ K_BACKSLASH: Keycode # value = <Keycode.K_BACKSLASH: 92>
3780
+ K_BACKSPACE: Keycode # value = <Keycode.K_BACKSPACE: 8>
3781
+ K_CALL: Keycode # value = <Keycode.K_CALL: 1073742113>
3782
+ K_CAPS: Keycode # value = <Keycode.K_CAPS: 1073741881>
3783
+ K_CARET: Keycode # value = <Keycode.K_CARET: 94>
3784
+ K_CHANNEL_DEC: Keycode # value = <Keycode.K_CHANNEL_DEC: 1073742085>
3785
+ K_CHANNEL_INC: Keycode # value = <Keycode.K_CHANNEL_INC: 1073742084>
3786
+ K_COLON: Keycode # value = <Keycode.K_COLON: 58>
3787
+ K_COMMA: Keycode # value = <Keycode.K_COMMA: 44>
3788
+ K_COPY: Keycode # value = <Keycode.K_COPY: 1073741948>
3789
+ K_CUT: Keycode # value = <Keycode.K_CUT: 1073741947>
3790
+ K_DBLQUOTE: Keycode # value = <Keycode.K_DBLQUOTE: 34>
3791
+ K_DEL: Keycode # value = <Keycode.K_DEL: 127>
3792
+ K_DOLLAR: Keycode # value = <Keycode.K_DOLLAR: 36>
3793
+ K_DOWN: Keycode # value = <Keycode.K_DOWN: 1073741905>
3794
+ K_END: Keycode # value = <Keycode.K_END: 1073741901>
3795
+ K_ENDCALL: Keycode # value = <Keycode.K_ENDCALL: 1073742114>
3796
+ K_EQ: Keycode # value = <Keycode.K_EQ: 61>
3797
+ K_ESC: Keycode # value = <Keycode.K_ESC: 27>
3798
+ K_EXCLAIM: Keycode # value = <Keycode.K_EXCLAIM: 33>
3799
+ K_EXECUTE: Keycode # value = <Keycode.K_EXECUTE: 1073741940>
3800
+ K_F1: Keycode # value = <Keycode.K_F1: 1073741882>
3801
+ K_F10: Keycode # value = <Keycode.K_F10: 1073741891>
3802
+ K_F11: Keycode # value = <Keycode.K_F11: 1073741892>
3803
+ K_F12: Keycode # value = <Keycode.K_F12: 1073741893>
3804
+ K_F13: Keycode # value = <Keycode.K_F13: 1073741928>
3805
+ K_F14: Keycode # value = <Keycode.K_F14: 1073741929>
3806
+ K_F15: Keycode # value = <Keycode.K_F15: 1073741930>
3807
+ K_F2: Keycode # value = <Keycode.K_F2: 1073741883>
3808
+ K_F3: Keycode # value = <Keycode.K_F3: 1073741884>
3809
+ K_F4: Keycode # value = <Keycode.K_F4: 1073741885>
3810
+ K_F5: Keycode # value = <Keycode.K_F5: 1073741886>
3811
+ K_F6: Keycode # value = <Keycode.K_F6: 1073741887>
3812
+ K_F7: Keycode # value = <Keycode.K_F7: 1073741888>
3813
+ K_F8: Keycode # value = <Keycode.K_F8: 1073741889>
3814
+ K_F9: Keycode # value = <Keycode.K_F9: 1073741890>
3815
+ K_FIND: Keycode # value = <Keycode.K_FIND: 1073741950>
3816
+ K_GRAVE: Keycode # value = <Keycode.K_GRAVE: 96>
3817
+ K_GT: Keycode # value = <Keycode.K_GT: 62>
3818
+ K_HASH: Keycode # value = <Keycode.K_HASH: 35>
3819
+ K_HELP: Keycode # value = <Keycode.K_HELP: 1073741941>
3820
+ K_HOME: Keycode # value = <Keycode.K_HOME: 1073741898>
3821
+ K_INS: Keycode # value = <Keycode.K_INS: 1073741897>
3822
+ K_KP_0: Keycode # value = <Keycode.K_KP_0: 1073741922>
3823
+ K_KP_1: Keycode # value = <Keycode.K_KP_1: 1073741913>
3824
+ K_KP_2: Keycode # value = <Keycode.K_KP_2: 1073741914>
3825
+ K_KP_3: Keycode # value = <Keycode.K_KP_3: 1073741915>
3826
+ K_KP_4: Keycode # value = <Keycode.K_KP_4: 1073741916>
3827
+ K_KP_5: Keycode # value = <Keycode.K_KP_5: 1073741917>
3828
+ K_KP_6: Keycode # value = <Keycode.K_KP_6: 1073741918>
3829
+ K_KP_7: Keycode # value = <Keycode.K_KP_7: 1073741919>
3830
+ K_KP_8: Keycode # value = <Keycode.K_KP_8: 1073741920>
3831
+ K_KP_9: Keycode # value = <Keycode.K_KP_9: 1073741921>
3832
+ K_KP_DIV: Keycode # value = <Keycode.K_KP_DIV: 1073741908>
3833
+ K_KP_ENTER: Keycode # value = <Keycode.K_KP_ENTER: 1073741912>
3834
+ K_KP_MINUS: Keycode # value = <Keycode.K_KP_MINUS: 1073741910>
3835
+ K_KP_MULT: Keycode # value = <Keycode.K_KP_MULT: 1073741909>
3836
+ K_KP_PERIOD: Keycode # value = <Keycode.K_KP_PERIOD: 1073741923>
3837
+ K_KP_PLUS: Keycode # value = <Keycode.K_KP_PLUS: 1073741911>
3838
+ K_LALT: Keycode # value = <Keycode.K_LALT: 1073742050>
3839
+ K_LBRACE: Keycode # value = <Keycode.K_LBRACE: 123>
3840
+ K_LBRACKET: Keycode # value = <Keycode.K_LBRACKET: 91>
3841
+ K_LCTRL: Keycode # value = <Keycode.K_LCTRL: 1073742048>
3842
+ K_LEFT: Keycode # value = <Keycode.K_LEFT: 1073741904>
3843
+ K_LGUI: Keycode # value = <Keycode.K_LGUI: 1073742051>
3844
+ K_LPAREN: Keycode # value = <Keycode.K_LPAREN: 40>
3845
+ K_LSHIFT: Keycode # value = <Keycode.K_LSHIFT: 1073742049>
3846
+ K_LT: Keycode # value = <Keycode.K_LT: 60>
3847
+ K_MEDIA_EJECT: Keycode # value = <Keycode.K_MEDIA_EJECT: 1073742094>
3848
+ K_MEDIA_FF: Keycode # value = <Keycode.K_MEDIA_FF: 1073742089>
3849
+ K_MEDIA_NEXT: Keycode # value = <Keycode.K_MEDIA_NEXT: 1073742091>
3850
+ K_MEDIA_PAUSE: Keycode # value = <Keycode.K_MEDIA_PAUSE: 1073742087>
3851
+ K_MEDIA_PLAY: Keycode # value = <Keycode.K_MEDIA_PLAY: 1073742086>
3852
+ K_MEDIA_PLAY_PAUSE: Keycode # value = <Keycode.K_MEDIA_PLAY_PAUSE: 1073742095>
3853
+ K_MEDIA_PREV: Keycode # value = <Keycode.K_MEDIA_PREV: 1073742092>
3854
+ K_MEDIA_REC: Keycode # value = <Keycode.K_MEDIA_REC: 1073742088>
3855
+ K_MEDIA_REWIND: Keycode # value = <Keycode.K_MEDIA_REWIND: 1073742090>
3856
+ K_MEDIA_SELECT: Keycode # value = <Keycode.K_MEDIA_SELECT: 1073742096>
3857
+ K_MEDIA_STOP: Keycode # value = <Keycode.K_MEDIA_STOP: 1073742093>
3858
+ K_MENU: Keycode # value = <Keycode.K_MENU: 1073741942>
3859
+ K_MINUS: Keycode # value = <Keycode.K_MINUS: 45>
3860
+ K_MODE: Keycode # value = <Keycode.K_MODE: 1073742081>
3861
+ K_MUTE: Keycode # value = <Keycode.K_MUTE: 1073741951>
3862
+ K_NUMLOCK: Keycode # value = <Keycode.K_NUMLOCK: 1073741907>
3863
+ K_PASTE: Keycode # value = <Keycode.K_PASTE: 1073741949>
3864
+ K_PAUSE: Keycode # value = <Keycode.K_PAUSE: 1073741896>
3865
+ K_PERCENT: Keycode # value = <Keycode.K_PERCENT: 37>
3866
+ K_PERIOD: Keycode # value = <Keycode.K_PERIOD: 46>
3867
+ K_PGDOWN: Keycode # value = <Keycode.K_PGDOWN: 1073741902>
3868
+ K_PGUP: Keycode # value = <Keycode.K_PGUP: 1073741899>
3869
+ K_PIPE: Keycode # value = <Keycode.K_PIPE: 124>
3870
+ K_PLUS: Keycode # value = <Keycode.K_PLUS: 43>
3871
+ K_POWER: Keycode # value = <Keycode.K_POWER: 1073741926>
3872
+ K_PRTSCR: Keycode # value = <Keycode.K_PRTSCR: 1073741894>
3873
+ K_QUESTION: Keycode # value = <Keycode.K_QUESTION: 63>
3874
+ K_RALT: Keycode # value = <Keycode.K_RALT: 1073742054>
3875
+ K_RBRACE: Keycode # value = <Keycode.K_RBRACE: 125>
3876
+ K_RBRACKET: Keycode # value = <Keycode.K_RBRACKET: 93>
3877
+ K_RCTRL: Keycode # value = <Keycode.K_RCTRL: 1073742052>
3878
+ K_RETURN: Keycode # value = <Keycode.K_RETURN: 13>
3879
+ K_RGUI: Keycode # value = <Keycode.K_RGUI: 1073742055>
3880
+ K_RIGHT: Keycode # value = <Keycode.K_RIGHT: 1073741903>
3881
+ K_RPAREN: Keycode # value = <Keycode.K_RPAREN: 41>
3882
+ K_RSHIFT: Keycode # value = <Keycode.K_RSHIFT: 1073742053>
3883
+ K_SCRLK: Keycode # value = <Keycode.K_SCRLK: 1073741895>
3884
+ K_SELECT: Keycode # value = <Keycode.K_SELECT: 1073741943>
3885
+ K_SEMICOLON: Keycode # value = <Keycode.K_SEMICOLON: 59>
3886
+ K_SGLQUOTE: Keycode # value = <Keycode.K_SGLQUOTE: 39>
3887
+ K_SLASH: Keycode # value = <Keycode.K_SLASH: 47>
3888
+ K_SLEEP: Keycode # value = <Keycode.K_SLEEP: 1073742082>
3889
+ K_SOFTLEFT: Keycode # value = <Keycode.K_SOFTLEFT: 1073742111>
3890
+ K_SOFTRIGHT: Keycode # value = <Keycode.K_SOFTRIGHT: 1073742112>
3891
+ K_SPACE: Keycode # value = <Keycode.K_SPACE: 32>
3892
+ K_STOP: Keycode # value = <Keycode.K_STOP: 1073741944>
3893
+ K_TAB: Keycode # value = <Keycode.K_TAB: 9>
3894
+ K_TILDE: Keycode # value = <Keycode.K_TILDE: 126>
3895
+ K_UNDERSCORE: Keycode # value = <Keycode.K_UNDERSCORE: 95>
3896
+ K_UNDO: Keycode # value = <Keycode.K_UNDO: 1073741946>
3897
+ K_UNKNOWN: Keycode # value = <Keycode.K_UNKNOWN: 0>
3898
+ K_UP: Keycode # value = <Keycode.K_UP: 1073741906>
3899
+ K_VOLDOWN: Keycode # value = <Keycode.K_VOLDOWN: 1073741953>
3900
+ K_VOLUP: Keycode # value = <Keycode.K_VOLUP: 1073741952>
3901
+ K_WAKE: Keycode # value = <Keycode.K_WAKE: 1073742083>
3902
+ K_a: Keycode # value = <Keycode.K_a: 97>
3903
+ K_b: Keycode # value = <Keycode.K_b: 98>
3904
+ K_c: Keycode # value = <Keycode.K_c: 99>
3905
+ K_d: Keycode # value = <Keycode.K_d: 100>
3906
+ K_e: Keycode # value = <Keycode.K_e: 101>
3907
+ K_f: Keycode # value = <Keycode.K_f: 102>
3908
+ K_g: Keycode # value = <Keycode.K_g: 103>
3909
+ K_h: Keycode # value = <Keycode.K_h: 104>
3910
+ K_i: Keycode # value = <Keycode.K_i: 105>
3911
+ K_j: Keycode # value = <Keycode.K_j: 106>
3912
+ K_k: Keycode # value = <Keycode.K_k: 107>
3913
+ K_l: Keycode # value = <Keycode.K_l: 108>
3914
+ K_m: Keycode # value = <Keycode.K_m: 109>
3915
+ K_n: Keycode # value = <Keycode.K_n: 110>
3916
+ K_o: Keycode # value = <Keycode.K_o: 111>
3917
+ K_p: Keycode # value = <Keycode.K_p: 112>
3918
+ K_q: Keycode # value = <Keycode.K_q: 113>
3919
+ K_r: Keycode # value = <Keycode.K_r: 114>
3920
+ K_s: Keycode # value = <Keycode.K_s: 115>
3921
+ K_t: Keycode # value = <Keycode.K_t: 116>
3922
+ K_u: Keycode # value = <Keycode.K_u: 117>
3923
+ K_v: Keycode # value = <Keycode.K_v: 118>
3924
+ K_w: Keycode # value = <Keycode.K_w: 119>
3925
+ K_x: Keycode # value = <Keycode.K_x: 120>
3926
+ K_y: Keycode # value = <Keycode.K_y: 121>
3927
+ K_z: Keycode # value = <Keycode.K_z: 122>
3928
+ LOCALE_CHANGED: EventType # value = <EventType.LOCALE_CHANGED: 263>
3929
+ LOW_MEMORY: EventType # value = <EventType.LOW_MEMORY: 258>
3930
+ MID_LEFT: Anchor # value = <Anchor.MID_LEFT: 3>
3931
+ MID_RIGHT: Anchor # value = <Anchor.MID_RIGHT: 5>
3932
+ MOUSE_ADDED: EventType # value = <EventType.MOUSE_ADDED: 1028>
3933
+ MOUSE_BUTTON_DOWN: EventType # value = <EventType.MOUSE_BUTTON_DOWN: 1025>
3934
+ MOUSE_BUTTON_UP: EventType # value = <EventType.MOUSE_BUTTON_UP: 1026>
3935
+ MOUSE_MOTION: EventType # value = <EventType.MOUSE_MOTION: 1024>
3936
+ MOUSE_REMOVED: EventType # value = <EventType.MOUSE_REMOVED: 1029>
3937
+ MOUSE_WHEEL: EventType # value = <EventType.MOUSE_WHEEL: 1027>
3938
+ M_LEFT: MouseButton # value = <MouseButton.M_LEFT: 1>
3939
+ M_MIDDLE: MouseButton # value = <MouseButton.M_MIDDLE: 2>
3940
+ M_RIGHT: MouseButton # value = <MouseButton.M_RIGHT: 3>
3941
+ M_SIDE1: MouseButton # value = <MouseButton.M_SIDE1: 4>
3942
+ M_SIDE2: MouseButton # value = <MouseButton.M_SIDE2: 5>
3943
+ PEN_AXIS: EventType # value = <EventType.PEN_AXIS: 4871>
3944
+ PEN_BUTTON_DOWN: EventType # value = <EventType.PEN_BUTTON_DOWN: 4868>
3945
+ PEN_BUTTON_UP: EventType # value = <EventType.PEN_BUTTON_UP: 4869>
3946
+ PEN_DOWN: EventType # value = <EventType.PEN_DOWN: 4866>
3947
+ PEN_MOTION: EventType # value = <EventType.PEN_MOTION: 4870>
3948
+ PEN_PROXIMITY_IN: EventType # value = <EventType.PEN_PROXIMITY_IN: 4864>
3949
+ PEN_PROXIMITY_OUT: EventType # value = <EventType.PEN_PROXIMITY_OUT: 4865>
3950
+ PEN_UP: EventType # value = <EventType.PEN_UP: 4867>
3951
+ P_DISTANCE: PenAxis # value = <PenAxis.P_DISTANCE: 3>
3952
+ P_PRESSURE: PenAxis # value = <PenAxis.P_PRESSURE: 0>
3953
+ P_ROTATION: PenAxis # value = <PenAxis.P_ROTATION: 4>
3954
+ P_SLIDER: PenAxis # value = <PenAxis.P_SLIDER: 5>
3955
+ P_TANGENTIAL_PRESSURE: PenAxis # value = <PenAxis.P_TANGENTIAL_PRESSURE: 6>
3956
+ P_TILT_X: PenAxis # value = <PenAxis.P_TILT_X: 1>
3957
+ P_TILT_Y: PenAxis # value = <PenAxis.P_TILT_Y: 2>
3958
+ QUIT: EventType # value = <EventType.QUIT: 256>
3959
+ RENDER_DEVICE_LOST: EventType # value = <EventType.RENDER_DEVICE_LOST: 8194>
3960
+ RENDER_DEVICE_RESET: EventType # value = <EventType.RENDER_DEVICE_RESET: 8193>
3961
+ RENDER_TARGETS_RESET: EventType # value = <EventType.RENDER_TARGETS_RESET: 8192>
3962
+ SENSOR_UPDATE: EventType # value = <EventType.SENSOR_UPDATE: 4608>
3963
+ SYSTEM_THEME_CHANGED: EventType # value = <EventType.SYSTEM_THEME_CHANGED: 264>
3964
+ S_0: Scancode # value = <Scancode.S_0: 39>
3965
+ S_1: Scancode # value = <Scancode.S_1: 30>
3966
+ S_2: Scancode # value = <Scancode.S_2: 31>
3967
+ S_3: Scancode # value = <Scancode.S_3: 32>
3968
+ S_4: Scancode # value = <Scancode.S_4: 33>
3969
+ S_5: Scancode # value = <Scancode.S_5: 34>
3970
+ S_6: Scancode # value = <Scancode.S_6: 35>
3971
+ S_7: Scancode # value = <Scancode.S_7: 36>
3972
+ S_8: Scancode # value = <Scancode.S_8: 37>
3973
+ S_9: Scancode # value = <Scancode.S_9: 38>
3974
+ S_AGAIN: Scancode # value = <Scancode.S_AGAIN: 121>
3975
+ S_APOSTROPHE: Scancode # value = <Scancode.S_APOSTROPHE: 52>
3976
+ S_APPLICATION: Scancode # value = <Scancode.S_APPLICATION: 101>
3977
+ S_BACKSLASH: Scancode # value = <Scancode.S_BACKSLASH: 49>
3978
+ S_BACKSPACE: Scancode # value = <Scancode.S_BACKSPACE: 42>
3979
+ S_CALL: Scancode # value = <Scancode.S_CALL: 289>
3980
+ S_CAPS: Scancode # value = <Scancode.S_CAPS: 57>
3981
+ S_CHANNEL_DEC: Scancode # value = <Scancode.S_CHANNEL_DEC: 261>
3982
+ S_CHANNEL_INC: Scancode # value = <Scancode.S_CHANNEL_INC: 260>
3983
+ S_COMMA: Scancode # value = <Scancode.S_COMMA: 54>
3984
+ S_COPY: Scancode # value = <Scancode.S_COPY: 124>
3985
+ S_CUT: Scancode # value = <Scancode.S_CUT: 123>
3986
+ S_DEL: Scancode # value = <Scancode.S_DEL: 76>
3987
+ S_DOWN: Scancode # value = <Scancode.S_DOWN: 81>
3988
+ S_END: Scancode # value = <Scancode.S_END: 77>
3989
+ S_ENDCALL: Scancode # value = <Scancode.S_ENDCALL: 290>
3990
+ S_EQ: Scancode # value = <Scancode.S_EQ: 46>
3991
+ S_ESC: Scancode # value = <Scancode.S_ESC: 41>
3992
+ S_EXECUTE: Scancode # value = <Scancode.S_EXECUTE: 116>
3993
+ S_F1: Scancode # value = <Scancode.S_F1: 58>
3994
+ S_F10: Scancode # value = <Scancode.S_F10: 67>
3995
+ S_F11: Scancode # value = <Scancode.S_F11: 68>
3996
+ S_F12: Scancode # value = <Scancode.S_F12: 69>
3997
+ S_F13: Scancode # value = <Scancode.S_F13: 104>
3998
+ S_F14: Scancode # value = <Scancode.S_F14: 105>
3999
+ S_F15: Scancode # value = <Scancode.S_F15: 106>
4000
+ S_F2: Scancode # value = <Scancode.S_F2: 59>
4001
+ S_F3: Scancode # value = <Scancode.S_F3: 60>
4002
+ S_F4: Scancode # value = <Scancode.S_F4: 61>
4003
+ S_F5: Scancode # value = <Scancode.S_F5: 62>
4004
+ S_F6: Scancode # value = <Scancode.S_F6: 63>
4005
+ S_F7: Scancode # value = <Scancode.S_F7: 64>
4006
+ S_F8: Scancode # value = <Scancode.S_F8: 65>
4007
+ S_F9: Scancode # value = <Scancode.S_F9: 66>
4008
+ S_FIND: Scancode # value = <Scancode.S_FIND: 126>
4009
+ S_GRAVE: Scancode # value = <Scancode.S_GRAVE: 53>
4010
+ S_HELP: Scancode # value = <Scancode.S_HELP: 117>
4011
+ S_HOME: Scancode # value = <Scancode.S_HOME: 74>
4012
+ S_INS: Scancode # value = <Scancode.S_INS: 73>
4013
+ S_KP_0: Scancode # value = <Scancode.S_KP_0: 98>
4014
+ S_KP_1: Scancode # value = <Scancode.S_KP_1: 89>
4015
+ S_KP_2: Scancode # value = <Scancode.S_KP_2: 90>
4016
+ S_KP_3: Scancode # value = <Scancode.S_KP_3: 91>
4017
+ S_KP_4: Scancode # value = <Scancode.S_KP_4: 92>
4018
+ S_KP_5: Scancode # value = <Scancode.S_KP_5: 93>
4019
+ S_KP_6: Scancode # value = <Scancode.S_KP_6: 94>
4020
+ S_KP_7: Scancode # value = <Scancode.S_KP_7: 95>
4021
+ S_KP_8: Scancode # value = <Scancode.S_KP_8: 96>
4022
+ S_KP_9: Scancode # value = <Scancode.S_KP_9: 97>
4023
+ S_KP_DIV: Scancode # value = <Scancode.S_KP_DIV: 84>
4024
+ S_KP_ENTER: Scancode # value = <Scancode.S_KP_ENTER: 88>
4025
+ S_KP_MINUS: Scancode # value = <Scancode.S_KP_MINUS: 86>
4026
+ S_KP_MULT: Scancode # value = <Scancode.S_KP_MULT: 85>
4027
+ S_KP_PERIOD: Scancode # value = <Scancode.S_KP_PERIOD: 99>
4028
+ S_KP_PLUS: Scancode # value = <Scancode.S_KP_PLUS: 87>
4029
+ S_LALT: Scancode # value = <Scancode.S_LALT: 226>
4030
+ S_LBRACKET: Scancode # value = <Scancode.S_LBRACKET: 47>
4031
+ S_LCTRL: Scancode # value = <Scancode.S_LCTRL: 224>
4032
+ S_LEFT: Scancode # value = <Scancode.S_LEFT: 80>
4033
+ S_LGUI: Scancode # value = <Scancode.S_LGUI: 227>
4034
+ S_LSHIFT: Scancode # value = <Scancode.S_LSHIFT: 225>
4035
+ S_MEDIA_EJECT: Scancode # value = <Scancode.S_MEDIA_EJECT: 270>
4036
+ S_MEDIA_FAST_FORWARD: Scancode # value = <Scancode.S_MEDIA_FAST_FORWARD: 265>
4037
+ S_MEDIA_NEXT: Scancode # value = <Scancode.S_MEDIA_NEXT: 267>
4038
+ S_MEDIA_PAUSE: Scancode # value = <Scancode.S_MEDIA_PAUSE: 263>
4039
+ S_MEDIA_PLAY: Scancode # value = <Scancode.S_MEDIA_PLAY: 262>
4040
+ S_MEDIA_PLAY_PAUSE: Scancode # value = <Scancode.S_MEDIA_PLAY_PAUSE: 271>
4041
+ S_MEDIA_PREV: Scancode # value = <Scancode.S_MEDIA_PREV: 268>
4042
+ S_MEDIA_REC: Scancode # value = <Scancode.S_MEDIA_REC: 264>
4043
+ S_MEDIA_REWIND: Scancode # value = <Scancode.S_MEDIA_REWIND: 266>
4044
+ S_MEDIA_SELECT: Scancode # value = <Scancode.S_MEDIA_SELECT: 272>
4045
+ S_MEDIA_STOP: Scancode # value = <Scancode.S_MEDIA_STOP: 269>
4046
+ S_MENU: Scancode # value = <Scancode.S_MENU: 118>
4047
+ S_MINUS: Scancode # value = <Scancode.S_MINUS: 45>
4048
+ S_MODE: Scancode # value = <Scancode.S_MODE: 257>
4049
+ S_MUTE: Scancode # value = <Scancode.S_MUTE: 127>
4050
+ S_NUMLOCK: Scancode # value = <Scancode.S_NUMLOCK: 83>
4051
+ S_PASTE: Scancode # value = <Scancode.S_PASTE: 125>
4052
+ S_PAUSE: Scancode # value = <Scancode.S_PAUSE: 72>
4053
+ S_PERIOD: Scancode # value = <Scancode.S_PERIOD: 55>
4054
+ S_PGDOWN: Scancode # value = <Scancode.S_PGDOWN: 78>
4055
+ S_PGUP: Scancode # value = <Scancode.S_PGUP: 75>
4056
+ S_POWER: Scancode # value = <Scancode.S_POWER: 102>
4057
+ S_PRTSCR: Scancode # value = <Scancode.S_PRTSCR: 70>
4058
+ S_RALT: Scancode # value = <Scancode.S_RALT: 230>
4059
+ S_RBRACKET: Scancode # value = <Scancode.S_RBRACKET: 48>
4060
+ S_RCTRL: Scancode # value = <Scancode.S_RCTRL: 228>
4061
+ S_RETURN: Scancode # value = <Scancode.S_RETURN: 40>
4062
+ S_RGUI: Scancode # value = <Scancode.S_RGUI: 231>
4063
+ S_RIGHT: Scancode # value = <Scancode.S_RIGHT: 79>
4064
+ S_RSHIFT: Scancode # value = <Scancode.S_RSHIFT: 229>
4065
+ S_SCRLK: Scancode # value = <Scancode.S_SCRLK: 71>
4066
+ S_SELECT: Scancode # value = <Scancode.S_SELECT: 119>
4067
+ S_SEMICOLON: Scancode # value = <Scancode.S_SEMICOLON: 51>
4068
+ S_SLASH: Scancode # value = <Scancode.S_SLASH: 56>
4069
+ S_SLEEP: Scancode # value = <Scancode.S_SLEEP: 258>
4070
+ S_SOFTLEFT: Scancode # value = <Scancode.S_SOFTLEFT: 287>
4071
+ S_SOFTRIGHT: Scancode # value = <Scancode.S_SOFTRIGHT: 288>
4072
+ S_SPACE: Scancode # value = <Scancode.S_SPACE: 44>
4073
+ S_STOP: Scancode # value = <Scancode.S_STOP: 120>
4074
+ S_TAB: Scancode # value = <Scancode.S_TAB: 43>
4075
+ S_UNDO: Scancode # value = <Scancode.S_UNDO: 122>
4076
+ S_UP: Scancode # value = <Scancode.S_UP: 82>
4077
+ S_VOLDOWN: Scancode # value = <Scancode.S_VOLDOWN: 129>
4078
+ S_VOLUP: Scancode # value = <Scancode.S_VOLUP: 128>
4079
+ S_WAKE: Scancode # value = <Scancode.S_WAKE: 259>
4080
+ S_a: Scancode # value = <Scancode.S_a: 4>
4081
+ S_b: Scancode # value = <Scancode.S_b: 5>
4082
+ S_c: Scancode # value = <Scancode.S_c: 6>
4083
+ S_d: Scancode # value = <Scancode.S_d: 7>
4084
+ S_e: Scancode # value = <Scancode.S_e: 8>
4085
+ S_f: Scancode # value = <Scancode.S_f: 9>
4086
+ S_g: Scancode # value = <Scancode.S_g: 10>
4087
+ S_h: Scancode # value = <Scancode.S_h: 11>
4088
+ S_i: Scancode # value = <Scancode.S_i: 12>
4089
+ S_j: Scancode # value = <Scancode.S_j: 13>
4090
+ S_k: Scancode # value = <Scancode.S_k: 14>
4091
+ S_l: Scancode # value = <Scancode.S_l: 15>
4092
+ S_m: Scancode # value = <Scancode.S_m: 16>
4093
+ S_n: Scancode # value = <Scancode.S_n: 17>
4094
+ S_o: Scancode # value = <Scancode.S_o: 18>
4095
+ S_p: Scancode # value = <Scancode.S_p: 19>
4096
+ S_q: Scancode # value = <Scancode.S_q: 20>
4097
+ S_r: Scancode # value = <Scancode.S_r: 21>
4098
+ S_s: Scancode # value = <Scancode.S_s: 22>
4099
+ S_t: Scancode # value = <Scancode.S_t: 23>
4100
+ S_u: Scancode # value = <Scancode.S_u: 24>
4101
+ S_v: Scancode # value = <Scancode.S_v: 25>
4102
+ S_w: Scancode # value = <Scancode.S_w: 26>
4103
+ S_x: Scancode # value = <Scancode.S_x: 27>
4104
+ S_y: Scancode # value = <Scancode.S_y: 28>
4105
+ S_z: Scancode # value = <Scancode.S_z: 29>
4106
+ TERMINATING: EventType # value = <EventType.TERMINATING: 257>
4107
+ TEXT_EDITING: EventType # value = <EventType.TEXT_EDITING: 770>
4108
+ TEXT_EDITING_CANDIDATES: EventType # value = <EventType.TEXT_EDITING_CANDIDATES: 775>
4109
+ TEXT_INPUT: EventType # value = <EventType.TEXT_INPUT: 771>
4110
+ TOP_LEFT: Anchor # value = <Anchor.TOP_LEFT: 0>
4111
+ TOP_MID: Anchor # value = <Anchor.TOP_MID: 1>
4112
+ TOP_RIGHT: Anchor # value = <Anchor.TOP_RIGHT: 2>
4113
+ WILL_ENTER_BACKGROUND: EventType # value = <EventType.WILL_ENTER_BACKGROUND: 259>
4114
+ WILL_ENTER_FOREGROUND: EventType # value = <EventType.WILL_ENTER_FOREGROUND: 261>
4115
+ WINDOW_CLOSE_REQUESTED: EventType # value = <EventType.WINDOW_CLOSE_REQUESTED: 528>
4116
+ WINDOW_DESTROYED: EventType # value = <EventType.WINDOW_DESTROYED: 537>
4117
+ WINDOW_DISPLAY_CHANGED: EventType # value = <EventType.WINDOW_DISPLAY_CHANGED: 531>
4118
+ WINDOW_DISPLAY_SCALE_CHANGED: EventType # value = <EventType.WINDOW_DISPLAY_SCALE_CHANGED: 532>
4119
+ WINDOW_ENTER_FULLSCREEN: EventType # value = <EventType.WINDOW_ENTER_FULLSCREEN: 535>
4120
+ WINDOW_EXPOSED: EventType # value = <EventType.WINDOW_EXPOSED: 516>
4121
+ WINDOW_FOCUS_GAINED: EventType # value = <EventType.WINDOW_FOCUS_GAINED: 526>
4122
+ WINDOW_FOCUS_LOST: EventType # value = <EventType.WINDOW_FOCUS_LOST: 527>
4123
+ WINDOW_HDR_STATE_CHANGED: EventType # value = <EventType.WINDOW_HDR_STATE_CHANGED: 538>
4124
+ WINDOW_HIDDEN: EventType # value = <EventType.WINDOW_HIDDEN: 515>
4125
+ WINDOW_HIT_TEST: EventType # value = <EventType.WINDOW_HIT_TEST: 529>
4126
+ WINDOW_ICCPROF_CHANGED: EventType # value = <EventType.WINDOW_ICCPROF_CHANGED: 530>
4127
+ WINDOW_LEAVE_FULLSCREEN: EventType # value = <EventType.WINDOW_LEAVE_FULLSCREEN: 536>
4128
+ WINDOW_MAXIMIZED: EventType # value = <EventType.WINDOW_MAXIMIZED: 522>
4129
+ WINDOW_MINIMIZED: EventType # value = <EventType.WINDOW_MINIMIZED: 521>
4130
+ WINDOW_MOUSE_ENTER: EventType # value = <EventType.WINDOW_MOUSE_ENTER: 524>
4131
+ WINDOW_MOUSE_LEAVE: EventType # value = <EventType.WINDOW_MOUSE_LEAVE: 525>
4132
+ WINDOW_MOVED: EventType # value = <EventType.WINDOW_MOVED: 517>
4133
+ WINDOW_OCCLUDED: EventType # value = <EventType.WINDOW_OCCLUDED: 534>
4134
+ WINDOW_RESIZED: EventType # value = <EventType.WINDOW_RESIZED: 518>
4135
+ WINDOW_RESTORED: EventType # value = <EventType.WINDOW_RESTORED: 523>
4136
+ WINDOW_SAFE_AREA_CHANGED: EventType # value = <EventType.WINDOW_SAFE_AREA_CHANGED: 533>
4137
+ WINDOW_SHOWN: EventType # value = <EventType.WINDOW_SHOWN: 514>