ó ¤ŒZc@`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û|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ƒ£scC`sa|j|ƒ}tj|jd||jjtdƒƒƒ}|j||ƒ|jj|ƒdS(Nunameutype( t _parse_typeRtAliasR:R@Rt_parse_generic_attribsRR(RR*ttypevaltalias((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRG¦s.cC`s–t|tjƒst‚|jjdƒ}|riyt|ƒdk|_Wqitk ret |_qiXn|jjdƒ}|rºyt|ƒdk|_ Wqºtk r¶t |_ qºXn|j rÇdS|j t dƒƒ}|dk r|jr|j|_qn|jjdƒ}|r'||_n|j t dƒƒ}|dk rc|jrc|j|_qcn|jjdƒ}|r‡||_n|j t dƒƒ} | dk rÃ| jrÃ| j|_qÃn|jjd ƒ} | rç| |_n|j t d ƒƒ} | dk r#| jr#| j|_q#n|jt d ƒƒ} | r’tƒ} x<| D]4}|jjd ƒ}|jjd ƒ}|| |td|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 ts t‚|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(Nunameu return-valueunode %r has no return-valueutransfer-ownershipunullableu1uthrowsutypeu identifiertwhenuwhent no_recurseu no-recurseu0tdetailedudetailedtactionuactiontno_hooksuno-hooksushadowsu shadowed-byumoved-tou parametersuinstance-parameteru parameteruclosureu%d >= %dudestroy(%R:R?R R`R@RtReturnRXRaRZRšRR{RRŠR9Rtshadowst shadowed_bytmoved_toR‹R-R tinstance_parameterR/Rt enumeratet_parse_type_array_lengthttypeR^R3targnamet closure_namet destroy_namet parametersRttrack(RR*RŽR‹R.t returnnodettransfertnullabletretvalR±tthrowsR–t identifiertparameters_nodet paramnodetiRŸtclosuretidxtdestroy((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRz:sp !!     . . 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*RltrestnamesR,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(R:R@RR RttforeignRZRR„R…R†R/R RzRR{R}R~RR«R¬R­R|R‚Rƒ( RtclsR*tcompoundRTR–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ÍRtRecordR:R@R RRRptis_gtype_struct_forR(RR*t anonymouststructRÏ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRK£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.pyRL¬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| | ƒSnt s¶tdƒ‚dS(NucallbackunameutypeuarrayRÃuzero-terminatedu0u fixed-sizeuvarargsu GLib.Listu GLib.SListu varargsuGLib.HashTableiiiuFailed to parse inner type(u GLib.Listu GLib.SList(ucallbackuarrayu varargsutype(R R RRpR:R@RRÃRXRtArrayRatzeroterminatedR^tsizetVarargsRt TypeUnknowntTypeR-tlisttmaptTYPE_ANYtListR/t_parse_type_simpleR3RtMapR9(RttypenodeR[t 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`sXx?ttdƒD].}|j|ƒ}|dk r|j|ƒSqWtsTtdƒ‚dS(NucallbackuarrayuvarargsutypeuFailed to parse toplevel type(ucallbackuarrayuvarargsutype(RÛR R?RRÞRaR9(RR*R.Rà((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRXäs  cC`sÀ|jtdƒƒ}|dkr%dS|jjdƒ}|dk r¼t|ƒ}|t|ƒks€td||t|ƒfƒ‚t||t j ƒr©||j |_ q¼||j |_ ndS(uYA hack necessary to handle the integer parameter/field indexes on array types.uarrayNulengthu %r %d >= %d(R?R RR:R@R^R3R9R'RtFieldR.tlength_param_nameR®(RtsiblingsR*R[RàtlenidxR½((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR¬ës   1c 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(RtBoxedR:R R@RRZRRRR/R RzR{RtR}R~RƒR„Rš(RR*RlRTR–R—R›((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRMús&    cC`s¸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(NurecorduunionucallbackRÐufieldunameureadableu0uwritableu1ubitstanonymous_nodeuprivate(urecorduunion(RR RÛR R-RzRRšRKRtRLRaR9RXRêR:R@tprivateR‹RZ(RR*R‹t type_nodeRït anonymous_eltRÌ((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyR¿s2  $  c C`s¢tj|jd|j|ƒ|jjdƒdk|jjdƒdk|jjdƒdk|jjdƒdk|jjdƒƒ}|j||ƒ||_|S( Nunameureadableu0uwritableu1u constructuconstruct-onlyutransfer-ownership(RtPropertyR:RXR@RZR‹(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(RtMemberR:R@RR RZ(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( RXRtConstantR:R@RRZRR(RR*Rñtconstant((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRNCs 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(R:R@RR R R RtBitfieldtEnumt error_domainRÃRZRRRR/RöR‹RzR{R|(RR*R.RÃRÆt type_nametglib_error_domainRŽRùRlt member_nodeRõR•R–((ss/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/girparser.pyRHLs8         N(#t__name__t __module__RaRRRR&R-R/R6R$R<R=R>RGRZRJRIROR RRzR†RÍRKRLRÞRXR¬RMR¿RˆRöRNRH(((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