desktop.cpython-312.pyc•5.76 kB
�
3�h� �
�, � d dl mZmZ d dlZd dlZd dlmZ d dlmZm Z m
Z
d dlmZ d dl
mZ d dlmZ d dlZd dlZ edd g�
� Zej) dee d�
� dee fd�� Zej- de ee
f d�
� ddedede ee
f fd�� Zy)� )� APIRouter�
HTTPExceptionN)�Image)�List�Dict�Any)�
ScreenInfoOut)�ContextMode)�RectRequestz/desktop�Desktop)�prefix�tagsz/screens�get_screen_info)�response_model�operation_id�returnc � � K � t j � D � cg c] } t di | j ���� }} |S c c} w �w)ay Get information about all connected screens/monitors.
Returns detailed information about each connected display including position,
resolution, and physical dimensions. This information is essential for
determining screenshot coordinates and understanding multi-monitor layouts.
Returns:
List of screen objects, each containing:
- x, y: Screen position in virtual desktop coordinates
- width, height: Screen resolution in pixels
- name: Display name/identifier
- is_primary: Boolean indicating if this is the primary display
- width_mm, height_mm: Physical dimensions in millimeters
Example:
For 3 horizontally aligned 1920x1080 screens:
- Screen 1: x=0, y=0, width=1920, height=1080
- Screen 2: x=1920, y=0, width=1920, height=1080
- Screen 3: x=3840, y=0, width=1920, height=1080
� )�
screeninfo�get_monitorsr �__dict__)�x�screenss �*B:\projects\desktop-mcp\app\api\desktop.pyr r s>