"Andr�s" Giraldo <[EMAIL PROTECTED]> writes:
> Ok, thanks, but how I supposed to make request to the
> class members?

GtkObject has these methods called
 gtk_object_set_data()
 gtk_object_get_data()

which lets you store additional pointers to the widget. This is how
you can store a pointer of your C++ class to a widget and the connected
callbacks can use the c++ methods. Like this:

// init:
 GtkWidget *widget = gtk_button_new("test");
 gtk_object_set_data(GTK_OBJECT(widget), "mycppobject", this);
 
// callback:
  static void callback(GtkWidget *w) {
     MyCpp *obj = (MyCpp*)gtk_object_get_data(GTK_OBJECT(w), "mycppobject");
     obj->DoIt();
  }

-- 
-- Tero Pulkkinen

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to