@c -*-texinfo-*-
@c This is part of the GNU G-Golf Reference Manual.
@c Copyright (C) 2016 - 2020 Free Software Foundation, Inc.
@c See the file g-golf.texi for copying conditions.


@defindex tl


@node Typelib
@subsection Typelib

G-Golf Typelib low level API.@*
GITypelib — Layout and accessors for typelib.


@subheading Procedures

@indentedblock
@table @code
@item @ref{g-golf-typelib-new}
@item @ref{call-with-input-typelib}
@item @ref{g-typelib-new-from-memory}
@item @ref{g-typelib-free}
@item @ref{g-typelib-get-namespace}
@end table
@end indentedblock


@c @subheading Types and Values

@c @indentedblock
@c @table @code
@c @item @ref{%g-arg-info-transfer}
@c @end table
@c @end indentedblock


@c @subheading Struct Hierarchy

@c @indentedblock
@c GIBaseInfo           	       		@*
@c @ @ +--- GIRegisteredTypeInfo  		@*
@c @ @ @ @ @ @ @ @ @ @ @  +--- GIEnumInfo
@c @end indentedblock


@subheading Description

TODO.


@subheading Procedures

Note: in this section, the @var{typelib} argument is [must be] a pointer
to a @code{GITypelib}.


@anchor{g-golf-typelib-new}
@deffn Procedure g-golf-typelib-new file

Returns a pointer to a new @code{GITypelib}.

@var{file}  must be a valid typelib filename.

This procedure actually sets things up and calls
@ref{g-typelib-new-from-memory}.
@end deffn


@anchor{call-with-input-typelib}
@deffn Procedure call-with-input-typelib file proc

Returns the value(s) returned by @var{proc}.

@var{file} must be a valid typelib filename. Makes a new
@code{GITypelib} by calling @code{(g-golf-typelib-new file)} and calls
@code{(proc typelib)} with the resulting @code{GITypelib}.

When @var{proc} returns, the @code{GITypelib} is free'd by calling
@code{g-typelib-free}. Otherwise the [Glib - C] memory chunk might not be
free'd automatically, though the scheme pointer returned by
@code{g-golf-typelib-new} will be garbage collected in the usual way if
not otherwise referenced.
@end deffn


@anchor{g-typelib-new-from-memory}
@deffn Procedure g-typelib-new-from-memory pointer size gerror

Returns a pointer to a new @code{GITypelib}.

@var{pointer} must be the address of a memory chunk containing the
typelib, @var{size} is the number of bytes of the memory chunk
containing the typelib, and @var{gerror} a pointer to a @code{GError}.

Creates a new @code{GITypelib} from a memory location. The memory block
pointed to by typelib will be automatically @code{g_free()}d when the
repository is destroyed.
@end deffn


@anchor{g-typelib-free}
@deffn Procedure g-typelib-free typelib

Returns nothing.

Free a GITypelib.
@end deffn


@anchor{g-typelib-get-namespace}
@deffn Procedure g-typelib-get-namespace typelib

Returns the namespace of @var{typelib}.
@end deffn


@c @subheading Types and Values
