o
    éË·ey	  ã                   @   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)ÚgtkÚ	main_quit)ÚaÚkw© r   úY/var/www/ideatree/venv/lib/python3.10/site-packages/IPython/terminal/pt_inputhooks/gtk.pyÚ
_main_quit5   s   zinputhook.<locals>._main_quitN)ÚgobjectÚio_add_watchÚfilenoÚIO_INr   Úmain)Úcontextr   r   r   r   Ú	inputhook,   s   	r   )Ú__doc__r   r	   ÚgdkÚthreads_initr   r   r   r   r   Ú<module>   s   
