Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
python2-gobject-base / usr / lib64 / python2.7 / site-packages / gi / _propertyhelper.pyo
Size: Mime:
ó
/^C]c@s]ddlZddlZddlmZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZejZejZejZej Z ej!Z!ej"Z"ej#Z#ej$Z$ej%ddfkr.e&Z'e(Z)ne*Z'e+Z)de,fd„ƒYZ-d	„Z.dS(
iÿÿÿÿNi(t_gi(t	TYPE_NONEtTYPE_INTERFACEt	TYPE_CHARt
TYPE_UCHARtTYPE_BOOLEANtTYPE_INTt	TYPE_UINTt	TYPE_LONGt
TYPE_ULONGt
TYPE_INT64tTYPE_UINT64t	TYPE_ENUMt
TYPE_FLAGSt
TYPE_FLOATtTYPE_DOUBLEtTYPE_STRINGtTYPE_POINTERt
TYPE_BOXEDt
TYPE_PARAMtTYPE_OBJECTt
TYPE_PYOBJECTt
TYPE_GTYPEt	TYPE_STRVtTYPE_VARIANTiitPropertyc
BsÎeZdZiee6ee6ee6e	e
6ee6e
e6Zide6de6de6ee6ee	6ee6ee6de6Ziee6ee6de6d e6ee6ee	6ee6ee6Zi	de6de6de6de6de6de6de6de6de	6Zde fd	„ƒYZ!d!d!d!d!dde#j$d!d!d
„	Z%d„Z&d„Z'd
„Z(d„Z)d„Z*d„Z+d„Z,d„Z-d„Z.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5RS("sÄCreates a new Property which when used in conjunction with
    GObject subclass will create a Python property accessor for the
    GObject ParamSpec.

    :param callable getter:
        getter to get the value of the property
    :param callable setter:
        setter to set the value of the property
    :param type type:
        type of property
    :param default:
        default value, must match the property type.
    :param str nick:
        short description
    :param str blurb:
        long description
    :param GObject.ParamFlags flags:
        parameter flags
    :keyword minimum:
        minimum allowed value (int, float, long only)
    :keyword maximum:
        maximum allowed value (int, float, long only)

    .. code-block:: python

         class MyObject(GObject.Object):
             prop = GObject.Property(type=str)

         obj = MyObject()
         obj.prop = 'value'

         obj.prop  # now is 'value'

    The API is similar to the builtin :py:func:`property`:

    .. code-block:: python

        class AnotherObject(GObject.Object):
            value = 0

            @GObject.Property
            def prop(self):
                'Read only property.'
                return 1

            @GObject.Property(type=int)
            def propInt(self):
                'Read-write integer property.'
                return self.value

            @propInt.setter
            def propInt(self, value):
                self.value = value
    iii?ii@tgt
__metaclass__cBseZd„ZRS(cCsdS(Ns<class 'GObject.Property'>((tself((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyt__repr__—s(t__name__t
__module__R(((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR–sc

CsÔd|_|dkrt}n|j|ƒ|_|j|ƒ|_|jƒt|t	ƒsjt
dƒ‚n||_t|t	ƒs‘t
dƒ‚n||_||_
||_|rÅ|rÅ|j}n<|rÞ|rÞ|j}n#|r|r|j}|j}n|j|ƒ||_|dk	rZ||jƒkrft
d|j|jƒfƒ‚qfn|jƒ}||_|	dk	r²|	|jƒkr¾t
d|j|jƒfƒ‚q¾n|jƒ}	|	|_d|_dS(Nsnick must be a stringsblurb must be a strings+Minimum for type %s cannot be lower than %ds,Maximum for type %s cannot be higher than %d(tNonetnametobjectt_type_from_pythonttypet_get_defaulttdefaultt_check_defaultt
isinstancet_basestringt	TypeErrortnicktblurbt__doc__tflagst_readonly_settert_writeonly_gettert_default_gettert_default_settertgettertfsett_get_minimumtminimumt_get_maximumtmaximumt_exc(
RR3tsetterR$R&R+R,R.R6R8((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyt__init__šsL		
				

	
			cCs#d|jpdtj|jƒfS(Ns<GObject Property %s (%s)>s(uninitialized)(R!Rt	type_nameR$(R((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyRÒscCsx|dkr|Sd|_y|j|ƒ}Wn!tk
rOtjƒd}nX|jrt|j}d|_|‚n|S(N(R R9tfgett	Exceptiont	tracebackt	print_exc(Rtinstancetklasstvaluetexc((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyt__get__×s	


				cCsY|dkrt‚nd|_|j|j|ƒ|jrU|j}d|_|‚ndS(N(R R*R9tset_propertyR!(RRARCRD((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyt__set__ðs					cCs
|j|ƒS(s;Allows application of the getter along with init arguments.(R3(RR=((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyt__call__ûscCs1|jr$|j|_|j|_n||_|S(s8Set the getter function to fget. For use as a decorator.(R-R,R=(RR=((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR3ÿs
		cCs(||_|js$|jj|_n|S(s8Set the setter function to fset. For use as a decorator.(R4R!R=R(RR4((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR:s		cCsÆ||jkr|j|St|tƒr]t|tjtjtjtjtj	fƒr]|j
S|ttt
ttttttttttttttttttt fkr¯|St!d|fƒ‚dS(NsUnsupported type: %r("t_type_from_pytype_lookupR(R$t
issubclassRtGObjecttGEnumtGFlagstGBoxedt
GInterfacet	__gtype__RRRRRRRRR	R
RRRRRRRRRRRRR*(Rttype_((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR#s"		cCs&|dk	r|S|jj|jdƒS(N(R t_default_lookuptgetR$(RR&((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR%&scCs!|j}|j}|tkrF|ttfkrFtd|fƒ‚n×|tkrp|dk	rtdƒ‚qn­|tkrš|dk	rtdƒ‚qnƒt	j
|tƒrõ|dkrÇtdƒ‚qt	j
||ƒstd||fƒ‚qn(t	j
|tƒr5t	j
||ƒstd||fƒ‚qnèt	j
|t
ƒrÀ|dk	rÀt|tƒs{tdt|ƒƒ‚nxŸ|D]7}t|ƒttfkr‚tdt|ƒƒ‚q‚q‚Wn]t	j
|tƒr|dk	rt|d	ƒst	j
|tƒrtd
||fƒ‚qndS(Ns%default must be True or False, not %rs)object types does not have default valuess(GType types does not have default valuess%enum properties needs a default values'enum value %s must be an instance of %rs(flags value %s must be an instance of %rsStrv value %s must be a lists'Strv value %s must contain only stringsRPs*variant value %s must be an instance of %r(R$R&RtTruetFalseR*RR RRt	type_is_aRR
RR(tlisttreprtstrtbytesRthasattr(RtptypeR&tval((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR'+s>		
 #cCs|jj|jdƒS(N(t_min_value_lookupRSR$R (R((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR5LscCs|jj|jdƒS(N(t_max_value_lookupRSR$R (R((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR7OscCst|d|j|ƒdS(Nt_property_helper_(tsetattrR!(RRARC((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR2VscCst|d|j|jƒS(NR`(tgetattrR!R&(RRA((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR1YscCs)td|jt|ƒjfƒ|_dS(Ns%s property of %s is read-only(R*R!R$RR9(RRARC((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR/\scCs)td|jt|ƒjfƒ|_dS(Ns%s property of %s is write-only(R*R!R$RR9(RRA((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR0`sc	Cs|j}|ttttttttfkrH|j	|j
|jf}n¢|tks|t
ks|jtƒs|jtƒs|jtƒrœ|jf}nN|ttfkr·d}n3|jtƒsÕ|jtƒrÞd}nt|ƒ‚|j|j|jf||jfS(N(((R$RRRR	R
RRRR6R8R&RRtis_aRR
RRRRRtNotImplementedErrorR+R,R.(RR\targs((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pytget_pspec_argshs			llûÿÿÿllÿÿÿÿllÿÿÿÿN(6RRR-Rt_longRtintRtboolRtfloatRRYRR"RIRR	Rt
G_MAXFLOATRtG_MAXDOUBLEtG_MININTt	G_MINLONGR
R^t	G_MAXUINTt
G_MAXULONGtG_MAXINTt	G_MAXLONGR_RRR$RR RtPARAM_READWRITER;RRERGRHR3R:R#R%R'R5R7R2R1R/R0Rf(((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyR2sp6



6							
			!						csvˆjjdiƒ}g}x¨ˆjjƒD]—\}}t|tƒr+|js[||_n|j|krŸ||j|jƒkr‰q+ntd|jƒ‚n|jƒ||j<|j|ƒq+q+W|sÐdS|ˆ_	dˆjks÷dˆjkrHxN|D]C}|j
|jks(|j|j
krþtdˆjfƒ‚qþqþWnd„}|ˆ_‡fd†}|ˆ_dS(	s“
    Scans the given class for instances of Property and merges them
    into the classes __gproperties__ dict if it exists or adds it if not.
    t__gproperties__s0Property %s was already found in __gproperties__Ntdo_get_propertytdo_set_propertysGObject subclass %r defines do_get/set_property and it also uses a property with a custom setter or getter. This is not allowedcSs%|jjddƒ}t||dƒS(Nt-t_(R!treplaceRbR (RtpspecR!((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pytobj_get_property¡scsD|jjddƒ}tˆ|dƒ}|r@|j||ƒndS(NRwRx(R!RyRbR R4(RRzRCR!tprop(tcls(s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pytobj_set_property¦s(t__dict__RStitemsR(RR!Rft
ValueErrortappendRtR=R1R4R2R*RRuRv(R}tgpropertiestpropsR!R|R{R~((R}s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pytinstall_properties{s2		
$		(/tsysR?RRt
_constantsRRRRRRRRR	R
RRR
RRRRRRRRRRRRkRlRmRqRoRnRrRptversion_infoRYR)RhRgt
basestringtlongR"RR…(((s8/usr/lib64/python2.7/site-packages/gi/_propertyhelper.pyt<module>s&š									ÿJ