pyloid 0.14.7__tar.gz → 0.15.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyloid-0.14.7 → pyloid-0.15.0}/PKG-INFO +1 -1
- {pyloid-0.14.7 → pyloid-0.15.0}/pyproject.toml +1 -1
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/js_api/window_api.py +20 -5
- {pyloid-0.14.7 → pyloid-0.15.0}/LICENSE +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/README.md +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/__init__.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/api.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/autostart.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/browser_window.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/custom/titlebar.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/js_api/event_api.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/monitor.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/pyloid.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/timer.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/tray.py +0 -0
- {pyloid-0.14.7 → pyloid-0.15.0}/src/pyloid/utils.py +0 -0
@@ -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()
|
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
|