pyloid 0.14.5__tar.gz → 0.14.6__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyloid-0.14.5 → pyloid-0.14.6}/PKG-INFO +1 -1
- {pyloid-0.14.5 → pyloid-0.14.6}/pyproject.toml +1 -1
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/js_api/window_api.py +30 -1
- {pyloid-0.14.5 → pyloid-0.14.6}/LICENSE +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/README.md +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/__init__.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/api.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/autostart.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/browser_window.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/custom/titlebar.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/js_api/event_api.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/monitor.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/pyloid.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/timer.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/tray.py +0 -0
- {pyloid-0.14.5 → pyloid-0.14.6}/src/pyloid/utils.py +0 -0
@@ -1,11 +1,12 @@
|
|
1
1
|
from ..api import PyloidAPI, Bridge
|
2
|
+
from ..pyloid import Pyloid
|
2
3
|
from typing import Optional
|
3
4
|
|
4
5
|
class WindowAPI(PyloidAPI):
|
5
6
|
def __init__(self, window_id: str, app):
|
6
7
|
super().__init__()
|
7
8
|
self.window_id: str = window_id
|
8
|
-
self.app = app
|
9
|
+
self.app: Pyloid = app
|
9
10
|
|
10
11
|
@Bridge(result=str)
|
11
12
|
def getWindowId(self):
|
@@ -40,6 +41,27 @@ class WindowAPI(PyloidAPI):
|
|
40
41
|
if window:
|
41
42
|
window.show()
|
42
43
|
|
44
|
+
@Bridge()
|
45
|
+
def focus(self):
|
46
|
+
"""Focuses the window."""
|
47
|
+
window = self.app.get_window_by_id(self.window_id)
|
48
|
+
if window:
|
49
|
+
window.focus()
|
50
|
+
|
51
|
+
@Bridge()
|
52
|
+
def showAndFocus(self):
|
53
|
+
"""Shows and focuses the window."""
|
54
|
+
window = self.app.get_window_by_id(self.window_id)
|
55
|
+
if window:
|
56
|
+
window.show_and_focus()
|
57
|
+
|
58
|
+
@Bridge()
|
59
|
+
def fullscreen(self):
|
60
|
+
"""Enters fullscreen mode."""
|
61
|
+
window = self.app.get_window_by_id(self.window_id)
|
62
|
+
if window:
|
63
|
+
window.fullscreen()
|
64
|
+
|
43
65
|
@Bridge()
|
44
66
|
def toggleFullscreen(self):
|
45
67
|
"""Toggles fullscreen mode for the window."""
|
@@ -68,6 +90,13 @@ class WindowAPI(PyloidAPI):
|
|
68
90
|
if window:
|
69
91
|
window.unmaximize()
|
70
92
|
|
93
|
+
@Bridge()
|
94
|
+
def toggleMaximize(self):
|
95
|
+
"""Toggles the maximized state of the window."""
|
96
|
+
window = self.app.get_window_by_id(self.window_id)
|
97
|
+
if window:
|
98
|
+
window.toggle_maximize()
|
99
|
+
|
71
100
|
@Bridge(str)
|
72
101
|
def setTitle(self, title: str):
|
73
102
|
"""Sets the title of the window."""
|
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
|