ó
½(~Qc @ so d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d d „ ƒ YZ d S(
iÿÿÿÿNi ( t config( t utils( t dbustypes( t parsert DocbookCodeGeneratorc B s† e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z d „ Z
d „ Z d
„ Z RS( c C s | | _ | | _ | j ƒ d S( N( t ifacest docbookt generate_expand_dicts( t selfR R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt __init__# s c C s´ d } | r; xD | j D] } t t | j ƒ | ƒ } q Wn t t | j ƒ | ƒ } d } | rÎ xÄ | j D]^ } x) | j D] } t t | j ƒ | ƒ } qy Wx) | j D] } t t | j ƒ | ƒ } q¥ Wqi WnX x) | j D] } t t | j ƒ | ƒ } qØ Wx) | j D] } t t | j ƒ | ƒ } qW| rq| j j d t j
| j ƒ | j | j | t | j ƒ d f ƒ n- | j j d | j | t | j ƒ d f ƒ d } x{ | j D]p } | d k rá| j j d | d d f ƒ n | j j d | j | t | j ƒ d | j f ƒ | d } q®Wx{ | j D]p } | d k r_| j j d | d d f ƒ n | j j d | j | t | j ƒ d | j f ƒ | d } q,W| j j d
ƒ d S( Ni s1 %s%*s (t s %s%*s (s ,
%*si s IN %s%*s %si s OUT %s%*s %ss );
( t methodst maxt lent namet in_argst signaturet out_argst outt writeR t dots_to_hyphens( R t it mt in_synopsist max_method_lent _mt max_signature_lent at count( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_method_prototype( sB #9!!3!3c C sÞ d } | r; xD | j D] } t t | j ƒ | ƒ } q Wn t t | j ƒ | ƒ } d } | r¢ xl | j D]2 } x) | j D] } t t | j ƒ | ƒ } qy Wqi Wn, x) | j D] } t t | j ƒ | ƒ } q¬ W| r| j j d t j | j ƒ | j | j | t | j ƒ d f ƒ n- | j j d | j | t | j ƒ d f ƒ d } x{ | j D]p } | d k r‰| j j d | d d f ƒ n | j j d | j | t | j ƒ d | j f ƒ | d } qVW| j j d ƒ d S(
Ni s1 %s%*s (R
s %s%*s (s ,
%*si s %s%*s %si s );
(
t signalsR R
R t argsR R R R R ( R R t sR t max_signal_lent _sR R R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_signal_prototypeP s0 #9!!3c C sr d } | r; xD | j D] } t t | j ƒ | ƒ } q Wn t t | j ƒ | ƒ } d } | rŽ xD | j D] } t t | j ƒ | ƒ } qi Wn t t | j ƒ | ƒ } | rñ | j j d t j | j ƒ | j | j | t | j ƒ d f ƒ n- | j j d | j | t | j ƒ d f ƒ | j r9| j
r9d } n | j rKd } n d } | j j d | | j f ƒ d S( Ni s1 %s%*sR
s %s%*st readwrites readable s writable s %s %s
( t
propertiesR R
R R R R R R t readablet writable( R R t pR t max_property_lent _pR t access( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_property_prototypeo s* 9! c C s’ | j j d d ƒ | j j d d ƒ | j j d d ƒ x' | j D] } | j | | d t ƒqF W| j j d d
ƒ | j j d d ƒ d S( Ns#
s1 Methods
s
R s
s
( ( ( ( ( ( R R R R t True( R R R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_synopsis_methods s c C s’ | j j d d ƒ | j j d d ƒ | j j d d ƒ x' | j D] } | j | | d t ƒqF W| j j d d
ƒ | j j d d ƒ d S( Ns!
s5 Signals
s
R s
s
( ( ( ( ( ( R R R R# R- ( R R R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_synopsis_signals– s c C s’ | j j d d ƒ | j j d d ƒ | j j d d ƒ x' | j D] } | j | | d t ƒqF W| j j d d
ƒ | j j d d ƒ d S( Ns
s6 Properties
s
R s
s
( ( ( ( ( ( R R R% R, R- ( R R R( ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_synopsis_propertiesŸ s c C ss | j j d t j | j ƒ | j f ƒ | j j d | j ƒ | j j d t j | j ƒ | j | j | j | j | j f ƒ | j j d ƒ | j | | d t ƒ| j j d ƒ | j j d | j | j t
ƒ ƒ | j sì | j r
| j j d ƒ x| | j D]q } | j j d d ƒ | j j d
| j
| j f ƒ | j j d | j | j t
ƒ ƒ | j j d d ƒ qWx| | j D]q } | j j d d ƒ | j j d
| j
| j f ƒ | j j d | j | j t
ƒ ƒ | j j d d ƒ q…W| j j d ƒ n t | j ƒ d k r<| j j d | j ƒ n | j r_| j j d | j ƒ n | j j d ƒ d S( Ns1
s! The %s() method
s] %s.%s()
s
R s
s %s
s
s
sC IN %s %s:
s %s
s
sD OUT %s %s:
s
i s# Since %s
s> The %s() method is deprecated.s
( ( ( ( ( R R R R R t name_without_prefixR t Falset expand_parast
doc_stringR- R R R R
t sincet
deprecated( R R R R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_method¨ s2 )A# # # c C së | j j d t j | j ƒ | j f ƒ | j j d | j ƒ | j j d t j | j ƒ | j | j | j | j | j f ƒ | j j d ƒ | j | | d t ƒ| j j d ƒ | j j d | j | j t
ƒ ƒ | j r…| j j d ƒ x| | j D]q } | j j d d ƒ | j j d
| j | j f ƒ | j j d | j | j t
ƒ ƒ | j j d d ƒ qý W| j j d
ƒ n t
| j ƒ d k r´| j j d | j ƒ n | j r×| j j d | j ƒ n | j j d ƒ d S( Ns1
s! The "%s" signal
s] %s::%s
s
R s
s %s
s
s
s@ %s %s:
s %s
s
s
i s# Since %s
s> The "%s" signal is deprecated.s
( ( ( R R R R R R1 R# R2 R3 R4 R- R R R
R5 R6 ( R R R R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_signalà s( )A# # c C s@ | j j d t j | j ƒ | j f ƒ | j j d | j ƒ | j j d t j | j ƒ | j | j | j | j | j f ƒ | j j d ƒ | j | | d t ƒ| j j d ƒ | j j d | j | j t
ƒ ƒ t | j ƒ d k r | j j d | j ƒ n | j
r,| j j d
| j ƒ n | j j d ƒ d S( Ns5
s# The "%s" property
s] %s:%s
s
R s
s %s
i s# Since %s
s@ The "%s" property is deprecated.s
( R R R R R R1 R, R2 R3 R4 R- R
R5 R6 ( R R R( ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt print_propertyÙ s )A# c C s— x* | j D] } | j | | j | ƒ } q
Wx* | j D] } | j | | j | ƒ } q7 W| r“ t j d d „ | ƒ } t j d d „ | ƒ } n | S( Ns @[a-zA-Z0-9_]*c S s d | j d ƒ d d S( Ns i i s ( t group( R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt î s s %[a-zA-Z0-9_]*c S s d | j d ƒ d d S( Ns
i i s ( R: ( R ( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyR; ð s ( t expand_member_dict_keyst replacet expand_member_dictt expand_iface_dict_keyst expand_iface_dictt ret sub( R R t expandParamsAndConstantst key( ( sb /home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyt expandç s c C s8 | j | | ƒ j ƒ } | j d ƒ s4 d | } n | S( Ns