ScreenMagnifier 1.11.0.post8__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.

Potentially problematic release.


This version of ScreenMagnifier might be problematic. Click here for more details.

Files changed (117) hide show
  1. ScreenMagnifier/__init__.py +68 -0
  2. ScreenMagnifier/__main__.py +17 -0
  3. ScreenMagnifier/advancedoverlay.py +593 -0
  4. ScreenMagnifier/advancedpanel.py +521 -0
  5. ScreenMagnifier/analysiscontroller.py +533 -0
  6. ScreenMagnifier/analysisserver.py +404 -0
  7. ScreenMagnifier/colordetector/__init__.py +28 -0
  8. ScreenMagnifier/colordetector/colordetector.py +570 -0
  9. ScreenMagnifier/colordetector/core.py +434 -0
  10. ScreenMagnifier/colordetector/main.py +23 -0
  11. ScreenMagnifier/colordetector/mainwindow.py +182 -0
  12. ScreenMagnifier/colorpanel.py +424 -0
  13. ScreenMagnifier/colorswatches/__init__.py +16 -0
  14. ScreenMagnifier/colorswatches/colorswatches.py +316 -0
  15. ScreenMagnifier/colorswatches/main.py +23 -0
  16. ScreenMagnifier/colorswatches/mainwindow.py +60 -0
  17. ScreenMagnifier/controlpanel.py +234 -0
  18. ScreenMagnifier/detectionpanel.py +790 -0
  19. ScreenMagnifier/facedetector/__init__.py +24 -0
  20. ScreenMagnifier/facedetector/core.py +314 -0
  21. ScreenMagnifier/facedetector/facedetector.py +288 -0
  22. ScreenMagnifier/facedetector/main.py +23 -0
  23. ScreenMagnifier/facedetector/mainwindow.py +122 -0
  24. ScreenMagnifier/facedetector/models/__init__.py +4 -0
  25. ScreenMagnifier/facepointer.py +1121 -0
  26. ScreenMagnifier/features.py +50 -0
  27. ScreenMagnifier/hotkeys/__init__.py +16 -0
  28. ScreenMagnifier/hotkeys/hotkeys.py +379 -0
  29. ScreenMagnifier/hotkeys/main.py +23 -0
  30. ScreenMagnifier/hotkeys/mainwindow.py +56 -0
  31. ScreenMagnifier/imagefilters/__init__.py +24 -0
  32. ScreenMagnifier/imagefilters/core.py +172 -0
  33. ScreenMagnifier/imagefilters/imagefilters.py +220 -0
  34. ScreenMagnifier/imagefilters/main.py +23 -0
  35. ScreenMagnifier/imagefilters/mainwindow.py +120 -0
  36. ScreenMagnifier/magnifierview/__init__.py +16 -0
  37. ScreenMagnifier/magnifierview/magnifierview.py +1249 -0
  38. ScreenMagnifier/magnifierview/main.py +23 -0
  39. ScreenMagnifier/magnifierview/mainwindow.py +91 -0
  40. ScreenMagnifier/main.py +157 -0
  41. ScreenMagnifier/mainwindow.py +1368 -0
  42. ScreenMagnifier/mousecatcher/__init__.py +16 -0
  43. ScreenMagnifier/mousecatcher/main.py +23 -0
  44. ScreenMagnifier/mousecatcher/mainwindow.py +78 -0
  45. ScreenMagnifier/mousecatcher/mousecatcher.py +251 -0
  46. ScreenMagnifier/mousemove.py +259 -0
  47. ScreenMagnifier/netprotocol/__init__.py +25 -0
  48. ScreenMagnifier/netprotocol/main.py +23 -0
  49. ScreenMagnifier/netprotocol/mainwindow.py +91 -0
  50. ScreenMagnifier/netprotocol/netprotocol.py +372 -0
  51. ScreenMagnifier/netprotocol/wire.py +189 -0
  52. ScreenMagnifier/regionselector/__init__.py +16 -0
  53. ScreenMagnifier/regionselector/main.py +23 -0
  54. ScreenMagnifier/regionselector/mainwindow.py +70 -0
  55. ScreenMagnifier/regionselector/regionselector.py +549 -0
  56. ScreenMagnifier/remoteclient.py +636 -0
  57. ScreenMagnifier/resources/icon-128.png +0 -0
  58. ScreenMagnifier/resources/icon-16.png +0 -0
  59. ScreenMagnifier/resources/icon-24.png +0 -0
  60. ScreenMagnifier/resources/icon-256.png +0 -0
  61. ScreenMagnifier/resources/icon-32.png +0 -0
  62. ScreenMagnifier/resources/icon-48.png +0 -0
  63. ScreenMagnifier/resources/icon-512.png +0 -0
  64. ScreenMagnifier/resources/icon-64.png +0 -0
  65. ScreenMagnifier/resources/icon.icns +0 -0
  66. ScreenMagnifier/resources/icon.ico +0 -0
  67. ScreenMagnifier/screengrabber/__init__.py +16 -0
  68. ScreenMagnifier/screengrabber/main.py +23 -0
  69. ScreenMagnifier/screengrabber/mainwindow.py +79 -0
  70. ScreenMagnifier/screengrabber/screengrabber.py +558 -0
  71. ScreenMagnifier/server.py +150 -0
  72. ScreenMagnifier/serverpanel.py +379 -0
  73. ScreenMagnifier/shortcuteditor/__init__.py +16 -0
  74. ScreenMagnifier/shortcuteditor/main.py +23 -0
  75. ScreenMagnifier/shortcuteditor/mainwindow.py +54 -0
  76. ScreenMagnifier/shortcuteditor/shortcuteditor.py +411 -0
  77. ScreenMagnifier/shortcuts.py +118 -0
  78. ScreenMagnifier/shortcutspanel.py +140 -0
  79. ScreenMagnifier/support.py +127 -0
  80. ScreenMagnifier/translations/ar.json +387 -0
  81. ScreenMagnifier/translations/de.json +387 -0
  82. ScreenMagnifier/translations/es.json +387 -0
  83. ScreenMagnifier/translations/fr.json +387 -0
  84. ScreenMagnifier/translations/it.json +387 -0
  85. ScreenMagnifier/translations/ja.json +387 -0
  86. ScreenMagnifier/translations/ko.json +387 -0
  87. ScreenMagnifier/translations/pt_BR.json +387 -0
  88. ScreenMagnifier/translations/ru.json +387 -0
  89. ScreenMagnifier/translations/tr.json +387 -0
  90. ScreenMagnifier/translations/zh_CN.json +387 -0
  91. ScreenMagnifier/translator/__init__.py +16 -0
  92. ScreenMagnifier/translator/main.py +23 -0
  93. ScreenMagnifier/translator/mainwindow.py +62 -0
  94. ScreenMagnifier/translator/translator.py +284 -0
  95. ScreenMagnifier/upscaler/__init__.py +24 -0
  96. ScreenMagnifier/upscaler/core.py +315 -0
  97. ScreenMagnifier/upscaler/main.py +23 -0
  98. ScreenMagnifier/upscaler/mainwindow.py +128 -0
  99. ScreenMagnifier/upscaler/models/FSRCNN-small_x2.pb +0 -0
  100. ScreenMagnifier/upscaler/models/FSRCNN-small_x3.pb +0 -0
  101. ScreenMagnifier/upscaler/models/FSRCNN-small_x4.pb +0 -0
  102. ScreenMagnifier/upscaler/models/FSRCNN_x2.pb +0 -0
  103. ScreenMagnifier/upscaler/models/FSRCNN_x3.pb +0 -0
  104. ScreenMagnifier/upscaler/models/FSRCNN_x4.pb +0 -0
  105. ScreenMagnifier/upscaler/models/LICENSE-FSRCNN +201 -0
  106. ScreenMagnifier/upscaler/models/__init__.py +4 -0
  107. ScreenMagnifier/upscaler/upscaler.py +285 -0
  108. ScreenMagnifier/wincheck.py +65 -0
  109. ScreenMagnifier/zoomoverlay/__init__.py +16 -0
  110. ScreenMagnifier/zoomoverlay/main.py +23 -0
  111. ScreenMagnifier/zoomoverlay/mainwindow.py +99 -0
  112. ScreenMagnifier/zoomoverlay/zoomoverlay.py +1779 -0
  113. screenmagnifier-1.11.0.post8.dist-info/METADATA +591 -0
  114. screenmagnifier-1.11.0.post8.dist-info/RECORD +117 -0
  115. screenmagnifier-1.11.0.post8.dist-info/WHEEL +5 -0
  116. screenmagnifier-1.11.0.post8.dist-info/entry_points.txt +5 -0
  117. screenmagnifier-1.11.0.post8.dist-info/top_level.txt +1 -0
@@ -0,0 +1,65 @@
1
+ # coding=utf-8
2
+ """
3
+ Windows self-test for the in-game scope: run `python wincheck.py` and read (or send) the report.
4
+ Checks:
5
+ 1. Hiding a plain window from screen capture.
6
+ 2. Hiding a per-pixel-alpha window (WA_TranslucentBackground, what the lens used before).
7
+ 3. Hiding the real ZoomOverlay lens.
8
+ 4. Direct window capture (PrintWindow) of the window under the screen center.
9
+ """
10
+ from sys import path, platform
11
+ from os.path import dirname
12
+
13
+ if not __package__ and dirname(__file__) not in path:
14
+ path.append(dirname(__file__))
15
+
16
+ try:
17
+ from .zoomoverlay.zoomoverlay import winSetCaptureExcluded, ZoomOverlay
18
+ from .screengrabber import winWindowAt, winGrabWindowRect, isBlankImage
19
+ except:
20
+ from zoomoverlay.zoomoverlay import winSetCaptureExcluded, ZoomOverlay
21
+ from screengrabber import winWindowAt, winGrabWindowRect, isBlankImage
22
+
23
+
24
+ def runChecks():
25
+ """
26
+ :return: (list[str | unicode | QString]) Report lines.
27
+ """
28
+ from ManyQt.QtGui import QGuiApplication
29
+ from ManyQt.QtWidgets import QWidget
30
+ from ManyQt.QtCore import Qt, QRect
31
+ from sys import getwindowsversion
32
+ lines = [u'Platform: {} Windows build: {}'.format(
33
+ platform, getwindowsversion().build if platform == 'win32' else '-')] # type: list[str]
34
+ plain = QWidget() # type: QWidget
35
+ plain.resize(200, 120)
36
+ plain.show()
37
+ lines.append(u'1. plain window : {}'.format(winSetCaptureExcluded(plain, forceLayered=False)))
38
+ translucent = QWidget() # type: QWidget
39
+ translucent.setWindowFlags(Qt.FramelessWindowHint | Qt.Tool)
40
+ translucent.setAttribute(Qt.WA_TranslucentBackground, True)
41
+ translucent.resize(200, 120)
42
+ translucent.show()
43
+ lines.append(u'2. per-pixel alpha : {}'.format(winSetCaptureExcluded(translucent, forceLayered=False)))
44
+ lens = ZoomOverlay() # type: ZoomOverlay
45
+ lens.show()
46
+ lines.append(u'3. ZoomOverlay lens : {}'.format(winSetCaptureExcluded(lens)))
47
+ centre = QGuiApplication.primaryScreen().geometry().center()
48
+ hwnd = winWindowAt(centre)
49
+ if hwnd:
50
+ img, dpr = winGrabWindowRect(hwnd, QRect(centre.x() - 50, centre.y() - 50, 100, 100))
51
+ lines.append(u'4. window capture : hwnd=0x{:x} image={}x{} blank={}'.format(
52
+ hwnd, img.width(), img.height(), isBlankImage(img)))
53
+ else:
54
+ lines.append(u'4. window capture : no application window under the screen centre')
55
+ for w in (plain, translucent, lens):
56
+ w.close()
57
+ return lines
58
+
59
+
60
+ if __name__ == '__main__':
61
+ from ManyQt.QtWidgets import QApplication
62
+ from sys import argv
63
+
64
+ a = QApplication(argv) # type: QApplication
65
+ print('\n'.join(runChecks()))
@@ -0,0 +1,16 @@
1
+ # coding=utf-8
2
+ """
3
+ zoomoverlay package.
4
+ """
5
+ from os.path import dirname
6
+ from sys import path
7
+
8
+ if not __package__ and dirname(__file__) not in path:
9
+ path.append(dirname(__file__))
10
+
11
+ try:
12
+ from .zoomoverlay import ZoomOverlay
13
+ except:
14
+ from zoomoverlay import ZoomOverlay
15
+
16
+ __all__ = ['ZoomOverlay'] # type: list[str]
@@ -0,0 +1,23 @@
1
+ # coding=utf-8
2
+ """
3
+ Entry point for the ZoomOverlay demo.
4
+ """
5
+ from os.path import dirname
6
+ from sys import path
7
+
8
+ if not __package__ and dirname(__file__) not in path:
9
+ path.append(dirname(__file__))
10
+
11
+ try:
12
+ from .mainwindow import MainWindow
13
+ except:
14
+ from mainwindow import MainWindow
15
+
16
+ if __name__ == '__main__':
17
+ from ManyQt.QtWidgets import QApplication
18
+ from sys import argv, exit
19
+
20
+ a = QApplication(argv) # type: QApplication
21
+ w = MainWindow() # type: MainWindow
22
+ w.show()
23
+ exit(a.exec_())
@@ -0,0 +1,99 @@
1
+ # coding=utf-8
2
+ """
3
+ Demo window for ZoomOverlay: a click-through lens over the screen center, the cursor or a corner.
4
+ """
5
+ from ManyQt.QtWidgets import QMainWindow, QVBoxLayout, QHBoxLayout, QWidget, QPushButton, QComboBox, QSlider, QLabel
6
+ from ManyQt.QtGui import QImage, QPainter, QColor, QGuiApplication
7
+ from ManyQt.QtCore import Qt, QRect, QRectF, QTimer, pyqtSlot
8
+ from os.path import dirname
9
+ from sys import path
10
+
11
+ if not __package__ and dirname(__file__) not in path:
12
+ path.append(dirname(__file__))
13
+
14
+ try:
15
+ from .zoomoverlay import ZoomOverlay
16
+ except:
17
+ from zoomoverlay import ZoomOverlay
18
+
19
+
20
+ def grabGlobal(rect):
21
+ """
22
+ Minimal multiscreen grab of a global rect (the full version lives in the screengrabber package).
23
+ :param rect: QRect
24
+ :return: QImage
25
+ """
26
+ img = QImage(max(1, rect.width()), max(1, rect.height()), QImage.Format_RGB32) # type: QImage
27
+ img.fill(QColor(14, 15, 20))
28
+ p = QPainter(img) # type: QPainter
29
+ for s in QGuiApplication.screens():
30
+ inter = s.geometry().intersected(rect) # type: QRect
31
+ if inter.isEmpty():
32
+ continue
33
+ pm = s.grabWindow(0, inter.x() - s.geometry().x(), inter.y() - s.geometry().y(), inter.width(),
34
+ inter.height())
35
+ p.drawPixmap(QRectF(inter.translated(-rect.topLeft())), pm, QRectF(0, 0, pm.width(), pm.height()))
36
+ p.end()
37
+ return img
38
+
39
+
40
+ class MainWindow(QMainWindow):
41
+ """
42
+ MainWindow class.
43
+ """
44
+
45
+ def __init__(self, *args, **kwargs):
46
+ """
47
+ :param args: any
48
+ :param kwargs: any
49
+ """
50
+ super(MainWindow, self).__init__(*args, **kwargs)
51
+ self.setWindowTitle(self.tr(u'ZoomOverlay demo'))
52
+ self.resize(460, 200)
53
+ self.__m_overlay = ZoomOverlay(zoom=3.0, target=ZoomOverlay.Cursor, placement=ZoomOverlay.TopRight,
54
+ overlayToggled=self.onToggled) # type: ZoomOverlay
55
+ self.__m_timer = QTimer(self) # type: QTimer
56
+ self.__m_timer.timeout.connect(lambda: self.__m_overlay.setFrame(grabGlobal(self.__m_overlay.sourceRect())))
57
+ toggle = QPushButton(self.tr(u'Show / hide lens')) # type: QPushButton
58
+ toggle.clicked.connect(self.__m_overlay.toggle)
59
+ target = QComboBox() # type: QComboBox
60
+ target.addItems([self.tr(u'Screen centre'), self.tr(u'Pinned point'), self.tr(u'Mouse cursor')])
61
+ target.setCurrentIndex(int(ZoomOverlay.Cursor))
62
+ target.currentIndexChanged.connect(self.__m_overlay.setTarget)
63
+ placement = QComboBox() # type: QComboBox
64
+ placement.addItems([self.tr(u'On target'), self.tr(u'Top-left'), self.tr(u'Top-right'), self.tr(u'Bottom-left'),
65
+ self.tr(u'Bottom-right')])
66
+ placement.setCurrentIndex(int(ZoomOverlay.TopRight))
67
+ placement.currentIndexChanged.connect(self.__m_overlay.setPlacement)
68
+ zoom = QSlider(Qt.Horizontal) # type: QSlider
69
+ zoom.setRange(10, 160)
70
+ zoom.setValue(30)
71
+ zoom.valueChanged.connect(lambda v: self.__m_overlay.setZoom(v / 10.0))
72
+ row = QHBoxLayout() # type: QHBoxLayout
73
+ row.addWidget(target)
74
+ row.addWidget(placement)
75
+ wdg = QWidget() # type: QWidget
76
+ layout = QVBoxLayout(wdg) # type: QVBoxLayout
77
+ layout.addWidget(toggle)
78
+ layout.addLayout(row)
79
+ layout.addWidget(QLabel(self.tr(u'Magnification')))
80
+ layout.addWidget(zoom)
81
+ self.setCentralWidget(wdg)
82
+
83
+ @pyqtSlot(bool)
84
+ @pyqtSlot(int)
85
+ def onToggled(self, shown):
86
+ """
87
+ :param shown: bool
88
+ :return:
89
+ """
90
+ self.__m_timer.start(16) if shown else self.__m_timer.stop()
91
+
92
+ def closeEvent(self, e):
93
+ """
94
+ :param e: QCloseEvent
95
+ :return:
96
+ """
97
+ self.__m_overlay.hideOverlay()
98
+ self.__m_overlay.close()
99
+ super(MainWindow, self).closeEvent(e)