ó
    ýËâfW$  ã                   óH   • S SK Jr   " S S\5      r " S S\5      rS rS rg)	é   )Ú_gic                   ó†   • \ rS rSrSr " S S\5      rSS jrSS\R                  SSSSS4S jr
SS	 jrS
 rSS jrS rSrg)ÚSignalé   a   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                   óH   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSrg)ÚSignal.BoundSignaléI   zy
Temporary binding object which can be used for connecting signals
without specifying the signal name string to connect.
c                 ó,   • [         R                  X5      $ ©N)ÚstrÚ__new__©ÚclsÚnameÚargsÚkargss       Ú2/usr/lib/python3/dist-packages/gi/_signalhelper.pyr   ÚSignal.BoundSignal.__new__N   s   € Ü—;‘;˜sÓ)Ð)ó    c                 óF   • [         R                  U 5        Xl        X l        g r   )r   Ú__init__ÚsignalÚgobj)Úselfr   r   s      r   r   ÚSignal.BoundSignal.__init__Q   s   € Ü�L‰L˜ÔØ ŒKØ�Ir   c                 ó   • SU -  $ )NzBoundSignal("%s")© ©r   s    r   Ú__repr__ÚSignal.BoundSignal.__repr__V   s   € Ø&¨Ñ-Ð-r   c                 óV   • U R                   R                  " U R                  /UQ70 UD6$ )zCall the signals closure.)r   Úfuncr   ©r   r   r   s      r   Ú__call__ÚSignal.BoundSignal.__call__Y   s%   € à—;‘;×#Ò# D§I¡IÐ>°Ò>¸Ñ>Ð>r   c                 óB   • U R                   R                  " X/UQ70 UD6$ )zRSame as GObject.Object.connect except there is no need to specify
the signal name.©r   Úconnect)r   Úcallbackr   r   s       r   r(   ÚSignal.BoundSignal.connect]   s#   € ð —9‘9×$Ò$ TÐD°dÒD¸eÑDÐDr   c                 óP   • U R                   R                  " U S-   U-   U/UQ70 UD6$ )zÚ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   s        r   Úconnect_detailedÚ#Signal.BoundSignal.connect_detailedb   s.   € ð —9‘9×$Ò$ T¨D¡[°6Ñ%9¸8ÐTÀdÒTÈeÑTÐTr   c                 ó:   • U R                   R                  U5        g)z"Same as GObject.Object.disconnect.N)r   Ú
disconnect)r   Ú
handler_ids     r   r0   ÚSignal.BoundSignal.disconnectj   s   € à�I‰I× Ñ  Õ,r   c                 óT   • U R                   R                  " [        U 5      /UQ70 UD6$ )zOSame as GObject.Object.emit except there is no need to specify
the signal name.)r   Úemitr   r#   s      r   r4   ÚSignal.BoundSignal.emitn   s%   € ð —9‘9—>’>¤# d£)Ð<¨dÒ<°eÑ<Ð<r   )r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r$   r(   r-   r0   r4   Ú__static_attributes__r   r   r   ÚBoundSignalr   I   s1   † ñ	ò	*ò	ò
	.ò	?ò	Eò
	Uò	-õ	=r   r<   Ú c                 ód   • [        U5      (       a  UR                  n[        R                  X5      $ r   )Úcallabler6   r   r   r   s       r   r   ÚSignal.__new__s   s#   € Ü�D�>‰>Ø—=‘=ˆDÜ�{‰{˜3Ó%Ð%r   Nc	                 ó>  • Uc  [        U5      (       a  UnU(       a  U(       d  UR                  n[        R                  U 5        U(       a  U(       d  U(       d  [	        U5      u  pEUc
  [        5       nX l        X0l        X@l        XPl	        X`l        Xpl
        X€l        g r   )r?   r:   r   r   Úget_signal_annotationsÚtupler"   ÚflagsÚreturn_typeÚ	arg_typesÚaccumulatorÚ	accu_data)	r   r   r"   rD   rE   rF   ÚdocrG   rH   s	            r   r   ÚSignal.__init__x   st   € à‰<œH TŸN™NØˆDæžØ—,‘,ˆCä�‰�TÔæž®	Ü%;¸DÓ%AÑ"ˆKØÑÜ›ˆIàŒ	ØŒ
Ø&ÔØ"ŒØŒØ&ÔØ"�r   c                 ó.   • Uc  U $ U R                  X5      $ )z:Returns a BoundSignal when accessed on an object instance.)r<   )r   ÚinstanceÚowners      r   Ú__get__ÚSignal.__get__�   s   € àÑØˆKØ×Ñ Ó/Ð/r   c                 ó`  • [        U[        R                  5      (       a  U R                  " U/UQ70 UD6  g[	        U 5      (       a  [	        U 5      nOUR
                  n[        U 5      " XAU R                  U R                  U R                  U R                  U R                  U R                  S9$ )zeAllows for instantiated Signals to be used as a decorator or calling
of the underlying signal method.©r   r"   rD   rE   rF   rI   rG   rH   N)Ú
isinstancer   ÚGObjectr"   r   r6   ÚtyperD   rE   rF   r:   rG   rH   )r   Úobjr   r   r   s        r   r$   ÚSignal.__call__•   sŠ   € ô �cœ3Ÿ;™;×'Ñ'Ø�IŠI�cÐ*˜DÒ* EÓ*ô �4�y‰yÜ˜4“y‘à—|‘|�ä˜”: 4¸¿¹Ø*.×*:Ñ*:ÀdÇnÁnØ"&§,¡,¸D×<LÑ<LÐX\×XfÑXfñhð hr   c                 ó¸   • [        U 5      " XR                  U R                  U R                  U R                  U R
                  U R                  U R                  S9$ )z%Returns a renamed copy of the Signal.rQ   )rT   r"   rD   rE   rF   r:   rG   rH   )r   ÚnewNames     r   ÚcopyÚSignal.copy©   sJ   € ô �DŒz˜w¯Y©Y¸d¿j¹jØ&*×&6Ñ&6À$Ç.Á.Ø"Ÿl™l¸×8HÑ8HÐTX×TbÑTbñdð 	dr   c                 ót   • U R                   U R                  U R                  U R                  U R                  4$ )zKReturns a tuple of: (flags, return_type, arg_types, accumulator, accu_data))rD   rE   rF   rG   rH   r   s    r   Úget_signal_argsÚSignal.get_signal_args°   s.   € à—
‘
˜D×,Ñ,¨d¯n©n¸d×>NÑ>NÐPT×P^ÑP^Ð_Ð_r   )r:   rH   rG   rF   rD   r"   rE   )r=   r   )r6   r7   r8   r9   r:   r   r<   r   r   ÚSIGNAL_RUN_FIRSTr   rN   r$   rY   r\   r;   r   r   r   r   r      sQ   † ñ0ôb(=�cô (=ôT&ð
  T°×1EÑ1EØ!¨T°rÀtÐW[ô#ô.0òhô(dõ`r   r   c                   ó   • \ rS rSrSrS rSrg)ÚSignalOverrideéµ   a  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                 ó   • g)zReturns the string 'override'.Úoverrider   r   s    r   r\   ÚSignalOverride.get_signal_argsÂ   s   € àr   r   N)r6   r7   r8   r9   r:   r\   r;   r   r   r   r`   r`   µ   s   † ñõr   r`   c                 óê   ^• [        5       nSn[        U S5      (       aS  SSKnUR                  U 5      m[        U4S jTR                   5       5      nSTR
                  ;   a  TR
                  S   nX!4$ )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   óf   >#   • U  H&  nUTR                   ;   d  M  TR                   U   v •  M(     g 7fr   )Úannotations)Ú.0ÚargÚspecs     €r   Ú	<genexpr>Ú)get_signal_annotations.<locals>.<genexpr>Ô   s1   øé € ð 6º9°CØ  D×$4Ñ$4Ñ4ó 0˜$×*Ñ*¨3Ö/º9ùs   ƒ1›1Úreturn)rC   ÚhasattrÚinspectÚgetfullargspecr   ri   )r"   rF   rE   rq   rl   s       @r   rB   rB   Ç   ss   ø€ ô “€IØ€KäˆtÐ&×'Ñ'ãØ×%Ñ% dÓ+ˆÜô 6¸4¿9º9ó 6ó 6ˆ	à�t×'Ñ'Ó'Ø×*Ñ*¨8Ñ4ˆKàÐ!Ð!r   c                 ó>  • U R                   R                  S0 5      n0 nU R                   R                  5        Hv  u  p4[        U[        5      (       d  M  [        U5      nU(       d  UnUR                  U5      n[        XU5        XQ;   a  [        SU-  5      eXBU'   UR                  5       X'   Mx     Xl
        UR                  5        HQ  u  p4UR                  c  M  SUR                  SS5      -   n[        X5      (       a  M;  [        XUR                  5        MS     g)zŒAdds Signal instances on a GObject derived class into the '__gsignals__'
dictionary to be picked up and registered as real GObject signals.
Ú__gsignals__z(Signal "%s" has already been registered.NÚdo_Ú-Ú_)Ú__dict__ÚgetÚitemsrR   r   r   rY   ÚsetattrÚ
ValueErrorr\   rt   r"   Úreplacerp   )r   ÚgsignalsÚ
newsignalsr   r   Ú
signalNameÚfuncNames          r   Úinstall_signalsr‚   Ü   s÷   € ð �|‰|×Ñ °Ó3€HØ€JØŸ™×*Ñ*Ö,‰ˆÜ�fœf×%Ó%Ü˜V›ˆJö Ø!�
ØŸ™ TÓ*�Ü˜ 6Ô*ØÓ%Ü Ð!KÈdÑ!RÓSÐSØ%+�zÑ"Ø#)×#9Ñ#9Ó#;ˆHÓ ñ -ð  Ôð #×(Ñ(Ö*‰ˆØ�;‰;Ó"Ø˜tŸ|™|¨C°Ó5Ñ5ˆHÜ˜3×)Ó)Ü˜ v§{¡{Ö3ò	 +r   N)r=   r   r   r   r`   rB   r‚   r   r   r   Ú<module>rƒ      s1   ðõ( ô[`ˆSô [`ô|�Vô ò$"ó*4r   