If you follow CantabileApp on Twitter or Facebook you’ll no doubt be aware that I’m spending the entire month of November working on the OS X port of Cantabile.
This post describes briefly what’s involved and shows some of the work that’s already been done.
A Little Background
When I set out to re-write Cantabile in late 2014, even though the initial goal was to get it running on Windows the entire project was designed from the ground up with OS X in mind.
The basic approach has been to build a custom cross-platform user-interface library and write everything that’s specific to Cantabile against that library.
That library is called GuiKit and theoretically, by porting it to OS X most of Cantabile should just work. Should.
GuiKit consists of a few main functional areas:
- application management — app startup/shutdown, power management etc…
- window management — the window frames, menus, shortcut keys etc…
- forms — dialog boxes and standard controls
- a composited view engine — Cantabile’s main window
- drawing — a cross platform drawing API
I’m also taking this opportunity to clean up the code so instead of working directly on GuiKit I’m building a new version “GuiKit2” and moving things over piece by piece, cleaning them up and porting to OS X as I go.
Eventually GuiKit2 will replace GuiKit in Cantabile.
Halfway through Month of Mac and things are coming together nicely. All the form controls now work on both OS X and Windows:
These screens don’t look much on their own, but the point here that large parts of Cantabile are built using these few controls.
Cross Platform Drawing API
The drawing API is also finished and supports various shape primitives, gradients, bezier curves, images, text rendering, affine transforms and more.
The Windows version talks to GDI+ while the OS X version talks to CoreGraphics and both versions produce almost identical output:
Finally, some parts of the application framework, menus, shortcut keys, message boxes have also been completed.
What’s Left and What’s Next?
The goal for the rest of November is to finish porting all of GuiKit except for the composited view engine which I’m considering moving to OpenGL and I’ll do later.
Aside from the user interface there’s also some work to be done in the audio engine but it too is already mostly cross platform. There’s just a few platform sensitive parts like audio driver hosting, MIDI integration and parts of the plugin hosting left.
Of course I also expect there to be a lot of unforeseen issues, but so far it’s coming together nicely.