BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Windows.Forms Comes to 64-bit Mac OS X

Windows.Forms Comes to 64-bit Mac OS X

Bookmarks

Mono has long had a pure C# implementation of the Windows.Forms stack for Linux, Mac, and Windows.  As technology trends changed, Mono's Windows.Forms platform has not been actively developed, but does remain a common dependency for various third party libraries and applications making its support important beyond those writings WinForms applications directly.  Mono's switch to 64-bit platform by default has caused problems for continuing the support of Windows.Forms on MacOS, since this support was built on Carbon's 32-bit foundation.

To address this gap, Mono's Miguel de Icaza recently explored how the MacOS support could be modernized.  His initial choices were either to use APIs provided by the 64-bit edition of Carbon or attempt a new back-end built on top of Cocoa using Xamarin.Mac.  An initial look into 64-bit Carbon suggested that the APIs by needed for Windows.Forms are poorly documented and making it hard to discern what is 64-bit capable.  This lead de Icaza to begin experimenting with Xamarin.Mac.

Fortuantely de Icaza was doing his development publicly, which provided an opportunity for Filip Navara to notice what de Icaza was working on.  Navara then contacted de Iacaza to say that one of his projects may be useful in this new endeavour.   Navara has made available an existing Cocoa backend that can be repurposed for inclusion on Mono proper. Navara's code comes from Mono SWF, which built a working Cocoa backend for Mono.  

De Icaza has since decided to use this code as the foundation for a new 64-bit implementation of Mono's Windows.Forms on MacOS.  In reviewing the code, de Icaza noticed that it uses native AppKit controls for some of the controls.  It also utilizes a custom version of System.Drawing that Mono originally developed for iOS users.

Rate this Article

Adoption
Style

BT