(require (planet "growl.ss" ("murphy" "growl.plt" 1 0)))
This library provides a simple interface to the UDP protocol for Growl notifications.
A notification center class. When the class is instantiated, it registers the application with the growl server.
name : string?
(listof (or/c (list/c symbol? string? any/c)
(list/c symbol? string?)))
hostname : string?
port-no : (integer-in 1 65535)
Creates a notification center for the application called name and connects to the Growl server at running on hostname:port-no.
The possible notifications that can be posted by the application are specified as an association list. Each element of the list has the form (id type [default? #t]). The id is used in calls to notify to reference the notification while the type is the string that will appear in the configuration interface of Growl to describe this notification type. default? indicates whether the notification type should be enabled by default.
name and notifications are accessible as fields of the new object.
(send a-growl notify
id : symbol?
title : string? = name
description : string?
priority : (integer-in -2 2) = 0
sticky? : any/c = #f
Sends a notification to the growl server. The type of notification to send is specified by the given id.
The title of the notification defaults to the name of the application. The description message has to be specified.
Optionally you can specify a priority hint for the message and a sticky? flag hinting that the message should be displayed until dismissed by the user.
(send a-growl close) → void?
Closes the UDP socket associated with this object. No further notifications can be sent using this object.
Copyright (c) 2008 by Thomas Chust <firstname.lastname@example.org>.
This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lessert General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You can find a copy of the GNU Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.html.