Re: array in g_signal_new



Il giorno Wed, 25 Nov 2009 23:20:24 +0000
Daniel Carvalho <idnael gmail com> ha scritto:

> The problem is the library needs to emit a signal where the argument
> is an list of integers. I could use an int[] or a GArray in this
> case... Want to ask you how to specify the gtype of the param. Or
> please point me to any open source app that uses this kind of thing.
> 
> 
> How to declare it?
> 
> klass->fields_destroyed_signal =
> 	g_signal_new(I_("fields-destroyed"),
> 		     G_OBJECT_CLASS_TYPE(klass),
> 		     G_SIGNAL_RUN_LAST,
> 		     G_STRUCT_OFFSET(VteTerminalClass,
> fields_destroyed), NULL,
> 		     NULL,
> 		     g_cclosure_marshal_VOID__VOID,
> 		     G_TYPE_NONE, 1,
> 		     G_TYPE_UINT // what to put here???
> 		     );

What's wrong in using a G_TYPE_POINTER? Also notice you'll need to use
a properly marshaller.

Ciao.
-- 
Nicola


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]