MINI MINI MANI MO

Path : /lib64/python2.7/site-packages/gi/
File Upload :
Current File : //lib64/python2.7/site-packages/gi/_signalhelper.pyo

ó
§Zc@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|dkrtƒ}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¡	

OHA YOOOO