Wondering: Why doesn't Apple release the API to properly implement menubar items?

Discussion in 'Mac Programming' started by ravenvii, Nov 11, 2009.

  1. ravenvii macrumors 604


    Mar 17, 2004
    Melenkurion Skyweir
    Currently apps that use the menubar have to use a hack of sorts. It's obvious they are not equal to Apple's own menubar items. You can't arrange the third-party icons to mingle with the Apple ones. When you click an item of Apple's, and move your mouse to another Apple item, the menu activates normally, but when you mouse over a third party's icon, it doesn't activate. You have to click to deactivate the menu, and click again the activate the third party menu.

    I am wondering why Apple refuses to reveal the proper APIs for third parties to use for menubar items?
  2. Catfish_Man macrumors 68030


    Sep 13, 2001
    Portland, OR
    The "proper" menu items run in SystemUIServer rather than in the applications that provide them, which is a bit of a risky thing to do. Some sort of in-between solution (perhaps something like how DockTile plugins work) seems appropriate. Have you filed a request with Apple for this at bugreport.apple.com?
  3. sammich macrumors 601


    Sep 26, 2006
    I've never noticed that. Now I'm gonna get annoyed by it :mad: However, iStatMenus doesn't behave like this, it activates like a menu item should, but others like Bowtie and Adium don't, like you said.

    Chances are Apple wants to keep things clean and uncluttered.
  4. kainjow Moderator emeritus


    Jun 15, 2000
    It's been like this since the beginning (AFAIK). I guess there isn't enough demand from developers for Apple to change it. Like Catfish_Man mentioned they probably will never open the existing API because each menu is a plugin managed by SystemUIServer and if one of those plugins crash, down goes the entire SystemUIServer process and all those menu items are gone (until it relaunches). I've seen it happen several times with Spotlight being the culprit.

    There's no reason they can't come up with some solution for integrating Apple menus with third-parties smoothly. I think they're just lazy ;)
  5. HiRez macrumors 603


    Jan 6, 2004
    Western US
    MenuMeters seems to function "correctly" (it'll drop down its menus after clicking on an Apple menu and moving to MM).
  6. kainjow Moderator emeritus


    Jun 15, 2000
    Looks like they use MenuCracker though.

Share This Page