[webkit-help] Adding Event Listeners on Cairo

Anthony Johnson anthony.johnson at flexsim.com
Mon Apr 18 15:00:50 PDT 2011

This is probably directed at Brent Fulgham, but if anyone else knows, great.
So I've built the Cairo webkit port, and I'm trying to add an event listener
to an element of an html document so that my own c++ method will be called
when the user hovers/clicks/focuses/etc. on the element. In looking through
the code, it looks like much of the implementation is still just stubs at
this point, i.e. the DomNode abd DomElement implementations have a lot of
E_NOTIMPL return values. Please tell me if that is a correct assessment, or
am I missing something? If I'm correct, then it seems to me there would be
two options. First, I could try to pull a bunch of the WebCore headers over
into the winlauncher's includes, and then somehow access the webcore
elements directly, bypassing Cairo's webkit layer. This option sounds like a
hack, so I don't think that's the way I need to go. Second, I could go ahead
and add implementations to the IDOMNode, IDOMEventTarget, etc. interfaces.
This will be a little more work on my side, but I think that's the direction
you were heading in the end anyway, right? So, if I go this route, here's
what I think I need to do.
1. I'd need to add the IDOMEventTarget interface query to DOMNode's
implementation, so that I can QueryInterface(IDOMEventTarget) on an
IDOMNode, and get a non-null pointer (I'm getting null right now).
2. Implement the addEventListener, removeEventListener methods on the
DOMNode class, which subsequently call the WebCore's Node member method

Am I missing anything? Is this the right way to go?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110418/0bcc4168/attachment.html>

More information about the webkit-help mailing list