aioxlib 0.2.0__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. aioxlib-0.4.0/PKG-INFO +142 -0
  2. aioxlib-0.4.0/README.md +118 -0
  3. aioxlib-0.4.0/aioxlib/__init__.py +34 -0
  4. aioxlib-0.4.0/aioxlib/_extensions.py +25 -0
  5. aioxlib-0.4.0/aioxlib/api.py +431 -0
  6. aioxlib-0.4.0/aioxlib/authority.py +56 -0
  7. aioxlib-0.4.0/aioxlib/bigreq.py +76 -0
  8. aioxlib-0.4.0/aioxlib/connection.py +156 -0
  9. aioxlib-0.4.0/aioxlib/constants.py +1102 -0
  10. aioxlib-0.4.0/aioxlib/dbe.py +243 -0
  11. aioxlib-0.4.0/aioxlib/display.py +961 -0
  12. aioxlib-0.4.0/aioxlib/dri3.py +143 -0
  13. aioxlib-0.4.0/aioxlib/glx.py +1500 -0
  14. aioxlib-0.4.0/aioxlib/present.py +255 -0
  15. aioxlib-0.4.0/aioxlib/protocol.py +975 -0
  16. aioxlib-0.4.0/aioxlib/render.py +1076 -0
  17. aioxlib-0.4.0/aioxlib/shm.py +207 -0
  18. aioxlib-0.4.0/aioxlib.egg-info/PKG-INFO +142 -0
  19. aioxlib-0.4.0/aioxlib.egg-info/SOURCES.txt +35 -0
  20. {aioxlib-0.2.0 → aioxlib-0.4.0}/aioxlib.egg-info/dependency_links.txt +0 -0
  21. {aioxlib-0.2.0 → aioxlib-0.4.0}/aioxlib.egg-info/top_level.txt +0 -0
  22. {aioxlib-0.2.0 → aioxlib-0.4.0}/pyproject.toml +1 -1
  23. aioxlib-0.4.0/tests/test_api.py +154 -0
  24. aioxlib-0.4.0/tests/test_authority.py +81 -0
  25. aioxlib-0.4.0/tests/test_bigreq.py +50 -0
  26. aioxlib-0.4.0/tests/test_connection.py +260 -0
  27. aioxlib-0.4.0/tests/test_constants.py +95 -0
  28. aioxlib-0.4.0/tests/test_dbe.py +260 -0
  29. aioxlib-0.4.0/tests/test_display.py +1399 -0
  30. aioxlib-0.4.0/tests/test_dri3.py +193 -0
  31. aioxlib-0.4.0/tests/test_examples.py +143 -0
  32. aioxlib-0.4.0/tests/test_glx.py +442 -0
  33. aioxlib-0.4.0/tests/test_present.py +162 -0
  34. aioxlib-0.4.0/tests/test_protocol.py +1432 -0
  35. aioxlib-0.4.0/tests/test_render.py +566 -0
  36. aioxlib-0.4.0/tests/test_shm.py +268 -0
  37. aioxlib-0.2.0/PKG-INFO +0 -196
  38. aioxlib-0.2.0/README.md +0 -172
  39. aioxlib-0.2.0/aioxlib/__init__.py +0 -6111
  40. aioxlib-0.2.0/aioxlib.egg-info/PKG-INFO +0 -196
  41. aioxlib-0.2.0/aioxlib.egg-info/SOURCES.txt +0 -8
  42. aioxlib-0.2.0/tests/test_aioxlib.py +0 -5717
  43. {aioxlib-0.2.0 → aioxlib-0.4.0}/setup.cfg +0 -0
aioxlib-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: aioxlib
3
+ Version: 0.4.0
4
+ Summary: Human friendly interface to XLib subsystems using asyncio python
5
+ Author-email: Jose Tiago Macara Coutinho <coutinhotiago@gmail.com>
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Documentation, https://aioxlib.readthedocs.io/en/latest/
8
+ Project-URL: Homepage, https://codeberg.org/tiagocoutinho/aioxlib/
9
+ Project-URL: Repository, https://codeberg.org/tiagocoutinho/aioxlib/
10
+ Keywords: x11,asyncio
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Multimedia :: Video
21
+ Classifier: Topic :: Multimedia :: Video :: Capture
22
+ Requires-Python: >=3.12
23
+ Description-Content-Type: text/markdown
24
+
25
+ # aioxlib
26
+
27
+ **Human-friendly asyncio interface to the X11 protocol**
28
+
29
+ [![PyPI](https://img.shields.io/pypi/v/aioxlib.svg)](https://pypi.org/project/aioxlib/)
30
+ [![Python Versions](https://img.shields.io/pypi/pyversions/aioxlib.svg)](https://pypi.org/project/aioxlib/)
31
+ [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
32
+
33
+ `aioxlib` is a pure-Python library that speaks the X11 wire protocol over
34
+ asyncio—without blocking the event loop and without linking to libX11.
35
+
36
+ ## Documentation
37
+
38
+ - Online: [aioxlib.readthedocs.io](https://aioxlib.readthedocs.io)
39
+ - Local: `pip install -r docs/requirements.txt && mkdocs serve`
40
+
41
+ ## Installation
42
+
43
+ ```bash
44
+ pip install aioxlib
45
+ ```
46
+
47
+ ## Quick start
48
+
49
+ The **root package** exposes the functional API and `get_display` only:
50
+
51
+ ```python
52
+ import asyncio
53
+ import aioxlib
54
+
55
+
56
+ async def main():
57
+ wnd = await aioxlib.create_window(640, 480, title="Hello from aioxlib")
58
+ await wnd.show()
59
+
60
+ async for event in aioxlib.events():
61
+ if wnd.is_delete_window(event):
62
+ break
63
+
64
+
65
+ asyncio.run(main())
66
+ ```
67
+
68
+ ### Explicit display (object API)
69
+
70
+ ```python
71
+ import asyncio
72
+ import aioxlib
73
+
74
+
75
+ async def main():
76
+ display = await aioxlib.get_display()
77
+ async with display:
78
+ screen = display.default_screen()
79
+ wnd = await screen.create_window(640, 480, title="Hello from aioxlib")
80
+ await wnd.show()
81
+
82
+ async for event in display.events():
83
+ if wnd.is_delete_window(event):
84
+ break
85
+
86
+
87
+ asyncio.run(main())
88
+ ```
89
+
90
+ ## Package layout
91
+
92
+ | Module | Contents |
93
+ |--------|----------|
94
+ | **`aioxlib`** (root) | Constants/enums + functional API + `get_display` |
95
+ | `aioxlib.constants` | X11 constants and enumerations |
96
+ | `aioxlib.protocol` | Constants, enums, pack/unpack |
97
+ | `aioxlib.connection` | Socket connection, Xauthority |
98
+ | `aioxlib.resource` | Resource, Drawable, ResourceManager |
99
+ | `aioxlib.display` (Window, Screen, GC, …) | Window, Screen, GC |
100
+ | `aioxlib.display` | Display, Pipeline |
101
+ | `aioxlib.render` / `shm` / `dbe` / … | Extensions |
102
+
103
+ ### Root functional API (selection)
104
+
105
+ | Function | Role |
106
+ |----------|------|
107
+ | `get_display` / `get_default_display` | Open connection |
108
+ | `create_window`, `map_window`, … | Windows |
109
+ | `events()`, `pipeline()` | Event stream / batched writes |
110
+ | `flush`, `query_extension`, `get_atom`, … | Display operations |
111
+ | `close_default_display` | Tear down default connection |
112
+
113
+ Classes such as `Display`, `Window`, and `EventType` are **not** re-exported
114
+ from the root; import them from their modules.
115
+
116
+ ## Documentation
117
+
118
+ ```bash
119
+ pip install mkdocs mkdocs-material 'mkdocstrings[python]'
120
+ mkdocs serve
121
+ ```
122
+
123
+ ## Examples
124
+
125
+ ```bash
126
+ python examples/basic.py
127
+ python examples/functional.py
128
+ ```
129
+
130
+ ## Requirements
131
+
132
+ - Python ≥ 3.12
133
+ - An X11 server and `$DISPLAY` (or an explicit URI)
134
+
135
+ ## License
136
+
137
+ GPLv3 or later — see [LICENSE](LICENSE).
138
+
139
+ ## Author
140
+
141
+ José Tiago Macara Coutinho
142
+ <https://codeberg.org/tiagocoutinho>
@@ -0,0 +1,118 @@
1
+ # aioxlib
2
+
3
+ **Human-friendly asyncio interface to the X11 protocol**
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/aioxlib.svg)](https://pypi.org/project/aioxlib/)
6
+ [![Python Versions](https://img.shields.io/pypi/pyversions/aioxlib.svg)](https://pypi.org/project/aioxlib/)
7
+ [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
8
+
9
+ `aioxlib` is a pure-Python library that speaks the X11 wire protocol over
10
+ asyncio—without blocking the event loop and without linking to libX11.
11
+
12
+ ## Documentation
13
+
14
+ - Online: [aioxlib.readthedocs.io](https://aioxlib.readthedocs.io)
15
+ - Local: `pip install -r docs/requirements.txt && mkdocs serve`
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install aioxlib
21
+ ```
22
+
23
+ ## Quick start
24
+
25
+ The **root package** exposes the functional API and `get_display` only:
26
+
27
+ ```python
28
+ import asyncio
29
+ import aioxlib
30
+
31
+
32
+ async def main():
33
+ wnd = await aioxlib.create_window(640, 480, title="Hello from aioxlib")
34
+ await wnd.show()
35
+
36
+ async for event in aioxlib.events():
37
+ if wnd.is_delete_window(event):
38
+ break
39
+
40
+
41
+ asyncio.run(main())
42
+ ```
43
+
44
+ ### Explicit display (object API)
45
+
46
+ ```python
47
+ import asyncio
48
+ import aioxlib
49
+
50
+
51
+ async def main():
52
+ display = await aioxlib.get_display()
53
+ async with display:
54
+ screen = display.default_screen()
55
+ wnd = await screen.create_window(640, 480, title="Hello from aioxlib")
56
+ await wnd.show()
57
+
58
+ async for event in display.events():
59
+ if wnd.is_delete_window(event):
60
+ break
61
+
62
+
63
+ asyncio.run(main())
64
+ ```
65
+
66
+ ## Package layout
67
+
68
+ | Module | Contents |
69
+ |--------|----------|
70
+ | **`aioxlib`** (root) | Constants/enums + functional API + `get_display` |
71
+ | `aioxlib.constants` | X11 constants and enumerations |
72
+ | `aioxlib.protocol` | Constants, enums, pack/unpack |
73
+ | `aioxlib.connection` | Socket connection, Xauthority |
74
+ | `aioxlib.resource` | Resource, Drawable, ResourceManager |
75
+ | `aioxlib.display` (Window, Screen, GC, …) | Window, Screen, GC |
76
+ | `aioxlib.display` | Display, Pipeline |
77
+ | `aioxlib.render` / `shm` / `dbe` / … | Extensions |
78
+
79
+ ### Root functional API (selection)
80
+
81
+ | Function | Role |
82
+ |----------|------|
83
+ | `get_display` / `get_default_display` | Open connection |
84
+ | `create_window`, `map_window`, … | Windows |
85
+ | `events()`, `pipeline()` | Event stream / batched writes |
86
+ | `flush`, `query_extension`, `get_atom`, … | Display operations |
87
+ | `close_default_display` | Tear down default connection |
88
+
89
+ Classes such as `Display`, `Window`, and `EventType` are **not** re-exported
90
+ from the root; import them from their modules.
91
+
92
+ ## Documentation
93
+
94
+ ```bash
95
+ pip install mkdocs mkdocs-material 'mkdocstrings[python]'
96
+ mkdocs serve
97
+ ```
98
+
99
+ ## Examples
100
+
101
+ ```bash
102
+ python examples/basic.py
103
+ python examples/functional.py
104
+ ```
105
+
106
+ ## Requirements
107
+
108
+ - Python ≥ 3.12
109
+ - An X11 server and `$DISPLAY` (or an explicit URI)
110
+
111
+ ## License
112
+
113
+ GPLv3 or later — see [LICENSE](LICENSE).
114
+
115
+ ## Author
116
+
117
+ José Tiago Macara Coutinho
118
+ <https://codeberg.org/tiagocoutinho>
@@ -0,0 +1,34 @@
1
+ #
2
+ # This file is part of the aioxlib project
3
+ #
4
+ # Copyright (c) 2026 Tiago Coutinho
5
+ # Distributed under the GPLv3 license. See LICENSE for more info.
6
+
7
+ """Asyncio-native pure-Python X11 client.
8
+
9
+ The root package exposes **constants/enums** (:mod:`aioxlib.constants`), the
10
+ **functional API** (:mod:`aioxlib.api`), and :func:`get_display` / :func:`get_display_config`.
11
+
12
+ Types and protocol helpers live in submodules::
13
+
14
+ from aioxlib import get_display, create_window, events, EventType, EventMask
15
+ from aioxlib.display import Display, Window
16
+ from aioxlib.protocol import pack_create_window
17
+ """
18
+
19
+ __version__ = "0.4.0"
20
+
21
+ from .api import * # noqa: F403
22
+ from .api import __all__ as _api_all
23
+ from .constants import * # noqa: F403
24
+ from .constants import __all__ as _constants_all
25
+ from .display import get_display
26
+
27
+ __all__ = [
28
+ "__version__",
29
+ "get_display",
30
+ *_constants_all,
31
+ *_api_all,
32
+ ]
33
+
34
+ del _api_all, _constants_all
@@ -0,0 +1,25 @@
1
+ #
2
+ # This file is part of the aioxlib project
3
+ #
4
+ # Copyright (c) 2026 Tiago Coutinho
5
+ # Distributed under the GPLv3 license. See LICENSE for more info.
6
+
7
+ from __future__ import annotations
8
+
9
+ from .bigreq import BigRequests
10
+ from .dbe import DoubleBuffer
11
+ from .dri3 import DRI3
12
+ from .glx import GLX
13
+ from .present import Present
14
+ from .render import Render
15
+ from .shm import SharedMemory
16
+
17
+ EXTENSIONS = {
18
+ "MIT-SHM": SharedMemory,
19
+ "DOUBLE-BUFFER": DoubleBuffer,
20
+ "BIG-REQUESTS": BigRequests,
21
+ "GLX": GLX,
22
+ "DRI3": DRI3,
23
+ "Present": Present,
24
+ "RENDER": Render,
25
+ }