Skip to content

Commit d6f1b66

Browse files
committed
compatibility improvements
1 parent ad26480 commit d6f1b66

File tree

118 files changed

+3833
-1820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3833
-1820
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
bin/
2+
build/
3+
lib/
4+
dist/
15
py3env/
26
PySDL2.egg-info/
37
_build/
48
__pycache__/
59
run_tests.py
610
*.sublime-workspace
711
*.sublime-project
12+
*.c
13+
*.pyc
14+
*.stackdump

doc/make_docs.bat

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
@echo off
2+
set PATH=C:\Python35-32;C:\Python35-32\Scripts;%PATH%
23
set PYTHONPATH=C:\Users\Lucas\Documents\Python\pysdl2\pysdl2
34
.\make docs
5+
:: copy ..\examples\
6+
:: \examples\ext\rl\part1\rl_n.py .\doc\tutorial\part_1.py

doc/modules/sdl2ext_window.rst

+5-69
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,7 @@
1-
.. currentmodule:: sdl2.ext
1+
.. module:: sdl2.ext.window
2+
:synopsis: Window routines to manage on-screen windows
23

3-
Window routines to manage on-screen windows
4-
===========================================
4+
sdl2.ext.window - Window routines to manage on-screen windows
5+
=============================================================
56

6-
.. class:: Window(title : string, size : iterable[, position=None[, flags=None]])
7-
8-
The Window class represents a visible on-screen object with an optional
9-
border and *title* text. It represents an area on the screen that can be
10-
accessed by the application for displaying graphics and receive and
11-
process user input.
12-
13-
The position to show the Window at is undefined by default, letting
14-
the operating system or window manager pick the best location. The
15-
behaviour can be adjusted through the ``DEFAULTPOS`` class variable. ::
16-
17-
Window.DEFAULTPOS = (10, 10)
18-
19-
The created Window is hidden by default, which can be overridden at
20-
the time of creation by providing other SDL window flags through the
21-
*flags* parameter. The default flags for creating Window instances
22-
can be adjusted through the ``DEFAULTFLAGS`` class variable. ::
23-
24-
Window.DEFAULTFLAGS = sdl2.SDL_WINDOW_SHOWN
25-
26-
.. attribute:: window
27-
28-
The used :class:`sdl2.SDL_Window`.
29-
30-
.. attribute:: title
31-
32-
The title of the :class:`Window`.
33-
34-
.. attribute:: size
35-
36-
The size of the :class:`Window`.
37-
38-
.. method:: show() -> None
39-
40-
Show the :class:`Window` on the display.
41-
42-
.. method:: hide() -> None
43-
44-
Hide the :class:`Window`.
45-
46-
.. method:: maximize() -> None
47-
48-
Maximizes the :class:`Window` to the display's dimensions.
49-
50-
.. method:: minimize() -> None
51-
52-
Minimizes the :class:`Window` to an iconified state in the system tray.
53-
54-
.. method:: refresh() -> None
55-
56-
Refreshes the entire :class:`Window` surface.
57-
58-
.. note::
59-
60-
This only needs to be called, if a SDL_Surface was acquired via
61-
:meth:`get_surface()` and is used to display contents.
62-
63-
.. method:: get_surface() -> SDL_Surface
64-
65-
Gets the :class:`sdl2.SDL_Surface` used by the :class:`Window` to
66-
display 2D pixel data.
67-
68-
.. note::
69-
70-
Using this method will make the usage of GL operations, such as
71-
texture handling or the usage of SDL renderers impossible.
7+
.. automodule:: sdl2.ext.window

doc/tutorial/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ instead show you the most noteworthy features.
1515
helloworld.rst
1616
pong.rst
1717
pygamers.rst
18+
rl.rst

doc/tutorial/rl.rst

+298
Large diffs are not rendered by default.
+5-69
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,7 @@
1-
.. currentmodule:: sdl2.ext
1+
.. module:: sdl2.ext.window
2+
:synopsis: Window routines to manage on-screen windows
23

3-
Window routines to manage on-screen windows
4-
===========================================
4+
sdl2.ext.window - Window routines to manage on-screen windows
5+
=============================================================
56

6-
.. class:: Window(title : string, size : iterable[, position=None[, flags=None]])
7-
8-
The Window class represents a visible on-screen object with an optional
9-
border and *title* text. It represents an area on the screen that can be
10-
accessed by the application for displaying graphics and receive and
11-
process user input.
12-
13-
The position to show the Window at is undefined by default, letting
14-
the operating system or window manager pick the best location. The
15-
behaviour can be adjusted through the ``DEFAULTPOS`` class variable. ::
16-
17-
Window.DEFAULTPOS = (10, 10)
18-
19-
The created Window is hidden by default, which can be overridden at
20-
the time of creation by providing other SDL window flags through the
21-
*flags* parameter. The default flags for creating Window instances
22-
can be adjusted through the ``DEFAULTFLAGS`` class variable. ::
23-
24-
Window.DEFAULTFLAGS = sdl2.SDL_WINDOW_SHOWN
25-
26-
.. attribute:: window
27-
28-
The used :class:`sdl2.SDL_Window`.
29-
30-
.. attribute:: title
31-
32-
The title of the :class:`Window`.
33-
34-
.. attribute:: size
35-
36-
The size of the :class:`Window`.
37-
38-
.. method:: show() -> None
39-
40-
Show the :class:`Window` on the display.
41-
42-
.. method:: hide() -> None
43-
44-
Hide the :class:`Window`.
45-
46-
.. method:: maximize() -> None
47-
48-
Maximizes the :class:`Window` to the display's dimensions.
49-
50-
.. method:: minimize() -> None
51-
52-
Minimizes the :class:`Window` to an iconified state in the system tray.
53-
54-
.. method:: refresh() -> None
55-
56-
Refreshes the entire :class:`Window` surface.
57-
58-
.. note::
59-
60-
This only needs to be called, if a SDL_Surface was acquired via
61-
:meth:`get_surface()` and is used to display contents.
62-
63-
.. method:: get_surface() -> SDL_Surface
64-
65-
Gets the :class:`sdl2.SDL_Surface` used by the :class:`Window` to
66-
display 2D pixel data.
67-
68-
.. note::
69-
70-
Using this method will make the usage of GL operations, such as
71-
texture handling or the usage of SDL renderers impossible.
7+
.. automodule:: sdl2.ext.window

docs/_sources/tutorial/index.rst.txt

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ instead show you the most noteworthy features.
1515
helloworld.rst
1616
pong.rst
1717
pygamers.rst
18+
rl.rst

0 commit comments

Comments
 (0)