Re: GtkItemFactory
- From: "Donna S. Martin" <donna omartin com>
- To: <gtk-list gnome org>
- Subject: Re: GtkItemFactory
- Date: Mon, 20 Nov 2000 14:57:47 -0700
That is the way to do it if you bear in mind two things.
1) An item factory callback has a different prototype than
a menu item callback.
2) That field is shared among all the callbacks you specify in the
GtkItemFactoryEntry array.
The most common error is number 1. Here is the prototype for
an Item Factory Callback.....
void (*GtkItemFactoryCallback1)( gpointer callback_data,
guint callback_action, GtkWidget *widget);
A bit different from a MenuItem callback. Of course, if you don't like
this,
you could always retrieve the widget id from the item factory and
attach your callback manually. Then you'd be using the GtkMenuItem's
callback prototype.
Does this make sense? Hope so, if not I'll try again.
Donna
----- Original Message -----
From: Ron Steinke <rsteinke merilon elfhame net>
To: <gtk-list gnome org>
Sent: Monday, November 20, 2000 12:11 PM
Subject: GtkItemFactory
> How do you pass a pointer to user data to callback functions
> called from a GtkMenuItem created by a GtkItemFactory? I tried
> passing it as the callback_data argument of gtk_item_factory_create_items,
> but this doesn't appear to by the way to do it.
> Ron Steinke
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]