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

Alexander Shulgin alexander.shulgin at yessoftware.com
Tue Nov 2 12:42:01 EDT 2010

On 27.10.2010 19:20, Alexander Shulgin wrote:
> On 27.10.2010 19:11, Geoff Norton wrote:
>> Hello,
>> +  [Export ("item:")]
>> +  DomNode Item (uint index);
>> This should probably be called GetItem, and wrapped with a manual binding
>> into a indexer.
>> At a higher level, several of these objects appear to be good candidates
>> for .NETizing  further, ie, DomNode could expose the children in an
>> enumerator, etc.
> Nice idea.  I'm going to ask for details when I come to this part.

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.

I've also added WebKit/DomNodeList.cs in which the generated class is 
extended with indexer and implements IEnumerable<DomNode>, so foreach 
constructs are possible now on DomNodeLists.

I have very little experience in C# generics, so someone will need to 
guide me while I'm adding more support for IEnumerable.  Do I need to 
copy-paste the code replacing the type name or there's a better method 
using generics and/or inheritance?

Also, I need some advice on property naming.  Is it desirable to reduce 
bloat by converting some names like `DomNode.NodeName' to just 
`DomNode.Name' or it is better to keep things as-is for transparency? 
At the opposite side, is it desirable to expand `BgColor' to 
`BackgroundColor' or better keep the original name too?  Is it OK to 
provide aliases to support both names--short and long?

>> As for updating the monomac inside monodevelop, what you did should work,
>> but ensure you close MonoDevelop before replacing the dll.
> Sure I did close it.  There's also MonoDevelop.MonoMac.dll and
> MonoDevelop.Debugger.Soft.MonoMac.dll in the same folder.  May be I
> should update them to?  Anyone knows how to do that?

OK, I resolved this issue by removing reference to shipped MonoMac in 
the monodevelop project and adding direct reference to my compiled dlls. 
  Works smooth so far :)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Added-some-DomObject-interfaces-for-WebKit-binding.patch
Url: http://lists.ximian.com/pipermail/mono-osx/attachments/20101102/8af6a3d6/attachment-0001.pl 

More information about the Mono-osx mailing list