Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pygetwindow/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pygetwindow/__pycache__/_pygetwindow_macos.cpython-312.pyc

�

&ٜg���R�ddlZddlZd�Zd�Zd�Zd�Zd�Zd�Zd�ZGd	�d
�Z	y)�Nc	��tjtjtjztj�}|D�cgc]8}|tj
�d|j
tjd�����:c}Scc}w)zHReturns a list of strings of window titles for all visible windows.
    � ���Quartz�CGWindowListCopyWindowInfo�#kCGWindowListExcludeDesktopElements�kCGWindowListOptionOnScreenOnly�kCGNullWindowID�kCGWindowOwnerName�get�
kCGWindowName��windows�wins  �I/usr/local/lib/python3.12/site-packages/pygetwindow/_pygetwindow_macos.py�getAllTitlesrs���
�/�/��0Z�0Z�]c�^D�^D�1D�FL�F\�F\�]�G�el�m�el�^a�s�6�4�4�5�s�w�w�v�?S�?S�UW�7X�Y�el�m�m��ms�=Bc�,�tjtjtjztj�}|D]B}|ddk(s�|tj
�d|j
tjd���cStd��)z7Returns a Window object of the currently active Window.�kCGWindowLayerrrrz Could not find an active window.)	rrr	r
rrr
r�	Exceptionrs  r�getActiveWindowrs����/�/��0Z�0Z�]c�^D�^D�1D�FL�F\�F\�]�G����� �A�%�!�&�";�";�<�c�g�g�f�FZ�FZ�\^�>_�`�`���6�
7�7�c
��tjtjtjztj�}g}|D]s}|d}tj|||d|d|d|d�s�/|j|tj�d|jtjd�����u|S)N�kCGWindowBounds�X�Y�Width�Heightrr)rrr	r
r�pygetwindow�pointInRect�appendrr
r)�x�yr�matchesr�ws      r�getWindowsAtr&s����/�/��0Z�0Z�]c�^D�^D�1D�FL�F\�F\�]�G��G����!�"���"�"�1�a��3���3���7��Q�x�[�Q��N�N�c�&�*C�*C�&D�c�g�g�f�Nb�Nb�df�Fg�h�i���Nrc��y�N�r)rr�activater*$s��
	rc�:�tjtjtjztj�}|D]S}||tj
�d|j
tjd���vs�<|d}|d|d|d|dfcSy)Nrrrrrrrr)�titlerrr%s    r�getWindowGeometryr-,s����/�/��0Z�0Z�]c�^D�^D�1D�FL�F\�F\�]�G����s�6�#<�#<�=�s�w�w�v�G[�G[�]_�?`�a�a��%�&�A��c�F�A�c�F�A�g�J��(��<�<�rc��tjtjtjztj�}|D]D}||tj
�d|j
tjd���vs�<|ddk7cSy)Nrr�kCGWindowAlphagr)r,rrs   r�	isVisibler05s����/�/��0Z�0Z�]c�^D�^D�1D�FL�F\�F\�]�G����s�6�#<�#<�=�s�w�w�v�G[�G[�]_�?`�a�a��'�(�C�/�/�rc��yr(r)r)rr�isMinimizedr2<s��	rc��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zed��Zed��Zed��Zed��Zed��Zy)�MacOSWindowc���|�_�fd�}�fd�}�jt�}tj|j|j
|j|jz
|j|j
z
||���_y)Nc�<���jt�}|j�j_|j
�j_|j|jz
�j_|j|j
z
�j_
yr()�_getWindowRect�_hWnd�left�_rect�_left�top�_top�right�_width�bottom�_height)�attrName�r�selfs  �r�_onReadz%MacOSWindow.__init__.<locals>._onReadJsd����#�#�E�*�A� �v�v�D�J�J���e�e�D�J�J�O� !���!�&�&� 0�D�J�J��!"���A�E�E�!1�D�J�J�rc����j|j|j��j|j|j
�yr()�moveTor9r<�resizeTo�width�height)�oldBox�newBoxrDs  �r�	_onChangez'MacOSWindow.__init__.<locals>._onChangeQs/����K�K����V�Z�Z�0��M�M�&�,�,��
�
�6r)�onChange�onRead)	r8r7�pyrect�Rectr9r<r>r@r:)rD�hWndrErMrCs`    r�__init__zMacOSWindow.__init__Gsf�����
�	2�	7�
����&���[�[����������!�&�&�0@�!�(�(�Q�U�U�BR�]f�ov�[�w��
rc
��|jt�}|j|jz
}|j|j
z
}d|jj�d|j�d|j
�d|�d|�d|j�d�
S)N�<z left="z", top="z
", width="z", height="z
", title="z">)	r7r8r>r9r@r<�	__class__�__name__r,)rDrCrIrJs    r�__str__zMacOSWindow.__str__Xs�������&�����!�&�&� �����A�E�E�!��RV�R`�R`�Ri�Ri�kl�kq�kq�st�sx�sx�z�BH�JN�JT�JT�U�	Urc�N�|jj�d|j�d�S)Nz(hWnd=�))rVrWr8�rDs r�__repr__zMacOSWindow.__repr___s�� $��� 7� 7����D�Drc�X�t|t�xr|j|jk(Sr()�
isinstancer4r8)rD�others  r�__eq__zMacOSWindow.__eq__cs!���%��-�K�$�*�*����2K�Krc��t�)z�Closes this window. This may trigger "Are you sure you want to
        quit?" dialogs or other actions that prevent the window from
        actually closing. This is identical to clicking the X button on the
        window.��NotImplementedErrorr[s r�closezMacOSWindow.closegs
��
"�!rc��t�)zMinimizes this window.rbr[s r�minimizezMacOSWindow.minimizen���!�!rc��t�)zMaximizes this window.rbr[s r�maximizezMacOSWindow.maximizesrgrc��t�)zCIf maximized or minimized, restores the window to it's normal size.rbr[s r�restorezMacOSWindow.restorexrgrc��t�)z7Activate this window and make it the foreground window.rbr[s rr*zMacOSWindow.activate}rgrc��t�)z0Resizes the window relative to its current size.rb)rD�widthOffset�heightOffsets   r�	resizeRelzMacOSWindow.resizeRel�rgrc��t�)z-Resizes the window to a new width and height.rb)rD�newWidth�	newHeights   rrHzMacOSWindow.resizeTo�rgrc��t�)z2Moves the window relative to its current position.rb)rD�xOffset�yOffsets   r�moveRelzMacOSWindow.moveRel�rgrc��t�)z2Moves the window to new coordinates on the screen.rb)rD�newLeft�newTops   rrGzMacOSWindow.moveTo�rgrc��t�)z2Returns True if the window is currently minimized.rbr[s rr2zMacOSWindow.isMinimized��
��"�!rc��t�)z2Returns True if the window is currently maximized.rbr[s r�isMaximizedzMacOSWindow.isMaximized�r|rc��t�)zFReturns True if the window is currently the active, foreground window.rbr[s r�isActivezMacOSWindow.isActive�r|rc��t�)z%Returns the window title as a string.rbr[s rr,zMacOSWindow.title�r|rc��t�r(rbr[s r�visiblezMacOSWindow.visible�rgrN)rW�
__module__�__qualname__rSrXr\r`rdrfrirkr*rprHrwrG�propertyr2r~r�r,r�r)rrr4r4Fs���x�"U�E�L�"�"�
"�
"�
"�
"�
"�
"�
"�
�"��"��"��"��"��"��"��"��"��"rr4)
rrrrr&r*r-r0r2r4r)rr�<module>r�s;��
��n�8��	�=�0�	�f"�f"r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists