o
    ¯b÷  ã                   @   sR   d Z ddlmZ ddlmZ G dd„ dejƒZG dd„ dejƒZdd	„ Z	d	gZ
d
S )aì  
This module provides support for Twisted to interact with the gtk3 mainloop
via Gobject introspection. This is like gi, but slightly slower and requires a
working $DISPLAY.

In order to use this support, simply do the following::

    from twisted.internet import gtk3reactor
    gtk3reactor.install()

If you wish to use a GApplication, register it with the reactor::

    from twisted.internet import reactor
    reactor.registerGApplication(app)

Then use twisted.internet APIs as usual.
é    )Ú	gireactor)Úruntimec                   @   ó   e Zd ZdZdd„ ZdS )ÚGtk3Reactorz/
    A reactor using the gtk3+ event loop.
    c                 C   ó   t jj| dd� dS ©z:
        Override init to set the C{useGtk} flag.
        T)ÚuseGtkN)r   Ú	GIReactorÚ__init__©Úself© r   ú>/usr/lib/python3/dist-packages/twisted/internet/gtk3reactor.pyr
      ó   zGtk3Reactor.__init__N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r      ó    r   c                   @   r   )ÚPortableGtk3Reactorz$
    Portable GTK+ 3.x reactor.
    c                 C   r   r   )r   ÚPortableGIReactorr
   r   r   r   r   r
   +   r   zPortableGtk3Reactor.__init__Nr   r   r   r   r   r   &   r   r   c                  C   s4   t j ¡ dkrtƒ } ntƒ } ddlm} || ƒ | S )zM
    Configure the Twisted mainloop to be run inside the gtk3+ mainloop.
    Úposixr   )ÚinstallReactor)r   ÚplatformÚgetTyper   r   Útwisted.internet.mainr   )Úreactorr   r   r   r   Úinstall2   s   r   N)r   Útwisted.internetr   Útwisted.pythonr   r	   r   r   r   r   Ú__all__r   r   r   r   Ú<module>   s   
