PyWebWinUI3 1.0.0b41__tar.gz → 1.0.0b43__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.
- {pywebwinui3-1.0.0b41/PyWebWinUI3.egg-info → pywebwinui3-1.0.0b43}/PKG-INFO +10 -7
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43/PyWebWinUI3.egg-info}/PKG-INFO +10 -7
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/PyWebWinUI3.egg-info/SOURCES.txt +15 -14
- pywebwinui3-1.0.0b43/PyWebWinUI3.egg-info/requires.txt +2 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/README.md +6 -3
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/__init__.py +1 -1
- pywebwinui3-1.0.0b43/pywebwinui3/core.py +285 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/event.py +45 -17
- pywebwinui3-1.0.0b43/pywebwinui3/qt.py +774 -0
- pywebwinui3-1.0.0b43/pywebwinui3/util.py +113 -0
- pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/assets/2.BF6evWMx.css +1 -0
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/XZBtqyIK.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/C5fctQ8t.js +1 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/DFhlgERc.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/DuPwkB53.js +1 -1
- pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/KfJIcf5l.js +1 -0
- pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/TzBZ48H8.js +1 -0
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/DZj5c8pp.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/jnH-TXHS.js +1 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/HFhCsEs0.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/ln01AzD2.js +1 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/BT7AcM8u.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/oIQI43DZ.js +1 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/IL0I9G5G.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/chunks/wKeSOqcH.js +1 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/entry/app.yjC6mqRx.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/entry/app.UoyHjfbP.js +2 -2
- pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/entry/start.PpAqhk-4.js +1 -0
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/nodes/0.DzzCzYS2.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/nodes/0.DYoNlsbe.js +3 -3
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/nodes/1.BA7Vlux3.js → pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/nodes/1.DrRW4ELJ.js +1 -1
- pywebwinui3-1.0.0b43/pywebwinui3/web/_app/immutable/nodes/2.D8H1CTiv.js +88 -0
- pywebwinui3-1.0.0b43/pywebwinui3/web/_app/version.json +1 -0
- pywebwinui3-1.0.0b43/pywebwinui3/web/index.html +99 -0
- pywebwinui3-1.0.0b43/requirements.txt +2 -0
- pywebwinui3-1.0.0b43/setup.py +18 -0
- pywebwinui3-1.0.0b41/PyWebWinUI3.egg-info/requires.txt +0 -2
- pywebwinui3-1.0.0b41/pywebwinui3/core.py +0 -130
- pywebwinui3-1.0.0b41/pywebwinui3/util.py +0 -84
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/assets/2.1jA9WFm5.css +0 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/DMzvlKlj.js +0 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/chunks/IJ0Ec6ka.js +0 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/entry/start.C_iXHCMJ.js +0 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/immutable/nodes/2.C17C-gtI.js +0 -92
- pywebwinui3-1.0.0b41/pywebwinui3/web/_app/version.json +0 -1
- pywebwinui3-1.0.0b41/pywebwinui3/web/index.html +0 -99
- pywebwinui3-1.0.0b41/requirements.txt +0 -2
- pywebwinui3-1.0.0b41/setup.py +0 -18
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/LICENSE +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/MANIFEST.in +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/NOTICE +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/PyWebWinUI3.egg-info/dependency_links.txt +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/PyWebWinUI3.egg-info/top_level.txt +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/type.py +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.0.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.1.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.10.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.11.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.12.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.13.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.14.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.15.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.16.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.17.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.18.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.19.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.2.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.20.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.21.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.22.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.23.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.24.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.25.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.26.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.27.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.28.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.29.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.3.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.30.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.31.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.32.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.33.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.34.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.35.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.36.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.37.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.38.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.39.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.4.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.40.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.41.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.42.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.43.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.44.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.45.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.46.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.47.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.48.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.49.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.5.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.50.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.51.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.52.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.53.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.54.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.55.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.56.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.57.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.58.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.59.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.6.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.60.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.61.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.62.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.63.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.64.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.65.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.66.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.67.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.68.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.69.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.7.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.70.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.71.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.72.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.73.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.74.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.75.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.76.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.77.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.78.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.79.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.8.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.80.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.81.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.82.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.83.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.84.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.85.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.86.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.87.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.88.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.89.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.9.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.90.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/PretendardVariable.subset.91.woff2 +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/Pretendard/Variable-dynamic-subset.min.css +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/SegoeFluentIcons.ttf +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/pywebwinui3/web/_app/env.js +0 -0
- {pywebwinui3-1.0.0b41 → pywebwinui3-1.0.0b43}/setup.cfg +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyWebWinUI3
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary: Create modern WinUI3-style desktop UIs in Python effortlessly using
|
|
3
|
+
Version: 1.0.0b43
|
|
4
|
+
Summary: Create modern WinUI3-style desktop UIs in Python effortlessly using PySide6 and QtWebEngine.
|
|
5
5
|
Home-page: https://github.com/Haruna5718/PyWebWinUI3
|
|
6
6
|
Author: Haruna5718
|
|
7
7
|
Author-email: me@haruna5718.dev
|
|
8
8
|
License: Apache 2.0
|
|
9
|
-
Keywords: PyWebWinUI3,pywebwinui3,Haruna5718,
|
|
9
|
+
Keywords: PyWebWinUI3,pywebwinui3,Haruna5718,pyside6,qtwebengine,winui3,pypi
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: NOTICE
|
|
13
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: PySide6
|
|
14
14
|
Requires-Dist: pywin32
|
|
15
15
|
Dynamic: author
|
|
16
16
|
Dynamic: author-email
|
|
@@ -26,13 +26,15 @@ Dynamic: summary
|
|
|
26
26
|
|
|
27
27
|
# PyWebWinUI3
|
|
28
28
|
|
|
29
|
-
PyWebWinUI3 is a project that helps you easily build WinUI3-style desktop UIs in Python using
|
|
29
|
+
PyWebWinUI3 is a project that helps you easily build WinUI3-style desktop UIs in Python using PySide6, QtWebEngine, and Svelte.
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
- Modern and intuitive **WinUI3-style** UI components
|
|
33
33
|
- Rapid desktop app development with Python
|
|
34
|
-
-
|
|
34
|
+
- Frameless desktop window powered by Qt
|
|
35
|
+
- Svelte-based frontend integration through `QWebChannel`
|
|
35
36
|
- Custom fonts and Fluent icon support
|
|
37
|
+
- Static frontend bundle loading without a local HTTP server
|
|
36
38
|
|
|
37
39
|
## Installation & Build
|
|
38
40
|
You can install PyWebWinUI3 directly from PyPI:
|
|
@@ -45,7 +47,7 @@ You can define your UI using XAML files and control the app with Python. See the
|
|
|
45
47
|
|
|
46
48
|
### Minimal Example
|
|
47
49
|
```python
|
|
48
|
-
from pywebwinui3 import MainWindow
|
|
50
|
+
from pywebwinui3.core import MainWindow
|
|
49
51
|
|
|
50
52
|
app = MainWindow("PyWebWinUI3", "./app.ico")
|
|
51
53
|
app.addSettings("Settings.xaml")
|
|
@@ -78,6 +80,7 @@ app.start()
|
|
|
78
80
|
|
|
79
81
|
### More
|
|
80
82
|
- See `example/example.py` and the XAML files in `example/` for advanced usage.
|
|
83
|
+
- The desktop shell is now based on PySide6 + QtWebEngine, so `PySide6` must be available in your environment.
|
|
81
84
|
|
|
82
85
|
## Contributing
|
|
83
86
|
- PRs and issues are welcome!
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyWebWinUI3
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary: Create modern WinUI3-style desktop UIs in Python effortlessly using
|
|
3
|
+
Version: 1.0.0b43
|
|
4
|
+
Summary: Create modern WinUI3-style desktop UIs in Python effortlessly using PySide6 and QtWebEngine.
|
|
5
5
|
Home-page: https://github.com/Haruna5718/PyWebWinUI3
|
|
6
6
|
Author: Haruna5718
|
|
7
7
|
Author-email: me@haruna5718.dev
|
|
8
8
|
License: Apache 2.0
|
|
9
|
-
Keywords: PyWebWinUI3,pywebwinui3,Haruna5718,
|
|
9
|
+
Keywords: PyWebWinUI3,pywebwinui3,Haruna5718,pyside6,qtwebengine,winui3,pypi
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: NOTICE
|
|
13
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: PySide6
|
|
14
14
|
Requires-Dist: pywin32
|
|
15
15
|
Dynamic: author
|
|
16
16
|
Dynamic: author-email
|
|
@@ -26,13 +26,15 @@ Dynamic: summary
|
|
|
26
26
|
|
|
27
27
|
# PyWebWinUI3
|
|
28
28
|
|
|
29
|
-
PyWebWinUI3 is a project that helps you easily build WinUI3-style desktop UIs in Python using
|
|
29
|
+
PyWebWinUI3 is a project that helps you easily build WinUI3-style desktop UIs in Python using PySide6, QtWebEngine, and Svelte.
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
- Modern and intuitive **WinUI3-style** UI components
|
|
33
33
|
- Rapid desktop app development with Python
|
|
34
|
-
-
|
|
34
|
+
- Frameless desktop window powered by Qt
|
|
35
|
+
- Svelte-based frontend integration through `QWebChannel`
|
|
35
36
|
- Custom fonts and Fluent icon support
|
|
37
|
+
- Static frontend bundle loading without a local HTTP server
|
|
36
38
|
|
|
37
39
|
## Installation & Build
|
|
38
40
|
You can install PyWebWinUI3 directly from PyPI:
|
|
@@ -45,7 +47,7 @@ You can define your UI using XAML files and control the app with Python. See the
|
|
|
45
47
|
|
|
46
48
|
### Minimal Example
|
|
47
49
|
```python
|
|
48
|
-
from pywebwinui3 import MainWindow
|
|
50
|
+
from pywebwinui3.core import MainWindow
|
|
49
51
|
|
|
50
52
|
app = MainWindow("PyWebWinUI3", "./app.ico")
|
|
51
53
|
app.addSettings("Settings.xaml")
|
|
@@ -78,6 +80,7 @@ app.start()
|
|
|
78
80
|
|
|
79
81
|
### More
|
|
80
82
|
- See `example/example.py` and the XAML files in `example/` for advanced usage.
|
|
83
|
+
- The desktop shell is now based on PySide6 + QtWebEngine, so `PySide6` must be available in your environment.
|
|
81
84
|
|
|
82
85
|
## Contributing
|
|
83
86
|
- PRs and issues are welcome!
|
|
@@ -12,6 +12,7 @@ PyWebWinUI3.egg-info/top_level.txt
|
|
|
12
12
|
pywebwinui3/__init__.py
|
|
13
13
|
pywebwinui3/core.py
|
|
14
14
|
pywebwinui3/event.py
|
|
15
|
+
pywebwinui3/qt.py
|
|
15
16
|
pywebwinui3/type.py
|
|
16
17
|
pywebwinui3/util.py
|
|
17
18
|
pywebwinui3/web/SegoeFluentIcons.ttf
|
|
@@ -111,17 +112,17 @@ pywebwinui3/web/Pretendard/PretendardVariable.subset.91.woff2
|
|
|
111
112
|
pywebwinui3/web/Pretendard/Variable-dynamic-subset.min.css
|
|
112
113
|
pywebwinui3/web/_app/env.js
|
|
113
114
|
pywebwinui3/web/_app/version.json
|
|
114
|
-
pywebwinui3/web/_app/immutable/assets/2.
|
|
115
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
116
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
117
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
118
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
119
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
120
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
121
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
122
|
-
pywebwinui3/web/_app/immutable/chunks/
|
|
123
|
-
pywebwinui3/web/_app/immutable/entry/app.
|
|
124
|
-
pywebwinui3/web/_app/immutable/entry/start.
|
|
125
|
-
pywebwinui3/web/_app/immutable/nodes/0.
|
|
126
|
-
pywebwinui3/web/_app/immutable/nodes/1.
|
|
127
|
-
pywebwinui3/web/_app/immutable/nodes/2.
|
|
115
|
+
pywebwinui3/web/_app/immutable/assets/2.BF6evWMx.css
|
|
116
|
+
pywebwinui3/web/_app/immutable/chunks/C5fctQ8t.js
|
|
117
|
+
pywebwinui3/web/_app/immutable/chunks/DuPwkB53.js
|
|
118
|
+
pywebwinui3/web/_app/immutable/chunks/KfJIcf5l.js
|
|
119
|
+
pywebwinui3/web/_app/immutable/chunks/TzBZ48H8.js
|
|
120
|
+
pywebwinui3/web/_app/immutable/chunks/jnH-TXHS.js
|
|
121
|
+
pywebwinui3/web/_app/immutable/chunks/ln01AzD2.js
|
|
122
|
+
pywebwinui3/web/_app/immutable/chunks/oIQI43DZ.js
|
|
123
|
+
pywebwinui3/web/_app/immutable/chunks/wKeSOqcH.js
|
|
124
|
+
pywebwinui3/web/_app/immutable/entry/app.UoyHjfbP.js
|
|
125
|
+
pywebwinui3/web/_app/immutable/entry/start.PpAqhk-4.js
|
|
126
|
+
pywebwinui3/web/_app/immutable/nodes/0.DYoNlsbe.js
|
|
127
|
+
pywebwinui3/web/_app/immutable/nodes/1.DrRW4ELJ.js
|
|
128
|
+
pywebwinui3/web/_app/immutable/nodes/2.D8H1CTiv.js
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
# PyWebWinUI3
|
|
3
3
|
|
|
4
|
-
PyWebWinUI3 is a project that helps you easily build WinUI3-style desktop UIs in Python using
|
|
4
|
+
PyWebWinUI3 is a project that helps you easily build WinUI3-style desktop UIs in Python using PySide6, QtWebEngine, and Svelte.
|
|
5
5
|
|
|
6
6
|
## Features
|
|
7
7
|
- Modern and intuitive **WinUI3-style** UI components
|
|
8
8
|
- Rapid desktop app development with Python
|
|
9
|
-
-
|
|
9
|
+
- Frameless desktop window powered by Qt
|
|
10
|
+
- Svelte-based frontend integration through `QWebChannel`
|
|
10
11
|
- Custom fonts and Fluent icon support
|
|
12
|
+
- Static frontend bundle loading without a local HTTP server
|
|
11
13
|
|
|
12
14
|
## Installation & Build
|
|
13
15
|
You can install PyWebWinUI3 directly from PyPI:
|
|
@@ -20,7 +22,7 @@ You can define your UI using XAML files and control the app with Python. See the
|
|
|
20
22
|
|
|
21
23
|
### Minimal Example
|
|
22
24
|
```python
|
|
23
|
-
from pywebwinui3 import MainWindow
|
|
25
|
+
from pywebwinui3.core import MainWindow
|
|
24
26
|
|
|
25
27
|
app = MainWindow("PyWebWinUI3", "./app.ico")
|
|
26
28
|
app.addSettings("Settings.xaml")
|
|
@@ -53,6 +55,7 @@ app.start()
|
|
|
53
55
|
|
|
54
56
|
### More
|
|
55
57
|
- See `example/example.py` and the XAML files in `example/` for advanced usage.
|
|
58
|
+
- The desktop shell is now based on PySide6 + QtWebEngine, so `PySide6` must be available in your environment.
|
|
56
59
|
|
|
57
60
|
## Contributing
|
|
58
61
|
- PRs and issues are welcome!
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import inspect
|
|
4
|
+
import logging
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
from .event import Event
|
|
9
|
+
from .type import Status
|
|
10
|
+
from .util import AccentColorWatcher, SyncDict, loadPage
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger("pywebwinui3")
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from .qt import WebviewAPI
|
|
16
|
+
|
|
17
|
+
DEFAULT_WINDOW_WIDTH = 900
|
|
18
|
+
DEFAULT_WINDOW_HEIGHT = 600
|
|
19
|
+
DEFAULT_WINDOW_MIN_WIDTH = 100
|
|
20
|
+
DEFAULT_WINDOW_MIN_HEIGHT = 100
|
|
21
|
+
ABSOLUTE_WINDOW_MIN_WIDTH = 1
|
|
22
|
+
ABSOLUTE_WINDOW_MIN_HEIGHT = 1
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class WindowEvents:
|
|
26
|
+
def __init__(self) -> None:
|
|
27
|
+
self._pywebviewready = Event()
|
|
28
|
+
self.closed = Event()
|
|
29
|
+
self.accentColorChange = Event()
|
|
30
|
+
self.themeChange = Event()
|
|
31
|
+
self.valueChange = Event()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class MainWindow:
|
|
35
|
+
def __init__(self, title: str, icon: str | None = None):
|
|
36
|
+
caller = inspect.currentframe().f_back
|
|
37
|
+
self.rootPath = Path(caller.f_code.co_filename).parent.resolve()
|
|
38
|
+
self.packagePath = Path(__file__).parent.resolve() / "web"
|
|
39
|
+
self._title = title
|
|
40
|
+
self._icon = icon
|
|
41
|
+
|
|
42
|
+
self.accent = AccentColorWatcher()
|
|
43
|
+
self.events = WindowEvents()
|
|
44
|
+
self._api: WebviewAPI | None = None
|
|
45
|
+
self._window_min_width = DEFAULT_WINDOW_MIN_WIDTH
|
|
46
|
+
self._window_min_height = DEFAULT_WINDOW_MIN_HEIGHT
|
|
47
|
+
|
|
48
|
+
self.values = SyncDict(
|
|
49
|
+
{
|
|
50
|
+
"system_title": title,
|
|
51
|
+
"system_icon": icon,
|
|
52
|
+
"system_theme": "system",
|
|
53
|
+
"system_theme_resolved": self.accent.theme,
|
|
54
|
+
"system_accent": self.accent.palette,
|
|
55
|
+
"system_pages": None,
|
|
56
|
+
"system_settings": None,
|
|
57
|
+
"system_nofication": [],
|
|
58
|
+
"system_pin": False,
|
|
59
|
+
"system_window_width": DEFAULT_WINDOW_WIDTH,
|
|
60
|
+
"system_window_height": DEFAULT_WINDOW_HEIGHT,
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
self.values.sync = self._queue_sync_value
|
|
64
|
+
|
|
65
|
+
self.events.accentColorChange = self.accent.event
|
|
66
|
+
self.events.themeChange = self.accent.theme_event
|
|
67
|
+
self.events.valueChange = self.values.event
|
|
68
|
+
self.events.accentColorChange += lambda palette: self.values.set("system_accent", palette)
|
|
69
|
+
self.events.themeChange += lambda theme: self.values.set("system_theme_resolved", theme)
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def api(self) -> WebviewAPI:
|
|
73
|
+
if self._api is None:
|
|
74
|
+
from .qt import WebviewAPI
|
|
75
|
+
|
|
76
|
+
self._api = WebviewAPI(self, self._title, self._icon)
|
|
77
|
+
return self._api
|
|
78
|
+
|
|
79
|
+
def _queue_sync_value(self, key, value):
|
|
80
|
+
if self._api is None:
|
|
81
|
+
return
|
|
82
|
+
self._api.queue_sync_value(key, value)
|
|
83
|
+
|
|
84
|
+
def onValueChange(self, key):
|
|
85
|
+
def decorator(func):
|
|
86
|
+
self.events.valueChange += (key, func)
|
|
87
|
+
return func
|
|
88
|
+
|
|
89
|
+
return decorator
|
|
90
|
+
|
|
91
|
+
def onAccentColorChange(self):
|
|
92
|
+
def decorator(func):
|
|
93
|
+
self.events.accentColorChange += func
|
|
94
|
+
return func
|
|
95
|
+
|
|
96
|
+
return decorator
|
|
97
|
+
|
|
98
|
+
def onThemeChange(self):
|
|
99
|
+
def decorator(func):
|
|
100
|
+
self.events.themeChange += func
|
|
101
|
+
return func
|
|
102
|
+
|
|
103
|
+
return decorator
|
|
104
|
+
|
|
105
|
+
def onSetup(self):
|
|
106
|
+
def decorator(func):
|
|
107
|
+
self.events._pywebviewready += func
|
|
108
|
+
return func
|
|
109
|
+
|
|
110
|
+
return decorator
|
|
111
|
+
|
|
112
|
+
def onExit(self):
|
|
113
|
+
def decorator(func):
|
|
114
|
+
self.events.closed += func
|
|
115
|
+
return func
|
|
116
|
+
|
|
117
|
+
return decorator
|
|
118
|
+
|
|
119
|
+
def notice(self, level: Status, title: str, description: str, item: dict | None = None):
|
|
120
|
+
self.values["system_nofication"] = [
|
|
121
|
+
*self.values["system_nofication"],
|
|
122
|
+
[level, title, description, item],
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
def init(self) -> dict:
|
|
126
|
+
return dict(self.values)
|
|
127
|
+
|
|
128
|
+
def pin(self, state: bool):
|
|
129
|
+
state = bool(state)
|
|
130
|
+
self.values.set("system_pin", state, self._api is not None)
|
|
131
|
+
if self._api is not None:
|
|
132
|
+
self._api.set_on_top(state)
|
|
133
|
+
return state
|
|
134
|
+
|
|
135
|
+
def _normalize_window_dimension(self, value, default: int, minimum: int, fallback=None) -> int:
|
|
136
|
+
minimum = max(1, int(minimum))
|
|
137
|
+
|
|
138
|
+
try:
|
|
139
|
+
fallback_value = int(round(float(fallback)))
|
|
140
|
+
except (TypeError, ValueError):
|
|
141
|
+
fallback_value = default
|
|
142
|
+
|
|
143
|
+
fallback_value = max(minimum, fallback_value)
|
|
144
|
+
|
|
145
|
+
try:
|
|
146
|
+
normalized = int(round(float(value)))
|
|
147
|
+
except (TypeError, ValueError):
|
|
148
|
+
return fallback_value
|
|
149
|
+
|
|
150
|
+
return max(minimum, normalized)
|
|
151
|
+
|
|
152
|
+
def get_window_min_size_values(self, min_width=None, min_height=None) -> tuple[int, int]:
|
|
153
|
+
current_min_width = self._window_min_width
|
|
154
|
+
current_min_height = self._window_min_height
|
|
155
|
+
|
|
156
|
+
resolved_min_width = self._normalize_window_dimension(
|
|
157
|
+
current_min_width if min_width is None else min_width,
|
|
158
|
+
DEFAULT_WINDOW_MIN_WIDTH,
|
|
159
|
+
ABSOLUTE_WINDOW_MIN_WIDTH,
|
|
160
|
+
current_min_width,
|
|
161
|
+
)
|
|
162
|
+
resolved_min_height = self._normalize_window_dimension(
|
|
163
|
+
current_min_height if min_height is None else min_height,
|
|
164
|
+
DEFAULT_WINDOW_MIN_HEIGHT,
|
|
165
|
+
ABSOLUTE_WINDOW_MIN_HEIGHT,
|
|
166
|
+
current_min_height,
|
|
167
|
+
)
|
|
168
|
+
return resolved_min_width, resolved_min_height
|
|
169
|
+
|
|
170
|
+
def set_window_min_size(self, min_width=None, min_height=None) -> tuple[int, int]:
|
|
171
|
+
resolved_min_width, resolved_min_height = self.get_window_min_size_values(min_width, min_height)
|
|
172
|
+
self._window_min_width = resolved_min_width
|
|
173
|
+
self._window_min_height = resolved_min_height
|
|
174
|
+
return resolved_min_width, resolved_min_height
|
|
175
|
+
|
|
176
|
+
def get_window_size_values(self, width=None, height=None) -> tuple[int, int]:
|
|
177
|
+
current_width = self.values.get("system_window_width")
|
|
178
|
+
current_height = self.values.get("system_window_height")
|
|
179
|
+
minimum_width, minimum_height = self.get_window_min_size_values()
|
|
180
|
+
|
|
181
|
+
resolved_width = self._normalize_window_dimension(
|
|
182
|
+
current_width if width is None else width,
|
|
183
|
+
DEFAULT_WINDOW_WIDTH,
|
|
184
|
+
minimum_width,
|
|
185
|
+
current_width,
|
|
186
|
+
)
|
|
187
|
+
resolved_height = self._normalize_window_dimension(
|
|
188
|
+
current_height if height is None else height,
|
|
189
|
+
DEFAULT_WINDOW_HEIGHT,
|
|
190
|
+
minimum_height,
|
|
191
|
+
current_height,
|
|
192
|
+
)
|
|
193
|
+
return resolved_width, resolved_height
|
|
194
|
+
|
|
195
|
+
def sync_window_size(self, width, height, sync: bool = True) -> tuple[int, int]:
|
|
196
|
+
resolved_width, resolved_height = self.get_window_size_values(width, height)
|
|
197
|
+
|
|
198
|
+
if self.values.get("system_window_width") != resolved_width:
|
|
199
|
+
self.values.set("system_window_width", resolved_width, sync)
|
|
200
|
+
if self.values.get("system_window_height") != resolved_height:
|
|
201
|
+
self.values.set("system_window_height", resolved_height, sync)
|
|
202
|
+
|
|
203
|
+
return resolved_width, resolved_height
|
|
204
|
+
|
|
205
|
+
def sync_window_min_size(self, min_width, min_height, sync: bool = True) -> tuple[int, int, int, int]:
|
|
206
|
+
resolved_min_width, resolved_min_height = self.set_window_min_size(min_width, min_height)
|
|
207
|
+
|
|
208
|
+
resolved_width, resolved_height = self.sync_window_size(
|
|
209
|
+
self.values.get("system_window_width"),
|
|
210
|
+
self.values.get("system_window_height"),
|
|
211
|
+
sync,
|
|
212
|
+
)
|
|
213
|
+
return resolved_min_width, resolved_min_height, resolved_width, resolved_height
|
|
214
|
+
|
|
215
|
+
def syncValue(self, key, value):
|
|
216
|
+
if key in {"system_window_width", "system_window_height"}:
|
|
217
|
+
return self.sync_window_size(
|
|
218
|
+
value if key == "system_window_width" else self.values.get("system_window_width"),
|
|
219
|
+
value if key == "system_window_height" else self.values.get("system_window_height"),
|
|
220
|
+
False,
|
|
221
|
+
)[0 if key == "system_window_width" else 1]
|
|
222
|
+
return self.values.set(key, value, False)
|
|
223
|
+
|
|
224
|
+
def addSettings(self, pageFile: str | Path | None = None, pageData: dict | None = None):
|
|
225
|
+
if pageFile and not pageData:
|
|
226
|
+
pageData = loadPage(pageFile)
|
|
227
|
+
logger.debug("Setting page: %s", pageData["attr"]["path"])
|
|
228
|
+
self.values["system_settings"] = pageData
|
|
229
|
+
|
|
230
|
+
def addPage(self, pageFile: str | Path | None = None, pageData: dict | None = None):
|
|
231
|
+
if pageFile and not pageData:
|
|
232
|
+
pageData = loadPage(pageFile)
|
|
233
|
+
logger.debug("Page added: %s", pageData["attr"]["path"])
|
|
234
|
+
self.values["system_pages"] = {
|
|
235
|
+
**(self.values["system_pages"] or {}),
|
|
236
|
+
pageData["attr"]["path"]: pageData,
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
def resolve_path(self, value: str | Path | None) -> Path | None:
|
|
240
|
+
if value is None:
|
|
241
|
+
return None
|
|
242
|
+
|
|
243
|
+
path = Path(value)
|
|
244
|
+
if path.is_absolute():
|
|
245
|
+
return path
|
|
246
|
+
|
|
247
|
+
root_candidate = self.rootPath / path
|
|
248
|
+
if root_candidate.exists():
|
|
249
|
+
return root_candidate.resolve()
|
|
250
|
+
|
|
251
|
+
package_candidate = self.packagePath / path
|
|
252
|
+
if package_candidate.exists():
|
|
253
|
+
return package_candidate.resolve()
|
|
254
|
+
|
|
255
|
+
return root_candidate.resolve()
|
|
256
|
+
|
|
257
|
+
def resolve_resource_url(self, value):
|
|
258
|
+
if not isinstance(value, (str, Path)):
|
|
259
|
+
return value
|
|
260
|
+
|
|
261
|
+
raw_value = str(value).strip()
|
|
262
|
+
if not raw_value:
|
|
263
|
+
return value
|
|
264
|
+
|
|
265
|
+
lowered = raw_value.lower()
|
|
266
|
+
if lowered.startswith(("http://", "https://", "file://", "data:", "qrc://", "qrc:", "about:")):
|
|
267
|
+
return raw_value
|
|
268
|
+
|
|
269
|
+
resolved = self.resolve_path(raw_value)
|
|
270
|
+
if resolved is None or not resolved.exists():
|
|
271
|
+
return raw_value
|
|
272
|
+
|
|
273
|
+
return resolved.as_uri()
|
|
274
|
+
|
|
275
|
+
def start(self, debug: bool = False, min_width=None, min_height=None):
|
|
276
|
+
if min_width is not None or min_height is not None:
|
|
277
|
+
resolved_min_width, resolved_min_height, _, _ = self.sync_window_min_size(
|
|
278
|
+
self._window_min_width if min_width is None else min_width,
|
|
279
|
+
self._window_min_height if min_height is None else min_height,
|
|
280
|
+
sync=False,
|
|
281
|
+
)
|
|
282
|
+
if self._api is not None and getattr(self._api, "_window", None) is not None:
|
|
283
|
+
self._api.set_window_minimum_size(resolved_min_width, resolved_min_height)
|
|
284
|
+
self.accent.start()
|
|
285
|
+
self.api.start(debug=debug)
|
|
@@ -1,20 +1,43 @@
|
|
|
1
|
-
import
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import atexit
|
|
2
4
|
import fnmatch
|
|
3
|
-
import
|
|
5
|
+
import logging
|
|
6
|
+
import os
|
|
4
7
|
import traceback
|
|
8
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
5
9
|
from typing import Any, Callable
|
|
6
10
|
|
|
7
|
-
logger = logging.getLogger(
|
|
11
|
+
logger = logging.getLogger("pywebwinui3.eventmanager")
|
|
12
|
+
|
|
13
|
+
_EVENT_WORKERS = max(4, min(32, (os.cpu_count() or 1) * 4))
|
|
14
|
+
_EVENT_EXECUTOR = ThreadPoolExecutor(
|
|
15
|
+
max_workers=_EVENT_WORKERS,
|
|
16
|
+
thread_name_prefix="pywebwinui3-event",
|
|
17
|
+
)
|
|
18
|
+
atexit.register(lambda: _EVENT_EXECUTOR.shutdown(wait=False))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _call_listener(func: Callable[..., Any], args: tuple[Any, ...]):
|
|
22
|
+
try:
|
|
23
|
+
func(*args)
|
|
24
|
+
except Exception:
|
|
25
|
+
logger.error(traceback.format_exc())
|
|
26
|
+
|
|
8
27
|
|
|
9
28
|
class Event:
|
|
10
29
|
def __init__(self) -> None:
|
|
11
30
|
self.items: list[Callable[..., Any]] = []
|
|
12
31
|
|
|
13
32
|
def set(self, *args: Any):
|
|
14
|
-
|
|
33
|
+
listeners = tuple(self.items)
|
|
34
|
+
if not listeners:
|
|
35
|
+
return
|
|
36
|
+
|
|
37
|
+
for func in listeners:
|
|
15
38
|
try:
|
|
16
|
-
|
|
17
|
-
except:
|
|
39
|
+
_EVENT_EXECUTOR.submit(_call_listener, func, args)
|
|
40
|
+
except Exception:
|
|
18
41
|
logger.error(traceback.format_exc())
|
|
19
42
|
|
|
20
43
|
def __add__(self, item: Callable[..., Any]):
|
|
@@ -35,19 +58,24 @@ class Event:
|
|
|
35
58
|
|
|
36
59
|
def __len__(self) -> int:
|
|
37
60
|
return len(self.items)
|
|
38
|
-
|
|
61
|
+
|
|
62
|
+
|
|
39
63
|
class PathEvent:
|
|
40
64
|
def __init__(self) -> None:
|
|
41
|
-
self.items: dict[str,Event] = {}
|
|
65
|
+
self.items: dict[str, Event] = {}
|
|
42
66
|
|
|
43
|
-
def set(self, target:str, *args: Any):
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
67
|
+
def set(self, target: str, *args: Any):
|
|
68
|
+
if not self.items:
|
|
69
|
+
return
|
|
70
|
+
|
|
71
|
+
for key, event in tuple(self.items.items()):
|
|
72
|
+
if not fnmatch.fnmatch(target, key):
|
|
73
|
+
continue
|
|
74
|
+
|
|
75
|
+
try:
|
|
76
|
+
event.set(target, *args)
|
|
77
|
+
except Exception:
|
|
78
|
+
logger.error(traceback.format_exc())
|
|
51
79
|
|
|
52
80
|
def __add__(self, item: list):
|
|
53
81
|
self.items.setdefault(item[0], Event()).__iadd__(item[1])
|
|
@@ -66,4 +94,4 @@ class PathEvent:
|
|
|
66
94
|
return self
|
|
67
95
|
|
|
68
96
|
def __len__(self) -> int:
|
|
69
|
-
return len(self.items)
|
|
97
|
+
return len(self.items)
|