ó 'cäYc@`sÓddlmZddlmZddlmZddlmZddlZddlmZddlm Z dd l m Z dd l m Z d Zd Zd Zd„Zd„Zd„Zdefd„ƒYZdS(i(tabsolute_import(tdivision(tprint_function(tunicode_literalsN(tparsei(tast(tCOMPATIBLE_GIR_VERSION(t OrderedDictu)http://www.gtk.org/introspection/core/1.0u&http://www.gtk.org/introspection/c/1.0u)http://www.gtk.org/introspection/glib/1.0cC`sdt|fS(Nu{%s}%s(tCORE_NS(ttag((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_corens'scC`sdt|fS(Nu{%s}%s(tGLIB_NS(R ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_glibns+scC`sdt|fS(Nu{%s}%s(tC_NS(R ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_cns/st GIRParsercB`s+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( cC`s||_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__5s  cC`sLtjj|ƒ}|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.pyR<s   cC`sMd|_tƒ|_tƒ|_tƒ|_d|_|j|jƒƒdS(N( RRtsett_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.pyRCs      cC`s|jS(N(R(R((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt get_namespaceKscC`sjt|tƒr<xT|jƒD]}|j|kr|SqWn*x'|jƒD]}|j|krI|SqIWdS(N(t isinstancetstrt getchildrenR R(Rtnodet name_or_namestchild((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_find_first_childPs cC`s,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_children[scC`sN|js dStjƒtj}|jd}|j|ƒrJ|t|ƒS|S(Niÿÿÿÿ(RRRtgetcwdtsept startswithtlen(Rtcwdtcurfile((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_get_current_file^s  c C`sÎ|jd}|tkr;td|jƒ|tfƒ‚nxƒ|jƒD]u}|jtdƒkrs|j|ƒqH|jtdƒkr˜|j|ƒqH|jt dƒkrH|j |ƒqHqHW|j tdƒƒ}|jj t dƒƒ}|r|j dƒ}n|jj t dƒƒ}|r6|j dƒ}ntj|jd |jdd |d |ƒ|_d |jkr“|jd j dƒ|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|jtdƒ6}|j sˆ|j!|tdƒ<|j"|tdƒR RttexttdocRPt version_doct deprecatedtdeprecated_doct stabilityt stability_doctfindallRt attributes(RR*tobjR]R`RbRPRcRdReRfRgRit attributes_t attributeR.tvalue((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRY¬s^                cC`sÒ|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|ƒ|t|ƒ}|j ||ƒg} |jjdƒdk} |tj kró|||| | |jjt dƒƒƒ} n |tj kr5|jjt d ƒƒ} |||| | | ƒ} nÉ|tj kr\|||| | ƒ} n¢|tjkrþ|||| d |jjd ƒd |jjd dƒdkd|jjddƒdkd|jjddƒdkd|jjddƒdkƒ} n|jjddƒ| _|jjddƒ| _|jjddƒ| _|| _|jtdƒƒ} | dk rœ|j| tdƒƒ}|r£|j|ƒ| _nx6|j| tdƒƒD]}| j|j|ƒƒq¼Wx½t|j| tdƒƒƒD]š\}}| |}|j| ||jƒ|jjdƒ}|r^t|ƒ}| |j|_n|jjdƒ}|rût|ƒ}| |j|_qûqûWn|j| ||jƒ| | _ |j || ƒ|j!j"| ƒ| S(Nunameu return-valueunode %r has no return-valueutransfer-ownershipunullableu1uthrowsutypeu identifiertwhenuwhent no_recurseu no-recurseu0tdetailedudetailedtactionuactiontno_hooksuno-hooksushadowsu shadowed-byumoved-tou parametersuinstance-parameteru parameteruclosureudestroy(#R9R>R R^R?RtReturnRWR_RYR™RRzR~R‰Rtshadowst shadowed_bytmoved_toRŠR-RŸtinstance_parameterR/Rt enumeratet_parse_type_array_lengthttypeR\targnamet closure_namet destroy_namet parametersRttrack(RR*RRŠR.t returnnodettransfertnullabletretvalR°tthrowsR•t identifiertparameters_nodet paramnodetiRžtclosuretidxtdestroy((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRy:sj !!      cC`s|g}tdƒtdƒtdƒtdƒf}xE|jƒD]7}|j|kr=|j||ƒ}|j|ƒq=q=W|S(Nufieldurecorduunionucallback(R R)R t _parse_fieldR(RR*RjtrestnamesR,tfieldobj((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR…~s*c C`s2||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(Nunametctypeutypet disguisedu disguisedu1t gtype_nameu type-nametget_typeuget-typetc_symbol_prefixu symbol-prefixuforeignumethodufieldufunctionu constructor(R9R?RR RstforeignRYRRƒR„R…R/R RyRRzR|R}RRªR«R¬R{RR‚( RtclsR*tcompoundRSR•Rºt fieldnodetfieldR–((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt_parse_compound‡s4   +   cC`sn|jtj|ƒ}|jjtdƒƒ}|dk rQ|jj|ƒ|_ n|sj|jj |ƒn|S(Nuis-gtype-struct-for( RÌRtRecordR9R?R RRRntis_gtype_struct_forR(RR*t anonymouststructRÎ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRJ£s cC`s2|jtj|ƒ}|s.|jj|ƒn|S(N(RÌRtUnionRR(RR*RÏtunion((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRK¬sc C`s¨|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|tttdƒƒƒ} | dk rì|j|ƒ}n t j}t j| |d| ƒS| d krŽ|j|tdƒƒ} tt|j| ƒƒ} x&t| ƒdkro| jt jƒqJWt j| d| dd| ƒS|jj| | ƒSndS(NucallbackunameutypeuarrayRÂuzero-terminatedu0u fixed-sizeuvarargsu GLib.Listu GLib.SListu varargsuGLib.HashTableiii(u GLib.Listu GLib.SList(ucallbackuarrayu varargsutype(R R RRnR9R?RRÂRWRtArrayR_tzeroterminatedR\tsizetVarargsRt TypeUnknowntTypeR-tlisttmaptTYPE_ANYtListR/t_parse_type_simpleR3RtMap(RttypenodeRZt array_typet element_typet array_ctypetrettzerot fixed_sizeR.RÂtsubchildt subchildrentsubchildren_types((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRݲsR           cC`sFx?ttdƒD].}|j|ƒ}|dk r|j|ƒSqWdS(Nucallbackuarrayuvarargsutype(ucallbackuarrayuvarargsutype(RÚR R>RRÝ(RR*R.Rß((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRWäs  cC`s|jtdƒƒ}|dkr%dS|jjdƒ}|dk r‹t|ƒ}t||tjƒrx||j |_ q‹||j |_ ndS(uYA hack necessary to handle the integer parameter/field indexes on array types.uarrayNulength( R>R RR9R?R\R'RtFieldR.tlength_param_nameR­(RtsiblingsR*RZRßtlenidxR¼((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR«ës   c C`sytj|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( NunameRÄu type-nameRÅuget-typeRÆu symbol-prefixumethodu constructorucallback(RtBoxedR9R R?RRYRRRR/R RyRzRsR|R}R‚RƒR™(RR*RjRSR•R–Rš((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRLús&    cC`sd}d}|jttd ƒkr-|}n|j|tdƒƒ}|dk rÛ|jtdƒkr~|j|tjƒ}qê|jtdƒkr«|j|dt ƒ}qê|jtdƒkrê|j |dt ƒ}qên|j |ƒ}tj |j jdƒ||j jdƒdk|j jdƒd k|j jd ƒd |ƒ}|j jd ƒd k|_||_|j||ƒ|S(NurecorduunionucallbackRÏunameureadableu0uwritableu1ubitstanonymous_nodeuprivate(urecorduunion(RR RÚR R-RyRR™RJRsRKRWRéR9R?tprivateRŠRY(RR*RŠt type_nodeRît anonymous_eltRË((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR¾s0    c C`s¢tj|jd|j|ƒ|jjdƒdk|jjdƒdk|jjdƒdk|jjdƒdk|jjdƒƒ}|j||ƒ||_|S( Nunameureadableu0uwritableu1u constructuconstruct-onlyutransfer-ownership(RtPropertyR9RWR?RYRŠ(RR*RŠR—((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR‡/s  cC`s^tj|jd|jd|jjtdƒƒ|jjtdƒƒƒ}|j||ƒ|S(Nunameuvalueu identifierunick(RtMemberR9R?RR RY(RR*tmember((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyt _parse_member;s  cC`sk|j|ƒ}tj|jd||jd|jjtdƒƒƒ}|j||ƒ|jj|ƒdS(Nunameuvalueutype( RWRtConstantR9R?RRYRR(RR*Rðtconstant((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRMCs c C`s¯|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( Nunameutypeuget-typeu type-nameu error-domainubitfieldtmembersRÄRÅumemberufunction(R9R?RR R R RtBitfieldtEnumt error_domainRÂRYRRRR/RõRŠRyRzR{(RR*R.RÂRÅt type_nametglib_error_domainRRøRjt member_nodeRôR”R•((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRGLs8         N(#t__name__t __module__R_RRRR&R-R/R6R$R;R<R=RFRYRIRHRNRŸRRyR…RÌRJRKRÝRWR«RLR¾R‡RõRMRG(((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR3s>      5     2 F    D   2      (t __future__RRRRRtxml.etree.cElementTreeRtRt girwriterRt collectionsRRR R R R RtobjectR(((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyts