ó ĘQ_Tc@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((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt__init__s     (t__name__t __module__t__doc__R(((s6/usr/local/lib/python2.7/site-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. topentclosecCst|ƒ|_||_g|_g|_d|_i|_i|_i|_g|_ |j dddt ƒ|j dddt ƒ|j dddt ƒ|j d ddtƒ|j d ddtƒ|j d ddtƒ|j dddtƒ|j ddd tƒ|j ddd!t ƒ|j ddd"t ƒ|j ddd#tƒ|j ddd$tƒ|j ddd%tƒ|j ddd&t ƒdS('NitCARD8R tuint8_ttCARD16tuint16_ttCARD32tuint32_ttCARD64tuint64_ttINT8tint8_ttINT16tint16_ttINT32tint32_ttINT64tint64_ttBYTEtBOOLtchartfloattdoubletvoid(R#(R%(R'(R)(R+(R-(R/(R1(R#(R#(schar(sfloat(R6(svoid(Rt namespacetoutputtimportstdirect_importst import_levelttypesteventsterrorstalltadd_typettcard8ttcard16ttcard32ttcard64ttint8ttint16ttint32ttint64ttcharttfloatttdouble(RRR9((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR?s.        cCstj||jƒdS(N(RtexecuteR8(R((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytregister\scCs4x-|jD]"\}}d|_|j|ƒq WdS(Ni(R@tpadstresolve(Rtnametitem((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyRP`s cCs?|jƒx$|jD]\}}|j|ƒqW|jƒdS(N(R R@toutR!(RRQRR((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytgeneratefs cCsH|jdkr+|jj||jfƒn|jj||jfƒdS(Ni(R<R;tappendRR:(RRQR8((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_importoscCs.x'|jD]\}}||kr tSq WtS(N(R:RR(RRQtname_R((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt has_importts cCsc||}||jkrdS||f|j|<|d |jjkr_|jj||fƒndS(Ni˙˙˙˙(R=R8RR@RU(RtidRRQRRtkey((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyRA{s  cCs¨|}||jkr$|j||S|jj|}||jkrR|j||Sx?|jjƒD].}|jdƒd|krb|j||SqbWtd|ƒ‚dS(NRisType %s not found(R=R8Rtkeyst rpartitiontResolveException(RRYtidxRZ((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_type_implƒscCs|j|dƒS(Ni(R_(RRY((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytget_type’scCs|j|dƒS(Ni(R_(RRY((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_type_name•scCs3|d |jjkr/|jj||fƒndS(Ni˙˙˙˙(R8RR@RU(RRYRQRR((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_request™scCsF||f|j|<|d |jjkrB|jj||fƒndS(Ni˙˙˙˙(R>R8RR@RU(RRYRQRR((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_eventžscCs|j|dS(Ni(R>(RRY((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_eventŁscCsF||f|j|<|d |jjkrB|jj||fƒndS(Ni˙˙˙˙(R?R8RR@RU(RRYRQRR((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_error§scCs|j|dS(Ni(R?(RRY((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_errorŹs(RRRt__main__R9R R!RRNRPRTRVRXRAR_R`RaRbRcRdReRf(((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR2s$                (Rtos.pathRRtxml.etree.cElementTreeRtxcbgenRt xcbgen.errort xcbgen.xtypesRgtobjectRR(((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyts   %