On Thu, 2007-05-24 at 23:25 +0800, 小多 wrote: > Good idea! But I don't know how to recast the nativeWindow as a > GtkWindow object. > When I tried: > g_signal_connect(G_OBJECT(NS_REINTERPRET_CAST(GtkWindow*, > aNativeWindow)), > "destroy", G_CALLBACK(nsTray::window_close_event), this); > It shows that: > GLib-GObject-WARNING **: gsignal.c:1669: signal `destroy' is invalid > for instance `0x8444a28'
you cannot recast it: they are two completely different classes. a GdkWindow is the platform specific resource for a window (not only top-levels, but internal windows as well), while a GtkWindow is a widget. http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html ciao, Emmanuele. -- Emmanuele Bassi, E: [EMAIL PROTECTED] W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list