@@ -338,7 +338,7 @@ class Event:
338338 .. seealso::
339339 :any:`tcod.event.time_ns`
340340
341- .. versionadded:: Unreleased
341+ .. versionadded:: 21.0
342342 """
343343
344344 @property
@@ -348,7 +348,7 @@ def timestamp(self) -> float:
348348 .. seealso::
349349 :any:`tcod.event.time`
350350
351- .. versionadded:: Unreleased
351+ .. versionadded:: 21.0
352352 """
353353 return self .timestamp_ns / 1_000_000_000
354354
@@ -357,7 +357,7 @@ def timestamp(self) -> float:
357357 def type (self ) -> str :
358358 """This events type.
359359
360- .. deprecated:: Unreleased
360+ .. deprecated:: 21.0
361361 Using this attribute is now actively discouraged. Use :func:`isinstance` or :ref:`match`.
362362
363363 :meta private:
@@ -371,7 +371,7 @@ def type(self) -> str:
371371 def _from_sdl_event (cls , sdl_event : _C_SDL_Event ) -> Event :
372372 """Return a class instance from a python-cffi 'SDL_Event*' pointer.
373373
374- .. versionchanged:: Unreleased
374+ .. versionchanged:: 21.0
375375 This method was unsuitable for the public API and is now private.
376376 """
377377 raise NotImplementedError
@@ -415,17 +415,17 @@ class KeyboardEvent(Event):
415415 which : int = 0
416416 """The SDL keyboard instance ID. Zero if unknown or virtual.
417417
418- .. versionadded:: Unreleased
418+ .. versionadded:: 21.0
419419 """
420420 window_id : int = 0
421421 """The SDL window ID with keyboard focus.
422422
423- .. versionadded:: Unreleased
423+ .. versionadded:: 21.0
424424 """
425425 pressed : bool = False
426426 """True if the key was pressed, False if the key was released.
427427
428- .. versionadded:: Unreleased
428+ .. versionadded:: 21.0
429429 """
430430
431431 @classmethod
@@ -473,20 +473,20 @@ class MouseState(Event):
473473 which : int = 0
474474 """The mouse device ID for this event.
475475
476- .. versionadded:: Unreleased
476+ .. versionadded:: 21.0
477477 """
478478
479479 window_id : int = 0
480480 """The window ID with mouse focus.
481481
482- .. versionadded:: Unreleased
482+ .. versionadded:: 21.0
483483 """
484484
485485 @property
486486 def integer_position (self ) -> Point [int ]:
487487 """Integer coordinates of this event.
488488
489- .. versionadded:: Unreleased
489+ .. versionadded:: 21.0
490490 """
491491 x , y = self .position
492492 return Point (floor (x ), floor (y ))
@@ -508,7 +508,7 @@ def pixel(self, value: Point[float]) -> None:
508508 def tile (self ) -> Point [int ]:
509509 """The integer tile coordinates of the mouse on the screen.
510510
511- .. deprecated:: Unreleased
511+ .. deprecated:: 21.0
512512 Use :any:`integer_position` of the event returned by :any:`Context.convert_event` instead.
513513 """
514514 return _verify_tile_coordinates (self ._tile )
@@ -542,7 +542,7 @@ class MouseMotion(MouseState):
542542 def integer_motion (self ) -> Point [int ]:
543543 """Integer motion of this event.
544544
545- .. versionadded:: Unreleased
545+ .. versionadded:: 21.0
546546 """
547547 x , y = self .position
548548 dx , dy = self .motion
@@ -567,7 +567,7 @@ def pixel_motion(self, value: Point[float]) -> None:
567567 def tile_motion (self ) -> Point [int ]:
568568 """The tile delta.
569569
570- .. deprecated:: Unreleased
570+ .. deprecated:: 21.0
571571 Use :any:`integer_motion` of the event returned by :any:`Context.convert_event` instead.
572572 """
573573 return _verify_tile_coordinates (self ._tile_motion )
@@ -625,7 +625,7 @@ class MouseButtonEvent(Event):
625625 .. versionchanged:: 19.0
626626 `position` and `tile` now use floating point coordinates.
627627
628- .. versionchanged:: Unreleased
628+ .. versionchanged:: 21.0
629629 No longer a subclass of :any:`MouseState`.
630630 """
631631
@@ -636,20 +636,20 @@ class MouseButtonEvent(Event):
636636 button : MouseButton
637637 """Which mouse button index was pressed or released in this event.
638638
639- .. versionchanged:: Unreleased
639+ .. versionchanged:: 21.0
640640 Is now strictly a :any:`MouseButton` type.
641641 """
642642
643643 which : int = 0
644644 """The mouse device ID for this event.
645645
646- .. versionadded:: Unreleased
646+ .. versionadded:: 21.0
647647 """
648648
649649 window_id : int = 0
650650 """The window ID with mouse focus.
651651
652- .. versionadded:: Unreleased
652+ .. versionadded:: 21.0
653653 """
654654
655655 @classmethod
@@ -795,7 +795,7 @@ class WindowEvent(Event):
795795 case tcod.event.WindowEvent(type=subtype, data=data, window_id=window_id):
796796 print(f"Other window event {subtype} on window {window_id} with {data=}")
797797
798- .. versionchanged:: Unreleased
798+ .. versionchanged:: 21.0
799799 Added `data` and `window_id` attributes and added missing SDL3 window events.
800800 """
801801
@@ -1013,7 +1013,7 @@ class JoystickButton(JoystickEvent):
10131013 def type (self ) -> Literal ["JOYBUTTONUP" , "JOYBUTTONDOWN" ]:
10141014 """Button state as a string.
10151015
1016- .. deprecated:: Unreleased
1016+ .. deprecated:: 21.0
10171017 Use :any:`pressed` instead.
10181018 """
10191019 return ("JOYBUTTONUP" , "JOYBUTTONDOWN" )[self .pressed ]
@@ -1122,7 +1122,7 @@ class ControllerButton(ControllerEvent):
11221122 def type (self ) -> Literal ["CONTROLLERBUTTONUP" , "CONTROLLERBUTTONDOWN" ]:
11231123 """Button state as a string.
11241124
1125- .. deprecated:: Unreleased
1125+ .. deprecated:: 21.0
11261126 Use :any:`pressed` instead.
11271127 """
11281128 return ("CONTROLLERBUTTONUP" , "CONTROLLERBUTTONDOWN" )[self .pressed ]
@@ -1160,7 +1160,7 @@ def _from_sdl_event(cls, sdl_event: _C_SDL_Event) -> Self:
11601160class ClipboardUpdate (Event ):
11611161 """Announces changed contents of the clipboard.
11621162
1163- .. versionadded:: Unreleased
1163+ .. versionadded:: 21.0
11641164 """
11651165
11661166 mime_types : tuple [str , ...]
@@ -1195,7 +1195,7 @@ class Drop(Event):
11951195 case tcod.event.Drop(type="COMPLETE"):
11961196 print("Drop handling finished")
11971197
1198- .. versionadded:: Unreleased
1198+ .. versionadded:: 21.0
11991199 """
12001200
12011201 type : Literal ["BEGIN" , "FILE" , "TEXT" , "COMPLETE" , "POSITION" ]
@@ -3097,15 +3097,15 @@ def __getattr__(name: str) -> int:
30973097def time_ns () -> int :
30983098 """Return the nanoseconds elapsed since SDL was initialized.
30993099
3100- .. versionadded:: Unreleased
3100+ .. versionadded:: 21.0
31013101 """
31023102 return int (lib .SDL_GetTicksNS ())
31033103
31043104
31053105def time () -> float :
31063106 """Return the seconds elapsed since SDL was initialized.
31073107
3108- .. versionadded:: Unreleased
3108+ .. versionadded:: 21.0
31093109 """
31103110 return time_ns () / 1_000_000_000
31113111
0 commit comments