o
    œ©Zh{	  ã                   @   s*   d Z ddlZddlZej ¡  dd„ ZdS )zŸ
PyGTK input hook for prompt_toolkit.

Listens on the pipe prompt_toolkit sets up for a notification that it should
return control to the terminal event loop.
é    Nc                 C   s(   dd„ }t  |  ¡ t j|¡ t ¡  dS )zæ
    When the eventloop of prompt-toolkit is idle, call this inputhook.

    This will run the GTK main loop until the file descriptor
    `context.fileno()` becomes ready.

    :param context: An `InputHookContext` instance.
    c                  _   s   t  ¡  dS )NF)ÚgtkZ	main_quit)ÚaÚkw© r   úY/var/www/html/lang_env/lib/python3.10/site-packages/IPython/terminal/pt_inputhooks/gtk.pyÚ
_main_quit7   s   zinputhook.<locals>._main_quitN)ÚgobjectZio_add_watchÚfilenoZIO_INr   Úmain)Úcontextr   r   r   r   Ú	inputhook-   s   
r   )Ú__doc__r   r   ZgdkZthreads_initr   r   r   r   r   Ú<module>   s   
