Re: Capture GdkWindow event
- From: "åå" <kid duo gmail com>
- To: "Marcelo Armengot" <marcelo armengot uv es>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Capture GdkWindow event
- Date: Thu, 24 May 2007 22:51:15 +0800
I have wrote a firefox extension.
My code is:
NS_IMETHODIMP nsTray::Connect_window_event(nsIBaseWindow *aBaseWindow,
nsITrayCallback *aCallback) {
nsresult rv;
NS_ENSURE_ARG_POINTER(aBaseWindow);
nativeWindow aNativeWindow;
rv = aBaseWindow->GetParentNativeWindow(&aNativeWindow);
NS_ENSURE_SUCCESS(rv, rv);
g_signal_connect(G_OBJECT(gdk_window_get_toplevel(NS_REINTERPRET_CAST(GdkWindow*,
aNativeWindow))), "destroy", G_CALLBACK(nsTray::window_close_event), this);
return NS_OK;
}
When I call this function, displayed that:
GLib-GObject-WARNING **: gsignal.c:1669: signal `destroy' is invalid for
instance `0x8444920'
On 5/24/07, Marcelo Armengot <marcelo armengot uv es> wrote:
åå escribiÃ:
> Hi,
>
> I want to capture a GdkWindow's destory event. And I have tried
> 'g_signal_connect' function, but failed.
> Can someone refer me to an example?
>
> thanks,
>
>
What's the matther following this example?
Is the doc exampl, i used it last time...
g_signal_connect(G_OBJECT (window), "destroy", G_CALLBACK (destroy),
NULL);
static void destroy (GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}
May be you have to explain us any more,
anyway the asiatic keys in your signature are lovely
;)
--
Sorry for my poor English :)
- http://www.aragonconsultinggroup.com
- http://www.aiyo.cn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]