Hi,

On 26.11.2005, at 23:06, Jiva DeVoe wrote:

So I'm sorta hacking on WildMenus this weekend, and have implemented a primitive clock in the menubar... I'm wondering what's the best way to get my clock to redraw once a minute? Obviously the menu code itself gets linked into each application, so having 20 applications all launching their own little background timers to update the menubar clock sounds kinda cruddy. What would be the best way to do this? I imagine some kind of NSNotification but that also seems cruddy.

(ps: For those who want said functionality - I have been sending patches to Michael Hanni, the WildMenus maintainer, so look for a release from him eventually.)

Just for inspiration, how it looks on OS X. Here is a screenshot from Quartz debug - an application that can show all windows and their properties:

http://stefan.agentfarms.net/Download/GNUstep/Trash/Quartz%20window% 20list.png

Main menu (horizontal) is window number WID=5 owned by process called WindowsServer. That means that the menu is not drawn nor owned by any application, applications just provide menu contents that is passed to the menu owner - window server.

The status bar is owned by damon/process called system UI server. WID 3a is the status bar (see NSStatusItem class) and WID 39 is the Spotlight magnifier icon.

Having those two processes separated from applications can simplify lots of things, including custom menu orientation, addition of shared menu entries across applications (like apple has apple menu, or menu with debug or scripting actions)...

Stefan Urbanek
--
http://stefan.agentfarms.net

First they ignore you, then they laugh at you, then they fight you, then you win.
- Mahatma Gandhi



_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to