| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/pyatspi/__pycache__/ |
Upload File : |
o
�ֱa�M � @ sZ g d �Z ddlZddlmZ ddlmZ ddlZdZdZdZ G dd � d e
�Zdd
d�ZdS )
)�Registry�MAIN_LOOP_GLIB�MAIN_LOOP_NONE�set_default_registry� N)�Atspi)�GLibr �Qt�Nonec @ s� e Zd ZdZi Zdd� Zdd� Zd1dd�Zd d
� Zdd� Z d
d� Z
d2dd�Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� ZdZd Zd!d"� Zd#d$� Zg deefdddfd%d&�Zg deeffd'd(�Zd)d*� Zd+d,� Zd-d.� Zd/d0� ZdS )3r a�
Wraps the Accessibility.Registry to provide more Pythonic registration for
events.
This object should be treated as a singleton, but such treatment is not
enforced. You can construct another instance of this object and give it a
reference to the Accessibility.Registry singleton. Doing so is harmless and
has no point.
@@ivar asynchronous: Should event dispatch to local listeners be decoupled
from event receiving from the registry?
@@type asynchronous: boolean
@@ivar reg: Reference to the real, wrapped registry object
@@type reg: Accessibility.Registry
@@ivar dev: Reference to the device controller
@@type dev: Accessibility.DeviceEventController
@@ivar clients: Map of event names to client listeners
@@type clients: dictionary
@@ivar observers: Map of event names to AT-SPI L{_Observer} objects
@@type observers: dictionary
c C sR | j | _z| jrW d S W n ty Y nw d| _d | _d | _d | _t�� | _ d S )NF)
�_Registry__shared_state�__dict__�has_implementations�AttributeError�device_event_register�app_event_register�desktopr �MainLoop� main_loop��self� r �2/usr/lib/python3/dist-packages/pyatspi/registry.py�__init__C s ��zRegistry.__init__c C s | S )zn
@@return: This instance of the registry
@@rtype: L{Registry}
r r r r r �__call__T s zRegistry.__call__Nc C s d| _ d| _d| _t� | _dS )a�
Creates a new 'Registry' object and sets this object
as the default returned by pyatspi.Registry.
The default registry (without calling this function) uses the
GLib main loop with caching. It connects to a registry daemon.
This function should be called before pyatspi is used if you
wish to change these defaults.
@@param main_loop_type: 'GLib', 'None' or 'Qt'. If 'None' is selected then caching
is disabled.
@@param use_registry: Whether to connect to a registry daemon for device events.
Without this the application to connect to must be declared in the
app_name parameter.
@@param app_name: D-Bus name of the application to connect to when not using the registry daemon.
TFN)r �asynchronous�started�dict�event_listeners)r �main_loop_type�app_namer r r �
_set_registry[ s zRegistry._set_registryc C s |dkr| j S t�| |�S )�B
For backwards compatibility with old API
�async)r �object�__getattr__)r �namer r r r# v s zRegistry.__getattr__c C s |dkr|| _ t�| ||� dS )r r! N)r r"