0x1949 Team - FAZEMRX - MANAGER
Edit File: _signalhelper.cpython-310.pyc
o �� ^W$ � @ s@ d dl mZ G dd� de�ZG dd� de�Zdd� Zdd � Zd S )� )�_gic @ sj e Zd ZdZG dd� de�Zddd�Zddejdddddfdd �Z dd d�Z dd � Zddd�Zdd� Z dS )�Signala� Object which gives a nice API for creating and binding signals. :param name: Name of signal or callable closure when used as a decorator. :type name: str or callable :param callable func: Callable closure method. :param GObject.SignalFlags flags: Flags specifying when to run closure. :param type return_type: Return type of the Signal. :param list arg_types: List of argument types specifying the signals function signature :param str doc: Documentation of signal object. :param callable accumulator: Accumulator method with the signature: func(ihint, return_accu, handler_return, accu_data) -> boolean :param object accu_data: User data passed to the accumulator. :Example: .. code-block:: python class Spam(GObject.Object): velocity = 0 @GObject.Signal def pushed(self): self.velocity += 1 @GObject.Signal(flags=GObject.SignalFlags.RUN_LAST) def pulled(self): self.velocity -= 1 stomped = GObject.Signal('stomped', arg_types=(int,)) @GObject.Signal def annotated_signal(self, a:int, b:str): "Python3 annotation support for parameter types. def on_pushed(obj): print(obj) spam = Spam() spam.pushed.connect(on_pushed) spam.pushed.emit() c @ sP e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� ZdS )zSignal.BoundSignalz� Temporary binding object which can be used for connecting signals without specifying the signal name string to connect. c O s t �| |�S �N)�str�__new__��cls�name�args�kargs� r �2/usr/lib/python3/dist-packages/gi/_signalhelper.pyr N s zSignal.BoundSignal.__new__c C s t �| � || _|| _d S r )r �__init__�signal�gobj)�selfr r r r r r Q s zSignal.BoundSignal.__init__c C s d| S )NzBoundSignal("%s")r �r r r r �__repr__V s zSignal.BoundSignal.__repr__c O s | j j| jg|�R i |��S )zCall the signals closure.)r �funcr �r r r r r r �__call__Y s zSignal.BoundSignal.__call__c O s | j j| |g|�R i |��S )z^Same as GObject.Object.connect except there is no need to specify the signal name.�r �connect)r �callbackr r r r r r ] s zSignal.BoundSignal.connectc O s$ | j j| d | |g|�R i |��S )a Same as GObject.Object.connect except there is no need to specify the signal name. In addition concats "::<detail>" to the signal name when connecting; for use with notifications like "notify" when a property changes. z::r )r r �detailr r r r r �connect_detailedb s $z#Signal.BoundSignal.connect_detailedc C s | j �|� dS )z"Same as GObject.Object.disconnect.N)r � disconnect)r � handler_idr r r r j s zSignal.BoundSignal.disconnectc O s | j jt| �g|�R i |��S )z[Same as GObject.Object.emit except there is no need to specify the signal name.)r �emitr r r r r r n s zSignal.BoundSignal.emitN)�__name__� __module__�__qualname__�__doc__r r r r r r r r r r r r �BoundSignalI s r# � c O s t |�r|j}t�| |�S r )�callabler r r r r r r r s s zSignal.__new__Nc C s� |d u r t |�r |}|r|s|j}t�| � |r"|s"|s"t|�\}}|d u r)t� }|| _|| _|| _|| _ || _|| _ || _d S r )r% r"