⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glib-genmarshal.1

📁 windows平台下开发gtk程序所需要的库和头文件等
💻 1
字号:
.\" ** You probably do not want to edit this file directly **.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1)..\" Instead of manually editing it, you probably should edit the DocBook XML.\" source for it and then use the DocBook XSL Stylesheets to regenerate it..TH "GLIB\-GENMARSHAL" "1" "08/22/2005" "" "".\" disable hyphenation.nh.\" disable justification (adjust text to left margin only).ad l.SH "NAME"glib\-genmarshal \- C code marshaller generation utility for GLib closures.SH "SYNOPSIS".HP 16\fBglib\-genmarshal\fR [options...] [files...].SH "DESCRIPTION".PP\fBglib\-genmarshal\fRis 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..SH "INVOCATION".PP\fBglib\-genmarshal\fRtakes 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..SS "Options".TP\fB\-\-header\fRGenerate header file contents of the marshallers..TP\fB\-\-body\fRGenerate C code file contents of the marshallers..TP\fB\-\-prefix=string\fR, \fB\-\-prefix string\fRSpecify marshaller prefix. The default prefix is`g_cclosure_marshal'..TP\fB\-\-skip\-source\fRSkip source location remarks in generated comments..TP\fB\-\-nostdinc\fRDo not use the standard marshallers of the GObject library, and skip\fIgmarshal.h\fRinclude directive in generated header files..TP\fB\-\-g\-fatal\-warnings\fRMake warnings fatal, that is, exit immediately once a warning occurs..TP\fB\-h\fR, \fB\-\-help\fRPrint brief help and exit..TP\fB\-v\fR, \fB\-\-version\fRPrint version and exit..SS "Marshaller list format".PPThe marshaller lists are processed line by line, a line can contain a comment in the form of.sp.nf# this is a comment.fi.spor a marshaller specification of the form.sp.nf\fIRTYPE\fR:\fIPTYPE\fR\fIRTYPE\fR:\fIPTYPE\fR,\fIPTYPE\fR\fIRTYPE\fR:\fIPTYPE\fR,\fIPTYPE\fR,\fIPTYPE\fR.fi.sp(up to 16\fIPTYPE\fRs may be present)..PPThe\fIRTYPE\fRpart specifies the callback's return type and the\fIPTYPE\fRs right to the colon specify the callback's parameter list, except for the first and the last arguments which are always pointers..SS "Parameter types".PPCurrently, the following types are supported:.TP\fIVOID\fRindicates no return type, or no extra parameters. If\fIVOID\fRis used as the parameter list, no additional parameters may be present..TP\fIBOOLEAN\fRfor boolean types (gboolean).TP\fICHAR\fRfor signed char types (gchar).TP\fIUCHAR\fRfor unsigned char types (guchar).TP\fIINT\fRfor signed integer types (gint).TP\fIUINT\fRfor unsigned integer types (guint).TP\fILONG\fRfor signed long integer types (glong).TP\fIULONG\fRfor unsigned long integer types (gulong).TP\fIINT64\fRfor signed 64bit integer types (gint64).TP\fIUINT64\fRfor unsigned 64bit integer types (guint64).TP\fIENUM\fRfor enumeration types (gint).TP\fIFLAGS\fRfor flag enumeration types (guint).TP\fIFLOAT\fRfor single\-precision float types (gfloat).TP\fIDOUBLE\fRfor double\-precision float types (gdouble).TP\fISTRING\fRfor string types (gchar*).TP\fIBOXED\fRfor boxed (anonymous but reference counted) types (GBoxed*).TP\fIPARAM\fRfor GParamSpec or derived types (GParamSpec*).TP\fIPOINTER\fRfor anonymous pointer types (gpointer).TP\fIOBJECT\fRfor GObject or derived types (GObject*).TP\fINONE\fRdeprecated alias for\fIVOID\fR.TP\fIBOOL\fRdeprecated alias for\fIBOOLEAN\fR.SH "EXAMPLE".PPTo generate marshallers for the following callback functions:.sp.nfvoid   foo (gpointer data1,            gpointer data2);void   bar (gpointer data1,            gint     param1,            gpointer data2);gfloat baz (gpointer data1,            gboolean param1,            guchar   param2,            gpointer data2);.fi.PPThe marshaller list has to look like this:.sp.nfVOID:VOIDVOID:INTFLOAT:BOOLEAN,UCHAR.fi.PPThe generated marshallers have the arguments encoded in their function name. For this particular list, they are.sp.nfg_cclosure_marshal_VOID__VOID(),g_cclosure_marshal_VOID__INT(), g_cclosure_marshal_FLOAT__BOOLEAN_UCHAR()..fi.PPThey can be used directly for GClosures or be passed in as the GSignalCMarshaller c_marshaller; argument upon creation of signals:.sp.nfGClosure *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);.fi.SH "SEE ALSO".PP\fBglib\-mkenums\fR(1).SH "BUGS".PPNone known yet..SH "AUTHOR".PP\fBglib\-genmarshal\fRhas been written by Tim Janik<timj@gtk.org>..PPThis manual page was provided by Tim Janik<timj@gtk.org>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -