HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/twisted/internet/__pycache__/gtk2reactor.cpython-310.pyc
o

�b8�	@s�dZddlZddlmZddlmZzeed�s!ddlZe�d�Wne	e
fy-YnwddlZeed�r;e��Gdd	�d	ej
�ZGd
d�dej�Zdd
d�Zddd�Zej��dkraeZneZdgZdS)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.
    TcC�,d}|dur
ddl}tjj|t||d�dS�NTr)�useGtk)�gtkr�GlibReactorBase�__init__�gobject��selfr	�_gtk�r�>/usr/lib/python3/dist-packages/twisted/internet/gtk2reactor.pyrF�zGtk2Reactor.__init__N�T)�__name__�
__module__�__qualname__�__doc__r
�IO_HUP�IO_ERR�IO_NVAL�_POLL_DISCONNECTED�IO_IN�_POLL_IN�IO_OUT�	_POLL_OUT�INFLAGS�OUTFLAGSrrrrrr7src@seZdZdZddd�ZdS)�PortableGtkReactorzd
    Reactor that works on Windows.

    Sockets aren't supported by GTK+'s input_add on Win32.
    TcCrr)r
r�PortableGlibReactorBaserr
rrrrrUrzPortableGtkReactor.__init__Nr)rrrrrrrrrr#Nsr#TcCs 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&�r	�reactorr&rrr�install]sr*cCst�}ddlm}||�|S)zK
    Configure the twisted mainloop to be run inside the gtk mainloop.
    rr%)r#r'r&r(rrr�portableInstallksr+�posixr)r�sys�twisted.internetr�twisted.pythonr�hasattr�pygtk�require�ImportError�AttributeErrorr
rrrr$r#r*r+�platform�getType�__all__rrrr�<module>s.

��