Blog
Mac Port
Date: 5/1/2006
So with the time off over Christmas / New Year I got down to some hard core Mac porting work. I've taken the null port I finished in December and started implementing things. One night I spent 2+ hours reading the documentation just trying to decide what types to use for things like Threads, Windows/Views, Fonts, Menuitems etc. This morning I got the test app to start, detect system fonts, create the fonts, open a window, with the right position and title bar, and then go into the event loop, then shutdown cleanly. Nice!

Next on the list is implementing the in memory bitmap object, so that the image loader doesn't bitch and moan during startup when trying to create the toolbar. Then I'll try and get the drawing model and controls hooked up so that something appears in the window. I might get to a point in the next week or so where I can actually take a screenshot of the progress.
Comments:
SnappyCrunch
05/01/2006 3:26am
Excellent. Do you find that your MacOS (X) is anything like your Linux ports, or is the Aqua interface radically different from anything you've coded for?
fret
05/01/2006 4:07am
Carbon is a million times better than Xlib. But seriously, I knew that before I started. Xlib is a dog.

So it's by far the most modern and flexible API I've targetted. But the documentation leaves a lot to be desired. Because at the moment I have no net connection on the mac all I have is the offline docs. Which really arn't enough to write code with. You keep wanting to ask someone who knows a question about the finer details of something, because the documentation is too sparse.

I'm downstairs on the Dad's lappy / dialup to try and track down some answers, but got side tracked answering forum posts ;)
fret
06/01/2006 9:04pm
I originally thought I would use a quartz image as the bitmap object but it turns out that they are static and can't be changed by writing to the bits directly, so I'm going to try and use a quartz bitmap context and so how that goes. So far I havn't been able blt anything from memory to screen yet. But I think I'm close.

As soon as some bitmap support is working I can start grafting in support for child windows (controls in carbon parlance) and then I'll see if I can get a reasonable screenshot.
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]