PyImGui 0.1.0__cp312-abi3-win_amd64.whl
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.
- imgui/__init__.py +41 -0
- imgui/__init__.pyi +10140 -0
- imgui/_imgui.pyd +0 -0
- imgui/app.py +219 -0
- imgui/app_dx12.py +673 -0
- imgui/app_metal4.py +251 -0
- imgui/app_opengl3.py +194 -0
- imgui/app_vulkan.py +805 -0
- imgui/imguizmo.pyi +501 -0
- imgui/impl_dx12.pyi +65 -0
- imgui/impl_metal.pyi +24 -0
- imgui/impl_metal4.pyi +34 -0
- imgui/impl_opengl3.pyi +81 -0
- imgui/impl_sdl3.pyi +100 -0
- imgui/impl_sdlgpu3.pyi +106 -0
- imgui/impl_vulkan.pyi +146 -0
- imgui/implot.pyi +2508 -0
- imgui/py.typed +0 -0
- pyimgui-0.1.0.dist-info/METADATA +311 -0
- pyimgui-0.1.0.dist-info/RECORD +23 -0
- pyimgui-0.1.0.dist-info/WHEEL +5 -0
- pyimgui-0.1.0.dist-info/licenses/LICENSE +21 -0
- pyimgui-0.1.0.dist-info/licenses/THIRD_PARTY_LICENSES.txt +242 -0
imgui/__init__.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Python bindings for Dear ImGui, with its SDL3 platform backend (`imgui.impl_sdl3`)
|
|
3
|
+
and its SDL_GPU, OpenGL 3 and Vulkan renderer backends (`imgui.impl_sdlgpu3`,
|
|
4
|
+
`imgui.impl_opengl3`, `imgui.impl_vulkan`), generated with litgen. On Windows, also
|
|
5
|
+
its Direct3D 12 renderer backend (`imgui.impl_dx12`); on macOS, its Metal and Metal 4
|
|
6
|
+
renderer backends (`imgui.impl_metal`, `imgui.impl_metal4`).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import ctypes
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
# The extension does not link SDL3: its SDL functions are looked up when it is
|
|
13
|
+
# loaded, in the SDL3 library that pysdl3 ships, whose windows and events the
|
|
14
|
+
# backends are handed. pysdl3 loads that library privately (ctypes' RTLD_LOCAL),
|
|
15
|
+
# which hides it from the lookup; opening it again with RTLD_GLOBAL exposes it.
|
|
16
|
+
try:
|
|
17
|
+
import sdl3
|
|
18
|
+
except ImportError as e:
|
|
19
|
+
raise ImportError("imgui needs pysdl3, whose SDL3 library its backends call: pip install pysdl3") from e
|
|
20
|
+
ctypes.CDLL(sdl3.SDL_GET_BINARY(sdl3.SDL_BINARY)._name, mode=ctypes.RTLD_GLOBAL)
|
|
21
|
+
|
|
22
|
+
from ._imgui import * # noqa: E402, F403
|
|
23
|
+
from ._imgui import imguizmo, impl_opengl3, impl_sdl3, impl_sdlgpu3, impl_vulkan, implot # noqa: E402
|
|
24
|
+
|
|
25
|
+
# Make the submodules importable as modules of their own: `from imgui import implot`
|
|
26
|
+
# works as it is, `import imgui.implot` needs these entries
|
|
27
|
+
sys.modules[f"{__name__}.impl_sdl3"] = impl_sdl3
|
|
28
|
+
sys.modules[f"{__name__}.impl_sdlgpu3"] = impl_sdlgpu3
|
|
29
|
+
sys.modules[f"{__name__}.impl_opengl3"] = impl_opengl3
|
|
30
|
+
sys.modules[f"{__name__}.impl_vulkan"] = impl_vulkan
|
|
31
|
+
sys.modules[f"{__name__}.implot"] = implot
|
|
32
|
+
sys.modules[f"{__name__}.imguizmo"] = imguizmo
|
|
33
|
+
if sys.platform == "win32":
|
|
34
|
+
from ._imgui import impl_dx12 # noqa: E402
|
|
35
|
+
|
|
36
|
+
sys.modules[f"{__name__}.impl_dx12"] = impl_dx12
|
|
37
|
+
if sys.platform == "darwin":
|
|
38
|
+
from ._imgui import impl_metal, impl_metal4 # noqa: E402
|
|
39
|
+
|
|
40
|
+
sys.modules[f"{__name__}.impl_metal"] = impl_metal
|
|
41
|
+
sys.modules[f"{__name__}.impl_metal4"] = impl_metal4
|