Artem Ananiev wrote:
I'm embedding Mozilla-based browser into my Java application using JavaXPCOM, on Windows. One of the first difficulties I met is that browser doesn't react on mouse wheel, thoug its scrollbar is present. My container implements these interfaces: nsIWebBrowserChrome, nsIWebBrowserChromeFocus, nsIEmbeddingSiteWindow. What should I do to enable mouse wheel in embedded browser?

Another question is: is it possible to get mouse and key events occuring in browser? I don't need them right now but they can be useful in my app later.

Thanks,

Artem


Artem,
I'm not real familiar with Java, but to receive events in my C++ app, I implement the nsIDOMEventListener interface. You have to setup the events you want notification from for this to work, but it's not that hard. If you get to the point you need code examples, I can provide you some in C++.

If you want to DISPATCH key or mouse events to an element, take a look at:
nsIDOMDocumentEvent
nsIDOMEvent
nsIEventTarget
nsIDOMKeyEvent
nsIDOMMouseEvent

Again, if you need some code examples, I can provide you with a few.

Hope this helps!

Nik Williams

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

Reply via email to