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

Re: itemfactory question



"Poletti, Don" wrote:
> 
> I am using the itemfactory to make menus and I am having to problems.
> 
> 1) What is the prototype for the callback. The header file has three
> different
> ones and none seem to work. If its not obvious I'm refering to the third
> entry
> in itemFactoryEntry which is the what gets called when selected
> 
> 2) The itemfactoryEntry does not seem to have any way to provide gpointer
> data.
> Is there a way?

For the prototype callback, I use always:

void menu_callback(gpointer cb_data, guint action, GtkWidget * w)
{
  switch (action)
    {
    case ABOUT:
	...
      break;
    case EXIT:
      gtk_main_quit();
      break;
	...
    }
}



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