aioxlib 0.1.0__tar.gz → 0.3.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.3.0/PKG-INFO +138 -0
  2. aioxlib-0.3.0/README.md +114 -0
  3. aioxlib-0.3.0/aioxlib/__init__.py +34 -0
  4. aioxlib-0.3.0/aioxlib/_extensions.py +25 -0
  5. aioxlib-0.3.0/aioxlib/api.py +431 -0
  6. aioxlib-0.3.0/aioxlib/authority.py +56 -0
  7. aioxlib-0.3.0/aioxlib/bigreq.py +76 -0
  8. aioxlib-0.3.0/aioxlib/connection.py +156 -0
  9. aioxlib-0.3.0/aioxlib/constants.py +1102 -0
  10. aioxlib-0.3.0/aioxlib/dbe.py +243 -0
  11. aioxlib-0.3.0/aioxlib/display.py +946 -0
  12. aioxlib-0.3.0/aioxlib/dri3.py +143 -0
  13. aioxlib-0.3.0/aioxlib/glx.py +1426 -0
  14. aioxlib-0.3.0/aioxlib/present.py +255 -0
  15. aioxlib-0.3.0/aioxlib/protocol.py +973 -0
  16. aioxlib-0.3.0/aioxlib/render.py +1076 -0
  17. aioxlib-0.3.0/aioxlib/shm.py +207 -0
  18. aioxlib-0.3.0/aioxlib.egg-info/PKG-INFO +138 -0
  19. aioxlib-0.3.0/aioxlib.egg-info/SOURCES.txt +35 -0
  20. {aioxlib-0.1.0 → aioxlib-0.3.0}/aioxlib.egg-info/dependency_links.txt +0 -0
  21. {aioxlib-0.1.0 → aioxlib-0.3.0}/aioxlib.egg-info/top_level.txt +0 -0
  22. {aioxlib-0.1.0 → aioxlib-0.3.0}/pyproject.toml +7 -5
  23. aioxlib-0.3.0/tests/test_api.py +154 -0
  24. aioxlib-0.3.0/tests/test_authority.py +81 -0
  25. aioxlib-0.3.0/tests/test_bigreq.py +50 -0
  26. aioxlib-0.3.0/tests/test_connection.py +260 -0
  27. aioxlib-0.3.0/tests/test_constants.py +95 -0
  28. aioxlib-0.3.0/tests/test_dbe.py +260 -0
  29. aioxlib-0.3.0/tests/test_display.py +1399 -0
  30. aioxlib-0.3.0/tests/test_dri3.py +193 -0
  31. aioxlib-0.3.0/tests/test_examples.py +143 -0
  32. aioxlib-0.3.0/tests/test_glx.py +442 -0
  33. aioxlib-0.3.0/tests/test_present.py +162 -0
  34. aioxlib-0.3.0/tests/test_protocol.py +1432 -0
  35. aioxlib-0.3.0/tests/test_render.py +566 -0
  36. aioxlib-0.3.0/tests/test_shm.py +268 -0
  37. aioxlib-0.1.0/PKG-INFO +0 -149
  38. aioxlib-0.1.0/README.md +0 -125
  39. aioxlib-0.1.0/aioxlib/__init__.py +0 -5534
  40. aioxlib-0.1.0/aioxlib.egg-info/PKG-INFO +0 -149
  41. aioxlib-0.1.0/aioxlib.egg-info/SOURCES.txt +0 -8
  42. aioxlib-0.1.0/tests/test_aioxlib.py +0 -4885
  43. {aioxlib-0.1.0 → aioxlib-0.3.0}/setup.cfg +0 -0
aioxlib-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: aioxlib
3
+ Version: 0.3.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
+ async def main():
56
+ wnd = await aioxlib.create_window(640, 480, title="Hello from aioxlib")
57
+ await wnd.show()
58
+
59
+ async for event in aioxlib.events():
60
+ if wnd.is_delete_window(event):
61
+ break
62
+
63
+ asyncio.run(main())
64
+ ```
65
+
66
+ ### Explicit display (object API)
67
+
68
+ ```python
69
+ import asyncio
70
+ import aioxlib
71
+
72
+ async def main():
73
+ display = await aioxlib.get_display()
74
+ async with display:
75
+ screen = display.default_screen()
76
+ wnd = await screen.create_window(640, 480, title="Hello from aioxlib")
77
+ await wnd.show()
78
+
79
+ async for event in display.events():
80
+ if wnd.is_delete_window(event):
81
+ break
82
+
83
+ asyncio.run(main())
84
+ ```
85
+
86
+ ## Package layout
87
+
88
+ | Module | Contents |
89
+ |--------|----------|
90
+ | **`aioxlib`** (root) | Constants/enums + functional API + `get_display` |
91
+ | `aioxlib.constants` | X11 constants and enumerations |
92
+ | `aioxlib.protocol` | Constants, enums, pack/unpack |
93
+ | `aioxlib.connection` | Socket connection, Xauthority |
94
+ | `aioxlib.resource` | Resource, Drawable, ResourceManager |
95
+ | `aioxlib.display` (Window, Screen, GC, …) | Window, Screen, GC |
96
+ | `aioxlib.display` | Display, Pipeline |
97
+ | `aioxlib.render` / `shm` / `dbe` / … | Extensions |
98
+
99
+ ### Root functional API (selection)
100
+
101
+ | Function | Role |
102
+ |----------|------|
103
+ | `get_display` / `get_default_display` | Open connection |
104
+ | `create_window`, `map_window`, … | Windows |
105
+ | `events()`, `pipeline()` | Event stream / batched writes |
106
+ | `flush`, `query_extension`, `get_atom`, … | Display operations |
107
+ | `close_default_display` | Tear down default connection |
108
+
109
+ Classes such as `Display`, `Window`, and `EventType` are **not** re-exported
110
+ from the root; import them from their modules.
111
+
112
+ ## Documentation
113
+
114
+ ```bash
115
+ pip install mkdocs mkdocs-material 'mkdocstrings[python]'
116
+ mkdocs serve
117
+ ```
118
+
119
+ ## Examples
120
+
121
+ ```bash
122
+ python examples/basic.py
123
+ python examples/functional.py
124
+ ```
125
+
126
+ ## Requirements
127
+
128
+ - Python ≥ 3.12
129
+ - An X11 server and `$DISPLAY` (or an explicit URI)
130
+
131
+ ## License
132
+
133
+ GPLv3 or later — see [LICENSE](LICENSE).
134
+
135
+ ## Author
136
+
137
+ José Tiago Macara Coutinho
138
+ <https://codeberg.org/tiagocoutinho>
@@ -0,0 +1,114 @@
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
+ async def main():
32
+ wnd = await aioxlib.create_window(640, 480, title="Hello from aioxlib")
33
+ await wnd.show()
34
+
35
+ async for event in aioxlib.events():
36
+ if wnd.is_delete_window(event):
37
+ break
38
+
39
+ asyncio.run(main())
40
+ ```
41
+
42
+ ### Explicit display (object API)
43
+
44
+ ```python
45
+ import asyncio
46
+ import aioxlib
47
+
48
+ async def main():
49
+ display = await aioxlib.get_display()
50
+ async with display:
51
+ screen = display.default_screen()
52
+ wnd = await screen.create_window(640, 480, title="Hello from aioxlib")
53
+ await wnd.show()
54
+
55
+ async for event in display.events():
56
+ if wnd.is_delete_window(event):
57
+ break
58
+
59
+ asyncio.run(main())
60
+ ```
61
+
62
+ ## Package layout
63
+
64
+ | Module | Contents |
65
+ |--------|----------|
66
+ | **`aioxlib`** (root) | Constants/enums + functional API + `get_display` |
67
+ | `aioxlib.constants` | X11 constants and enumerations |
68
+ | `aioxlib.protocol` | Constants, enums, pack/unpack |
69
+ | `aioxlib.connection` | Socket connection, Xauthority |
70
+ | `aioxlib.resource` | Resource, Drawable, ResourceManager |
71
+ | `aioxlib.display` (Window, Screen, GC, …) | Window, Screen, GC |
72
+ | `aioxlib.display` | Display, Pipeline |
73
+ | `aioxlib.render` / `shm` / `dbe` / … | Extensions |
74
+
75
+ ### Root functional API (selection)
76
+
77
+ | Function | Role |
78
+ |----------|------|
79
+ | `get_display` / `get_default_display` | Open connection |
80
+ | `create_window`, `map_window`, … | Windows |
81
+ | `events()`, `pipeline()` | Event stream / batched writes |
82
+ | `flush`, `query_extension`, `get_atom`, … | Display operations |
83
+ | `close_default_display` | Tear down default connection |
84
+
85
+ Classes such as `Display`, `Window`, and `EventType` are **not** re-exported
86
+ from the root; import them from their modules.
87
+
88
+ ## Documentation
89
+
90
+ ```bash
91
+ pip install mkdocs mkdocs-material 'mkdocstrings[python]'
92
+ mkdocs serve
93
+ ```
94
+
95
+ ## Examples
96
+
97
+ ```bash
98
+ python examples/basic.py
99
+ python examples/functional.py
100
+ ```
101
+
102
+ ## Requirements
103
+
104
+ - Python ≥ 3.12
105
+ - An X11 server and `$DISPLAY` (or an explicit URI)
106
+
107
+ ## License
108
+
109
+ GPLv3 or later — see [LICENSE](LICENSE).
110
+
111
+ ## Author
112
+
113
+ José Tiago Macara Coutinho
114
+ <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.3.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
+ }