
    fF                        d dl mZmZmZmZmZmZmZ dad Z	d Z
d Zi ej                  eej                  eej                   eej"                  eej$                  eej&                  eej(                  eej*                  eej,                  eej.                  eej2                  eej4                  eej8                  eej:                  eej<                  eej@                  e!ejD                  e!ejF                  e!ejH                  dejJ                  dejL                  dejN                  diZ(d Z)d Z*d Z+d	 Z, e	e,       y)
   )	VFuncInfoFunctionInfoCallableInfo
ObjectInfo
StructInfo	DirectionTypeTagNc                     | a y)zSet doc string generator function

    :param callable func:
        Callable which takes a GIInfoStruct and returns documentation for it.
    N_generate_doc_string_func)funcs    ./usr/lib/python3/dist-packages/gi/docstring.pyset_doc_string_generatorr   %   s
     !%    c                      t         S )z6Returns the currently registered doc string generator.r    r   r   get_doc_string_generatorr   /   s    $$r   c                     t        |       S )aE  Generate a doc string given a GIInfoStruct.

    :param gi.types.BaseInfo info:
        GI info instance to generate documentation for.
    :returns:
        Generated documentation as a string.
    :rtype: str

    This passes the info struct to the currently registered doc string
    generator and returns the result.
    r   infos    r   generate_doc_stringr   4   s     %T**r   c                 V   | j                         }t        j                  |d       }|rt        |d      r|j                  S |t
        j                  k(  rG| j                         }|j                         }|s| j                         S |j                         d|S | j                         S )N__name__.)get_tag_type_tag_to_py_typegethasattrr   r	   	INTERFACEget_interfaceget_nameget_tag_as_stringget_namespace)gi_typetype_tagpy_typeiface	info_names        r   _get_pytype_hintr)   \   s     H"&&x6G77J/	W&&	&%%'NN$	,,..--/;;$$&&r   c                 n   g }t        | t              rdg}n#t        | t              r| j                         rdg}| j	                         }d}| j                         j                         h}t               }|D ]m  }|j                  |j                                |j                  |j                         j                                |j                  |j                                o t        |      D ]  \  }}|j                         t        j                  k(  r(||v r-|j!                         }t#        |j                               }	|	|vr|d|	z   z  }|j%                         s||v r|dz  }n|j'                         r|dz  }|j)                  |        dj+                  |      }
g }t#        | j                               }| j-                         s.|r,||vr(|}| j/                         r|dz  }|j)                  |       t        |      D ]r  \  }}|j                         t        j0                  k(  r(||v r-|j!                         }t#        |j                               }	|	|vr|d|	z   z  }|j)                  |       t |r#| j2                  d|
d	dj+                  |      S | j2                  d|
d
S )Nself)void:z=Nonez=<optional>z, z or None(z) -> ))
isinstancer   r   	is_methodget_argumentsget_return_typeget_array_lengthsetaddget_destroyget_typeget_closure	enumerateget_directionr   OUTr!   r)   may_be_nullis_optionalappendjoinskip_returnmay_return_nullINr   )r   in_args_strsargshint_blacklistignore_indicesuser_data_indicesargiargstrhintin_args_strout_args_strsreturn_hints                r   _generate_callable_info_docrP   n   sz   L$	"x	D,	'>>"8LDN **,==?@N 13??,-3<<>::<=coo/01 D/ $3)--//~%cDj F??%6 6gF__m#FF#$ ))L)K M"4#7#7#9:K++^2S!j FV$D/ 	%3),,./~%cDj FV$	% !%TYY}=UVV==+66r   c                 :   d}d}t        | t              r-| j                         dkD  r3|d| j                         z   dz   z  }n|d| j                         z   dz   z  }| j	                         D ]'  }|j                         s|dt        |      z   dz   z  }) |r||z   S y)Nz
:Constructors:

::

     z    z()
z(**properties)

)r0   r   get_sizer!   get_methodsis_constructorrP   )r   headerdocmethod_infos       r   _generate_class_info_docr[      s    )F
C$
#==?Q6DMMO+f44Cv'*<<<'') L%%'67DDtKKCL |r   c                 |    t        | t        t        f      rt        |       S t        | t              rt        |       S y)NrR   )r0   r   r   r[   r   rP   r   s    r   _generate_doc_dispatchr]      s4    $Z01'--	D,	'*400r   )-_gir   r   r   r   r   r   r	   r   r   r   r   BOOLEANboolINT8intUINT8INT16UINT16INT32UINT32INT64UINT64FLOATfloatDOUBLEGLISTlistGSLISTARRAYGHASHdictUTF8strFILENAMEUNICHARr   GTYPEERRORVOIDr   r)   rP   r[   r]   r   r   r   <module>rz      s  .   ! %%
+ cs  s  	
  s    s    u    t    t  t  c   ((#!"  ))4ttd+ 2'$=7@* / 0r   