Re: Capture GdkWindow event



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: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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