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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.14.7
3
+ Version: 0.15.0
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.14.7"
3
+ version = "0.15.0"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -1,12 +1,15 @@
1
+ from typing import TYPE_CHECKING, Optional
2
+
1
3
  from ..api import PyloidAPI, Bridge
2
- from ..pyloid import Pyloid
3
- from typing import Optional
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