On 5/24/07, Emmanuele Bassi <[EMAIL PROTECTED]> wrote:
>
> could you please reply below? and could you please reply to the list?
> I'm subscribe, so there's no need to Cc: me.
>
> On Thu, 2007-05-24 at 23:38 +0800, 小多 wrote:
> > OK, but how could I capture a GdkWindow's event?
> >
> you don't. you
could you please reply below? and could you please reply to the list?
I'm subscribe, so there's no need to Cc: me.
On Thu, 2007-05-24 at 23:38 +0800, 小多 wrote:
> OK, but how could I capture a GdkWindow's event?
>
you don't. you need to get a GtkWindow to connect to the events.
I have no idea of
OK, but how could I capture a GdkWindow's event?
On 5/24/07, Emmanuele Bassi <[EMAIL PROTECTED]> wrote:
>
> 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_
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), thi
I will search some doc for revising this way of addressing.
Thanks again.
On 5/24/07, Marcelo Armengot <[EMAIL PROTECTED]> wrote:
>
> It seems you are looking for the parent of a window. When you created
> that window you knew its parent.
> Save the parent and call for his destruction.
>
> Another
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
On Thu, 2007-05-24 at 23:07 +0800, 小多 wrote:
> Without toplevel():
> GLib-GObject-WARNING **: gsignal.c:1669: signal `destroy' is invalid for
> instance `0x8444a28'
GObject is trying to tell you that GdkWindow instances do not have a
"destroy" signal; the "destroy" signal is available for GtkObjec
It seems you are looking for the parent of a window. When you created
that window you knew its parent.
Save the parent and call for his destruction.
Another way is to revise this way of addressing, but i cant help you...
G_OBJECT(gdk_window_get_toplevel(NS_REINTERPRET_CAST(GdkWindow*,
aNativeWi
Without toplevel():
GLib-GObject-WARNING **: gsignal.c:1669: signal `destroy' is invalid for
instance `0x8444a28'
But
gdk_window_hide(gdk_window_get_toplevel(NS_REINTERPRET_CAST(GdkWindow*,
aNativeWindow)));
can hide the window. It's wried...
On 5/24/07, Marcelo Armengot <[EMAIL PROTECTED]> wrote
0x8444920 is the address of the instance
G_OBJECT(gdk_window_get_toplevel(NS_REINTERPRET_CAST(GdkWindow*,
aNativeWindow)))
He is telling you that is a wrong reference and he cant redirect it.
I think you are addressing wrongly your window,
try to look for the window without toplevel() primitive
_
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);
小多 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
12 matches
Mail list logo