Your IP : 18.224.33.17


Current Path : /lib64/python2.7/site-packages/gi/
Upload File :
Current File : //lib64/python2.7/site-packages/gi/types.pyc

�
QLZc@@sgddlmZddlZddlZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZejZeddlmZddlmZdejko�dknr�d
�Zndefd��YZd
�Zd�Zdefd��YZeje�deefd��YZd�Z d�Z!deefd��YZ"dS(i(tabsolute_importNi(tTYPE_INVALID(tgenerate_doc_string(t
InterfaceInfot
ObjectInfot
StructInfot	VFuncInfotregister_interface_infothook_up_vfunc_implementationt_gobject(t_propertyhelper(t
_signalhelpericC@s
t|d�S(Nt__call__(thasattr(tobj((s./usr/lib64/python2.7/site-packages/gi/types.pytcallable1stMetaClassHelpercB@s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cC@s1x*|jj�D]}t||j|�qWdS(N(t__info__tget_methodstsetattrt__name__(tclstmethod_info((s./usr/lib64/python2.7/site-packages/gi/types.pyt_setup_methods6scC@sq|j}|j�}|dkr%dSxE|j�D]7}|j}t||�s2t||t|��q2q2WdS(N(Rtget_class_structtNoneRRR
Rtclassmethod(Rtinfotclass_structRtname((s./usr/lib64/python2.7/site-packages/gi/types.pyt_setup_class_methods:s		cC@sUxN|jj�D]=}|j�jdd�}t||t|j|j��qWdS(Nt-t_(Rt
get_fieldstget_nametreplaceRtpropertyt	get_valuet	set_value(Rt
field_infoR((s./usr/lib64/python2.7/site-packages/gi/types.pyt
_setup_fieldsEscC@sFx?|jj�D].}|j�}|j�}t|||�qWdS(N(Rt
get_constantsR"R%R(Rt
constant_infoRtvalue((s./usr/lib64/python2.7/site-packages/gi/types.pyt_setup_constantsJscC@s�x||jj�D]k\}}|jd�st|�r?qnd}xH|jD]=}t||d�}|dk	rOt|t�rO|}PqOqOW|dkr�t	|j
|td��}n|dk	r|d|j�ks�t
�t||j
�}|dk	re|j�}td||jj�|jj�|j�|j�|jj�|jj�f��nt||j|�qqWdS(Ntdo_sTMethod %s() on class %s.%s is ambiguous with methods in base classes %s.%s and %s.%s(t__dict__titemst
startswithRRt__mro__tgetattrt
isinstanceRtfind_vfunc_info_in_interfacet	__bases__tlenR"tAssertionErrortfind_vfunc_conflict_in_basest
get_containert	TypeErrorRt
get_namespaceRt	__gtype__(Rt
vfunc_nametpy_vfunct
vfunc_infotbasetmethodtambiguous_baset	base_info((s./usr/lib64/python2.7/site-packages/gi/types.pyt
_setup_vfuncsPs4		cC@s�|jjd�}|dks.t|t�r2dS|jdkrT|jdkrTdSx1|j�D]#}d|j}t|||�qaWdS(NRsgi.repository.GObjecttObjectsdo_%s(	R.tgetRR3Rt
__module__Rt
get_vfuncsR(Rt
class_infoR?R((s./usr/lib64/python2.7/site-packages/gi/types.pyt_setup_native_vfuncs}s
(RRGRRR(R,RDRJ(((s./usr/lib64/python2.7/site-packages/gi/types.pyR5s					-cC@s�x�|D]�}|tkst|t�st|d�r?qnt|jt�r�x0|jj�D]}|j�|kra|SqaWnt|j	|�}|dk	r|SqWdS(NR(t
GInterfacet
issubclassR
R3RRRHR"R4R5R(tbasesR=R@tvfunc((s./usr/lib64/python2.7/site-packages/gi/types.pyR4�s
cC@s�x�|D]�}t|d�st|jd�r6qn|jj�}|j�}x0|D](}|j�|krX||krX|SqXWt||j�}|dk	r|SqWdS(NRRH(R
RRHR"R8R5R(RNRMtklasstvfuncsR=tvtaklass((s./usr/lib64/python2.7/site-packages/gi/types.pyR8�s

t_GObjectMetaBasecB@s eZdZd�Zd�ZRS(s8Metaclass for automatically registering GObject classes.cC@sDtj||||�tj|�tj|�|j|j�dS(N(ttypet__init__tpropertyhelpertinstall_propertiestsignalhelpertinstall_signalst_type_registerR.(RRRMtdict_((s./usr/lib64/python2.7/site-packages/gi/types.pyRU�s

cC@sCd|krdS|jjd�r&dStj||jd��dS(NR<s
gi.overrides.t__gtype_name__(RGR0R	t
type_registerRF(Rt	namespace((s./usr/lib64/python2.7/site-packages/gi/types.pyRZ�s
(RRGt__doc__RURZ(((s./usr/lib64/python2.7/site-packages/gi/types.pyRS�s	tGObjectMetacB@s/eZdZd�Zd�Zed��ZRS(s+Meta class used for GI GObject based types.cC@stt|�j|||�t}|jd|jj�krGt}nt}|ro|jtjkrot}n|r�|j�n�|rt	|jt
�r�|j�n|j�|j
�|j�t	|jt
�r�|j�qt	|jt�rt|jj��qndS(Nsgi.repository.(tsuperR`RUtFalseRGRR;tTrueRDR3RRRR,RJR(RRt
get_g_type(RRRMR[t
is_gi_definedtis_python_defined((s./usr/lib64/python2.7/site-packages/gi/types.pyRU�s&		





cC@s
t|�S(N(tmro(R((s./usr/lib64/python2.7/site-packages/gi/types.pyRg�scC@sX|tkrdS|jjdd�}|dk	r5|S|jjd�rTt|j�SdS(sFMeta class property which shows up on any class using this meta-class.tR_sgi.repository.sgi.overridesN(sgi.repository.sgi.overrides(R`R.RFRRGR0RR(Rtdoc((s./usr/lib64/python2.7/site-packages/gi/types.pyR_�s
(RRGR_RURgR$(((s./usr/lib64/python2.7/site-packages/gi/types.pyR`�s		cC@s{g}|gg}|jr�x`|jD]U}t|d�rS|t|j�g7}q%tjd|t�|t|�g7}q%W|t|j�g7}nx�|rvx`|D]X}|d}g|D]}||dkr�|^q�}|r�t|jkr�d}q�Pq�W|dkrt
d��n|j|�xE|D]<}|r3|d|kr3|d=|so|j|�qoq3q3Wq�W|S(s\Compute the class precedence list (mro) according to C3, with GObject
    interface considerations.

    We override Python's MRO calculation to account for the fact that
    GObject classes are not affected by the diamond problem:
    http://en.wikipedia.org/wiki/Diamond_problem

    Based on http://www.python.org/download/releases/2.3/mro/
    R1sQMixin class %s is an old style class, please update this to derive from "object".iis8Cannot create a consistent method resolution order (MRO)N(
R5R
tlistR1twarningstwarntRuntimeWarningRgRKRR:tappendtremove(tCRMtbases_of_subclassesR@tsubclass_basest	candidatetstnot_head((s./usr/lib64/python2.7/site-packages/gi/types.pyRgs6			

)	
cO@sdS(N((targstkwargs((s./usr/lib64/python2.7/site-packages/gi/types.pytnothing<st
StructMetacB@s&eZdZd�Zed��ZRS(s*Meta class used for GI Struct based types.cC@s�tt|�j|||�|jj�}|tkrJ|jdk	rJdS|j�|j	�xp|jj
�D]_}|j�rn|jdkrn|j
�s�|jj�dkrnt|�|_t|_PqnqnWdS(Ntnewi(RaRyRURRdRtpytypeRR(RRtis_constructorRt
get_argumentstget_sizetstaticmethodt__new__Rx(RRRMR[tg_typeR((s./usr/lib64/python2.7/site-packages/gi/types.pyRUCs


	cC@s|tkrdSt|j�S(NRh(RyRR(R((s./usr/lib64/python2.7/site-packages/gi/types.pyR_Ys(RRGR_RUR$(((s./usr/lib64/python2.7/site-packages/gi/types.pyRy@s	(ii(ii(#t
__future__RtsysRkt
_constantsRt	docstringRt_giRRRRRRR	RKRhR
RVRRXtversion_infoRtobjectRR4R8RTRSt_install_metaclassR`RgRxRy(((s./usr/lib64/python2.7/site-packages/gi/types.pyt<module>s(4		[		
.	<