On 6/13/06, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
Antonio Gomes wrote:
> I see your point, but is reimplementing such interface(s) the only way to
> get it ?

Er... what do you mean?

Humm, ok .. let me clarify things:

I am trying to disable loads (activated by mouse clicks) under certain
circumstances (if user starts panning from a link, for example - ps:
pan is already implemented). So far, I am using the gtkmozembed's
open_uri callback (returning TRUE) to avoid load, but it fails in some
cases ...

So, if I could remove mouse_down listener and then add it on mouse_up,
I'd reach what I want to (avoid loading) without failing I think ...
Do I have to reimplementing nsIDOMMouseListener interface to get it ?

 > > So, could I get the listener of  a nsDOMWindow

There is no such thing.

But, look at 
http://lxr.mozilla.org/mozilla1.8/source/dom/src/base/nsGlobalWindow.cpp#5104

> DOMWindow->RemoveEventListener (NS_LITERAL_STRING("mousedown"), ???,
> PR_TRUE)

I _really_ don't know what that code is trying to do...

   (...mozilla_engine is a gtkmozembed object... )

   nsIWebBrowser *webBrowser = nsnull;
   gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED(mozilla_engine),
&webBrowser);

   nsCOMPtr<nsIDOMWindow> DOMWindow;
   webBrowser->GetContentDOMWindow(getter_AddRefs(DOMWindow));

  // getting DOMWindow listener somehow. Dont know if it's possible
  ....

  // to remove temporarily mousedown event listener from it, I have
to have the listener first (missing parameter bellow)
  DOMWindow->RemoveEventListener (NS_LITERAL_STRING("mousedown"), ???, PR_TRUE)

that's what I meant ...

thanks for your time.

--
--Antonio Gomes
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to