HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/twisted/internet/__pycache__/gtk2reactor.cpython-38.pyc
U


W[�	@s�dZddlZddlmZddlmZz eed�sBddlZe�d�Wne	e
fk
r\YnXddlZeed�rxe��Gdd	�d	ej
�ZGd
d�dej�Zdd
d�Zddd�Zej��dkr�eZneZdgZdS)a>
This module provides support for Twisted to interact with the glib/gtk2
mainloop.

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

    from twisted.internet import gtk2reactor
    gtk2reactor.install()

Then use twisted.internet APIs as usual.  The other methods here are not
intended to be called directly.
�N)�	_glibbase)�runtime�frozenz2.0�threads_initc@sHeZdZdZejejBejBZej	Z
ejZe
eBZ
eeBZddd�ZdS)�Gtk2Reactorz&
    PyGTK+ 2 event loop reactor.
    TcCs,d}|dkrddl}tjj|t||d�dS�NTr)�useGtk)�gtkr�GlibReactorBase�__init__�gobject��selfrZ_gtk�r�>/usr/lib/python3/dist-packages/twisted/internet/gtk2reactor.pyrDszGtk2Reactor.__init__N)T)�__name__�
__module__�__qualname__�__doc__rZIO_HUPZIO_ERRZIO_NVALZ_POLL_DISCONNECTEDZIO_INZ_POLL_INZIO_OUTZ	_POLL_OUTZINFLAGSZOUTFLAGSrrrrrr6src@seZdZdZddd�ZdS)�PortableGtkReactorzd
    Reactor that works on Windows.

    Sockets aren't supported by GTK+'s input_add on Win32.
    TcCs,d}|dkrddl}tjj|t||d�dSr)r	r�PortableGlibReactorBaserrr
rrrrSs�zPortableGtkReactor.__init__N)T)rrrrrrrrrrMsrTcCs t|�}ddlm}||�|S)z�
    Configure the twisted mainloop to be run inside the gtk mainloop.

    @param useGtk: should glib rather than GTK+ event loop be
        used (this will be slightly faster but does not support GUI).
    r��installReactor)r�twisted.internet.mainr�rZreactorrrrr�install\srcCst�}ddlm}||�|S)zK
    Configure the twisted mainloop to be run inside the gtk mainloop.
    rr)rrrrrrr�portableInstallisr�posix)T)T)r�sysZtwisted.internetrZtwisted.pythonr�hasattrZpygtkZrequire�ImportError�AttributeErrorrrr
rrrrr�platformZgetType�__all__rrrr�<module>s(