[Mono-osx] Patches for NSColor

Regan Sarwas rsarwas at gmail.com
Thu Dec 30 17:44:49 EST 2010

Attached is a git-diff output file for corrections to the NSColor interface
in appkit.cs
Also attached is NSColor.cs which provides strongly typed bindings for the
two obj-c methods that take *CGFloat input.
(I did not include the diff to the Makefile)

I added out parameters in the interface where appropriate, and the generator
created correct code in all case.  Of course this relies on continuing
correct behavior of the generator, but in my opinion is much cleaner than
creating additional wrapper methods to deal with an IntPtr.

I did a minimal amount of method/parameter renaming to be internally consist
(as I saw it).

I resisted the urge to do more extensive renaming, because I wasn't sure it
was appropriate.  I would like to rename XxxxxRGBA() to XxxxxRgba() for
consistency with MonoMac.CoreImage.CIColor and System.Drawing.Color. I also
considered dropping "Component" from xxxComponent. (i.e RedComponent { get;}
would become Red {get;}. Once again this would be consistent with CIColor
and Color,  furthermore Component seems to be a synonym for property.

This is my first submission, so feedback would be helpful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101230/9e8b777c/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: appkit.cs.patch
Type: application/octet-stream
Size: 5879 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20101230/9e8b777c/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NSColor.cs
Type: application/octet-stream
Size: 1131 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20101230/9e8b777c/attachment-0003.obj 

More information about the Mono-osx mailing list