�
)/�Uc�����������@���sJ���d��d�l��m�Z�d��d�l�m�Z�d�d�l�m�Z�d�e�f�d�������YZ�d�S(���i����(���t���with_statement(���t���contextmanageri���(���t���astt���CCodeGeneratorc�����������B���s����e��Z�g��g��g��g��g��d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�e	�d������Z
�d����Z�d	����Z�d
����Z
�d����Z�RS(���c	���	������C���sU���|�|��_��|�|��_�|�|��_�|�|��_�|�|��_�|�|��_�|�|��_�i��|��_�|�|��_�d��S(���N(	���t���out_h_filenamet���out_c_filenamet���function_decorationt���include_first_headert���include_last_headert���include_first_srct���include_last_srct���_function_bodiest	���namespace(	���t���selfR���R���R���R���R���R���R	���R
���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���__init__���s����								c���������C���s*���|�j��d�d���}�d�|��j�j�d�|�f�S(���Nt��� t���_s���%s_%si����(���t���replaceR���t���symbol_prefixes(���R
���t���name(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt
���gen_symbol/���s����c���������C���s����t��|�t�j���r6�|�j�t�j�t�j�f�k�r6�d�}�n�d�}�|�j�j�t�j�t�j	�f���rt�|�j
�t�j�k�rt�d�|�S|�j�j�|�S(���Nt���*t����s���const gchar*(
���t
���isinstanceR���t	���Parametert	���directiont���PARAM_DIRECTION_OUTt���PARAM_DIRECTION_INOUTt���typet���is_equivt���TYPE_STRINGt
���TYPE_FILENAMEt���transfert���PARAM_TRANSFER_NONEt���ctype(���R
���t���paramt���suffix(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_typecontainer_to_ctype3���s����	c���������C���s����|��j��r)�|�j�d�d�j�|��j������n��|�j�d�|��j�|�j���|�j�f���t�|�j���}�|�j�r��xv�t�|�j���D]U�\�}�}�|��j�|���}�|�j�d�|�|�j	�f���|�|�d�k��rw�|�j�d���qw�qw�Wn
�|�j�d���|�j�d���d��S(	���Ns���
%sR���s���
%s
%s (s���%s %si���s���, t���voidt���)(
���R���t���writet���joinR%���t���retvalt���symbolt���lent
���parameterst	���enumeratet���argname(���R
���t���outt���funct���lt���iR#���R"���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_write_prelude@���s����	 	
c���������C���s'���|��j��|��j�|���|��j�j�d���d��S(���Ns���;

(���R4���t���out_hR(���(���R
���R1���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_write_prototypeS���s����c���������C���s���|��j��j�d�|�f���d��S(���Ns
���(transfer %s)(���t���out_cR(���(���R
���R ���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_write_annotation_transferW���s����c���������C���s"��|��j��j�d�|�j�f���x��|�j�D]��}�|��j��j�d�|�j�f���|�j�t�j�t�j�f�k�r��|�j	�rq�d�}�n�d�}�|��j��j�d�|�j�|�f���|��j
�|�j���n��|��j��j�d���q$�W|��j��j�d���|��j��j�d���|��j��j�d���|��j��j�d	���|��j
�|�j�j���|��j��j�d
���d��S(���Ns���/**
 * %s:
s��� * @%s: s��� caller-allocatesR���s���(%s%s) s���:
s��� *
s��� * Undocumented.
s��� * Returns: s���
 */(
���R7���R(���R+���R-���R/���R���R���R���R���t���caller_allocatesR8���R ���R*���(���R
���R1���R#���t���allocate_string(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_write_docsZ���s$����		c���������c���sV���|��j��|���|��j�|���|��j�|��j�|���|��j�j�d���d��V|��j�j�d���d��S(���Ns���
{
s���}

(���R6���R;���R4���R7���R(���(���R
���R1���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt	���_functiono���s����

c���������C���s��d�}�|��j��j�|���|��j�j�j����}�x%�|��j�D]�}�|��j��j�d�|���q2�W|��j��j�d�|�|�f���x%�|��j�D]�}�|��j��j�d�|���qt�W|��j�j�|���x%�|��j�D]�}�|��j�j�d�|���q��W|��j�j�d�|��j	�f���x%�|��j
�D]�}�|��j�j�d�|���q��Wd��S(���Ns0���/* GENERATED BY testcodegen.py; DO NOT EDIT */

s���#include "%s"
s>���
#ifndef __%s_H__
#define __%s_H__

#include <glib-object.h>

s���#include "%s"

(���R5���R(���R���R���t���upperR���R���R7���R	���R���R
���(���R
���t���warningt���nsuppert���header(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_codegen_startx���s����	c���������C���s.���|��j��j�d���|��j��j����|��j�j����d��S(���Ns���#endif
(���R5���R(���t���closeR7���(���R
���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���_codegen_end����s����
c���������C���s)���t��|�t�j���s�t���|�|��j�|�<d��S(���N(���R���R���t���Functiont���AssertionErrorR���(���R
���t���nodet���body(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���set_function_body����s����c���������C���s����t��|��j�d���|��_�t��|��j�d���|��_�|��j����xs�|��j�j����D]b�}�t�|�t	�j
���rD�|��j�|����6�|��j�j
�|���}�|�s��d�}�n��|��j�j�|���Wd��QXqD�qD�W|��j����d��S(���Nt���wR���(���t���openR���R5���R���R7���RA���R���t
���itervaluesR���R���RD���R<���R���t���getR(���RC���(���R
���RF���RG���(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���codegen����s����
	(���t���__name__t
���__module__R���R���R%���R4���R6���R8���R;���R���R<���RA���RC���RH���RM���(����(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyR������s ���		
								N(���t
���__future__R����t
���contextlibR���R���R���t���objectR���(����(����(����sq���/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/codegen.pyt���<module>���s���