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.
Generate header file contents of the marshallers.
Generate C code file contents of the marshallers.
--prefix=string, --prefix string
Specify marshaller prefix. The default prefix is `g_cclosure_marshal'.
Skip source location remarks in generated comments.
Do not use the standard GRuntime marshallers, and skip gmarshal.h include directive in generated header files.
Make warnings fatal, that is, exit immediately once a warning occurs.
Print brief help and exit.
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
or a marshaller specification of the form
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.
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.
for boolean types (gboolean)
CHAR for signed char types (gchar)
for unsigned char types (guchar)
INT for signed integer types (gint)
UINT for unsigned integer types (guint)
LONG for signed long integer types (glong)
for unsigned long integer types (gulong)
ENUM for enumeration types (gint)
for flag enumeration types (guint)
for single-precision float types (gfloat)
for double-precision float types (gdouble)
for string types (gchar*)
for boxed (anonymous but reference counted) types (GBoxed*)
for GParamSpec or derived types (GParamSpec*)
for anonymous pointer types (gpointer)
for GObject or derived types (GObject*)
NONE deprecated alias for VOID
To generate marshallers for the following callback functions:
void foo (gpointer data1, gpointer data2); void bar (gpointer data1, gint param1, gpointer data2); gfloat baz (gpointer data1, gboolean param1, guchar param2, gpointer data2);
The marshaller list has to look like this:
VOID:VOID VOID:INT FLOAT:BOOLEAN,UCHAR
The generated marshallers have the arguments encoded in their function name. For this particular list, they are g_cclosure_marshal_VOIDVOID(), g_cclosure_marshal_VOIDINT(), g_cclosure_marshal_FLOAT__BOOLEAN_UCHAR().
They can be used directly for GClosures or be passed in as the GSignalCMarshaller c_marshaller; argument upon creation of signals:
glib-genmarshal has been written by Tim Janik __