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

Re: g_signal_emit: what is "detail" ?



On Sat, 2003-05-03 at 07:55, paolo borelli wrote:
> Hi!
> 
> I'm porting some code to gtk2 and I want to replace gtk_signal_emit with
> g_signal_emit. I see that g_signal_emit has an additional parameter
> called "detail" but I couldn't find what is for and what I have to pass
> to it when calling the function...
> 
> The docs are a little too terse:
> 
> ...
> detail: the detail
> ...
> 
> So I looked at some other app: I had gnome-terminal handy and there I
> saw that it always pass 0 as detail.
> 
> Can someone give me some advice and/or point me to more verbose docs?

Best example of detail is for the ::notify signal for property changes:

 g_signal_connect (entry, "notify::cursor_position", ...)

If you use g_signal_emit_by_name() you'd use a text form like this,
but for g_signal_emit(), you instead provide a signal_id/quark
pair.

Most signals don't have an interesting detail, so pass 0.

Regards,
                                      Owen





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