Re: [gtk-list] Pointer to user data in Widget Structure.

> Has any thought been given to having a user(programmer) accessable pointer within a
> widget. For example I would find it very convenient to associate a data structure
> with each notebook page in an application I am writing.
> Motif, MS Windows, and FWF (Free Widget Foundation) support this concept.

>From gtkobject.h :

/* Set/get the "user_data" object data field of "object". It should
 *  be noted that these functions are no different than calling
 *  `gtk_object_set_data'/`gtk_object_get_data' with a key of "user_data".
 *  They are merely provided as a convenience.
void     gtk_object_set_user_data (GtkObject    *object,
                                   gpointer      data);
gpointer gtk_object_get_user_data (GtkObject    *object)

Those work for me.


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