EnglishFrenchSpanish

OnWorks favicon

glib-genmarshal - Online in the Cloud

Run glib-genmarshal in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command glib-genmarshal that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


glib-genmarshal - C code marshaller generation utility for GLib closures

SYNOPSIS


glib-genmarshal [OPTION...] [FILE...]

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.

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.

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

RTYPE:PTYPE
RTYPE:PTYPE,PTYPE
RTYPE:PTYPE,PTYPE,PTYPE

(up to 16 PTYPEs may be present).

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*)

VARIANT
for GVariant types (GVariant*)

NONE
deprecated alias for VOID

BOOL
deprecated alias for BOOLEAN

OPTIONS


--header
Generate header file contents of the marshallers.

--body
Generate C code file contents of the marshallers.

--prefix=PREFIX
Specify marshaller prefix. The default prefix is `g_cclosure_marshal'.

--skip-source
Skip source location remarks in generated comments.

--stdinc
Use the standard marshallers of the GObject library, and include gmarshal.h in
generated header files.

--nostdinc
Do not use the standard marshallers of the GObject library, and skip gmarshal.h
include directive in generated header files.

--internal
Mark generated functions as internal, using G_GNUC_INTERNAL.

--valist-marshallers
Generate valist marshallers, for use with g_signal_set_va_marshaller().

-v, --version
Print version information.

--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.

EXAMPLE


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 file has to look like this:

VOID:VOID
VOID:INT
FLOAT:BOOLEAN,UCHAR

and you call glib-genmarshal like this:

glib-genmarshal --header marshaller.list > marshaller.h
glib-genmarshal --body marshaller.list > marshaller.c

The generated marshallers have the arguments encoded in their function name. For this
particular list, they are

g_cclosure_user_marshal_VOID__VOID(),
g_cclosure_user_marshal_VOID__INT(),
g_cclosure_user_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:

GClosure *cc_foo, *cc_bar, *cc_baz;

cc_foo = g_cclosure_new (NULL, foo, NULL);
g_closure_set_marshal (cc_foo, g_cclosure_user_marshal_VOID__VOID);
cc_bar = g_cclosure_new (NULL, bar, NULL);
g_closure_set_marshal (cc_bar, g_cclosure_user_marshal_VOID__INT);
cc_baz = g_cclosure_new (NULL, baz, NULL);
g_closure_set_marshal (cc_baz, g_cclosure_user_marshal_FLOAT__BOOLEAN_UCHAR);

Use glib-genmarshal online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 2
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 3
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • 4
    eSpeak: speech synthesis
    eSpeak: speech synthesis
    Text to Speech engine for English and
    many other languages. Compact size with
    clear but artificial pronunciation.
    Available as a command-line program with
    many ...
    Download eSpeak: speech synthesis
  • 5
    Sky Chart / Cartes du Ciel
    Sky Chart / Cartes du Ciel
    SkyChart is a software to draw chart of
    the night sky for the amateur astronomer
    from a bunch of stars and nebulae
    catalogs. See main web page for full
    download...
    Download Sky Chart / Cartes du Ciel
  • 6
    GSmartControl
    GSmartControl
    GSmartControl is a graphical user
    interface for smartctl. It allows you to
    inspect the hard disk and solid-state
    drive SMART data to determine its
    health, as w...
    Download GSmartControl
  • More »

Linux commands

  • 1
    abc2abc
    abc2abc
    abc2abc - a simple abc
    checker/re-formatter/transposer ...
    Run abc2abc
  • 2
    abc2ly
    abc2ly
    abc2ly - manual page for abc2ly
    (LilyPond) 2.18.2 ...
    Run abc2ly
  • 3
    coqmktop
    coqmktop
    coqmktop - The Coq Proof Assistant
    user-tactics linker ...
    Run coqmktop
  • 4
    coqtop
    coqtop
    coqtop - The Coq Proof Assistant
    toplevel system ...
    Run coqtop
  • 5
    g.copygrass
    g.copygrass
    g.copy - Copies available data files in
    the current mapset search path to the
    user�s current mapset. KEYWORDS:
    general, map management ...
    Run g.copygrass
  • 6
    g.dirsepsgrass
    g.dirsepsgrass
    g.dirseps - Internal GRASS utility for
    converting directory separator
    characters. Converts any directory
    separator characters in the input string
    to or from na...
    Run g.dirsepsgrass
  • More »

Ad