ó ÚśóMc@sŒdZddlmZmZddlmZddlmZddlTddl Tddl Z de fd„ƒYZ d e fd „ƒYZ dS( sJ This module contains the namespace class and the singleton module class. i˙˙˙˙(tdirnametbasename(tparse(tmatcher(t*Nt NamespacecBseZdZd„ZRS(s[ Contains the naming information for an extension. Public fields: header is the header attribute ("header file" name). is_ext is true for extensions, false for xproto. major_version and minor_version are extension version info. ext_xname is the X extension name string. ext_name is the XCB extension name prefix. cCs||_t|ƒ|_t|ƒ|_t|ƒjƒ|_|jjdƒ|_ |j d|_ |jjdt ƒrčt |_ |jjdƒ|_|jjdƒ|_|jjdƒ|_|jjdƒ|_d|jf|_nt |_ d|_d |_dS( Ntheadert:sextension-xnames major-versions minor-versionsextension-nametxcbt(R(tpathRtdirRtfileRtgetroottroottgetRtnstFalsetTruetis_extt major_versiont minor_versiont ext_xnametext_nametprefix(tselftfilename((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt__init__s     (t__name__t __module__t__doc__R(((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyR s tModulecBsŻeZdZejdZejdZd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd„Zd„Zd„ZRS(s8 This is the grand, encompassing class that represents an entire XCB specification. Only gets instantiated once, in the main() routine. Don't need to worry about this much except to declare it and to get the namespace. Public fields: namespace contains the namespace info for the spec. topentclosecCsQt|ƒ|_||_g|_i|_i|_i|_g|_|jdddt ƒ|jdddt ƒ|jdddt ƒ|jdddt ƒ|jd ddt ƒ|jd ddtƒ|jdddt ƒ|jdddt ƒ|jdddtƒ|jdddtƒ|jdddtƒ|jdddt ƒdS( NtCARD8R tuint8_ttCARD16tuint16_ttCARD32tuint32_ttINT8tint8_ttINT16tint16_ttINT32tint32_ttBYTEtBOOLtchartfloattdoubletvoid(R#(R%(R'(R)(R+(R-(R#(R#(schar(sfloat(R2(svoid(Rt namespacetoutputtimportsttypesteventsterrorstalltadd_typettcard8ttcard16ttcard32ttint8ttint16ttint32ttcharttfloatttdouble(RRR5((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyR?s&      cCstj||jƒdS(N(RtexecuteR4(R((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pytregisterXscCs+x$|jD]\}}|j|ƒq WdS(N(R:tresolve(Rtnametitem((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyRG\scCs?|jƒx$|jD]\}}|j|ƒqW|jƒdS(N(R R:toutR!(RRHRI((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pytgenerateas cCs|jj||jfƒdS(N(R6tappendR(RRHR4((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt add_importjscCs.x'|jD]\}}||kr tSq WtS(N(R6RR(RRHtname_R((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt has_importms cCsc||}||jkrdS||f|j|<|d |jjkr_|jj||fƒndS(Ni˙˙˙˙(R7R4RR:RL(RtidRRHRItkey((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyR;ts  cCs¨|}||jkr$|j||S|jj|}||jkrR|j||Sx?|jjƒD].}|jdƒd|krb|j||SqbWtd|ƒ‚dS(NRisType %s not found(R7R4Rtkeyst rpartitiontResolveException(RRPtidxRQ((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt get_type_impl|scCs|j|dƒS(Ni(RV(RRP((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pytget_type‹scCs|j|dƒS(Ni(RV(RRP((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt get_type_nameŽscCs3|d |jjkr/|jj||fƒndS(Ni˙˙˙˙(R4RR:RL(RRPRHRI((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt add_request’scCsF||f|j|<|d |jjkrB|jj||fƒndS(Ni˙˙˙˙(R8R4RR:RL(RRPRHRI((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt add_event—scCs|j|dS(Ni(R8(RRP((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt get_eventœscCsF||f|j|<|d |jjkrB|jj||fƒndS(Ni˙˙˙˙(R9R4RR:RL(RRPRHRI((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt add_error scCs|j|dS(Ni(R9(RRP((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyt get_errorĽs(RRRt__main__R5R R!RRFRGRKRMROR;RVRWRXRYRZR[R\R](((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyR2s$                (Rtos.pathRRtxml.etree.cElementTreeRtxcbgenRt xcbgen.errort xcbgen.xtypesR^tobjectRR(((s2/usr/lib/python2.7/vendor-packages/xcbgen/state.pyts   %