ó ¿×:Uc@sƒddlZddlmZddlmZddlmZdZdZdZ d „Z d „Z d „Z d e fd „ƒYZdS(iÿÿÿÿN(tparsei(tast(tCOMPATIBLE_GIR_VERSIONs)http://www.gtk.org/introspection/core/1.0s&http://www.gtk.org/introspection/c/1.0s)http://www.gtk.org/introspection/glib/1.0cCsdt|fS(Ns{%s}%s(tCORE_NS(ttag((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_corens!scCsdt|fS(Ns{%s}%s(tGLIB_NS(R((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_glibns%scCsdt|fS(Ns{%s}%s(tC_NS(R((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_cns)st GIRParsercBs+eZed„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„Zd„Zdd„Zd„Zd„Zed„Zed„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"RS( cCs||_d|_g|_dS(N(t _types_onlytNonet _namespacet_filename_stack(tselft types_only((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt__init__/s  cCsLtjj|ƒ}|jj|ƒt|ƒ}|j|ƒ|jjƒdS(N(tostpathtabspathRtappendRt parse_treetpop(Rtfilenamettree((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR6s   cCsMd|_tƒ|_tƒ|_tƒ|_d|_|j|jƒƒdS(N( R R tsett_pkgconfig_packagest _includest _c_includest _c_prefixt _parse_apitgetroot(RR((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR=s      cCs|jS(N(R (R((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt get_namespaceEscCsjt|tƒr<xT|jƒD]}|j|kr|SqWn*x'|jƒD]}|j|krI|SqIWdS(N(t isinstancetstrt getchildrenRR (Rtnodet name_or_namestchild((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_find_first_childJs cCs,g|jƒD]}|j|kr |^q S(N(R$R(RR%tnameR'((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_find_childrenUscCsN|js dStjƒtj}|jd}|j|ƒrJ|t|ƒS|S(Niÿÿÿÿ(RR Rtgetcwdtsept startswithtlen(Rtcwdtcurfile((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_get_current_fileXs  c Csû|jtdƒkst‚|jd}|tkrVtd|jƒ|tfƒ‚nxƒ|jƒD]u}|jtdƒkrŽ|j|ƒqc|jtdƒkr³|j |ƒqc|jt dƒkrc|j |ƒqcqcW|j tdƒƒ}|dk st‚|jjt dƒƒ}|r3|jdƒ}n|jjt d ƒƒ}|rc|jdƒ}ntj|jd |jdd |d |ƒ|_d |jkrÀ|jd jdƒ|j_n|j|j_|j|j_|j|j_i |jtdƒ6|jtdƒ6|jtdƒ6|jtdƒ6|jtdƒ6|jtdƒ6|jtdƒ6|jtdƒ6|j t!dƒ6}|j"sµ|j#|tdƒ<|j$|tdƒ            cCsÒ|jjdƒ}|r-|jj|ƒ}nd}i|jdd6|d6|jtdƒd6|jtdƒd6|jjtdƒƒd 6|jjtd ƒƒd 6}|jtd ƒkrÉt j }n[|jtd ƒkrt j }|jjdƒ}|o|dk}||dtd|fƒ‚n|jjdƒ}|jjdƒdk}tj|j|ƒ||ƒ}|j||ƒg} |jjdƒdk} |tj krð|||| | |jjt dƒƒƒ} n|tj kr2|jjt d ƒƒ} |||| | | ƒ} nÕ|tj krY|||| | ƒ} n®|tj krû|||| d |jjd ƒd |jjd d ƒdkd|jjdd ƒdkd|jjdd ƒdkd|jjdd ƒdkƒ} n tst‚|jjddƒ| _|jjddƒ| _|jjddƒ| _|| _|jtdƒƒ} | dk r|j| tdƒƒ}|r¬|j|ƒ| _nx6|j| tdƒƒD]}| j|j|ƒƒqÅWxt|j| tdƒƒƒD]ö\}}| |}|j| ||jƒ|jjdƒ}|r•t|ƒ}|t| ƒks‚td|t| ƒfƒ‚| |j|_ n|jjdƒ}|rt|ƒ}|t| ƒksçtd|t| ƒfƒ‚| |j|_!qqWn|j| ||jƒ|j|| ƒ|j"j#| ƒ| S(NR)s return-valuesnode %r has no return-valuestransfer-ownershipRªR«tthrowsRbt identifiertwhent no_recurses no-recurseRytdetailedtactiontno_hookssno-hookstshadowss shadowed-bysmoved-tot parameterssinstance-parametert parametertclosures%d >= %dtdestroy($RFRKRt ValueErrorRLRtReturnRcReR¨R RŽR’RœtFalseRER R¹t shadowed_bytmoved_toRrR(R±tinstance_parameterR*Rt enumeratet_parse_type_array_lengthRbRkR.targnamet closure_namet destroy_nameR ttrack(RR%RžRrR)t returnnodettransferRªtretvalRºR²R¥R³tparameters_nodet paramnodetiR°R¼tidxR½((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR#sn !     . .cCs|g}tdƒtdƒtdƒtdƒf}xE|jƒD]7}|j|kr=|j||ƒ}|j|ƒq=q=W|S(NtfieldR@RAR<(RR$Rt _parse_fieldR(RR%RqtrestnamesR'tfieldobj((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR˜ds*c Cs2||jjdƒd|jjtdƒƒd|jjdƒdkd|jjtdƒƒd|jjtd ƒƒd |jjtd ƒƒƒ}|jjd ƒdkr´t|_n|j||ƒ|js.|jj |j ||ƒƒxQ|j |t d ƒƒD]7}|j |tj|ƒ}t|_|jj|ƒqWxRt|j |t dƒƒƒD]2\}}|j|}|j|j||jƒq\WxB|j |t dƒƒD](}|jj|j |tj|ƒƒq«WxT|j |t dƒƒD]7} |j | tj|ƒ}t|_|jj|ƒqðWn|S(NR)RwRbt disguisedR«Rts type-nameRusget-typeRvs symbol-prefixtforeignR_RÑRDR(RFRLR RRˆR×ReR R–R—R˜R*RRRRŽRR‘RRÄRÅRbRR”R•( RtclsR%tcompoundR_R¥RÏt fieldnodeRÑR¦((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_parse_compoundms4   +   cCsn|jtj|ƒ}|jjtdƒƒ}|dk rQ|jj|ƒ|_ n|sj|jj |ƒn|S(Nsis-gtype-struct-for( RÛRtRecordRFRLRR R R„tis_gtype_struct_forR(RR%t anonymouststructRÝ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRW‰s cCs2|jtj|ƒ}|s.|jj|ƒn|S(N(RÛRtUnionR R(RR%RÞRA((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRX’scCs®|jtdƒkrM|jj|jdƒ}|jjtdƒƒ|_|S|jtdƒkr|jjdƒ}|j|ƒ}|jjtdƒƒ}t j ||d|ƒ}|jjdƒ}|rã|dkrãt |_ n|jjdƒ}|r t |ƒ|_n|S|jtd ƒkr0t jƒS|jtdƒkr˜|jjdƒ} |jjtdƒƒ} | dkr¡| dkr‘t jƒSt jd| ƒS| dkr|j|ttdƒƒ} | dk ræ|j|ƒ}n t j}t j| |d| ƒS| d kr‚|j|tdƒƒ} t|j| ƒ} x&t| ƒd krc| jt jƒq>Wt j| d| dd| ƒS|jj| | ƒSnt sªtdƒ‚dS(NR<R)RbtarrayRwszero-terminatedRys fixed-sizetvarargss GLib.Lists GLib.SListsGLib.HashTableiiisFailed to parse inner type(s GLib.Lists GLib.SList(scallbacksarrayRâstype(RRR R„RFRLR RwRcRtArrayRÀtzeroterminatedRktsizetVarargsR t TypeUnknowntTypeR(tmaptTYPE_ANYtListR*t_parse_type_simpleR.RtMapRE(RttypenodeRft array_typet element_typet array_ctypetrettzerot fixed_sizeR)Rwtsubchildt subchildrentsubchildren_types((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRì˜sR           cCsXx?ttdƒD].}|j|ƒ}|dk r|j|ƒSqWtsTtdƒ‚dS(NR<RáRâRbsFailed to parse toplevel type(scallbacksarraysvarargsstype(RéRRKR RìRÀRE(RR%R)Rî((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRcÊs  cCsÀ|jtdƒƒ}|dkr%dS|jjdƒ}|dk r¼t|ƒ}|t|ƒks€tdt|t|ƒfƒ‚t ||t j ƒr©||j |_ q¼||j|_ ndS(sYA hack necessary to handle the integer parameter/field indexes on array types.RáNtlengths %r %d >= %d(RKRR RFRLRkR.RERrR"RtFieldR)tlength_param_nameRÆ(RtsiblingsR%RfRîtlenidxRÐ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRÅÑs   1c Csytj|jtdƒd|jtdƒd|jtdƒd|jjtdƒƒƒ}|j||ƒ|jr‡|jj |ƒdSxQ|j |t dƒƒD]7}|j |tj |ƒ}t|_|jj |ƒq WxB|j |t d ƒƒD](}|jj |j |tj |ƒƒqôWxB|j |t d ƒƒD](}|jj |j |tj|ƒƒq9W|jj |ƒdS( NR)Rts type-nameRusget-typeRvs symbol-prefixR_RR<(RtBoxedRFRRLR ReR R RR*RRRŽRˆRR‘R•R–R¨(RR%RqR_R¥R¦R<((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRYàs&    cCs¸d}d}|jttdƒkr-|}n|j|tdƒƒ}|dk rð|jtdƒkr~|j|tjƒ}q#|jtdƒkr«|j|dt ƒ}q#|jtdƒkrØ|j |dt ƒ}q#t s#t |jƒ‚n3|jtdƒkst |jƒ‚|j |ƒ}tj|jjdƒ||jjdƒdk|jjd ƒd k|jjd ƒd |ƒ}|jjd ƒd k|_||_|j||ƒ|S(NR@RAR<RÞRÑR)treadableRytwritableR«tbitstanonymous_nodetprivate(srecordsunion(R RRéRR(RRR¨RWRˆRXRÀRERcRùRFRLRRrRe(RR%Rrt type_nodeRt anonymous_eltRÑ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRÒ÷s2  $  c Cs¢tj|jd|j|ƒ|jjdƒdk|jjdƒdk|jjdƒdk|jjdƒdk|jjdƒƒ}|j||ƒ||_|S( NR)RþRyRÿR«t constructsconstruct-onlystransfer-ownership(RtPropertyRFRcRLReRr(RR%RrR§((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRšs  cCs^tj|jd|jd|jjtdƒƒ|jjtdƒƒƒ}|j||ƒ|S(NR)tvalueR³tnick(RtMemberRFRLR RRe(RR%tmember((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt _parse_member!s  cCsk|j|ƒ}tj|jd||jd|jjtdƒƒƒ}|j||ƒ|jj|ƒdS(NR)RRb( RcRtConstantRFRLR ReR R(RR%RRC((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRZ)s c Cs¯|jjdƒ}|jjtdƒƒ}|jjtdƒƒ}|jjtdƒƒ}|jjtdƒƒ}|jtdƒkr“tj}n tj}g}|||d|d|d |ƒ} || _ || _ |j || ƒ|j r|j j| ƒdSxE|j|td ƒƒD]+} |j| ƒ} | | _|j| ƒqWxN|j|td ƒƒD]4} |j| tjƒ} | | _| jj| ƒqcW|j j| ƒdS( NR)Rbsget-types type-names error-domainR;tmembersRtRuR RD(RFRLR RRRRtBitfieldtEnumt error_domainRwReR R RR*R RrRRŽR(RR%R)RwRut type_nametglib_error_domainRžR Rqt member_nodeR R¤R¥((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRT2s8         N(#t__name__t __module__RÀRRRR!R(R*R1RRHRIRJRSReRVRUR[R±R RR˜RÛRWRXRìRcRÅRYRÒRšR RZRT(((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR -s>      5     ! F    A   2      (Rtxml.etree.cElementTreeRtRt girwriterRRRRRRR tobjectR (((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyts