[Mono-osx] [MonoMac] Adding WebKit DOM interfaces
Miguel de Icaza
miguel at novell.com
Tue Nov 16 16:46:36 EST 2010
Yeah, because it'll be compiled into a class rather than an interface, so
> DomNode couldn't inherit from that. So after more thought, I've come up
> with this patch which adds IDomEventTarget interface.
What I did was to add the events directly to the DomNode, so it is possible
to add the event listeners directly into the DomNode:
The problem with introducing C# interfaces into the mix is that it would be
half a solution, they are not universally supported for incoming/outgoing
arguments nor marshalling.
The second problem is that if you feed an IFoo to a class that expects and
NSObject, there is no way other than checking at invocation time that you
have an NSObject, and we do not really have any way of enforcing that the
[Exports] are on the proper methods.
We do want to come up with a solution to this general problem, in general by
adding Objective-C-like protocols to C#, where methods in a protocol can be
made *optional* and must be implemented by an NSObject, but that is a longer
term change that wont happen any time soon.
For now, we will just flatten out objects that explicitly implement an
interface, like in this case
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx