ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/usr/lib64/python2.7/site-packages/gi/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyo

�
QLZc@s�ddlZddlmZdejko6dknrGd�Zndefd	��YZd
efd��YZd�Zd
�Z	dS(i����Ni(t_gobjectiiicCs
t|d�S(Nt__call__(thasattr(tfn((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pytcallablestSignalc	Bs~eZdZdefd��YZdd�Zdd
ejd
d
dd
d
d�Z	d
d�Z
d�Zd
d�Zd	�Z
RS(s�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()
    tBoundSignalcBsVeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s�
        Temporary binding object which can be used for connecting signals
        without specifying the signal name string to connect.
        cOstj||�S(N(tstrt__new__(tclstnametargstkargs((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyRXscCs#tj|�||_||_dS(N(Rt__init__tsignaltgobj(tselfRR((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR
[s
	cCsd|S(NsBoundSignal("%s")((R((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyt__repr__`scOs|jj|j||�S(sCall the signals closure.(RtfuncR(RRR((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyRcscOs|jj||||�S(s^Same as GObject.Object.connect except there is no need to specify
            the signal name.(Rtconnect(RtcallbackRR((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyRgscOs!|jj|d||||�S(s
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.
            s::(RR(RRtdetailRR((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pytconnect_detailedlscCs|jj|�dS(s"Same as GObject.Object.disconnect.N(tinstancet
disconnect(Rt
handler_id((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyRtscOs|jjt|�||�S(s[Same as GObject.Object.emit except there is no need to specify
            the signal name.(RtemitR(RRR((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyRxs(t__name__t
__module__t__doc__RR
RRRRRR(((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyRSs							tcOs(t|�r|j}ntj||�S(N(RRRR(R	R
RR((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR}sc		Cs�|r|r|j}nt|�r7|}|j}n|rP|rP|j}ntj|�|r�|pl|r�t|�\}}n|dkr�t�}n||_||_	||_
||_||_||_||_
dS(N(RRRRR
tget_signal_annotationstNonettupleRtflagstreturn_typet	arg_typestaccumulatort	accu_data(	RR
RR"R#R$tdocR%R&((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR
�s&


						cCs |dkr|S|j||�S(s:Returns a BoundSignal when accessed on an object instance.N(R R(RRtowner((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyt__get__�scOs�t|tj�r(|j|||�nst|�rCt|�}n	|j}t|�d|d|d|jd|jd|j	d|j
d|jd|j�Sd	S(
smAllows for instantiated Signals to be used as a decorator or calling
        of the underlying signal method.R
RR"R#R$R'R%R&N(
t
isinstanceRtGObjectRRRttypeR"R#R$RR%R&(RtobjRRR
((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR�s	!cCsj|d	kr|j}nt|�d|d|jd|jd|jd|jd|jd|jd|j	�S(
s%Returns a renamed copy of the Signal.R
RR"R#R$R'R%R&N(
R R
R,RR"R#R$RR%R&(RtnewName((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pytcopy�s
$cCs"|j|j|j|j|jfS(sKReturns a tuple of: (flags, return_type, arg_types, accumulator, accu_data)(R"R#R$R%R&(R((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pytget_signal_args�sN(RRRRRRR RtSIGNAL_RUN_FIRSTR
R)RR/R0(((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR!s1*	tSignalOverridecBseZdZd�ZRS(s&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
    cCsdS(sReturns the string 'override'.toverride((R((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR0�s(RRRR0(((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR2�scs�t�}d}t|d�rzddl}|j|��t�fd��jD��}d�jkrz�jd}qzn||fS(sAttempt 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.
    t__annotations__i����Nc3s+|]!}|�jkr�j|VqdS(N(tannotations(t.0targ(tspec(s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pys	<genexpr>�streturn(R!R RtinspecttgetfullargspecRR5(RR$R#R:((R8s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyR�s	cCs7|jjdi�}i}x�|jj�D]�\}}t|t�r+t|�}|s�|}|j|�}t|||�n||kr�td|��n|||<|j	�||<q+q+W||_
xg|j�D]Y\}}|jdk	r�d|j
dd�}t||�s/t|||j�q/q�q�WdS(s�Adds Signal instances on a GObject derived class into the '__gsignals__'
    dictionary to be picked up and registered as real GObject signals.
    t__gsignals__s(Signal "%s" has already been registered.tdo_t-t_N(t__dict__tgettitemsR*RRR/tsetattrt
ValueErrorR0R<RR treplaceR(R	tgsignalst
newsignalsR
Rt
signalNametfuncName((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pytinstall_signals�s&
	(ii(ii(
tsyst_giRtversion_infoRRRR2RRJ(((s6/usr/lib64/python2.7/site-packages/gi/_signalhelper.pyt<module>s�	

Zerion Mini Shell 1.0