⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
gi
/
__pycache__
/
View File Name :
_signalhelper.cpython-310.pyc
o ^W$ @ s@ d dl mZ G dd deZG dd deZdd Zdd Zd S ) )_gic @ sj e Zd ZdZG dd deZdddZddejdddddfdd Z dd dZ dd ZdddZdd 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__clsnameargskargs r 2/usr/lib/python3/dist-packages/gi/_signalhelper.pyr N s zSignal.BoundSignal.__new__c C s t | || _|| _d S r )r __init__signalgobj)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 "::
" 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" r r get_signal_annotationstupler flagsreturn_type arg_typesaccumulator accu_data) r r r r( r) r* docr+ r, r r r r x s zSignal.__init__c C s |du r| S | | |S )z:Returns a BoundSignal when accessed on an object instance.N)r# )r instanceownerr r r __get__ s zSignal.__get__c O sh t |tjr| j|g|R i | dS t| rt| }n|j}t| ||| j| j| j | j | j| jdS )zmAllows for instantiated Signals to be used as a decorator or calling of the underlying signal method.r r r( r) r* r- r+ r, N) isinstancer GObjectr r r typer( r) r* r" r+ r, )r objr r r r r r r s zSignal.__call__c C s* t | || j| j| j| j| j| j| jdS )z%Returns a renamed copy of the Signal.r1 )r4 r r( r) r* r" r+ r, )r newNamer r r copy s zSignal.copyc C s | j | j| j| j| jfS )zKReturns a tuple of: (flags, return_type, arg_types, accumulator, accu_data))r( r) r* r+ r, r r r r get_signal_args s zSignal.get_signal_args)r$ r )r r r! r" r r# r r SIGNAL_RUN_FIRSTr r0 r r7 r8 r r r r r s 1 * r c @ s e Zd ZdZdd ZdS )SignalOverridea& Specialized sub-class of Signal which can be used as a decorator for overriding existing signals on GObjects. :Example: .. code-block:: python class MyWidget(Gtk.Widget): @GObject.SignalOverride def configure_event(self): pass c C s dS )zReturns the string 'override'.overrider r r r r r8 s zSignalOverride.get_signal_argsN)r r r! r" r8 r r r r r: s r: c sZ t }d}t| dr)ddl}|| t fdd jD }d jv r) jd }||fS )a Attempt pulling python 3 function annotations off of 'func' for use as a signals type information. Returns an ordered nested tuple of (return_type, (arg_type1, arg_type2, ...)). If the given function does not have annotations then (None, tuple()) is returned. N__annotations__ c 3 s$ | ] }| j v r j | V qd S r )annotations).0argspecr r