+
    i                     Z   ^ RI t ^ RIt^ RIHtHt ^ RIHt ^RIHt ^RI	H
t
 ^ RIHtHtHtHtHtHtHt  ! R R]P&                  ]4      tR	 t ! R
 R]
]P,                  ]4      t ! R R]P                  ]4      t ! R R]P2                  ]4      t]P6                   ! R R]4      4       tR# )    N)_apicbook)Gcf)_macosx)FigureCanvasAgg)_BackendFigureCanvasBaseFigureManagerBaseNavigationToolbar2ResizeEvent	TimerBase_allow_interruptc                       ] tR t^tRtRtR# )TimerMacz6Subclass of `.TimerBase` using CFRunLoop timer events. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       ڂ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/backends/backend_macosx.pyr   r      s    @r   r   c                 8    \        R \        P                  4      # )zEA context manager that allows terminating a plot by sending a SIGINT.c                 J    \         P                  ! V P                  4       4      # N)r   wake_on_fd_writefileno)rsocks   &r   <lambda>(_allow_interrupt_macos.<locals>.<lambda>   s    g..u||~>r   )r   r   stopr   r   r   _allow_interrupt_macosr#      s    >N Nr   c                      a a ] tR t^t oRt]t]P                  ! R 4      t	V 3R lt
V 3R ltR tR tR tRV 3R lltR	 tRR
 ltRtVtV ;t# )FigureCanvasMacmacosxc                    \         # r   )FigureManagerMacclss   &r   r    FigureCanvasMac.<lambda>(   s    3Cr   c                b   < \         SV `  VR 7       RV n        RV n        \	        4       V n        R# ))figureFN)super__init___draw_pending_is_drawingset_timers)selfr-   	__class__s   &&r   r/   FigureCanvasMac.__init__*   s,    '" ur   c                   < V P                   '       d   R# \        P                  ! V RR7      ;_uu_ 4        \        SV `  4        RRR4       V P                  4        R#   + '       g   i     L"; i)z/Render the figure and update the macosx canvas.NT)r1   )r1   r   _setattr_cmr.   drawupdate)r4   r5   s   &r   r9   FigureCanvasMac.draw1   sG     t66GLN 7 76s   AA/	c                    \        V R R4      '       g:   \        V RR4      '       g%   RV n        V P                  V P                  4       R# R# R# )r0   Fr1   TN)getattrr0   _single_shot_timer
_draw_idler4   s   &r   	draw_idleFigureCanvasMac.draw_idle;   sF    ou55mU33!%D ##DOO4	 4 6r   c                   a  V 3R lpS P                  ^ R7      pRVn        VP                  W!V4       S P                  P	                  V4       VP                  4        R# )z/Add a single shot timer with the given callbackc                 L   < V ! 4        SP                   P                  V4       R # r   )r3   remove)callbacktimerr4   s   &&r   callback_func9FigureCanvasMac._single_shot_timer.<locals>.callback_funcF   s    JLL&r   )intervalTN)	new_timersingle_shotadd_callbackr3   addstart)r4   rF   rH   rG   s   f&  r   r>   "FigureCanvasMac._single_shot_timerD   sM    	' * =E:r   c                    V P                  4       ;_uu_ 4        V P                  '       g    RRR4       R# RV n        V P                  4        RRR4       R#   + '       g   i     R# ; i)z
Draw method for singleshot timer

This draw method can be added to a singleshot timer, which can
accumulate draws while the eventloop is spinning. This method will
then only draw the first time and short-circuit the others.
NF)_idle_draw_cntxr0   r9   r@   s   &r   r?   FigureCanvasMac._draw_idleO   sN     !!##%%% 	 $#
 "'DIIK $###s   AAA)	c                F   < \         SV `  V4       V P                  4        R # r   )r.   blitr:   )r4   bboxr5   s   &&r   rU   FigureCanvasMac.blit_   s    Tr   c                   V P                   P                  V P                  ,          pW,          pW#,          pV P                   P                  WR R7       \	        RV 4      P                  4        V P                  4        R# )F)forwardresize_eventN)r-   dpidevice_pixel_ratioset_size_inchesr   _processrA   )r4   widthheightscales   &&& r   resizeFigureCanvasMac.resized   s\    $"9"99##E5#AND)224r   c                    \        4       ;_uu_ 4        V P                  VR 7       RRR4       R#   + '       g   i     R# ; i))timeoutN)r#   _start_event_loop)r4   re   s   &&r   start_event_loop FigureCanvasMac.start_event_loopm   s-     $%%""7"3 &%%%s	   0A	)r0   r1   r3   r   )r   )r   r   r   r   required_interactive_frameworkr   
_timer_clsr   classpropertymanager_classr/   r9   rA   r>   r?   rU   rb   rg   r   __classdictcell____classcell__r5   __classdict__s   @@r   r%   r%      sP      &."J&&'CDM5	 
4 4r   r%   c                   8   a  ] tR t^tt o R tR tR tR tRtV t	R# )NavigationToolbar2Macc           	       a \         P                  ! R 4      o\        \        P                  !  w  r#rB\
        P                  P                  Y\        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      4       \        P                  ! W4       R# )imagesc              3   `   <"   T F#  qf   K  \        SV,          4      R,           x  K%  	  R # 5i)Nz.pdf)str).0
image_name	data_paths   & r   	<genexpr>1NavigationToolbar2Mac.__init__.<locals>.<genexpr>{   s-      K$/j 7#i*,-66$/s   .!.c              3   0   "   T F  qf   K  Vx  K  	  R # 5ir   r   )rw   tooltips   & r   rz   r{   }   s     Ig''s   
N)r   _get_data_pathzipr   	toolitemsr   r/   tuple)r4   canvas_tooltipsimage_namesry   s   &&   @r   r/   NavigationToolbar2Mac.__init__v   s    ((2	&)+=+G+G&H#[""++E K$/KEE K$/K KEIIEEIII		K
 	##D1r   c                    V P                   P                  \        V4      \        V4      \        V4      \        V4      4       R # r   )r   set_rubberbandint)r4   eventx0y0x1y1s   &&&&&&r   draw_rubberband%NavigationToolbar2Mac.draw_rubberband   s*    ""3r7CGSWc"gFr   c                :    V P                   P                  4        R # r   )r   remove_rubberbandr@   s   &r   r   'NavigationToolbar2Mac.remove_rubberband   s    %%'r   c                   \         P                  P                  \        P                  R ,          4      p\
        P                  ! RVV P                  P                  4       4      pVf   R# \        P                  R ,          '       d1   \         P                  P                  V4      \        P                  R &   V P                  P                  P                  V4       V# )zsavefig.directoryzSave the figureN)ospath
expandusermplrcParamsr   choose_save_filer   get_default_filenamedirnamer-   savefig)r4   args	directoryfilenames   &*  r   save_figure!NavigationToolbar2Mac.save_figure   s    GG&&s||4G'HI	++,=,5,0KK,L,L,NP <<+,,020ICLL,-""8,r   r   N)
r   r   r   r   r/   r   r   r   r   rm   )rp   s   @r   rr   rr   t   s     2G( r   rr   c                   X   a a ] tR t^t o]tR tR tV 3R lt]	R 4       t
R tRtVtV ;t# )r(   c                &   R V n         \        P                  P                  W4       \	        \
        P                  ! R4      4      p\        P                  P                  V4       \        P                  ! WV4       V P                  \        P                  R,          4       V P                  e   V P                  P                  4        \        P                  ! 4       '       d-   V P                  4        V P                   P#                  4        R# R# )Fzimages/matplotlib.pdfzmacosx.window_modeN)_shownr   FigureManagerr/   rv   r   r~   set_iconr
   _set_window_moder   r   toolbarr:   is_interactiveshowr   rA   )r4   r   num	icon_paths   &&& r   r/   FigureManagerMac.__init__   s    &&t4,,-DEF	&&y1""45cll+?@A<<#LL!IIKKK!!#  r   c                f    \         P                  ! V 4       V P                  P                  4        R # r   )r   destroyr   flush_eventsr@   s   &r   _close_button_pressed&FigureManagerMac._close_button_pressed   s    D  "r   c                   < V P                   P                  '       d7   V P                   P                  P                  4       pVP                  4        KR  \        SV `  4        R # r   )r   r3   popr"   r.   r   )r4   rG   r5   s   & r   r   FigureManagerMac.destroy   s@     kk!!!KK''++-EJJLr   c                    \        4       ;_uu_ 4        \        P                  ! 4        R R R 4       R #   + '       g   i     R # ; ir   )r#   r   r   r)   s   &r   start_main_loop FigureManagerMac.start_main_loop   s%     $%%LLN &%%%s	   3A	c                6   V P                   P                  P                  '       d   V P                   P                  4        V P                  '       g   V P                  4        R V n        \        P                  R,          '       d   V P                  4        R# R# )Tzfigure.raise_windowN)	r   r-   stalerA   r   _showr   r   _raiser@   s   &r   r   FigureManagerMac.show   s_    ;;###KK!!#{{{JJLDK<<-..KKM /r   )r   )r   r   r   r   rr   _toolbar2_classr/   r   r   classmethodr   r   r   rm   rn   ro   s   @@r   r(   r(      s7     +O$#  
 r   r(   c                   6    ] tR t^t]t]t]P                  t	Rt
R# )_BackendMacr   N)r   r   r   r   r%   FigureCanvasr(   r   r   mainloopr   r   r   r   r   r      s    "L$M//Hr   r   )r   
matplotlibr   r   r   matplotlib._pylab_helpersr    r   backend_aggr   matplotlib.backend_basesr   r	   r
   r   r   r   r   Timerr   r#   r   r%   rr   r   r(   exportr   r   r   r   <module>r      s    	  " )  (. . .
Aw}}i A
NY4ow';';=M Y4xG668J @)w,,.? )X 
0( 0 0r   