python-cui 1.4.0.6__tar.gz → 1.4.0.8__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.
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/PKG-INFO +5 -3
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/README.md +3 -1
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/pyproject.toml +2 -2
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_cui.pyi +5 -2
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_cui.pyx +16 -6
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_app.py +8 -8
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/.github/workflows/ci.yml +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/.github/workflows/publish-to-pypi.yml +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/.gitignore +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/.gitmodules +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CMakeLists.txt +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/.editorconfig +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/.gitignore +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/CHANGELOG.md +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/CLAUDE.md +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/CMakeLists.txt +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/LICENSE +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/README.md +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/THIRD_PARTY.md +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/cmake/CuiApp.cmake +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/cmake/mingw-w64.cmake +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/examples/CMakeLists.txt +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/include/cui/cui.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/include/cui/cui_app.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/include/cui/cui_icons.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/include/cui/cui_render.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_actions.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_ai.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_bidi.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_bidi.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_bidi_data.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_charts.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_chrome.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_code.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_controls.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_core.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_curves.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_data.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_devpanels.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_devtools.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_devviews.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_dials.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_diff.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_disclosure.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_dock.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_draw.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_editor.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_emoji.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_emoji_data.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_extras.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_files.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_flame.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_font_data.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_graph.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_grid.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_hex.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_image.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_inflate.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_instrument.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_internal.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_joining.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_layout.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_markdown.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_media.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_month.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_motion.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_nodes.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_overlay.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_photo.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_pickers.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_planning.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_regex.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_shape.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_shape.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_social.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_strings.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_terminal.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_text.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_textedit.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_theme.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_timeline.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_tools.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_tour.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_treetable.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_viz.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/cui_widgets.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_app.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_app_cocoa.m +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_app_glfw.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_app_sdl2.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_app_win32.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_app_x11.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_dialogs.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/platform/cui_platform.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/render/cui_render_gl.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/src/render/cui_render_sw.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/tests/CMakeLists.txt +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/third_party/LICENSE-Unicode.txt +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/third_party/stb_image.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/third_party/stb_image_write.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/third_party/stb_rect_pack.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/CUI/third_party/stb_truetype.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/components-dark.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/components-light.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/assistant.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/caffeine.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/dashboard.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/finance.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/hello.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/mail.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/music.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/notes.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/settings.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/todo.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/docs/images/examples/tracker.png +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/_common.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/assistant.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/caffeine.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/components.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/dashboard.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/finance.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/hello.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/mail.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/music.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/notes.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/settings.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/todo.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/examples/tracker.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/__init__.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/__init__.pyi +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_api.pyi +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_api.pyx +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_cui.pxd +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_gen/COVERAGE.md +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_gen/__init__.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_gen/constants.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_gen/model.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_gen/sizes.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_stdbool.pxd +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_trampoline.c +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_trampoline.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/_types.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/cui_decl.pxd +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/py.typed +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/src/cui/ui.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/conftest.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_charts.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_context.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_examples.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_facade.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_generated.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_marshalling.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tests/test_render.py +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tools/clang-include/README.md +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tools/clang-include/stdarg.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tools/clang-include/stdbool.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tools/clang-include/stddef.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tools/clang-include/stdint.h +0 -0
- {python_cui-1.4.0.6 → python_cui-1.4.0.8}/tools/gen_cui.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cui
|
|
3
|
-
Version: 1.4.0.
|
|
3
|
+
Version: 1.4.0.8
|
|
4
4
|
Summary: Python bindings for CUI
|
|
5
5
|
Keywords: gui,ui,immediate-mode,cui,bindings,cython
|
|
6
6
|
License-Expression: MIT
|
|
@@ -10,11 +10,13 @@ Classifier: Programming Language :: C
|
|
|
10
10
|
Classifier: Programming Language :: Cython
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Topic :: Software Development :: User Interfaces
|
|
13
|
-
Project-URL: Homepage, https://github.com/
|
|
13
|
+
Project-URL: Homepage, https://github.com/Quantalon/python-cui
|
|
14
14
|
Requires-Python: >=3.9
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# python-cui
|
|
18
|
+
|
|
19
|
+
CUI 的 Python 绑定
|
|
18
20
|
|
|
19
21
|
[CUI](https://github.com/yappologistic/CUI) 是一个用 C99 写的立即模式原生 UI 库(约 190 个组件,
|
|
20
22
|
自带软件渲染器与 Win32 / Cocoa / X11 / SDL2 / GLFW 窗口后端)。PYCUI 把它做成一个可以直接
|
|
@@ -18,11 +18,11 @@ classifiers = [
|
|
|
18
18
|
"Topic :: Software Development :: User Interfaces",
|
|
19
19
|
]
|
|
20
20
|
# The library version tracks the vendored CUI release: <cui major>.<minor>.<patch>.<bindings revision>.
|
|
21
|
-
version = "1.4.0.
|
|
21
|
+
version = "1.4.0.8"
|
|
22
22
|
dependencies = []
|
|
23
23
|
|
|
24
24
|
[project.urls]
|
|
25
|
-
Homepage = "https://github.com/
|
|
25
|
+
Homepage = "https://github.com/Quantalon/python-cui"
|
|
26
26
|
|
|
27
27
|
[tool.scikit-build]
|
|
28
28
|
minimum-version = "0.10"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Type stubs for the hand-written Cython core."""
|
|
2
2
|
|
|
3
|
-
from typing import Any, Callable
|
|
3
|
+
from typing import TYPE_CHECKING, Any, Callable
|
|
4
4
|
|
|
5
5
|
from ._types import (
|
|
6
6
|
CanvasResult,
|
|
@@ -16,6 +16,9 @@ from ._types import (
|
|
|
16
16
|
Vec2,
|
|
17
17
|
)
|
|
18
18
|
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from .ui import UI
|
|
21
|
+
|
|
19
22
|
__version__: str
|
|
20
23
|
CUI_VERSION: str
|
|
21
24
|
|
|
@@ -147,7 +150,7 @@ class App:
|
|
|
147
150
|
def is_software(self) -> bool: ...
|
|
148
151
|
def create(self, **desc: Any) -> App: ...
|
|
149
152
|
def frame(self) -> bool: ...
|
|
150
|
-
def run(self, frame: Callable[[
|
|
153
|
+
def run(self, frame: Callable[["UI"], None], **desc: Any) -> int: ...
|
|
151
154
|
def quit(self) -> None: ...
|
|
152
155
|
def set_title(self, title: str) -> None: ...
|
|
153
156
|
def set_size(self, width: int, height: int) -> None: ...
|
|
@@ -1487,24 +1487,34 @@ cdef class App:
|
|
|
1487
1487
|
return bool(ok)
|
|
1488
1488
|
|
|
1489
1489
|
def run(self, frame, **desc):
|
|
1490
|
-
"""Create the window and call ``frame(
|
|
1490
|
+
"""Create the window and call ``frame(ui)`` until it closes.
|
|
1491
1491
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1492
|
+
``ui`` is the :class:`cui.UI` facade over the frame's
|
|
1493
|
+
:class:`cui.Context`, also reachable as ``ui.context``. The loop runs
|
|
1494
|
+
with the GIL released, so other Python threads keep running while the
|
|
1495
|
+
window waits for input. An exception raised inside ``frame`` stops the
|
|
1496
|
+
loop, unwinds cleanly and is re-raised here.
|
|
1495
1497
|
"""
|
|
1496
1498
|
cdef cui_app_desc d
|
|
1497
1499
|
cdef pycui_run_state st
|
|
1498
1500
|
cdef Context ctx
|
|
1499
1501
|
cdef int rc
|
|
1500
1502
|
cdef object info = None
|
|
1503
|
+
cdef object invoke
|
|
1504
|
+
cdef object ui
|
|
1501
1505
|
|
|
1502
1506
|
memset(&d, 0, sizeof(d))
|
|
1503
1507
|
memset(&st, 0, sizeof(st))
|
|
1504
1508
|
self._fill_desc(&d, dict(desc))
|
|
1505
1509
|
ctx = Context.__new__(Context)
|
|
1506
|
-
|
|
1507
|
-
|
|
1510
|
+
# The C trampoline binds the frame's cui_ctx onto ``ctx`` and calls the
|
|
1511
|
+
# frame callable with it; the callable gets the UI facade instead.
|
|
1512
|
+
from .ui import UI
|
|
1513
|
+
|
|
1514
|
+
ui = UI(ctx)
|
|
1515
|
+
invoke = lambda _context: frame(ui)
|
|
1516
|
+
Py_INCREF(invoke)
|
|
1517
|
+
st.callable = <PyObject *>invoke
|
|
1508
1518
|
Py_INCREF(ctx)
|
|
1509
1519
|
st.ui = <PyObject *>ctx
|
|
1510
1520
|
try:
|
|
@@ -26,10 +26,10 @@ def test_run_quit_and_redraw():
|
|
|
26
26
|
app = cui.App()
|
|
27
27
|
frames = []
|
|
28
28
|
|
|
29
|
-
def frame(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ui
|
|
29
|
+
def frame(ui):
|
|
30
|
+
assert isinstance(ui, cui.UI)
|
|
31
|
+
frames.append(ui.context.frame_count)
|
|
32
|
+
ui.context.request_wakeup(0.01)
|
|
33
33
|
with ui.column(pad=8):
|
|
34
34
|
ui.heading("trampoline")
|
|
35
35
|
if len(frames) >= 3:
|
|
@@ -42,8 +42,8 @@ def test_run_quit_and_redraw():
|
|
|
42
42
|
def test_exception_in_frame_stops_the_loop_and_reraises():
|
|
43
43
|
app = cui.App()
|
|
44
44
|
|
|
45
|
-
def frame(
|
|
46
|
-
|
|
45
|
+
def frame(ui):
|
|
46
|
+
ui.context.request_wakeup(0.01)
|
|
47
47
|
raise RuntimeError("from the frame")
|
|
48
48
|
|
|
49
49
|
with pytest.raises(RuntimeError, match="from the frame"):
|
|
@@ -78,8 +78,8 @@ def test_the_loop_releases_the_gil():
|
|
|
78
78
|
thread.start()
|
|
79
79
|
start = time.perf_counter()
|
|
80
80
|
|
|
81
|
-
def frame(
|
|
82
|
-
|
|
81
|
+
def frame(ui):
|
|
82
|
+
ui.context.request_wakeup(0.005)
|
|
83
83
|
if time.perf_counter() - start > 0.3:
|
|
84
84
|
app.quit()
|
|
85
85
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|