Ë
    çôfW$  ã                   óH   — d dl mZ  G d„ de«      Z G d„ de«      Zd„ Zd„ Zy)	é   )Ú_gic                   óv   — 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y)Ú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                   ó@   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zy
)úSignal.BoundSignalz‘
        Temporary binding object which can be used for connecting signals
        without specifying the signal name string to connect.
        c                 ó.   — t         j                  | |«      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                 óJ   — t         j                  | «       || _        || _        y r	   )r
   Ú__init__ÚsignalÚgobj)Úselfr   r   s      r   r   zSignal.BoundSignal.__init__Q   s   € Ü�L‰L˜ÔØ ˆDŒKØˆD�Ir   c                 ó   — d| z  S )NzBoundSignal("%s")© ©r   s    r   Ú__repr__zSignal.BoundSignal.__repr__V   s   € Ø&¨Ñ-Ð-r   c                 óV   —  | j                   j                  | j                  g|¢­i |¤ŽS )zCall the signals closure.)r   Úfuncr   ©r   r   r   s      r   Ú__call__zSignal.BoundSignal.__call__Y   s'   € à#�4—;‘;×#Ñ# D§I¡IÐ>°Ò>¸Ñ>Ð>r   c                 óD   —  | j                   j                  | |g|¢­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‘9×$Ñ$ T¨8ÐD°dÒD¸eÑDÐDr   c                 óP   —  | j                   j                  | dz   |z   |g|¢­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   s0   € ð %�4—9‘9×$Ñ$ T¨D¡[°6Ñ%9¸8ÐTÀdÒTÈeÑTÐTr   c                 ó:   — | j                   j                  |«       y)z"Same as GObject.Object.disconnect.N)r   Ú
disconnect)r   Ú
handler_ids     r   r(   zSignal.BoundSignal.disconnectj   s   € à�I‰I× Ñ  Õ,r   c                 óT   —  | j                   j                  t        | «      g|¢­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‘9—>‘>¤# d£)Ð<¨dÒ<°eÑ<Ð<r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r"   r&   r(   r+   r   r   r   ÚBoundSignalr   I   s1   „ ñ	ò	*ò	ò
	.ò	?ò	Eò
	Uò	-ó	=r   r0   Ú c                 ó\   — t        |«      r|j                  }t        j                  | |«      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        j                  | «       |r|s|st	        |«      \  }}|€
t        «       }|| _        || _        || _        || _	        || _        || _
        || _        y 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ØˆDá™Ø—,‘,ˆCä�‰�TÔá™©	Ü%;¸DÓ%AÑ"ˆK˜ØÐÜ›ˆIàˆŒ	ØˆŒ
Ø&ˆÔØ"ˆŒØˆŒØ&ˆÔØ"ˆ�r   c                 ó.   — |€| S | j                  | |«      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        |t        j                  «      r | j                  |g|¢­i |¤Ž y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Ÿ;™;Ô'ØˆD�I‰I�cÐ*˜DÒ* EÓ*ô �4ŒyÜ˜4“y‘à—|‘|�à”4˜“: 4¨c¸¿¹Ø*.×*:Ñ*:ÀdÇnÁnØ"&§,¡,¸D×<LÑ<LÐX\×XfÑXfô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©   sN   € ð Œt�D‹z˜w¨T¯Y©Y¸d¿j¹jØ&*×&6Ñ&6À$Ç.Á.Ø"Ÿl™l¸×8HÑ8HÐTX×TbÑTbôdð 	dr   c                 ót   — | 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©n¸d×>NÑ>NÐPT×P^ÑP^Ð_Ð_r   )r1   r	   )r,   r-   r.   r/   r
   r0   r   r   ÚSIGNAL_RUN_FIRSTr   r@   r   rI   rK   r   r   r   r   r      sQ   „ ñ0ôb(=�cô (=óT&ð
  T°×1EÑ1EØ!¨T°rÀtÐW[ó#ó.0òhó(dó`r   r   c                   ó   — e Zd ZdZd„ Zy)Ú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                  ó   — y)zReturns the string 'override'.Úoverrider   r   s    r   rK   zSignalOverride.get_signal_argsÂ   s   € àr   N)r,   r-   r.   r/   rK   r   r   r   rN   rN   µ   s   „ ñór   rN   c                 óÜ   ‡— t        «       }d}t        | d«      rPddl}|j                  | «      Š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   óX   •K  — | ]!  }|‰j                   v r‰j                   |   –— Œ# y ­wr	   )Úannotations)Ú.0ÚargÚspecs     €r   ú	<genexpr>z)get_signal_annotations.<locals>.<genexpr>Ô   s1   øè ø€ ò 6°CØ  D×$4Ñ$4Ñ4ð ×*Ñ*¨3Õ/ñ 6ùs   ƒ'*Úreturn)r6   ÚhasattrÚinspectÚgetfullargspecr   rU   )r   r9   r8   r\   rX   s       @r   r5   r5   Ç   sr   ø€ ô “€IØ€KäˆtÐ&Ô'ãØ×%Ñ% dÓ+ˆÜó 6¸4¿9¹9ô 6ó 6ˆ	à�t×'Ñ'Ñ'Ø×*Ñ*¨8Ñ4ˆKà˜	Ð!Ð!r   c                 ó  — | j                   j                  di «      }i }| j                   j                  «       D ]m  \  }}t        |t        «      sŒt        |«      }|s |}|j                  |«      }t        | ||«       ||v rt        d|z  «      ‚|||<   |j                  «       ||<   Œo || _
        |j                  «       D ]K  \  }}|j                  €Œd|j                  dd«      z   }t        | |«      rŒ5t        | ||j                  «       ŒM y)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   Ü   s  € ð �|‰|×Ñ °Ó3€HØ€JØŸ™×*Ñ*Ó,ò <‰ˆˆfÜ�fœfÕ%Ü˜V›ˆJñ Ø!�
ØŸ™ TÓ*�Ü˜˜T 6Ô*Ø˜XÑ%Ü Ð!KÈdÑ!RÓSÐSØ%+ˆJ�zÑ"Ø#)×#9Ñ#9Ó#;ˆH�ZÒ ð<ð  €CÔð #×(Ñ(Ó*ò 4‰ˆˆfØ�;‰;Ñ"Ø˜tŸ|™|¨C°Ó5Ñ5ˆHÜ˜3 Õ)Ü˜˜X v§{¡{Õ3ñ	4r   N)r1   r   r
   r   rN   r5   rm   r   r   r   ú<module>rn      s1   ðõ( ô[`ˆSô [`ô|�Vô ò$"ó*4r   