+
    Dfj                         R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ]! ]RR4      e   ]P                  ! 4         ! R R	]P                  4      t ! R
 R]P                  4      tRR R lltR.tR# )a  
This module provides support for Twisted to interact with the glib
mainloop via GObject Introspection.

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

    from twisted.internet import gireactor
    gireactor.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.

On Python 3, pygobject v3.4 or later is required.
)Union)GLib)	_glibbase)ReactorAlreadyRunning)runtimethreads_initNc                   8   a  ] tR t^$t o RtRtRR ltR tRtV t	R# )	GIReactorz
GObject-introspection event loop reactor.

@ivar _gapplication: A C{Gio.Application} instance that was registered
    with C{registerGApplication}.
Nc                P    \         P                  P                  V \        R 4       R # N)r   GlibReactorBase__init__r   )selfuseGtks   &&</usr/lib/python3/dist-packages/twisted/internet/gireactor.pyr   GIReactor.__init__/   s    !!**4t<    c                   a V P                   e   \        R4      hV P                  '       d   \        R4      h\	        SR4      '       g   \        R4      hSV n         V3R lpW n        SP                  V n        R# )aK  
Register a C{Gio.Application} or C{Gtk.Application}, whose main loop
will be used instead of the default one.

We will C{hold} the application so it doesn't exit on its own. In
versions of C{python-gi} 3.2 and later, we exit the event loop using
the C{app.quit} method which overrides any holds. Older versions are
not supported.
Nz2Can't register more than one application instance.z5Can't register application after reactor was started.quitzPApplication registration is not supported in versions of PyGObject prior to 3.2.c                  J   < S P                  4        S P                  R 4       R # r   )holdrun)apps   r   r   +GIReactor.registerGApplication.<locals>.runI   s    HHJGGDMr   )_gapplicationRuntimeError_startedr   hasattr_runr   _crash)r   r   r   s   &f r   registerGApplicationGIReactor.registerGApplication2   sx     )STT==='G  sF##7  !	 	hhr   )r   r   r   F)
__name__
__module____qualname____firstlineno____doc__r   r   r    __static_attributes____classdictcell__)__classdict__s   @r   r	   r	   $   s       M= r   r	   c                   R   a a ] tR t^Rt oRtRV 3R lltR tV3R lR ltRtVt	V ;t
# )PortableGIReactorz4
Portable GObject Introspection event loop reactor.
c                4   < \         SV `  \        R VR7       R # )Nr   )superr   r   )r   r   	__class__s   &&r   r   PortableGIReactor.__init__W   s    tF3r   c                    \        R4      h)zo
Register a C{Gio.Application} or C{Gtk.Application}, whose main loop
will be used instead of the default one.
z3GApplication is not currently supported on Windows.)NotImplementedError)r   r   s   &&r   r    &PortableGIReactor.registerGApplicationZ   s    
 ""WXXr   c                   < V ^8  d   QhRR/# )   returnN )formatr*   s   "r   __annotate__PortableGIReactor.__annotate__a   s      $ r   c                    R# )z%
For compatibility only. Do nothing.
Nr8   )r   s   &r   simulatePortableGIReactor.simulatea   s    r   r8   r"   )r#   r$   r%   r&   r'   r   r    r=   r(   r)   __classcell__)r0   r*   s   @@r   r,   r,   R   s$     4Y  r   r,   c                R    V ^8  d   QhR\         R\        \        \        3,          /# )r6   r   r7   )boolr   r	   r,   )r9   s   "r   r:   r:   g   s%      D U96G+G%H r   c                    \         P                  P                  4       R8X  d   \        V R7      pM\	        V R7      p^ RIHp V! V4       V# )z
Configure the twisted mainloop to be run inside the glib mainloop.

@param useGtk: A hint that the Gtk GUI will or will not be used.  Currently
    does not modify any behavior.
posixr.   )installReactor)r   platformgetTyper	   r,   twisted.internet.mainrD   )r   reactorrD   s   &  r   installrI   g   s?     !W,6*#6247Nr   rI   r"   )r'   typingr   gi.repositoryr   twisted.internetr   twisted.internet.errorr   twisted.pythonr   getattrr   r   r	   r,   rI   __all__r8   r   r   <module>rQ      si   (   & 8 "
4&2+	)) +\	11 *& +r   