§
    ÂÛ	^W$  ã                   óV   — d dl mZ  G d„ de¦  «        Z G d„ de¦  «        Zd„ Zd„ ZdS )	é   )Ú_gic                   ót   — e Zd ZdZ G d„ de¦  «        Zdd„Zddej        dddddfd„Z	dd„Z
d	„ Zdd
„Zd„ ZdS )Ú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                   óB   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
S )úSignal.BoundSignalz‘
        Temporary binding object which can be used for connecting signals
        without specifying the signal name string to connect.
        c                 ó8   — t                                | |¦  «        S ©N)ÚstrÚ__new__©ÚclsÚnameÚargsÚkargss       ú2/usr/lib/python3/dist-packages/gi/_signalhelper.pyr   zSignal.BoundSignal.__new__N   s   € Ý—;’;˜s DÑ)Ô)Ð)ó    c                 óV   — t                                | ¦  «         || _        || _        d S r	   )r
   Ú__init__ÚsignalÚgobj)Úselfr   r   s      r   r   zSignal.BoundSignal.__init__Q   s&   € Ý�LŠL˜ÑÔÐØ ˆDŒKØˆDŒIˆIˆIr   c                 ó   — d| z  S )NzBoundSignal("%s")© ©r   s    r   Ú__repr__zSignal.BoundSignal.__repr__V   s   € Ø&¨Ñ-Ð-r   c                 ó8   —  | j         j        | j        g|¢R i |¤ŽS )zCall the signals closure.)r   Úfuncr   ©r   r   r   s      r   Ú__call__zSignal.BoundSignal.__call__Y   s)   € à#�4”;Ô# D¤IÐ>°Ð>Ð>Ð>¸Ð>Ð>Ð>r   c                 ó0   —  | 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   s       r   r"   zSignal.BoundSignal.connect]   s+   € ð %�4”9Ô$ T¨8ÐD°dÐDÐDÐD¸eÐDÐDÐDr   c                 ó<   —  | j         j        | dz   |z   |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   s        r   Úconnect_detailedz#Signal.BoundSignal.connect_detailedb   s4   € ð %�4”9Ô$ T¨D¡[°6Ñ%9¸8ÐTÀdÐTÐTÐTÈeÐTÐTÐTr   c                 ó:   — | j                              |¦  «         dS )z"Same as GObject.Object.disconnect.N)r   Ú
disconnect)r   Ú
handler_ids     r   r(   zSignal.BoundSignal.disconnectj   s   € àŒI× Ò  Ñ,Ô,Ð,Ð,Ð,r   c                 óH   —  | j         j        t          | ¦  «        g|¢R i |¤ŽS )z[Same as GObject.Object.emit except there is no need to specify
            the signal name.)r   Úemitr
   r   s      r   r+   zSignal.BoundSignal.emitn   s.   € ð "�4”9”>¥# d¡)¤)Ð<¨dÐ<Ð<Ð<°eÐ<Ð<Ð<r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r"   r&   r(   r+   r   r   r   ÚBoundSignalr   I   sœ   € € € € € ð	ð 	ð	*ð 	*ð 	*ð	ð 	ð 	ð
	.ð 	.ð 	.ð	?ð 	?ð 	?ð	Eð 	Eð 	Eð
	Uð 	Uð 	Uð	-ð 	-ð 	-ð	=ð 	=ð 	=ð 	=ð 	=r   r0   Ú c                 ód   — t          |¦  «        r|j        }t                               | |¦  «        S r	   )Úcallabler,   r
   r   r   s       r   r   zSignal.__new__s   s+   € Ý�D‰>Œ>ð 	!Ø”=ˆDÝ�{Š{˜3 Ñ%Ô%Ð%r   Nc	                 ó(  — |€t          |¦  «        r|}|r	|s|j        }t                               | ¦  «         |r|s|st	          |¦  «        \  }}|€t          ¦   «         }|| _        || _        || _        || _	        || _        || _
        || _        d S r	   )r3   r/   r
   r   Úget_signal_annotationsÚtupler   ÚflagsÚreturn_typeÚ	arg_typesÚaccumulatorÚ	accu_data)	r   r   r   r7   r8   r9   Údocr:   r;   s	            r   r   zSignal.__init__x   s¯   € àˆ<�H T™NœNˆ<ØˆDàð 	˜ð 	Ø”,ˆCå�Š�TÑÔÐàð 	B˜ð 	B¨	ð 	BÝ%;¸DÑ%AÔ%AÑ"ˆK˜ØÐÝ™œˆIàˆŒ	ØˆŒ
Ø&ˆÔØ"ˆŒØˆŒØ&ˆÔØ"ˆŒˆˆr   c                 ó6   — |€| S |                       | |¦  «        S )z:Returns a BoundSignal when accessed on an object instance.)r0   )r   ÚinstanceÚowners      r   Ú__get__zSignal.__get__�   s#   € àÐØˆKØ×Ò  hÑ/Ô/Ð/r   c           
      ó$  — t          |t          j        ¦  «        r | j        |g|¢R i |¤Ž dS t	          | ¦  «        rt	          | ¦  «        }n|j        } t          | ¦  «        ||| j        | j        | j	        | j
        | j        | j        ¬¦  «        S )zmAllows for instantiated Signals to be used as a decorator or calling
        of the underlying signal method.©r   r   r7   r8   r9   r<   r:   r;   N)Ú
isinstancer   ÚGObjectr   r
   r,   Útyper7   r8   r9   r/   r:   r;   )r   Úobjr   r   r   s        r   r   zSignal.__call__•   sª   € õ �c�3œ;Ñ'Ô'ð 	hØˆDŒI�cÐ*˜DÐ*Ð*Ð* EÐ*Ð*Ð*Ð*Ð*õ �4‰yŒyð $Ý˜4‘y”y��à”|�à•4˜‘:”: 4¨c¸¼Ø*.Ô*:ÀdÄnØ"&¤,¸DÔ<LÐX\ÔXfðhñ hô hð hr   c           
      óˆ   —  t          | ¦  «        || j        | j        | j        | j        | j        | j        | j        ¬¦  «        S )z%Returns a renamed copy of the Signal.rB   )rE   r   r7   r8   r9   r/   r:   r;   )r   ÚnewNames     r   ÚcopyzSignal.copy©   sK   € ð �t�D‰zŒz˜w¨T¬Y¸d¼jØ&*Ô&6À$Ä.Ø"œl¸Ô8HÐTXÔTbðdñ dô dð 	dr   c                 óB   — | j         | j        | j        | j        | j        fS )zKReturns a tuple of: (flags, return_type, arg_types, accumulator, accu_data))r7   r8   r9   r:   r;   r   s    r   Úget_signal_argszSignal.get_signal_args°   s!   € à”
˜DÔ,¨d¬n¸dÔ>NÐPTÔP^Ð_Ð_r   )r1   r	   )r,   r-   r.   r/   r
   r0   r   r   ÚSIGNAL_RUN_FIRSTr   r@   r   rI   rK   r   r   r   r   r      sÜ   € € € € € ð0ð 0ðb(=ð (=ð (=ð (=ð (=�cñ (=ô (=ð (=ðT&ð &ð &ð &ð
  T°Ô1EØ!¨T°rÀtÐW[ð#ð #ð #ð #ð.0ð 0ð 0ð 0ðhð hð hð(dð dð dð dð`ð `ð `ð `ð `r   r   c                   ó   — e Zd ZdZd„ ZdS )Ú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                 ó   — dS )zReturns the string 'override'.Úoverrider   r   s    r   rK   zSignalOverride.get_signal_argsÂ   s   € àˆzr   N)r,   r-   r.   r/   rK   r   r   r   rN   rN   µ   s-   € € € € € ðð ðð ð ð ð r   rN   c                 óê   ‡— t          ¦   «         }d}t          | d¦  «        rOddl}|                     | ¦  «        Št          ˆfd„‰j        D ¦   «         ¦  «        }d‰j        v r‰j        d         }||fS )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   óD   •K  — | ]}|‰j         v ¯‰j         |         V — Œd S r	   )Úannotations)Ú.0ÚargÚspecs     €r   ú	<genexpr>z)get_signal_annotations.<locals>.<genexpr>Ô   sD   øè è € ð 6ð 6°CØ  DÔ$4Ð4Ð4ð Ô*¨3Ô/Ø4Ð4Ð4Ð4ð6ð 6r   Úreturn)r6   ÚhasattrÚinspectÚgetfullargspecr   rU   )r   r9   r8   r\   rX   s       @r   r5   r5   Ç   sž   ø€ õ ‘”€IØ€KåˆtÐ&Ñ'Ô'ð 5àˆˆˆØ×%Ò% dÑ+Ô+ˆÝð 6ð 6ð 6ð 6¸4¼9ð 6ñ 6ô 6ñ 6ô 6ˆ	à�tÔ'Ð'Ð'ØÔ*¨8Ô4ˆKà˜	Ð!Ð!r   c                 óL  — | j                              di ¦  «        }i }| j                              ¦   «         D ]…\  }}t          |t          ¦  «        rkt          |¦  «        }|s(|}|                     |¦  «        }t          | ||¦  «         ||v rt          d|z  ¦  «        ‚|||<   | 	                    ¦   «         ||<   Œ†|| _
        |                     ¦   «         D ]K\  }}|j        �?d|                     dd¦  «        z   }t          | |¦  «        st          | ||j        ¦  «         ŒLdS )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ÚitemsrC   r   r
   rI   ÚsetattrÚ
ValueErrorrK   r_   r   Úreplacer[   )r   ÚgsignalsÚ
newsignalsr   r   Ú
signalNameÚfuncNames          r   Úinstall_signalsrm   Ü   sJ  € ð Œ|×Ò °Ñ3Ô3€HØ€JØœ×*Ò*Ñ,Ô,ð <ð <‰ˆˆfÝ�f�fÑ%Ô%ð 	<Ý˜V™œˆJð ð +Ø!�
ØŸš TÑ*Ô*�Ý˜˜T 6Ñ*Ô*Ð*Ø˜XÐ%Ð%Ý Ð!KÈdÑ!RÑSÔSÐSØ%+ˆJ�zÑ"Ø#)×#9Ò#9Ñ#;Ô#;ˆH�ZÑ øà€CÔð #×(Ò(Ñ*Ô*ð 4ð 4‰ˆˆfØŒ;Ð"Ø˜tŸ|š|¨C°Ñ5Ô5Ñ5ˆHÝ˜3 Ñ)Ô)ð 4Ý˜˜X v¤{Ñ3Ô3Ð3øð	4ð 4r   N)r1   r   r
   r   rN   r5   rm   r   r   r   ú<module>rn      s¦   ðð( Ð Ð Ð Ð Ð ð[`ð [`ð [`ð [`ð [`ˆSñ [`ô [`ð [`ð|ð ð ð ð �Vñ ô ð ð$"ð "ð "ð*4ð 4ð 4ð 4ð 4r   