Skip to content

Commit 45936e5

Browse files
committed
Note recent additions to the changelog.
1 parent 304eedb commit 45936e5

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
"truetype",
293293
"undoc",
294294
"Unifont",
295+
"unraisablehook",
295296
"upscaling",
296297
"VAFUNC",
297298
"vcoef",

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Changes relevant to the users of python-tcod are documented here.
44
This project adheres to [Semantic Versioning](https://semver.org/) since version `2.0.0`.
55

66
## [Unreleased]
7+
### Added
8+
- Adds `sdl_window` and `sdl_renderer` to tcod contexts.
9+
- Adds `tcod.event.add_watch` and `tcod.event.remove_watch` to handle SDL events via callback.
10+
- Adds the `tcod.sdl.video` module to handle SDL windows.
11+
- Adds the `tcod.sdl.render` module to handle SDL renderers.
12+
- Adds the `tcod.render` module which gives more control over the rendering of consoles and tilesets.
713
### Fixed
814
- Fixed handling of non-Path PathLike parameters and filepath encodings.
915

tcod/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def toggle_fullscreen(context: tcod.context.Context) -> None:
355355

356356
@property
357357
def sdl_window(self) -> Optional[tcod.sdl.video.Window]:
358-
"""Return a tcod.sdl.video.Window referencing this contexts SDL window if it exists.
358+
"""Return a :any:`tcod.sdl.video.Window` referencing this contexts SDL window if it exists.
359359
360360
.. versionadded:: 13.4
361361
"""
@@ -364,7 +364,7 @@ def sdl_window(self) -> Optional[tcod.sdl.video.Window]:
364364

365365
@property
366366
def sdl_renderer(self) -> Optional[tcod.sdl.render.Renderer]:
367-
"""Return a tcod.sdl.render.Renderer referencing this contexts SDL renderer if it exists.
367+
"""Return a :any:`tcod.sdl.render.Renderer` referencing this contexts SDL renderer if it exists.
368368
369369
.. versionadded:: 13.4
370370
"""

tcod/event.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ def add_watch(callback: _EventCallback) -> _EventCallback:
10891089
10901090
Callbacks added as event watchers can later be removed with :any:`tcod.event.remove_watch`.
10911091
1092+
.. warning::
1093+
How uncaught exceptions in a callback are handled is not currently defined by tcod.
1094+
They will likely be handled by :any:`sys.unraisablehook`.
1095+
10921096
Args:
10931097
callback (Callable[[Event], None]):
10941098
A function which accepts :any:`Event` parameters.
@@ -2303,6 +2307,8 @@ def __repr__(self) -> str:
23032307
"get",
23042308
"wait",
23052309
"get_mouse_state",
2310+
"add_watch",
2311+
"remove_watch",
23062312
"EventDispatch",
23072313
"get_keyboard_state",
23082314
"get_modifier_state",

0 commit comments

Comments
 (0)