From 36fa2a33fc93585df5515a2dc3726fd7d6a1c1b5 Mon Sep 17 00:00:00 2001 From: Kalmat Date: Fri, 15 Sep 2023 22:15:39 +0200 Subject: [PATCH] ALL: Renamed findMonitors() and findMonitorsInfo to findMonitorsAtPoint() and findMonitorsAtPointInfo(). Added findMonitorWithName() and findMonitorWithNameInfo() --- dist/PyMonCtl-0.6-py3-none-any.whl | Bin 85714 -> 85928 bytes src/pymonctl/__init__.py | 6 ++-- src/pymonctl/_main.py | 50 ++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/dist/PyMonCtl-0.6-py3-none-any.whl b/dist/PyMonCtl-0.6-py3-none-any.whl index 3beab4ec2755a4f893143a876854014ce85d5c35..6a545f5402526c52bbb2dbaad97a5d1b917e73d6 100644 GIT binary patch delta 9762 zcmZ8{Wl){Xvi07$2X}XO*Py}OEgQE$fZ&n`cX#*T?k>UIT@y4&aJTP0=hQu4-P=_? zJyX59XMS~0&8)d>*wS3s+VKoD_*^y}hv2v#7AO!12QG0ngBVbXU1LWNIgh_0D_(`3 zAv`K8kJGmqzpGXMQ()iXUCL;lAXmG$GD605RP$Mg;|qeav+T>%gwUIp!`5V#_B9LE z_3P|uk!&JST6eAlD>7|4tgeQ#m^Y2moOwfj)>qyO*tcTDR=SFr4d?EJ0D>|XnWr(5 zaV1riIdy%fxg{WCQIq7g)VzTI$3{kzxhR86_`qLjhH0mAY#f}s;<^OwU47nuJk1Qb zUx4IN8$Rr&v(Fmd0^|fqukWU5Q^pQGF@jL-bfNuB~qNX!&L zLqC@cG(QB8;ngN5bWCiI{e~(2EKbyffHi5TVU|1taYJa+8gms&_hU9W!=*?Gkz_$0 zj|X8X*)jlHsD-m82V4EtFq+;5?yuPvCsl-I_*Mk9m|F+XBRuWWaJx3Vk288|9SQ2A zgqE2Z?GBY&3KkF_L_~i(Yr-?AbQ#3npoTwU7|ODWH+&D27ZVeI>8dywc~>t(L@s_7 z8Jr@(c;+=vllU_oZy*|R9S)K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fAc3K!Bw!sRUX%;yf{;Yp!w`V%GO2KkM&F!@v|rnr}8{I=79yt zO!WDq!4mRv0i=vFmFQ4C0GwpMRt%|7ZS_Z;eGQlxMoyl(e}t}ar}j7o-cFnq3$;oo zfg}uMAtQGo@Ex@iuiijYOmnNB-v`81+*eOu3c9*iUQS=|=5{5ifnJKT!T2yKPeO}e z0<)Uaw8Ja}jl{VJwZnvL*t)WmnLB2|gW@>VQQeat>6@L{WK?ReP%N#HI;!v?$}>w5 zRF<);9ww4c?WMZ$p*?-O!Z{uz76vGO?Z<*%!^X6jRRM22+8atjddXNeQ;|7GrMwq? zHN53h5atYDze`6^(uF?33(@73_?AqZ%{*;<*X6k2#fswMfj~Xu_T&1ZHl8Nnj`FIW zMMe2Ta5Il&xXLb&oOoyFj$CbwTT#fA#>a!e_%KN&o9*v;hDJ{;&M6Zwe?q{g3oq4#)<{3P$rOQjU`PcZ&Ob<~@E2OM{s*f5 zFSPjw*V+FA^A&)Y|CFu&ps)CU;H3f(jpSc|OtfHh!}z-ww7-q=zxIX!CRGHo{~ytR aMbZC9)DU3tPlOMSQUqed str: return ("" if numberOnly else "PyMonCtl-")+__version__ -from ._main import (getAllMonitors, getAllMonitorsDict, getMonitorsCount, getPrimary, findMonitor, findMonitorInfo, +from ._main import (getAllMonitors, getAllMonitorsDict, getMonitorsCount, getPrimary, + findMonitorsAtPoint, findMonitorsAtPointInfo, findMonitorWithName, findMonitorWithNameInfo, arrangeMonitors, getMousePos, Monitor, enableUpdateInfo, disableUpdateInfo, isUpdateInfoEnabled, isWatchdogEnabled, updateWatchdogInterval, plugListenerRegister, plugListenerUnregister, isPlugListenerRegistered, diff --git a/src/pymonctl/_main.py b/src/pymonctl/_main.py index 36233d2..f1e0d89 100644 --- a/src/pymonctl/_main.py +++ b/src/pymonctl/_main.py @@ -49,7 +49,7 @@ def getAllMonitorsDict() -> dict[str, ScreenValue]: Values: "system_name": display name as returned by the system (in macOS, the name can be duplicated!) - "handle": + "id": display handle according to each platform/OS "is_primary": ''True'' if monitor is primary (shows clock and notification area, sign in, lock, CTRL+ALT+DELETE screens...) @@ -95,28 +95,62 @@ def getPrimary() -> Monitor: return _getPrimary() -def findMonitor(x: int, y: int) -> List[Monitor]: +def findMonitorsAtPoint(x: int, y: int) -> List[Monitor]: """ - Get monitor instance in which given coordinates (x, y) are found. + Get all Monitor class instances in which given coordinates (x, y) are found. - :return: Monitor instance or None + :param x: target X coordinate + :param y: target Y coordinate + :return: List of Monitor instances or empty """ return _findMonitor(x, y) -def findMonitorInfo(x: int, y: int) -> dict[str, ScreenValue]: +def findMonitorsAtPointInfo(x: int, y: int) -> List[dict[str, ScreenValue]]: """ - Get monitor info in which given coordinates (x, y) are found. + Get all monitors info in which given coordinates (x, y) are found. - :return: monitor info (see getAllMonitorsDict() doc) as dictionary, or empty + :param x: target X coordinate + :param y: target Y coordinate + :return: list of monitor info (see getAllMonitorsDict() doc) as a list of dicts, or empty """ - info: dict[str, ScreenValue] = {} + info: List[dict[str, ScreenValue]] = [{}] monitors = getAllMonitorsDict() for monitor in monitors.keys(): pos = monitors[monitor]["position"] size = monitors[monitor]["size"] if _pointInBox(x, y, pos.x, pos.y, size.width, size.height): + info.append({monitor: monitors[monitor]}) + return info + + +def findMonitorWithName(name: str) -> Optional[Monitor]: + """ + Get the Monitor class instance which name matches given name. + + :param name: target monitor name + :return: Monitor or None if not found + """ + monitors = getAllMonitorsDict() + for monitor in monitors.keys(): + if monitor == name: + return Monitor(monitors[monitor]["id"]) + return None + + +def findMonitorWithNameInfo(name: str) -> dict[str, ScreenValue]: + """ + Get monitor instance which name matches given name. + + :param name: target monitor name + :return: monitor info (see getAllMonitorsDict() doc) as dict, or empty + """ + info: dict[str, ScreenValue] = {} + monitors = getAllMonitorsDict() + for monitor in monitors.keys(): + if monitor == name: info[monitor] = monitors[monitor] + break return info