Skip to content

Commit 8847314

Browse files
committed
add docs
1 parent 97791a0 commit 8847314

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

docs/reST/ref/sdl2_video.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@
146146
Gets or sets whether the window is borderless.
147147

148148
.. note:: You can't change the border state of a fullscreen window.
149+
150+
.. attribute:: always_on_top
151+
152+
| :sl:`Get or set whether the window is always on top`
153+
| :sg:`always_on_top -> bool`
154+
155+
Get or set whether the window is always on top.
156+
157+
.. note:: Setting the always-on-top mode requires SDL2.0.16+.
158+
149159
.. attribute:: id
150160

151161
| :sl:`Get the unique window ID (**read-only**)`

src_c/doc/sdl2_video_doc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define DOC_SDL2_VIDEO_WINDOW_TITLE "title -> str\nGet or set the window title"
1111
#define DOC_SDL2_VIDEO_WINDOW_RESIZABLE "resizable -> bool\nGet or set whether the window is resizable"
1212
#define DOC_SDL2_VIDEO_WINDOW_BORDERLESS "borderless -> bool\nGet or set whether the window is borderless"
13+
#define DOC_SDL2_VIDEO_WINDOW_ALWAYSONTOP "always_on_top -> bool\nGet or set whether the window is always on top"
1314
#define DOC_SDL2_VIDEO_WINDOW_ID "id -> int\nGet the unique window ID (**read-only**)"
1415
#define DOC_SDL2_VIDEO_WINDOW_SIZE "size -> (int, int)\nGet or set the window size in pixels"
1516
#define DOC_SDL2_VIDEO_WINDOW_POSITION "position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED\nGet or set the window position in screen coordinates"

src_c/window.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ static PyGetSetDef _window_getset[] = {
747747
{"borderless", (getter)window_get_borderless,
748748
(setter)window_set_borderless, DOC_SDL2_VIDEO_WINDOW_BORDERLESS, NULL},
749749
{"always_on_top", (getter)window_get_always_on_top,
750-
(setter)window_set_always_on_top, "doc", NULL},
750+
(setter)window_set_always_on_top, DOC_SDL2_VIDEO_WINDOW_ALWAYSONTOP,
751+
NULL},
751752
{"relative_mouse", (getter)mouse_get_relative_mode,
752753
(setter)mouse_set_relative_mode, DOC_SDL2_VIDEO_WINDOW_RELATIVEMOUSE,
753754
NULL},

0 commit comments

Comments
 (0)