Windows PowerShell command on Get-command glib-genmarshal
MyWebUniversity

Manual Pages for UNIX Operating System command usage for man glib-genmarshal

User Commands glib-genmarshal(1)

NAME

glib-genmarshal - generates C code marshallers for GLib clo-

sures

SYNOPSIS

glib-genmarshal [--body] [--g-fatal-warnings] [--header] [-

-help] [--internal] [--nostdinc | --stdinc] [--prefix=dir]

[--skip-source] [--version] [file...]

DESCRIPTION

glib-genmarshal generates C code marshallers for callback

functions of the GClosure mechanism in the GObject subli-

brary of GLib. The marshaller functions have a standard sig-

nature. The following are passed to the marshaller func-

tions: the invoking closure, an array of value structures

holding the callback function parameters, and a value struc-

ture for the return value of the callback. The marshaller then calls the C code function of the closure with all of the parameters on the stack, and collects the return value.

glib-genmarshal generates the specified list of marshallers.

The marshaller list is either read from standard input or from files passed as additional arguments on the command line.

EXTENDED DESCRIPTION

The marshaller lists are processed line by line. A line can contain a comment in the following format:

# this is a comment

A marshaller list can contain a marshaller specification in the following format: RTYPE:PTYPE RTYPE:PTYPE,PTYPE RTYPE:PTYPE,PTYPE,PTYPE

# up to 16 PTYPEs may be present

RTYPE specifies the callback return type. PTYPE specifies the callback parameter list, except for the first and the last arguments which are always pointers. Parameter Types Currently, the following parameter types are supported: BOOL Deprecated alias for BOOLEAN. BOOLEAN Boolean type (gboolean).

SunOS 5.11 Last change: 7 Apr 2003 1

User Commands glib-genmarshal(1)

BOXED Boxed, anonymous but reference counted, type (GBoxed*). CHAR Signed char type (gchar).

DOUBLE Double-precision float type (gdou-

ble). ENUM Enumeration type (gint). FLAGS Flag enumeration type (guint).

FLOAT Single-precision float type

(gfloat). INT Signed integer type (gint). INT64 Signed 64bit integer type (gint64). LONG Signed long integer type (glong). NONE Deprecated alias for VOID. OBJECT GObject or derived type (GObject*).

PARAM GParamSpec or derived type (GParam-

Spec*).

SunOS 5.11 Last change: 7 Apr 2003 2

User Commands glib-genmarshal(1)

POINTER Anonymous pointer type (gpointer). STRING String type (gchar*). UCHAR Unsigned char type (guchar). UINT Unsigned integer type (guint). UINT64 Unsigned 64bit integer type (guint64). ULONG Unsigned long integer type (gulong).

VOID No return type, or no extra parame-

ters. If VOID is used as the parame-

ter list, no additional parameters may be present. OPTIONS The following options are supported:

--body Generate the C code file contents of

the marshallers.

--g-fatal-warnings Make warnings fatal, that is, exit

immediately once a warning occurs.

--internal Mark generated functions as internal

by using the G_GNUC_INTERNAL macro.

--header Generate the header file contents of

the marshallers.

SunOS 5.11 Last change: 7 Apr 2003 3

User Commands glib-genmarshal(1)

-h, --help Show usage and basic help informa-

tion.

--nostdinc Do not use the standard marshallers

of the GObject library, and skip the gmarshal.h include directive in generated header files.

--stdinc Use the standard marshallers of the

GObject library, and use the

gmarshal.h include directive in gen-

erated header files.

--prefix=dir Specify the marshaller prefix. The

default prefix is

g_cclosure_marshal.

--skip-source Skip source location remarks in gen-

erated comments.

-v, --version Show version information.

OPERANDS The following operands are supported:

file Specifies the marshaller to be gen-

erated.

EXAMPLES

Example 1: Generating Marshallers

This example shows how to generate marshallers for the fol-

lowing callback functions: void foo (gpointer data1, gpointer data2); void bar (gpointer data1, gint param1,

SunOS 5.11 Last change: 7 Apr 2003 4

User Commands glib-genmarshal(1)

gpointer data2); gfloat baz (gpointer data1, gboolean param1, guchar param2, gpointer data2); The marshaller list is as follows: VOID:VOID VOID:INT FLOAT:BOOLEAN,UCHAR The generated marshallers have the arguments encoded in their function name. For this particular list, they are as follows:

g_cclosure_marshal_VOID__VOID()

g_cclosure_marshal_VOID__INT()

g_cclosure_marshal_FLOAT__BOOLEAN_UCHAR()

The generated marshallers can be used directly for GClosures

or can 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_marshal_VOID__VOID);

cc_bar = g_cclosure_new (NULL, bar, NULL);

g_closure_set_marshal (cc_bar, g_cclosure_marshal_VOID__INT);

cc_baz = g_cclosure_new (NULL, baz, NULL);

g_closure_set_marshal (cc_baz, g_cclosure_marshal_FLOAT__BOOLEAN_UCHAR);

EXIT STATUS The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES The following files are used by this application:

/usr/bin/glib-genmarshal The command-line executable

for the application.

SunOS 5.11 Last change: 7 Apr 2003 5

User Commands glib-genmarshal(1)

/usr/share/gtk-doc/html/glib Location of developer docu-

mentation

ATTRIBUTES

See attributes(5) for descriptions of the following attri-

butes:

____________________________________________________________

| ATTRIBUTE TYPE | ATTRIBUTE VALUE |

|_____________________________|_____________________________|

| Availability | SUNWglib2-devel |

|_____________________________|_____________________________|

| Interface stability | Committed |

|_____________________________|_____________________________|

SEE ALSO

gdk-pixbuf-csource(1), gdk-pixbuf-query-loaders(1), glib-

gettextize(1), glib-mkenums(1), gobject-query(1), gtk-

query-immodules-2.0(1), gtk-update-icon-cache(1), libglib-

2.0(3), attributes(5), gnome-interfaces(5)

NOTES Written by Tim Janik. Updated by Brian Cameron, Sun Microsystems Inc., 2003, 2006.

SunOS 5.11 Last change: 7 Apr 2003 6




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™