Интерактивная система просмотра системных руководств (man-ов)
glib-genmarshal (1)
>> glib-genmarshal (1) ( Разные man: Команды и прикладные программы пользовательского уровня )
NAME
glib-genmarshal - C code marshaller generation utility for GLib closures
SYNOPSIS
glib-genmarshal [options...] [files...]
DESCRIPTION
glib-genmarshal
is a small utility that generates C code marshallers for callback functions of the GClosure mechanism in the GObject sublibrary of GLib. The marshaller functions have a standard signature, they get passed in the invoking closure, an array of value structures holding the callback function parameters and a value structure for the return value of the callback. The marshaller is then responsible to call the respective C code function of the closure with all the parameters on the stack and to collect its return value.
INVOCATION
glib-genmarshal
takes a list of marshallers to generate as input. The marshaller list is either read from standard input or from files passed as additional arguments on the command line.
Options
--header
Generate header file contents of the marshallers.
--body
Generate C code file contents of the marshallers.
--prefix=string, --prefix string
Specify marshaller prefix. The default prefix is
`g_cclosure_marshal'.
--skip-source
Skip source location remarks in generated comments.
--nostdinc
Do not use the standard marshallers of the GObject library, and skip
gmarshal.h
include directive in generated header files.
--g-fatal-warnings
Make warnings fatal, that is, exit immediately once a warning occurs.
-h, --help
Print brief help and exit.
-v, --version
Print version and exit.
Marshaller list format
The marshaller lists are processed line by line, a line can contain a comment in the form of
The
RTYPE
part specifies the callback's return type and the
PTYPEs right to the colon specify the callback's parameter list, except for the first and the last arguments which are always pointers.
Parameter types
Currently, the following types are supported:
VOID
indicates no return type, or no extra parameters. If
VOID
is used as the parameter list, no additional parameters may be present.
BOOLEAN
for boolean types (gboolean)
CHAR
for signed char types (gchar)
UCHAR
for unsigned char types (guchar)
INT
for signed integer types (gint)
UINT
for unsigned integer types (guint)
LONG
for signed long integer types (glong)
ULONG
for unsigned long integer types (gulong)
INT64
for signed 64bit integer types (gint64)
UINT64
for unsigned 64bit integer types (guint64)
ENUM
for enumeration types (gint)
FLAGS
for flag enumeration types (guint)
FLOAT
for single-precision float types (gfloat)
DOUBLE
for double-precision float types (gdouble)
STRING
for string types (gchar*)
BOXED
for boxed (anonymous but reference counted) types (GBoxed*)
PARAM
for GParamSpec or derived types (GParamSpec*)
POINTER
for anonymous pointer types (gpointer)
OBJECT
for GObject or derived types (GObject*)
NONE
deprecated alias for
VOID
BOOL
deprecated alias for
BOOLEAN
EXAMPLE
To generate marshallers for the following callback functions: