Re: Problem with g++ and GtkItemFactory functions



Hi,

David Topper <topper virginia edu> writes:

> I've got some functions:
> 
> void create_save_perl_fs (signal_object *s_obj) {};
> void create_save_as_perl_fs (signal_object *s_obj) {};
> void create_new_perl_fs (signal_object *s_obj) {};
> 
> and a GtkItemFactoryEntry setup as follows:
> 
>     GtkItemFactoryEntry perl_file_select_menu[] = {
>       { "/Open", NULL, create_open_perl_fs, 0, NULL },
>       { "/Save", NULL, create_save_perl_fs, 0, NULL },
>       { "/Save As", NULL, create_save_as_perl_fs, 0, NULL }
>     };

there's a comment in the gtkitemgactory.h header file that explains
your problem:

 /* We use () here to mean unspecified arguments. This is deprecated
  * as of C99, but we can't change it without breaking compatibility.
  * (Note that if we are included from a C++ program () will mean
  * (void) so an explicit cast will be needed.)
  */
 typedef void    (*GtkItemFactoryCallback)  ();
 typedef void    (*GtkItemFactoryCallback1) (gpointer   callback_data,
                                             guint      callback_action,
                                             GtkWidget *widget);


Sven




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