pyloid 0.14.7__py3-none-any.whl → 0.15.0__py3-none-any.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.
pyloid/js_api/window_api.py
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Optional
|
2
|
+
|
1
3
|
from ..api import PyloidAPI, Bridge
|
2
|
-
|
3
|
-
|
4
|
+
|
5
|
+
if TYPE_CHECKING:
|
6
|
+
from ..pyloid import Pyloid
|
4
7
|
|
5
8
|
class WindowAPI(PyloidAPI):
|
6
|
-
def __init__(self, window_id: str, app):
|
9
|
+
def __init__(self, window_id: str, app: 'Pyloid'):
|
7
10
|
super().__init__()
|
8
11
|
self.window_id: str = window_id
|
9
|
-
self.app: Pyloid = app
|
12
|
+
self.app: 'Pyloid' = app
|
10
13
|
|
11
14
|
@Bridge(result=str)
|
12
15
|
def getWindowId(self):
|
@@ -97,6 +100,18 @@ class WindowAPI(PyloidAPI):
|
|
97
100
|
if window:
|
98
101
|
window.toggle_maximize()
|
99
102
|
|
103
|
+
@Bridge(result=bool)
|
104
|
+
def isFullscreen(self):
|
105
|
+
"""Returns True if the window is fullscreen."""
|
106
|
+
window = self.app.get_window_by_id(self.window_id)
|
107
|
+
return window.is_fullscreen()
|
108
|
+
|
109
|
+
@Bridge(result=bool)
|
110
|
+
def isMaximized(self):
|
111
|
+
"""Returns True if the window is maximized."""
|
112
|
+
window = self.app.get_window_by_id(self.window_id)
|
113
|
+
return window.is_maximized()
|
114
|
+
|
100
115
|
@Bridge(str)
|
101
116
|
def setTitle(self, title: str):
|
102
117
|
"""Sets the title of the window."""
|
@@ -192,4 +207,4 @@ class WindowAPI(PyloidAPI):
|
|
192
207
|
"""Starts the system drag."""
|
193
208
|
window = self.app.get_window_by_id(self.window_id)
|
194
209
|
if window:
|
195
|
-
window.web_view.start_system_drag()
|
210
|
+
window.web_view.start_system_drag()
|
@@ -5,13 +5,13 @@ pyloid/browser_window.py,sha256=BYciMcnJ54xETmqkSs_W8aSkdTis6fKPwOKbnXH63U0,3896
|
|
5
5
|
pyloid/custom/titlebar.py,sha256=itzK9pJbZMQ7BKca9kdbuHMffurrw15UijR6OU03Xsk,3894
|
6
6
|
pyloid/filewatcher.py,sha256=3M5zWVUf1OhlkWJcDFC8ZA9agO4Q-U8WdgGpy6kaVz0,4601
|
7
7
|
pyloid/js_api/event_api.py,sha256=_52yyBonqecmMvJpFW7OMNi_jX8Nrteqw_kI6r-DGG0,951
|
8
|
-
pyloid/js_api/window_api.py,sha256=
|
8
|
+
pyloid/js_api/window_api.py,sha256=bUZBnBDJ8TYkM9T4swCT2khPZGzOpyiwpcXDrvmmhCI,6713
|
9
9
|
pyloid/monitor.py,sha256=nmcoOmlHeTysrZVT5mmL92ASbqMg8aH-hQg35qKWi0M,27540
|
10
10
|
pyloid/pyloid.py,sha256=3YymePkpM_hKPzvHSSgELuSHkmbDsKW60HnRwwBMY7A,41178
|
11
11
|
pyloid/timer.py,sha256=RqMsChFUd93cxMVgkHWiIKrci0QDTBgJSTULnAtYT8M,8712
|
12
12
|
pyloid/tray.py,sha256=D12opVEc2wc2T4tK9epaN1oOdeziScsIVNM2uCN7C-A,1710
|
13
13
|
pyloid/utils.py,sha256=VGZE2liY8_AElEqxVe1YLbk3fWlcAevpRc6oOTTgi-U,1927
|
14
|
-
pyloid-0.
|
15
|
-
pyloid-0.
|
16
|
-
pyloid-0.
|
17
|
-
pyloid-0.
|
14
|
+
pyloid-0.15.0.dist-info/LICENSE,sha256=F96EzotgWhhpnQTW2TcdoqrMDir1jyEo6H915tGQ-QE,11524
|
15
|
+
pyloid-0.15.0.dist-info/METADATA,sha256=RM4HvSrukcQ5spcRbjauYYTDjNs4y7jIAuYV00Z7448,3050
|
16
|
+
pyloid-0.15.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
17
|
+
pyloid-0.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|