From a Cocoa perspective it's actually called an NSStatusItem (Status Item), appearing the NSStatusBar (Status Bar).
From a user perspective (per Apple's Human Interface Guidelines), it's called a "Menu Bar Extra" appearing inside the "Menu Bar". Though I think that's a little bit stupid for a name.
However, they tend to be more robust for certain applications than a Dock icon or Dock Icon Menu's. You can have clickable buttons, have single- and double-click behavior, display graphics, etc...
On a downside, if you don't have enough screen space to show them, they'll start to disappear. They are ordered based on which app loaded theirs first and cannot be re-ordered.
--------------------
Apple's "Menu Bar Extras" don't exist within NSStatusBar. These include the clock, battery icon, bluetooth icon, etc... They live in a private API of Apple's.
Apple's always appear on the far-right, are the last to "disappear" if there's not enough space for them to fit. Unlike 3rd party NSStatusItem's, you can re-position Apple's by Control-Clicking on them and moving them around (except for Spotlight's).
--------------------
Since 3rd party NSStatusItem's are not going away anytime soon, there's a need for a Mac app (or OS X update) that'll let you condense them into some sort of manageable GUI element.
All NSStatusItems appear under a single instance of NSStatusBar. It would be possible to write an app that'll extend NSStatusBar's class (overriding it, swizzle it, etc...) which would allow you to do custom stuff with them. Perhaps add ordering support, hiding support, grouping them inside a mini-window accessible by a single "Menu Bar Extra" you click to access them.
For example (excuse the crappiness - I mocked it up in 5 min, credit goes to Snippit for the window graphic):
Well, a small correction. Certain ones, most notably iStat Menus, can be moved with command-click.
In the old days, a hack was used to make this work by tricking the system into thinking it was a built-in, but unused, menubar item, often the drawing tablet's status item. I believe this was done through a "haxie", from Unsanity. I'm not sure how iStat Menus does it, but I'd hazard a guess at the same way.
Disclaimer: I'm working off shaky knowledge that I learned three or four years ago, before I was even a dev.
iStat Menus works the same way, yes. The private API is called NSMenuExtra. It's considerably different from NSStatusItem in that NSStatusItems are created by an open application, whereas NSMenuExtras are created by plugins to SystemUIServer. (This makes stability an issue in NSMenuExtras, as one crashy plugin will make the whole status area disappear.)
This makes stability an issue in NSMenuExtras, as one crashy plugin will make the whole status area disappear.
Is that what happens now? They used to make the whole windowserver disappear. Not fun.
I honestly can't understand why Apple doesn't improve support for plain NSStatusItems. There's no reason why they can't have command-drag remove and reordering as well. They're just windows, after all.
IIRC, 'back in the day' when I was on OSX I remember that the behavior for Apple statusbar apps was different than if you went about it in the kosher, Apple-approved fashion.
It might have been the option-click-drag re-arranging or the option-click-drag-to-desktop to remove from the statusbar (or both of those). Maybe those have since become part of the standard API though.
From a Cocoa perspective it's actually called an NSStatusItem (Status Item), appearing the NSStatusBar (Status Bar).
From a user perspective (per Apple's Human Interface Guidelines), it's called a "Menu Bar Extra" appearing inside the "Menu Bar". Though I think that's a little bit stupid for a name.
Apple does warn developers from making NSStatusItem's/Menu Bar Extra's: http://developer.apple.com/library/mac/#documentation/UserEx...
However, they tend to be more robust for certain applications than a Dock icon or Dock Icon Menu's. You can have clickable buttons, have single- and double-click behavior, display graphics, etc...
On a downside, if you don't have enough screen space to show them, they'll start to disappear. They are ordered based on which app loaded theirs first and cannot be re-ordered.
--------------------
Apple's "Menu Bar Extras" don't exist within NSStatusBar. These include the clock, battery icon, bluetooth icon, etc... They live in a private API of Apple's.
Apple's always appear on the far-right, are the last to "disappear" if there's not enough space for them to fit. Unlike 3rd party NSStatusItem's, you can re-position Apple's by Control-Clicking on them and moving them around (except for Spotlight's).
--------------------
Since 3rd party NSStatusItem's are not going away anytime soon, there's a need for a Mac app (or OS X update) that'll let you condense them into some sort of manageable GUI element.
All NSStatusItems appear under a single instance of NSStatusBar. It would be possible to write an app that'll extend NSStatusBar's class (overriding it, swizzle it, etc...) which would allow you to do custom stuff with them. Perhaps add ordering support, hiding support, grouping them inside a mini-window accessible by a single "Menu Bar Extra" you click to access them.
For example (excuse the crappiness - I mocked it up in 5 min, credit goes to Snippit for the window graphic):
http://www.dave-gallagher.net/coding/menuBarMockup.jpg
It would be nice to add "lesser-used" Menu Bar Extra's to something like that, hiding them out of the way.