+
    Si                    p  a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIHtHtH	t	H
t
HtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHtHt ]'       d	   ^ R	IHtHt R(tRt ^t!^t"^t#]!]#,          ]",          t$R R lt% ! R R]4      t& ! R R]4      t' ! R R]4      t(/ RR].]3bRR].](3bRR].]
3bRR].]3bRR].]3bRR].]3bRR].]3bRR]]! ]4      ]! ]4      .]3bRR].])3bRR].])3bRR].]3bR R].])3bR!R].])3bR"R](.](3bR#R](](.](3bR$R](]]].]3bt*R%]+R&&    ! R' R
]4      t,R# ))zXThis is part of the MSS Python's module.
Source: https://github.com/BoboTiG/python-mss.
)annotationsN)	POINTER	Structurec_doublec_floatc_int32c_ubytec_uint32c_uint64c_void_p)mac_ver)TYPE_CHECKINGAny)MSSBase)ScreenShotError)
ScreenShotSize)
CFunctionsMonitorMSSgRQ$@c                   V ^8  d   QhRR/# )   returnztype[c_double | c_float] )formats   "P/Users/mibo/.openclaw/workspace/.venv/lib/python3.14/site-packages/mss/darwin.py__annotate__r       s     8 8) 8    c                 D    \         P                  R8  d   \        # \        # )z&Get the appropriate value for a float.l        )sysmaxsizer   r   r   r   r   cgfloatr!       s    {{U*877r   c                  J    ] tR t^%tRtR]! 4       3R]! 4       33tR R ltRtR# )CGPointz3Structure that contains coordinates of a rectangle.xyc                   V ^8  d   QhRR/# r   r   strr   )r   s   "r   r   CGPoint.__annotate__*   s     D D# Dr   c                	f    \        V 4      P                   R V P                   RV P                   R2# )z(left=z top=))type__name__r$   r%   selfs   &r   __repr__CGPoint.__repr__*   s.    t*%%&fTVVHE$&&CCr   r   N	r-   
__module____qualname____firstlineno____doc__r!   _fields_r0   __static_attributes__r   r   r   r#   r#   %   s)    =gi 3	"23HD Dr   r#   c                  J    ] tR t^.tRtR]! 4       3R]! 4       33tR R ltRtR# )CGSizez3Structure that contains dimensions of an rectangle.widthheightc                   V ^8  d   QhRR/# r'   r   )r   s   "r   r   CGSize.__annotate__3   s     Q Q# Qr   c                	f    \        V 4      P                   R V P                   RV P                   R2# )z(width=z height=r+   )r,   r-   r;   r<   r.   s   &r   r0   CGSize.__repr__3   s.    t*%%&gdjj\$++aPPr   r   Nr2   r   r   r   r:   r:   .   s)    =')$x&;<HQ Qr   r:   c                  6    ] tR t^7tRtR]3R]33tR R ltRt	R# )CGRectz6Structure that contains information about a rectangle.originsizec                   V ^8  d   QhRR/# r'   r   )r   s   "r   r   CGRect.__annotate__<   s     C C# Cr   c                	f    \        V 4      P                   R V P                   RV P                   R2# )< >)r,   r-   rC   rD   r.   s   &r   r0   CGRect.__repr__<   s.    t*%%&a}Adii[BBr   r   N)
r-   r3   r4   r5   r6   r#   r:   r7   r0   r8   r   r   r   rB   rB   7   s%    @7#ff%56HC Cr   rB   CGDataProviderCopyDatacoreCGDisplayBoundsCGDisplayRotationCFDataGetBytePtrCFDataGetLength	CFReleaseCGDataProviderReleaseCGGetActiveDisplayListCGImageGetBitsPerPixelCGImageGetBytesPerRowCGImageGetDataProviderCGImageGetHeightCGImageGetWidthCGRectStandardizeCGRectUnionCGWindowListCreateImager   
CFUNCTIONSc                  v   a  ] tR t^ZtRtRR0tR V 3R lltR R ltR R	 ltR
 R lt	R R lt
R R ltRtV ;t# )r   z]Multiple ScreenShots implementation for macOS.
It uses intensively the CoreGraphics library.
rM   max_displaysc                    V ^8  d   QhRRRR/# )r   kwargsr   r   Noner   )r   s   "r   r   MSS.__annotate__a   s      C D r   c                  < \         SV `  ! R/ VB  VP                  R^ 4      V n        V P	                  4        V P                  4        R# )zMacOS initialisations.r_   Nr   )super__init__getr_   _init_library_set_cfunctions)r/   ra   	__class__s   ",r   rf   MSS.__init__a   s>    "6""JJ~r:r   c                   V ^8  d   QhRR/# r   r   rb   r   )r   s   "r   r   rc   j   s     : :t :r   c                P   \        RP                  \        4       ^ ,          P                  R4      R,          4      4      pV\        8  d!   \
        P                  P                  R4      pMRpV'       g   Rp\        V4      h\
        P                  P                  V4      V n        R# )zLoad the CoreGraphics library..:Nr   NCoreGraphicszO/System/Library/Frameworks/CoreGraphics.framework/Versions/Current/CoreGraphicszNo CoreGraphics library found.N)floatjoinr   splitMAC_VERSION_CATALINActypesutilfind_libraryr   cdllLoadLibraryrM   )r/   versioncoregraphicsmsgs   &   r   rh   MSS._init_libraryj   sy    1!3!3C!8!<=>))!;;33NCL mL2C!#&&KK++L9	r   c                   V ^8  d   QhRR/# rm   r   )r   s   "r   r   rc   x   s     ; ; ;r   c                    V P                   pRV P                  /p\        P                  4        F  w  pw  rEpV! W$,          W5V4       K  	  R# )z7Set all ctypes functions and attach them to attributes.rM   N)	_cfactoryrM   r]   items)r/   cfactoryattrsfuncattrargtypesrestypes   &      r   ri   MSS._set_cfunctionsx   sE    >>#/9/?/?/A+D+47U[$': 0Br   c                   V ^8  d   QhRR/# rm   r   )r   s   "r   r   rc      s     -
 -
 -
r   c                   \         pV P                  p\        4       pV P                  P	                  / 4       \        ^ 4      p\
        V P                  ,          ! 4       pVP                  V P                  V\        P                  ! V4      4       \        VP                  4       F  pWV,          pVP                  V4      pVP                  V4      pVP                  P                  VP                  P                   rVP#                  V4      R9   d   YrV P                  P	                  RV! VP$                  P&                  4      RV! VP$                  P(                  4      RV! V	4      RV! V
4      /4       VP+                  W84      pK  	  RV! VP$                  P&                  4      RV! VP$                  P(                  4      RV! VP                  P                  4      RV! VP                  P                   4      /V P                  ^ &   R# )z;Get positions of monitors. It will populate self._monitors.lefttopr;   r<   N>        V@     V)intrM   rB   	_monitorsappendr	   r_   rT   ru   byrefrangevaluerN   rZ   rD   r;   r<   rO   rC   r$   r%   r[   )r/   int_rM   all_monitorsdisplay_countactive_displaysidxdisplayrectr;   r<   s   &          r   _monitors_implMSS._monitors_impl   s   yy
 xb! !#d&7&77:##D$5$5UbHcd,,-C%*G''0D))$/D IIOOTYY-=-=6
 %%g.-? &vNN!!D/4.T%[d6l	  ++L?L- .4 D,,../4++--.T,++112d<,,334	
qr   c                    V ^8  d   QhRRRR/# )r   monitorr   r   r   r   )r   s   "r   r   rc      s     'G 'G' 'G 'Gr   c               >   V P                   p\        VR,          VR,          3VR,          VR,          34      pVP                  V^^ \        4      pV'       g   Rp\	        V4      hVP                  V4      pVP                  V4      pR;r VP                  V4      pVP                  V4      p	VP                  V	4      p
VP                  V	4      p\        P                  ! V
\        \        V,          4      4      p\        VP                   4      pVP#                  V4      pVP%                  V4      pV^,           ^,          pW,          V8w  dK   \        4       p\'        V4       F/  pVV,          pVWo,          ,           pVP)                  VVV 4       K1  	  TpV'       d   VP+                  V4       V	'       d   VP-                  V	4       T P/                  Y\1        Yg4      R7      #   T'       d   TP+                  T4       T	'       d   TP-                  T	4       i i ; i)z:Retrieve all pixels from a monitor. Pixels have to be RGB.r   r   r;   r<   z.CoreGraphics.CGWindowListCreateImage() failed.N)rD   )rM   rB   r\   IMAGE_OPTIONSr   rY   rX   rW   rL   rP   rQ   ru   castr   r   	bytearraycontentsrV   rU   r   extendrS   rR   	cls_imager   )r/   r   rM   r   	image_refr|   r;   r<   prov	copy_datadata_refbuf_lenrawdatabytes_per_rowbytes_per_pixelcroppedrowstartends   ""                  r   
_grab_implMSS._grab_impl   s   yywv7'':JGT\L]9^_00q!]K	BC!#&&$$Y/&&y1	*..y9D33D9I,,Y7H**95G++h'0A(BCCS\\*D !66yAM"99)DO.2q8O&-7#+ =C-/E%"99CNN4c?3 ) **40y)~~d$u2E~FF **40y) s   DG' '!H	Hc                   V ^8  d   QhRR/# )r   r   zScreenShot | Noner   )r   s   "r   r   rc      s      / r   c                    R# )z0Retrieve all cursor data. Pixels have to be RGB.Nr   r.   s   &r   _cursor_implMSS._cursor_impl   s    r   )rM   r_   )r-   r3   r4   r5   r6   	__slots__rf   rh   ri   r   r   r   r8   __classcell__)rj   s   @r   r   r   Z   s?     (I :;-
^'GR r   )r   )-__conditional_annotations__r6   
__future__r   ru   ctypes.utilr   r   r   r   r   r   r   r	   r
   r   platformr   typingr   r   mss.baser   mss.exceptionr   mss.screenshotr   r   
mss.modelsr   r   __all__rt   !kCGWindowImageBoundsIgnoreFramingkCGWindowImageNominalResolutionkCGWindowImageShouldBeOpaquer   r!   r#   r:   rB   r   r]   __annotations__r   )r   s   @r   <module>r      s   #   
 h h h  %  ) +.
 $* !"( % 14PPSrr8
Di DQY QCY Cvz8< 
F3 &8*g6	
 (X6 
H5 &8*h/ fxj(; v'(2CWXEV'WY`a vz37 fxj#6 vz8< (S1 
C0 &6(F3  FVV,f5!" 8X(NPXY#
J *' r   