Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events as types in python #3121

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
93828b9
Just rename "event.c" to "_event.c".
gresm Jun 17, 2024
dbf8c26
Merge branch 'pygame-community:main' into events_as_types_python
gresm Jun 18, 2024
a604caa
Just rename "event.c" to "_event.c".
gresm Jun 17, 2024
ce045d3
Merge branch 'events-in-python' of https://github.com/gresm/pygame-ce…
gresm Jul 16, 2024
3009fe1
Move custom_type() to python.
gresm Jul 16, 2024
549805e
Bugfix
gresm Jul 16, 2024
f333b6e
Move event_name() to python.
gresm Jul 16, 2024
8485bdd
Update _NAMES_MAPPING
gresm Jul 17, 2024
1b10fd9
Moving Event() to python, likely not working yet.
gresm Jul 18, 2024
0c5c9fb
Moving Event() to python - bugfix.
gresm Jul 18, 2024
27194e3
Moving Event() to python - bugfix 2.
gresm Jul 19, 2024
097ad6a
Moving Event() to python - bugfix 3.
gresm Jul 19, 2024
931cf5e
Moving Event() to python - bugfix 4.
gresm Jul 19, 2024
d80bf00
Merge branch 'main' into events-in-python
gresm Jul 19, 2024
db570be
Moving Event() to python - bugfix 5.
gresm Jul 19, 2024
06b8a14
Add documentation.
gresm Jul 19, 2024
ea11552
Merge branch 'pygame-community:main' into events-in-python
gresm Aug 8, 2024
38084e8
Input buffer.
gresm Aug 8, 2024
6fd93ba
Mark what to do.
gresm Aug 9, 2024
cba8374
Dopump export.
gresm Aug 10, 2024
0e21061
Allowed_set/allowed_get.
gresm Aug 10, 2024
2e9eabb
Move set_allowed, set_blocked, get_blocked to python.
gresm Aug 14, 2024
8a2253a
Bugfix.
gresm Aug 16, 2024
900a4b6
Add docstrings.
gresm Aug 21, 2024
fed5617
Remove _pgEventDictProxy and use a naive multiple Py_INCREF-s approac…
gresm Aug 26, 2024
e8e9a42
Merge branch 'main' into events-in-python-2
gresm Aug 26, 2024
8680024
Fix formatting for docs and bugfixes.
gresm Aug 26, 2024
9c539c6
Buffered INCREFs and DECREFs for timers.
gresm Aug 26, 2024
246a305
Fix 2 old memory leaks and remove negative decref bug.
gresm Aug 28, 2024
01e30c7
Merge branch 'main' of https://github.com/pygame-community/pygame-ce …
gresm Aug 28, 2024
ba48bcc
Fix a typing issue.
gresm Aug 28, 2024
3cb18db
Improve documentation.
gresm Aug 28, 2024
46f17c4
Move get() to python.
gresm Sep 11, 2024
4b7124e
Merge branch 'main' of https://github.com/pygame-community/pygame-ce …
gresm Sep 11, 2024
55220a4
Format
gresm Sep 23, 2024
0e4df38
Merge branch 'main' of https://github.com/pygame-community/pygame-ce …
gresm Sep 23, 2024
8a62db9
Move peek() to python.
gresm Sep 24, 2024
5d6bdc7
Merge remote-tracking branch 'origin' into events-in-python-2
gresm Sep 24, 2024
a62e529
Run updated pre-commit.
gresm Sep 24, 2024
987bf9a
Merge branch 'main' of https://github.com/pygame-community/pygame-ce …
gresm Sep 25, 2024
8a990c2
Events as types in python.
gresm Sep 25, 2024
537c527
Bugfix.
gresm Sep 25, 2024
9e10e91
Merge branch 'main' of https://github.com/pygame-community/pygame-ce …
gresm Oct 22, 2024
4bed447
Merge branch 'events-in-python-2' into events-as-types-python
gresm Oct 22, 2024
a2d4ca4
Dust off the PR.
gresm Oct 22, 2024
ea8e2b6
Removing tests for pygame.event.peek(None).
gresm Oct 22, 2024
d5015ed
Merge branch 'main' of https://github.com/pygame-community/pygame-ce …
gresm Nov 4, 2024
48c1991
Fix versionadded version note.
gresm Nov 4, 2024
ed33f48
Fix stubs.
gresm Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildconfig/Setup.Android.SDL2.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ base src_c/base.c $(SDL) $(DEBUG)
color src_c/color.c $(SDL) $(DEBUG)
constants src_c/constants.c $(SDL) $(DEBUG)
display src_c/display.c $(SDL) $(DEBUG)
event src_c/event.c $(SDL) $(DEBUG)
_event src_c/_event.c $(SDL) $(DEBUG)
key src_c/key.c $(SDL) $(DEBUG)
mouse src_c/mouse.c $(SDL) $(DEBUG)
rect src_c/rect.c src_c/pgcompat_rect.c $(SDL) $(DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion buildconfig/Setup.Emscripten.SDL2.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ controller src_c/void.c
controller_old src_c/void.c
display src_c/void.c
draw src_c/void.c
event src_c/void.c
_event src_c/void.c
font src_c/void.c
gfxdraw src_c/void.c
joystick src_c/void.c
Expand Down
2 changes: 1 addition & 1 deletion buildconfig/Setup.SDL2.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ base src_c/base.c $(SDL) $(DEBUG)
color src_c/color.c $(SDL) $(DEBUG)
constants src_c/constants.c $(SDL) $(DEBUG)
display src_c/display.c $(SDL) $(DEBUG)
event src_c/event.c $(SDL) $(DEBUG)
_event src_c/_event.c $(SDL) $(DEBUG)
key src_c/key.c $(SDL) $(DEBUG)
mouse src_c/mouse.c $(SDL) $(DEBUG)
rect src_c/rect.c src_c/pgcompat_rect.c $(SDL) $(DEBUG)
Expand Down
21 changes: 21 additions & 0 deletions buildconfig/stubs/pygame/_event.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from __future__ import annotations

from .typing import SequenceLike, EventLike

_EventTypes = int | SequenceLike[int]

def pump(dopump: bool, /) -> None: ...
def _get(type: int, /) -> EventLike | None: ...
def _peek(type: int, /) -> bool: ...
def _proxify_event_type(type: int, /) -> int: ...
def video_check() -> None: ...
def poll() -> EventLike: ...
def wait(timeout: int = 0) -> EventLike: ...
def set_grab(grab: bool, /) -> None: ...
def get_grab() -> bool: ...
def allowed_get(type: int, /) -> bool: ...
def allowed_set(type: int, val: bool, /) -> None: ...
def post(event: EventLike, /) -> bool: ...
def register_event_class(cls: type[EventLike]) -> None: ...
def _internal_mod_init() -> None: ...
def _internal_mod_quit() -> None: ...
Loading
Loading