PySide2-Frameless-Window 0.5.0__tar.gz → 0.6.0__tar.gz
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.
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/PKG-INFO +2 -1
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/PySide2_Frameless_Window.egg-info/PKG-INFO +2 -1
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/README.md +1 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/__init__.py +1 -1
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/mac/__init__.py +3 -1
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/utils/__init__.py +3 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/utils/linux_utils.py +22 -3
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/utils/mac_utils.py +27 -2
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/utils/win32_utils.py +31 -2
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/setup.py +1 -1
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/LICENSE +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/PySide2_Frameless_Window.egg-info/SOURCES.txt +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/PySide2_Frameless_Window.egg-info/dependency_links.txt +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/PySide2_Frameless_Window.egg-info/requires.txt +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/PySide2_Frameless_Window.egg-info/top_level.txt +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/_rc/__init__.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/_rc/resource.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/linux/__init__.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/linux/window_effect.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/mac/window_effect.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/titlebar/__init__.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/titlebar/title_bar_buttons.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/webengine/__init__.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/windows/__init__.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/windows/c_structures.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/windows/window_effect.py +0 -0
- {pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySide2-Frameless-Window
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A cross-platform frameless window based on pyside2, support Win32, Linux and macOS.
|
|
5
5
|
Home-page: https://github.com/zhiyiYo/PyQt-Frameless-Window/tree/Pyside2
|
|
6
6
|
Author: zhiyiYo
|
|
@@ -53,6 +53,7 @@ Requires-Dist: PyCocoa; platform_system == "Darwin"
|
|
|
53
53
|
* Win11 mica blur
|
|
54
54
|
* Win7 Aero blur
|
|
55
55
|
* MacOS blur
|
|
56
|
+
* Disable screen capture
|
|
56
57
|
|
|
57
58
|
## Install
|
|
58
59
|
To install use pip:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySide2-Frameless-Window
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A cross-platform frameless window based on pyside2, support Win32, Linux and macOS.
|
|
5
5
|
Home-page: https://github.com/zhiyiYo/PyQt-Frameless-Window/tree/Pyside2
|
|
6
6
|
Author: zhiyiYo
|
|
@@ -53,6 +53,7 @@ Requires-Dist: PyCocoa; platform_system == "Darwin"
|
|
|
53
53
|
* Win11 mica blur
|
|
54
54
|
* Win7 Aero blur
|
|
55
55
|
* MacOS blur
|
|
56
|
+
* Disable screen capture
|
|
56
57
|
|
|
57
58
|
## Install
|
|
58
59
|
To install use pip:
|
{pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/mac/__init__.py
RENAMED
|
@@ -34,7 +34,9 @@ class MacFramelessWindow(QWidget):
|
|
|
34
34
|
self.__nsWindow = view.window()
|
|
35
35
|
|
|
36
36
|
# hide system title bar
|
|
37
|
-
self.
|
|
37
|
+
isButtonVisible = self.isSystemButtonVisible()
|
|
38
|
+
self._hideSystemTitleBar()
|
|
39
|
+
self.setSystemTitleBarButtonVisible(isButtonVisible)
|
|
38
40
|
|
|
39
41
|
def setStayOnTop(self, isTop: bool):
|
|
40
42
|
""" set the stay on top status """
|
{pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/utils/__init__.py
RENAMED
|
@@ -4,12 +4,15 @@ import sys
|
|
|
4
4
|
if sys.platform == "win32":
|
|
5
5
|
from .win32_utils import WindowsMoveResize as MoveResize
|
|
6
6
|
from .win32_utils import getSystemAccentColor
|
|
7
|
+
from .win32_utils import WindowsScreenCaptureFilter as ScreenCaptureFilter
|
|
7
8
|
elif sys.platform == "darwin":
|
|
8
9
|
from .mac_utils import MacMoveResize as MoveResize
|
|
9
10
|
from .mac_utils import getSystemAccentColor
|
|
11
|
+
from .mac_utils import MacScreenCaptureFilter as ScreenCaptureFilter
|
|
10
12
|
else:
|
|
11
13
|
from .linux_utils import LinuxMoveResize as MoveResize
|
|
12
14
|
from .linux_utils import getSystemAccentColor
|
|
15
|
+
from .linux_utils import LinuxScreenCaptureFilter as ScreenCaptureFilter
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
def startSystemMove(window, globalPos):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
|
-
from PySide2.QtCore import QEvent, QPoint, Qt
|
|
2
|
+
from PySide2.QtCore import QEvent, QPoint, Qt, QObject
|
|
3
3
|
from PySide2.QtGui import QMouseEvent, QColor
|
|
4
|
-
from PySide2.QtWidgets import QApplication
|
|
4
|
+
from PySide2.QtWidgets import QApplication, QWidget
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class LinuxMoveResize:
|
|
@@ -53,4 +53,23 @@ def getSystemAccentColor():
|
|
|
53
53
|
color: QColor
|
|
54
54
|
accent color
|
|
55
55
|
"""
|
|
56
|
-
return QColor()
|
|
56
|
+
return QColor()
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class LinuxScreenCaptureFilter(QObject):
|
|
60
|
+
""" Filter for screen capture """
|
|
61
|
+
|
|
62
|
+
def __init__(self, parent: QWidget):
|
|
63
|
+
super().__init__(parent)
|
|
64
|
+
self.setScreenCaptureEnabled(False)
|
|
65
|
+
|
|
66
|
+
def eventFilter(self, watched, event):
|
|
67
|
+
if watched == self.parent():
|
|
68
|
+
if event.type() == QEvent.Type.WinIdChange:
|
|
69
|
+
self.setScreenCaptureEnabled(self.isScreenCaptureEnabled)
|
|
70
|
+
|
|
71
|
+
return super().eventFilter(watched, event)
|
|
72
|
+
|
|
73
|
+
def setScreenCaptureEnabled(self, enabled: bool):
|
|
74
|
+
""" Set screen capture enabled """
|
|
75
|
+
self.isScreenCaptureEnabled = enabled
|
|
@@ -3,7 +3,7 @@ from ctypes import c_void_p
|
|
|
3
3
|
|
|
4
4
|
import Cocoa
|
|
5
5
|
import objc
|
|
6
|
-
from PySide2.QtCore import qVersion
|
|
6
|
+
from PySide2.QtCore import qVersion, QEvent, QObject
|
|
7
7
|
from PySide2.QtGui import QColor
|
|
8
8
|
from PySide2.QtWidgets import QWidget
|
|
9
9
|
from Quartz.CoreGraphics import (CGEventCreateMouseEvent,
|
|
@@ -86,4 +86,29 @@ def getSystemAccentColor():
|
|
|
86
86
|
r = int(color.redComponent() * 255)
|
|
87
87
|
g = int(color.greenComponent() * 255)
|
|
88
88
|
b = int(color.blueComponent() * 255)
|
|
89
|
-
return QColor(r, g, b)
|
|
89
|
+
return QColor(r, g, b)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class MacScreenCaptureFilter(QObject):
|
|
93
|
+
""" Filter for screen capture """
|
|
94
|
+
|
|
95
|
+
def __init__(self, parent: QWidget):
|
|
96
|
+
super().__init__(parent)
|
|
97
|
+
self.setScreenCaptureEnabled(False)
|
|
98
|
+
|
|
99
|
+
def eventFilter(self, watched, event):
|
|
100
|
+
if watched == self.parent():
|
|
101
|
+
if event.type() == QEvent.Type.WinIdChange:
|
|
102
|
+
self.setScreenCaptureEnabled(self.isScreenCaptureEnabled)
|
|
103
|
+
|
|
104
|
+
return super().eventFilter(watched, event)
|
|
105
|
+
|
|
106
|
+
def setScreenCaptureEnabled(self, enabled: bool):
|
|
107
|
+
""" Set screen capture enabled """
|
|
108
|
+
self.isScreenCaptureEnabled = enabled
|
|
109
|
+
|
|
110
|
+
nsWindow = getNSWindow(self.parent().winId())
|
|
111
|
+
if nsWindow:
|
|
112
|
+
NSWindowSharingNone = 0
|
|
113
|
+
NSWindowSharingReadOnly = 1
|
|
114
|
+
nsWindow.setSharingType_(NSWindowSharingReadOnly if enabled else NSWindowSharingNone)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding:utf-8
|
|
2
|
-
from ctypes import Structure, byref, sizeof, windll, c_ulong, c_bool, POINTER
|
|
2
|
+
from ctypes import Structure, byref, sizeof, windll, c_ulong, c_bool, POINTER, WinDLL, wintypes
|
|
3
3
|
from ctypes.wintypes import DWORD, HWND, LPARAM, RECT, UINT
|
|
4
4
|
from platform import platform
|
|
5
5
|
import sys
|
|
@@ -9,8 +9,9 @@ import win32api
|
|
|
9
9
|
import win32con
|
|
10
10
|
import win32gui
|
|
11
11
|
import win32print
|
|
12
|
-
from PySide2.QtCore import QOperatingSystemVersion, QVersionNumber
|
|
12
|
+
from PySide2.QtCore import QOperatingSystemVersion, QObject, QEvent, QVersionNumber
|
|
13
13
|
from PySide2.QtGui import QGuiApplication, QColor
|
|
14
|
+
from PySide2.QtWidgets import QWidget
|
|
14
15
|
from PySide2.QtWinExtras import QtWin
|
|
15
16
|
from win32comext.shell import shellcon
|
|
16
17
|
|
|
@@ -337,3 +338,31 @@ class WindowsMoveResize:
|
|
|
337
338
|
window edges
|
|
338
339
|
"""
|
|
339
340
|
pass
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
class WindowsScreenCaptureFilter(QObject):
|
|
344
|
+
""" Filter for screen capture """
|
|
345
|
+
|
|
346
|
+
def __init__(self, parent: QWidget):
|
|
347
|
+
super().__init__(parent)
|
|
348
|
+
self.setScreenCaptureEnabled(False)
|
|
349
|
+
|
|
350
|
+
def eventFilter(self, watched, event):
|
|
351
|
+
if watched == self.parent():
|
|
352
|
+
if event.type() == QEvent.Type.WinIdChange:
|
|
353
|
+
self.setScreenCaptureEnabled(self.isScreenCaptureEnabled)
|
|
354
|
+
|
|
355
|
+
return super().eventFilter(watched, event)
|
|
356
|
+
|
|
357
|
+
def setScreenCaptureEnabled(self, enabled: bool):
|
|
358
|
+
""" Set screen capture enabled """
|
|
359
|
+
self.isScreenCaptureEnabled = enabled
|
|
360
|
+
WDA_NONE = 0x00000000
|
|
361
|
+
WDA_EXCLUDEFROMCAPTURE = 0x00000011
|
|
362
|
+
|
|
363
|
+
user32 = WinDLL('user32', use_last_error=True)
|
|
364
|
+
SetWindowDisplayAffinity = user32.SetWindowDisplayAffinity
|
|
365
|
+
SetWindowDisplayAffinity.argtypes = (wintypes.HWND, wintypes.DWORD)
|
|
366
|
+
SetWindowDisplayAffinity.restype = wintypes.BOOL
|
|
367
|
+
|
|
368
|
+
SetWindowDisplayAffinity(int(self.parent().winId()), WDA_NONE if enabled else WDA_EXCLUDEFROMCAPTURE)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/_rc/__init__.py
RENAMED
|
File without changes
|
{pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/_rc/resource.py
RENAMED
|
File without changes
|
{pyside2_frameless_window-0.5.0 → pyside2_frameless_window-0.6.0}/qframelesswindow/linux/__init__.py
RENAMED
|
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
|