
    Zg	                    v    S r SSKJr  SSKJrJrJr  SSKJr  SSK	J
r
  \(       a  SSKJr  S/r " S S\
5      rg	)
z"API for working with Nvim windows.    )annotations)TYPE_CHECKINGTuplecast)Buffer)Remote)TabpageWindowc                  H   \ rS rSrSrSr\SS j5       r\SS j5       r\R                  SS j5       r\SS j5       r
\
R                  SS j5       r
\SS	 j5       r\R                  SS
 j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       rSrg)r
      zA remote Nvim window.	nvim_win_c                $    U R                  S5      $ )z9Get the `Buffer` currently being displayed by the window.nvim_win_get_bufrequestselfs    3/usr/lib/python3/dist-packages/pynvim/api/window.pybufferWindow.buffer   s     ||.//    c                l    [        [        [        [        4   [        U R	                  S5      5      5      $ )z:Get the (row, col) tuple with the current cursor position.nvim_win_get_cursor)r   r   inttupler   r   s    r   cursorWindow.cursor   s(     E#s(OU4<<8M+N%OPPr   c                &    U R                  SU5      $ )z4Set the (row, col) tuple as the new cursor position.nvim_win_set_cursorr   )r   poss     r   r   r   !   s     ||1377r   c                $    U R                  S5      $ )zGet the window height in rows.nvim_win_get_heightr   r   s    r   heightWindow.height&        ||122r   c                &    U R                  SU5      $ )Set the window height in rows.nvim_win_set_heightr   )r   r#   s     r   r#   r$   +   s     ||16::r   c                $    U R                  S5      $ )zGet the window width in rows.nvim_win_get_widthr   r   s    r   widthWindow.width0   s     ||011r   c                &    U R                  SU5      $ )r'   nvim_win_set_widthr   )r   r+   s     r   r+   r,   5   s     ||0%88r   c                *    U R                  S5      S   $ )z;0-indexed, on-screen window position(row) in display cells.nvim_win_get_positionr   r   r   s    r   row
Window.row:        ||34Q77r   c                *    U R                  S5      S   $ )z;0-indexed, on-screen window position(col) in display cells.r0      r   r   s    r   col
Window.col?   r3   r   c                $    U R                  S5      $ )z+Get the `Tabpage` that contains the window.nvim_win_get_tabpager   r   s    r   tabpageWindow.tabpageD   s     ||233r   c                $    U R                  S5      $ )z'Return True if the window still exists.nvim_win_is_validr   r   s    r   validWindow.validI   s     ||/00r   c                $    U R                  S5      $ )zGet the window number.nvim_win_get_numberr   r   s    r   numberWindow.numberN   r%   r    N)returnr   )rE   Tuple[int, int])r    rF   rE   None)rE   r   )r#   r   rE   rG   )r+   r   rE   rG   )rE   r	   )rE   bool)__name__
__module____qualname____firstlineno____doc___api_prefixpropertyr   r   setterr#   r+   r1   r6   r:   r>   rB   __static_attributes__rD   r   r   r
   r
      s   K0 0 Q Q ]]8 8 3 3 ]]; ; 2 2 \\9 9 8 8 8 8 4 4 1 1 3 3r   N)rM   
__future__r   typingr   r   r   pynvim.api.bufferr   pynvim.api.commonr   pynvim.api.tabpager	   __all__r
   rD   r   r   <module>rX      s4    ( " - - $ $* *@3V @3r   