gtk_toolbar_X_item. How can it callback?



Hi!

Strange thing I've found: 

gtk_toolbar_append_item, 
gtk_toolbar_prepend_item,
gtk_toolbar_insert_item

All three are prototyped using the argument set:

(GtkToolbar *toolbar,
 const char *text,
 const char *tooltip_text,
 const char *tooltip_private_text,
 GtkWidget *icon,
 GtkSignalFunc callback,
 gpointer user_data);

However, the data type GtkSignalFunc is defined by:

void        (*GtkSignalFunc)                (void);

So..........in theory, the user_data part of the argument can't
get to the call back. However, although compiling it and passing
a GtkCallback issues warnings through the compiler (like: "warning: 
passing arg 6 of `gtk_toolbar_append_item' from incompatible pointer 
type") it seems to work fine (ie. The call back is called with
the user_data passed to the func_data element of the call back).

What's up with this? Is it something to do with the new
g_XXX signal handling or am I justing doing something wrong?

ciao,
Doug.




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