Sindbad~EG File Manager
�
&ٜg� � �R � d dl Z d dlZd� Zd� Zd� Zd� Zd� Zd� Zd� Z G d � d
� Z y)� Nc � � t j t j t j z t j � } | D �cg c]8 }|t j
�d|j
t j d� ����: c}S c c}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�getAllTitlesr s� � �
�/�/��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 �, � t j t j t j z t j � } | D ]B }|d dk( s�|t j
�d|j
t j d� ��c S t d� �)z7Returns a Window object of the currently active Window.�kCGWindowLayerr r r z Could not find an active window.) r r r r
r r r
r � Exceptionr s r �getActiveWindowr s� � � �/�/��0Z�0Z�]c� ^D� ^D� 1D� FL� F\� F\� ]�G����� �A�%�!�&�";�";�<�c�g�g�f�FZ�FZ�\^�>_�`�`� � �6�
7�7� c
� � t j t j t j z t j � }g }|D ]s }|d }t j | ||d |d |d |d � s�/|j |t j �d|j t j d� ��� �u |S )N�kCGWindowBounds�X�Y�Width�Heightr r )r r r r
r �pygetwindow�pointInRect�appendr r
r )�x�yr �matchesr �ws r �getWindowsAtr&