[haiku-development] Re: Notification Server?

  • From: Chris Peel <chris.gsi@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 24 May 2007 23:30:08 +0100


On 24 May 2007, at 13:14, Stephan Assmus wrote:

Niels, it will be done anyways (I mean, if not by us then by someone else, in fact it has been), as much as I agree with your general notion. But I'd
rather have it under our control, so that we can make it as sane as
possible. Some useful situations for the feature were pointed out. The
thing is you are fighting windmills. By not providing the feature, you will likely not get the reaction "ah what a relieve, Haiku doesn't have these bothersome notifications". I mean you will likely not educate the users, they (some, many?) will simply miss a feature. *Everyone* here agreed that it can be annoying. But the level at which it is annoying is different for everyone. So the obvious solution is to provide the user a way to define the level (which btw I have searched for in Window, but frustratingly have not found). We can still make a point by choosing the default setting to be
"critical" or something. I hope you can see this as a compromise.

Best regards,
-Stephan


I'm late coming to this thread (just moved my subscription over to my mac) but has anyone checked out the Mac OS X Growl application (http://growl.info) or the Windows equivalent {cough} written by me {cough} Snarl? (http://www.fullphat.net/)?

I'm thinking this might be the sort of thing you're after?

What really interested me about Snarl was that all an application has to do is post a notification detailing the content (i.e. title, text, icon, etc.) of the notification; it's then down to Growl/Snarl to display it. This means that the end user can have full control about which notifications are displayed and the configuration of all this is maintained by Growl/Snarl *not* the originating application.

Both applications also allow for 'classes' of notification to be generated, so a IM client register the following classes:

"User goes online"
"User goes offline"
"User status changes"
etc...

I then decide (using Snarl/Growl) that I want to see only "user goes online" notifications. I do this via Snarl/Growl so the source app still sends the notification; it just doesn't get displayed.

Growl also includes support for prioritizing notifications and assigning different styles (i.e. UI appearances) to them. I plan to add this to a forthcoming Snarl release.

Anyway, from the coding side I'm not sure what language Growl is written in but I wrote Snarl in good ole Visual Basic 6. Don't let that put you off though - I use the Windows WM_COPYDATA mechanism so there's support for C, C++, C#, VB.net, and even things like Ruby, Java, etc.

From a BeOS perspective (and I'm no BeOS coder) - I'd expect the notification engine to be a daemon and then there would be a kit which would 'talk' to the daemon (rather than a user app trying to talk directly to it). So you might have a BNotification class which would have the following members:

SetTitle()
SetText()
SetIcon()
SetTimeout()
Show()
etc...

You'd construct a BNotificaton object, fill in the Setxxx() fields then call Show() - this would send the notification information to the daemon which would then decide whether it should be displayed or not (and where on-screen, and in what colour/style, etc.)

Just my rather long 2c...

Chris














Other related posts: