I am looking to create an application that I can keep next to Spotlight.
Application like Dropbox, Mint, Alfred reside there and live through out the life of OS.
Where should I start?
Thanks in advance, RKS
I am looking to create an application that I can keep next to Spotlight.
Application like Dropbox, Mint, Alfred reside there and live through out the life of OS.
Where should I start?
Thanks in advance, RKS
Use NSStatusBar class.
NSStatusBar *mStatusItem = [[[NSStatusBar systemStatusBar]statusItemWithLength:NSVariableStatusItemLength] retain]; // Retain
[mStatusItem setHighlightMode:YES];
//Set Menu Icon
[mStatusItem setImage: [NSImage imageNamed:@"Image"]];
[mStatusItem setAlternateImage: [NSImage imageNamed:@"AImage"]];
[mStatusItem setMenu: lMenu];
[mStatusItem setToolTip:@"my app"];
That sounds like a "menu extra"/"status bar item".
The official API for status bar items is NSStatusBar; see Apple's information on status bars.
The unofficial (and thus not guaranteed to continue to work, or even to work at all on the latest OS X) internal interface for menu extras is NSMenuExtra; see, for example, this information on NSMenuExtra.