Feeds

Spice up your Apple applications

Splash of Aqua

  • alert
  • submit to reddit

Internet Security Threat Report 2014

Mac Secrets Apple's "Professional" range of applications such as Final Cut Studio, Aperture or Logic Express have a completely different look to the standard Aqua color scheme. This comes courtesy of a private framework called ProKit.framework, intended to make Apple's professional software stand out from the crowd.

And stand out it does. Personally, I'm not a huge fan. The relentlessly grey color scheme is drab and I find the default font small and fiddly. From a visual perspective, I hate the cramped little dialogs that appear in Aperture, such as at the Preferences dialog.

A standard Aqua look would have been much cleaner, in my view. If any other developer had come up with this, they'd be roundly castigated for his non-standard user interface but, being Apple, they get away with it.

With that in mind, I'm going to show you how to use the ProKit library to customize your applications.

Framework uncovered

First, create yourself a new Xcode Cocoa application in the usual way and then add ProKit.framework to the list of linked frameworks by dragging it from its hiding place in /System/Library/PrivateFrameworks/. You should find that the app will still build and run just fine.

On background, I believe that ProKit.framework is installed as standard under Leopard, so if you're adventurous enough to use the techniques described here in a production app, then you'd be wise to specifically target Leopard. If you need to support Tiger, direct your users here.

Now go into Interface Builder, select the application window, bring up the Inspector and change its class name from NSWindow to NSProWindow. Also be sure to select the "Textured" checkbox before saving and returning to Xcode. If you now rerun the app, a wondrous sight will meet your eyes: your program will sport the same monochrome look as Apple's pro-level tools.

This is cool, but what we really want to do is use some of those ProKit controls, right? Before you can do this, you need to make one small change to your main.m source file. Just open the file and change the call to NSApplicationMain into a call to NSProApplicationMain. You might also want to add an extern reference to the new call so as to stop the compiler from whinging. When you're done, things should look like this:

extern int NSProApplicationMain (int argc, const char *argv[]);

int main (int argc, char *argv[])
{
        return NSProApplicationMain (argc,  (const char **) argv);
}

With that small change, various parts of the ProKit framework get initialised behind the scenes, so we're now ready to use those new controls.

Choosing a cloud hosting partner with confidence

Next page: Take control

More from The Register

next story
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Sway: Microsoft's new Office app doesn't have an Undo function
Content aggregation, meet the workplace ... oh
Sign off my IT project or I’ll PHONE your MUM
Honestly, it’s a piece of piss
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
NetWare sales revive in China thanks to that man Snowden
If it ain't Microsoft, it's in fashion behind the Great Firewall
Chrome 38's new HTML tag support makes fatties FIT and SKINNIER
First browser to protect networks' bandwith using official spec
Admins! Never mind POODLE, there're NEW OpenSSL bugs to splat
Four new patches for open-source crypto libraries
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
Win a year’s supply of chocolate
There is no techie angle to this competition so we're not going to pretend there is, but everyone loves chocolate so who cares.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.