How to pass data to GtkItemFactory callback function?



Hello,

I'm using the simple method for the GtkItemFactory.  Namely:

  GtkItemFactoryEntry menu_items[] = {
    { "/_File",         NULL,         NULL, 0, "<Branch>" },
    { "/File/_Open",    "<control>O", open_file, 0, NULL },

and so on.  But I don't see how I can place a data pointer into this
structure as I can with general gtk_signal_connect().  I do see,
however, defs. in the GtkItemFactoryEtry spec off the docs:

struct GtkItemFactoryEntry
 {
   gchar *path;
   gchar *accelerator;

   GtkItemFactoryCallback callback;
   guint                  callback_action;

...

and GtkItemFactoryCallback 1&2 have some args which would work.  But I'm
at a loss to implement this.

Anyone?

Thanks,

DT
--
Technical Director, Virginia Center for Computer Music
http://www.people.virginia.edu/~djt7p
(804) 924-7355



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