pyloid 0.14.4__py3-none-any.whl → 0.14.6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pyloid/browser_window.py CHANGED
@@ -621,6 +621,18 @@ class BrowserWindow:
621
621
  """
622
622
  self._window.close()
623
623
 
624
+ def fullscreen(self):
625
+ """
626
+ Enters fullscreen mode.
627
+
628
+ Examples
629
+ --------
630
+ >>> app = Pyloid(app_name="Pyloid-App")
631
+ >>> window = app.create_window("pyloid-window")
632
+ >>> window.fullscreen()
633
+ """
634
+ self._window.showFullScreen()
635
+
624
636
  def toggle_fullscreen(self):
625
637
  """
626
638
  Toggles the fullscreen mode of the window.
@@ -672,6 +684,21 @@ class BrowserWindow:
672
684
  """
673
685
  self._window.showNormal()
674
686
 
687
+ def toggle_maximize(self):
688
+ """
689
+ Toggles the maximized state of the window.
690
+
691
+ Examples
692
+ --------
693
+ >>> app = Pyloid(app_name="Pyloid-App")
694
+ >>> window = app.create_window("pyloid-window")
695
+ >>> window.toggle_maximize()
696
+ """
697
+ if self._window.isMaximized():
698
+ self._window.showNormal()
699
+ else:
700
+ self._window.showMaximized()
701
+
675
702
  def capture(self, save_path: str) -> Optional[str]:
676
703
  """
677
704
  Captures the current window.
@@ -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."""
@@ -198,4 +198,4 @@ Apache License
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
- limitations under the License.
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.14.4
3
+ Version: 0.14.6
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -19,7 +19,7 @@ Pyloid is the Python backend version of Electron and Tauri, designed to simplify
19
19
 
20
20
  ![example image](example.png)
21
21
 
22
- ## 🚀 Why Pyloid?
22
+ ## Why Pyloid?
23
23
 
24
24
  With Pyloid, you can leverage the full power of Python in your desktop applications. Its simplicity and flexibility make it the perfect choice for both beginners and experienced developers looking for a Python-focused alternative to Electron or Tauri. It is especially optimized for building AI-powered desktop applications.
25
25
 
@@ -87,3 +87,7 @@ This project uses PySide6, which is licensed under the LGPL (Lesser General Publ
87
87
 
88
88
  (Add information about how to contribute here)
89
89
 
90
+ ## Issues
91
+
92
+ If you encounter any issues or have suggestions for improvements, please open an issue on the [GitHub repository](https://github.com/Pyloid/pyloid/issues).
93
+
@@ -1,17 +1,17 @@
1
1
  pyloid/__init__.py,sha256=OOPhOKNQVmAM8hnfTeE7lHzxb8LsFNcgegBAvDrA-vY,293
2
2
  pyloid/api.py,sha256=np0pFVUlen_GpN0svY0A3awY_ZjVFk-RpHQZZKFUMuo,2157
3
3
  pyloid/autostart.py,sha256=K7DQYl4LHItvPp0bt1V9WwaaZmVSTeGvadkcwG-KKrI,3899
4
- pyloid/browser_window.py,sha256=dMdmMTMqgAp2wViGZqZmUO4J5_GtNkYSQ_BCpq65ybo,37543
4
+ pyloid/browser_window.py,sha256=CjVU2lg0_KXbaD2l-OeG_fu6vrJUnwvtrvGf2_cllGY,38277
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=JDAFIMMiw75PNcyO8_163PJdRY-dvFNBO3IN0TA-Xsw,5383
8
+ pyloid/js_api/window_api.py,sha256=qDycE5jyIOcNbzIS86khh2V7JVtq36Gn-W9KFV2mU4M,6230
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.14.4.dist-info/LICENSE,sha256=MTYF-6xpRekyTUglRweWtbfbwBL1I_3Bgfbm_SNOuI8,11525
15
- pyloid-0.14.4.dist-info/METADATA,sha256=BVYMCgFLNferu3MbSqxFy0qmrT63AMIBKH0sJ-nn7Ng,2887
16
- pyloid-0.14.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
17
- pyloid-0.14.4.dist-info/RECORD,,
14
+ pyloid-0.14.6.dist-info/LICENSE,sha256=F96EzotgWhhpnQTW2TcdoqrMDir1jyEo6H915tGQ-QE,11524
15
+ pyloid-0.14.6.dist-info/METADATA,sha256=-HPNbCxxKrGt067iuR_Yyr_7OAah4z9XatBYuB7GFz0,3050
16
+ pyloid-0.14.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
17
+ pyloid-0.14.6.dist-info/RECORD,,