ó c5cYc@sddlZddlZddlmZddlmZddlmZddlmZddlmZdd d „ƒYZ dS( iÿÿÿÿN(tpathi(tconfig(tutils(t dbustypes(tparsertDocbookCodeGeneratorcBs†eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „ZRS(cCs)||_||_||_|jƒdS(N(tifacestdocbooktoutdirtgenerate_expand_dicts(tselfRRR((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt__init__"s   c Cs´d}|r;xD|jD]}tt|jƒ|ƒ}qWntt|jƒ|ƒ}d}|rÎxÄ|jD]^}x)|jD]}tt|jƒ|ƒ}qyWx)|jD]}tt|jƒ|ƒ}q¥WqiWnXx)|jD]}tt|jƒ|ƒ}qØWx)|jD]}tt|jƒ|ƒ}qW|rq|jjdt j |jƒ|j|j|t|jƒdfƒn-|jjd|j|t|jƒdfƒd}x{|jD]p}|dkrá|jjd|ddfƒn|jjd|j|t|jƒd|jfƒ|d}q®Wx{|jD]p}|dkr_|jjd|ddfƒn|jjd |j|t|jƒd|jfƒ|d}q,W|jjd ƒdS( Nis1%s%*s (ts%s%*s (s, %*sis IN %s%*s %sis OUT %s%*s %ss); ( tmethodstmaxtlentnametin_argst signaturetout_argstouttwriteRtdots_to_hyphens( R titmt in_synopsistmax_method_lent_mtmax_signature_lentatcount((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_method_prototype(sB# 9 ! !3 !3c CsÞd}|r;xD|jD]}tt|jƒ|ƒ}qWntt|jƒ|ƒ}d}|r¢xl|jD]2}x)|jD]}tt|jƒ|ƒ}qyWqiWn,x)|jD]}tt|jƒ|ƒ}q¬W|r|jjdtj |jƒ|j|j|t|jƒdfƒn-|jjd|j|t|jƒdfƒd}x{|jD]p}|dkr‰|jjd|ddfƒn|jjd|j|t|jƒd|jfƒ|d}qVW|jjd ƒdS( Nis1%s%*s (R s%s%*s (s, %*sis%s%*s %sis); ( tsignalsRRRtargsRRRRR( R RtsRtmax_signal_lent_sRRR((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_signal_prototypePs0# 9 ! !3cCsrd}|r;xD|jD]}tt|jƒ|ƒ}qWntt|jƒ|ƒ}d}|rŽxD|jD]}tt|jƒ|ƒ}qiWntt|jƒ|ƒ}|rñ|jjdtj|jƒ|j|j|t|jƒdfƒn-|jjd|j|t|jƒdfƒ|j r9|j r9d}n|j rKd}nd}|jjd||jfƒdS( Nis1%s%*sR s%s%*st readwrites readable s writable s %s %s ( t propertiesRRRRRRRRtreadabletwritable(R RtpRtmax_property_lent_pRtaccess((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_property_prototypeos* 9 !   cCs’|jjddƒ|jjddƒ|jjdd ƒx'|jD]}|j||dtƒqFW|jjdd ƒ|jjdd ƒdS( Ns# s1 Methods s Rs s ((((((RRR RtTrue(R RR((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_synopsis_methodsscCs’|jjddƒ|jjddƒ|jjdd ƒx'|jD]}|j||dtƒqFW|jjdd ƒ|jjdd ƒdS( Ns! s5 Signals s Rs s ((((((RRR R%R/(R RR"((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_synopsis_signals–scCs’|jjddƒ|jjddƒ|jjdd ƒx'|jD]}|j||dtƒqFW|jjdd ƒ|jjdd ƒdS( Ns s6 Properties s Rs s ((((((RRR'R.R/(R RR*((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_synopsis_propertiesŸscCss|jjdtj|jƒ|jfƒ|jjd|jƒ|jjdtj|jƒ|j|j|j|j|jfƒ|jjdƒ|j||dtƒ|jjdƒ|jjd|j|j t ƒƒ|j sì|j r |jjdƒx||j D]q}|jjd dƒ|jjd |j |jfƒ|jjd |j|j t ƒƒ|jjd dƒqWx||j D]q}|jjd dƒ|jjd |j |jfƒ|jjd |j|j t ƒƒ|jjd dƒq…W|jjdƒnt|jƒdkr<|jjd|jƒn|jr_|jjd|jƒn|jjdƒdS(Ns1 s! The %s() method s] %s.%s() s Rs s%s s s sC IN %s %s: s %s s sD OUT %s %s: s is#Since %s s>The %s() method is deprecated.s (((((RRRRRtname_without_prefixRtFalset expand_parast doc_stringR/RRRRtsincet deprecated(R RRR((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_method¨s2)A# # # cCsë|jjdtj|jƒ|jfƒ|jjd|jƒ|jjdtj|jƒ|j|j|j|j|jfƒ|jjdƒ|j||dtƒ|jjdƒ|jjd|j|j t ƒƒ|j r…|jjdƒx||j D]q}|jjd dƒ|jjd |j |jfƒ|jjd |j|j t ƒƒ|jjd dƒqýW|jjd ƒnt |jƒdkr´|jjd|jƒn|jr×|jjd|jƒn|jjdƒdS(Ns1 s! The "%s" signal s] %s::%s s Rs s%s s s s@ %s %s: s %s s s is#Since %s s>The "%s" signal is deprecated.s (((RRRRRR3R%R4R5R6R/R!RRR7R8(R RR"R((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_signalÃs()A#  # cCs@|jjdtj|jƒ|jfƒ|jjd|jƒ|jjdtj|jƒ|j|j|j|j|jfƒ|jjdƒ|j||dtƒ|jjdƒ|jjd|j|j t ƒƒt |j ƒdkr |jjd |j ƒn|j r,|jjd |jƒn|jjd ƒdS( Ns5 s# The "%s" property s] %s:%s s Rs s%s is#Since %s s@The "%s" property is deprecated.s (RRRRRR3R.R4R5R6R/RR7R8(R RR*((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytprint_propertyÙs)A# cCs—x*|jD]}|j||j|ƒ}q Wx*|jD]}|j||j|ƒ}q7W|r“tjdd„|ƒ}tjdd„|ƒ}n|S(Ns@[a-zA-Z0-9_]*cSsd|jdƒddS(Ns iis (tgroup(R((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytîss%[a-zA-Z0-9_]*cSsd|jdƒddS(Ns iis (R<(R((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyR=ðs(texpand_member_dict_keystreplacetexpand_member_dicttexpand_iface_dict_keystexpand_iface_dicttretsub(R R"texpandParamsAndConstantstkey((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytexpandçscCs8|j||ƒjƒ}|jdƒs4d|}n|S(Ns%s(RGtstript startswith(R R"RE((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyR5ós cCs³i|_i|_x^|jD]S}d|j}dtj|jƒ|jf}||j|%ss%s.%s()s.%s()s#%s::%ss."%s"s#%s:%ss0"%s"treverse(R@RBRRRRR R R'tsortedtkeysR/R>RA(R RRFtvalueRR"R*((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyR ùs(    %%%cCsWxP|jD]E}ttj|jd|j|jfƒdƒ|_|jjdd ƒ|jjdd!ƒ|jjdd"ƒ|jjdd#ƒ|jjdd$ƒ|jjd|jƒ|jjd d%ƒ|jjd t j |jƒ|jfƒ|jjd t j |jƒ|j |jfƒ|jjd d&ƒ|jjd d'ƒ|jjd|jƒ|jjd|j ƒ|jjdd(ƒt |jƒdkr·|j|ƒnt |jƒdkrÜ|j|ƒnt |jƒdkr|j|ƒn|jjdt j |jƒƒ|jjdd)ƒ|jjd|j|jtƒƒt |jƒdkr‡|jjd|jƒn|jrª|jjd|jƒn|jjdd*ƒt |jƒdkr9|jjd|jƒ|jjdd+ƒx!|jD]}|j||ƒqW|jjdd,ƒnt |jƒdkr´|jjd|jƒ|jjdd-ƒx!|jD]}|j||ƒqƒW|jjdd.ƒnt |jƒdkr/|jjd|jƒ|jjdd/ƒx!|jD]}|j||ƒqþW|jjdd0ƒn|jjdƒ|jjdƒq WdS(1Ns %s-%s.xmltwR s' sA s s s] %s sa %s s s s %ss %ss is/ s/ Description s %s s% Since %s s?The %s interface is deprecated.s s0 s5 Method Details s0 s5 Signal Details s3 s7 Property Details s s ((((((((((((((((((RtopenRtjoinRRRRRRRR3tdoc_string_briefRR R0R R1R'R2R5R6R/R7R8R9R:R;(R RRR"((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pytgeneratesd1)/ # (t__name__t __module__R RR%R.R0R1R2R9R:R;RGR5R RR(((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyR!s  (       (( tsysRCtosRR RRRRR(((s\/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyts