ó
ąZOc           @   sn   d  Z  d d l m Z d d l m Z d e j f d     YZ d e j f d     YZ d   Z	 d	 g Z
 d
 S(   sY  
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()

Then use twisted.internet APIs as usual.
i˙˙˙˙(   t	   gireactor(   t   runtimet   Gtk3Reactorc           B   s   e  Z d  Z d   Z RS(   s/   
    A reactor using the gtk3+ event loop.
    c         C   s   t  j j |  d t d S(   s:   
        Override init to set the C{useGtk} flag.
        t   useGtkN(   R    t	   GIReactort   __init__t   True(   t   self(    (    s@   /usr/lib/python2.7/dist-packages/twisted/internet/gtk3reactor.pyR      s    (   t   __name__t
   __module__t   __doc__R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/internet/gtk3reactor.pyR      s   t   PortableGtk3Reactorc           B   s   e  Z d  Z d   Z RS(   s$   
    Portable GTK+ 3.x reactor.
    c         C   s   t  j j |  d t d S(   s:   
        Override init to set the C{useGtk} flag.
        R   N(   R    t   PortableGIReactorR   R   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/internet/gtk3reactor.pyR   &   s    (   R   R	   R
   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/internet/gtk3reactor.pyR   "   s   c          C   sH   t  j j   d k r! t   }  n	 t   }  d d l m } | |   |  S(   sM   
    Configure the Twisted mainloop to be run inside the gtk3+ mainloop.
    t   posixi˙˙˙˙(   t   installReactor(   R   t   platformt   getTypeR   R   t   twisted.internet.mainR   (   t   reactorR   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/internet/gtk3reactor.pyt   install.   s    	
R   N(   R
   t   twisted.internetR    t   twisted.pythonR   R   R   R   R   R   t   __all__(    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/internet/gtk3reactor.pyt   <module>   s   	