[Mono-osx] [MonoMac] Adding WebKit DOM interfaces

Alexander Shulgin alexander.shulgin at yessoftware.com
Wed Nov 10 11:23:36 EST 2010


On 09.11.2010 18:34, Miguel de Icaza wrote:
>
>> OK, here is an updated patch.  I've added some DomCss* classes as well
>> as DomDocument (incomplete), etc.  Interfaces are laid out in webkit.cs
>> by the depth of inheritance, then in (roughly) alphabetical order.
>
> Thanks!
>

Thanks Miguel, for your response!

Now when I try adding DOM event interfaces, I face the following 
problem.  Suppose, I've added the DomEvent interface definition to 
webkit.cs like this:

[BaseType(typeof(DomObject), Name = "DOMEvent")]
interface DomEvent
{
     [Export("type")]
     string Type { get; }

     [Export("target")]
     DomEventTarget Target { get; }

     ...
}

If I use parse.exe on DOMEventTarget.h and DOMEventListener.h I get 
something like this, which I also add to webkit.cs:

[Model]
interface DomEventTarget
{
     [Abstract]
     [Export("addEventListener:listener:useCapture:")]
     void AddEventListener(string type, DomEventListener listener, bool 
useCapture);

     ...
}

[Model]
interface DomEventListener
{
     [Abstract]
     [Export("handleEvent:")]
     void HandleEvent(DomEvent evt);
}

The problem is that these [Model] interfaces aren't converted to any 
real code during compilation, so `make' complains like `DomEventTarget' 
does not exist in namespace `MonoMac.WebKit'.

What that [Model] attribute means?  How should I go resolving this problem?

Thanks!
--
Alex


More information about the Mono-osx mailing list