Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Menu Bar API?

Menu Bar API?
Thread Tools
Forum Regular
Join Date: Jul 2002
Location: Los Angeles, CA
Status: Offline
Reply With Quote
Sep 21, 2002, 09:56 PM
 
Anyone know where I could get some info on how to make a menu-bar widget? (Such as iChat's, volume, etc). Thanks.
I'm a bad...motherf%#!ing DJ
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 22, 2002, 12:33 AM
 
The officially-sanctioned route is with the NSStatusItem class. (At least that's the Cocoa way. I don't know if there's a Carbon equivalent.)

If you want one like the volume control--independent of any applications and you can drag it around--you'll have to use the private SystemUIServer APIs and your users will have to use Unsanity's Menu Exra Enabler. As far as I know, this requires Cocoa too--specifically Objective-C.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Sep 22, 2002, 05:02 PM
 
MenuExtras are what you're looking for, I think. Check out ASM's code.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 23, 2002, 09:36 AM
 
Eugh. Not only is the ASM source a horrible mess, the way they've done it - subclassing and reimplementing everything under the sun - is a totally unnecessary and confusing way of creating a menu extra. The only useful thing in there is SystemUIServer.h, which you could get yourself with class-dump, but with the lack of any other starting points it might just be the only option...
[vash:~] banana% killall killall
Terminated
     
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Sep 23, 2002, 04:13 PM
 
Originally posted by Gul Banana:
Eugh. Not only is the ASM source a horrible mess, the way they've done it - subclassing and reimplementing everything under the sun - is a totally unnecessary and confusing way of creating a menu extra. The only useful thing in there is SystemUIServer.h, which you could get yourself with class-dump, but with the lack of any other starting points it might just be the only option...
Question: Where do you find class-dump? I see objdump, but I do not see any class-dump command.
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
Mac Enthusiast
Join Date: Nov 2001
Status: Offline
Reply With Quote
Sep 23, 2002, 07:06 PM
 
Originally posted by Mactoid:
Question: Where do you find class-dump? I see objdump, but I do not see any class-dump command.
http://www.omnigroup.com/~nygard/Projects/
     
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Sep 23, 2002, 08:48 PM
 
Originally posted by Ibson:

http://www.omnigroup.com/~nygard/Projects/
OmniGroup, of course! Thanks for the link.
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
Junior Member
Join Date: Oct 2001
Status: Offline
Reply With Quote
Sep 24, 2002, 10:52 PM
 
I created an app the runs from the menu bar after reading the first post in this thread. If you want to check it out send me an email and I'll send you the code.

type R 503
I be that insane n***a from the psycho ward.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:49 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2