glib-genmarshal man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

glib-genmarshal(1)		 User Commands		    glib-genmarshal(1)

NAME
       glib-genmarshal - generates C code marshallers for GLib closures

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  sublibrary  of  GLib.  The  mar‐
       shaller	functions  have a standard signature. The following are passed
       to the marshaller functions: 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  mar‐
       shaller 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 follow‐
       ing 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).

       BOXED		       Boxed, anonymous but  reference	counted,  type
			       (GBoxed*).

       CHAR		       Signed char type (gchar).

       DOUBLE		       Double-precision float type (gdouble).

       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 (GParamSpec*).

       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 parameters. If VOID
			       is used as the parameter	 list,	no  additional
			       parameters may be present.

OPTIONS
       The following options are supported:

       --body		       Generate	 the  C code file contents of the mar‐
			       shallers.

       --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  mar‐
			       shallers.

       -h, --help	       Show usage and basic help information.

       --nostdinc	       Do not use the standard marshallers of the GOb‐
			       ject 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	direc‐
			       tive in generated header files.

       --prefix=dir	       Specify the marshaller prefix. The default pre‐
			       fix is g_cclosure_marshal.

       --skip-source	       Skip source location remarks in generated  com‐
			       ments.

       -v, --version	       Show version information.

OPERANDS
       The following operands are supported:

       file		       Specifies the marshaller to be generated.

EXAMPLES
       Example 1: Generating Marshallers

       This  example shows how to generate marshallers for the following call‐
       back 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 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  cre‐
       ation 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.

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

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      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-inter‐
       faces(5)

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

SunOS 5.11			  7 Apr 2003		    glib-genmarshal(1)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net