Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/gi/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/gi/module.pyc


.Oc@@syddlmZddlZddlmZmZy
djZWn!ek
rbddlmZnXddl	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZdd	lmZmZmZe
j Z!d
Z"dZ#de$fd
YZ%de$fdYZ&de&fdYZ'de&fdYZ(dS(i(tabsolute_importNi(t_glibt_gobjectt(t	maketrans(tregistry(t
RepositorytFunctionInfotRegisteredTypeInfotEnumInfot
ObjectInfot
InterfaceInfotConstantInfot
StructInfot	UnionInfotStructtBoxedtenum_addtenum_register_new_gtype_and_addt	flags_addt flags_register_new_gtype_and_add(tGObjectMetat
StructMetatFunctioncC@s|j}|stS|j}|j}|dkrF|dksR|dkrYtjStd|d|g}t||S(NtGObjecttObjecttInitiallyUnownedsgi.repository.%stfromlist(t
get_parenttobjectt
get_namespacetget_nameRRt
__import__tgetattr(tobject_infotparent_object_infot	namespacetnametmodule((s-/usr/lib/python2.7/dist-packages/gi/module.pytget_parent_for_object;s$cC@shg}x[|jD]M}|j}|j}td|d|g}|jt||qW|S(Nsgi.repository.%sR(tget_interfacesRRR tappendR!(R"t
interfacestinterface_infoR$R%R&((s-/usr/lib/python2.7/dist-packages/gi/module.pytget_interfaces_for_objectLstIntrospectionModulecB@s/eZddZdZdZdZRS(cC@stj||||_||_d||_tj|j|jtj|j|_|jdkrtj|j|_ndS(Nsgi.repository.(	t
repositorytrequiret
_namespacet_versiont__name__tget_typelib_patht__path__tNonetget_version(tselfR$tversion((s-/usr/lib/python2.7/dist-packages/gi/module.pyt__init__Ys		
c
@stj|j|}|s7td|j|fnt|tr|j}|j}|dkrp|j
r|jtj
rt|}q|tjkstt|}nB|jtjrt|}n!|tjkstt|}||_d|j|_tdd}xH|jD]7}|jj|}t||||jq2Wn|tjkr||_qnt|tr\|j}|tjkr|j}|dk	r||j|<|Snt|t r4t!|t"fdt#|D}	f|	}
t$}nt|t%rXtj&f}
t$}nt|t't(fr|jtj)rt*f}
n^|jtj+s|tjks|j,|krt-f}
n"t.d|j|jft/}nt0||j}i|d6d|jd6|d	6}|||
|}|tjkr||_qnHt|t1rzt2|}n*t|t3r|j}nt0|||j|<|S(
Ns%r object has no attribute %rsgi.repository.tabcdefgjhijklmnopqrstuvwxyztABCDEFGJHIJKLMNOPQRSTUVWXYZc3@s$|]}t|s|VqdS(N(t
issubclass(t.0t	interface(tparent(s-/usr/lib/python2.7/dist-packages/gi/module.pys	<genexpr>ss$unable to create a wrapper for %s.%st__info__t
__module__t	__gtype__(4R.tfind_by_nameR0tAttributeErrorR2t
isinstanceR	t
get_g_typetpytypeR5tis_flagstis_aRt
TYPE_FLAGSRt	TYPE_NONEtAssertionErrorRt	TYPE_ENUMRRR@RRARt
get_valuesRt	translatetsetattrt	get_valueRt__dict__R
R'ttupleR,RRt
GInterfaceR
Rt
TYPE_BOXEDRtTYPE_POINTERtfundamentalRt	TypeErrorRtNotImplementedErrorRRR(
R7R%tinfotg_typetwrappertascii_upper_transt
value_infot
value_namettype_R*tbasest	metaclasstdict_((R?s-/usr/lib/python2.7/dist-packages/gi/module.pyt__getattr__es			#	
"
		"	

cC@s#tj|j}d|j|fS(Ns <IntrospectionModule %r from %r>(R.R3R0(R7tpath((s-/usr/lib/python2.7/dist-packages/gi/module.pyt__repr__scC@s^tt|j}|j|jjtj|j}|jd|Dt	|S(Ncs@s|]}|jVqdS(N(R(R=RZ((s-/usr/lib/python2.7/dist-packages/gi/module.pys	<genexpr>s(
tsettdirt	__class__tupdateRRtkeysR.t	get_infosR0tlist(R7tresulttnamespace_infos((s-/usr/lib/python2.7/dist-packages/gi/module.pyt__dir__s
N(R2RAR5R9RdRfRp(((s-/usr/lib/python2.7/dist-packages/gi/module.pyR-Ws	_	t
DynamicModulecB@s5eZdZdZdZdZdZRS(cC@s(||_d|_d|_d|_dS(N(R0R5t_introspection_modulet_overrides_moduleR4(R7R$((s-/usr/lib/python2.7/dist-packages/gi/module.pyR9s			cC@sptj|j}t|j||_tdd|jg}t||jd|_t	j
|j|_dS(Nsgi.overridesR(tgitget_required_versionR0R-RrR R!R5RsR.R3R4(R7R8toverrides_modules((s-/usr/lib/python2.7/dist-packages/gi/module.pyt_loads	cC@s}|jdk	rFt|jdd}||krmt|j|dSn'd|j|f}|tkrmt|St|j|S(Nt__all__s%s.%s((RsR5R!R0RRr(R7R%toverride_exportstkey((s-/usr/lib/python2.7/dist-packages/gi/module.pyRdscC@smtt|j}|j|jj|jt|jt|jdd}|j|t	|S(NRx((
RgRhRiRjRRRkRrR!RsRm(R7RnRy((s-/usr/lib/python2.7/dist-packages/gi/module.pyRps
cC@s5tj|j}d|jj|jj|j|fS(Ns<%s.%s %r from %r>(R.R3R0RiRAR2(R7Re((s-/usr/lib/python2.7/dist-packages/gi/module.pyRfs
	(R2RAR9RwRdRpRf(((s-/usr/lib/python2.7/dist-packages/gi/module.pyRqs
					
tDynamicGObjectModulecB@s eZdZdZdZRS(sgWrapper for the internal GObject module

    This class allows us to access both the static internal PyGObject module and the GI GObject module
    through the same interface.  It is returned when by importing GObject from the gi repository:

    from gi.repository import GObject

    We use this because some PyGI interfaces generated from the GIR require GObject types not wrapped
    by the static bindings.  This also allows access to module attributes in a way that is more
    familiar to GI application developers.  Take signal flags as an example.  The G_SIGNAL_RUN_FIRST
    flag would be accessed as GObject.SIGNAL_RUN_FIRST in the static bindings but in the dynamic bindings
    can be accessed as GObject.SignalFlags.RUN_FIRST.  The latter follows a GI naming convention which
    would be familiar to GI application developers in a number of languages.
    cC@stj|dddS(NR$R(RqR9(R7((s-/usr/lib/python2.7/dist-packages/gi/module.pyR9scC@sMddlm}t||d}|dkrItt|j|}n|S(Ni(R(RRR!R5tsuperR{Rd(R7R%Rtattr((s-/usr/lib/python2.7/dist-packages/gi/module.pyRds
(R2RAt__doc__R9Rd(((s-/usr/lib/python2.7/dist-packages/gi/module.pyR{s	tDynamicGLibModulecB@s eZdZdZdZRS(sWrapper for the internal GLib module

    This class allows us to access both the static internal PyGLib module and the GI GLib module
    through the same interface.  It is returned when by importing GLib from the gi repository:

    from gi.repository import GLib

    We use this because some PyGI interfaces generated from the GIR require GLib types not wrapped
    by the static bindings.  This also allows access to module attributes in a way that is more
    familiar to GI application developers.
    cC@stj|dddS(NR$tGLib(RqR9(R7((s-/usr/lib/python2.7/dist-packages/gi/module.pyR93scC@s=tt|d}|dkr9tt|j|}n|S(N(R!RR5R|RRd(R7R%R}((s-/usr/lib/python2.7/dist-packages/gi/module.pyRd6s(R2RAR~R9Rd(((s-/usr/lib/python2.7/dist-packages/gi/module.pyR&s	()t
__future__RtosRRRRRDtstringRtt	overridesRt_giRRRR	R
RRR
RRRRRRRttypesRRRtget_defaultR.R'R,RR-RqR{R(((s-/usr/lib/python2.7/dist-packages/gi/module.pyt<module>s"

d		}2