Re: How to create an MDI'sh program
- From: "Michael K. Johnson" <johnsonm redhat com>
- To: gtk-list redhat com
- cc: lndshark megsinet net
- Subject: Re: How to create an MDI'sh program
- Date: Tue, 06 Jan 1998 20:33:49 -0500
Landshark writes:
>Is there an extra member in the widget structure that allows for this,
>similar to the SetWindowLong() function of Win32's?
See gtkobject.h:
--------8<--------
/* Set the "user_data" object data field of "object". It should
* be noted that this is no different than calling 'gtk_object_data_add'
* with a key of "user_data". It is merely provided as a convenience.
*/
void gtk_object_set_user_data (GtkObject *object,
gpointer data);
/* Get the "user_data" object data field of "object". It should
* be noted that this is no different than calling 'gtk_object_data_find'
* with a key of "user_data". It is merely provided as a convenience.
*/
gpointer gtk_object_get_user_data (GtkObject *object);
--------8<--------
This is very flexible; the pointer can be a pointer to anything you
want.
Have fun!
michaelkjohnson
"Magazines all too frequently lead to books and should be regarded by the
prudent as the heavy petting of literature." -- Fran Lebowitz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]