Certain modules and headers can be included directly within project to instantly add support for Snarl to an application. In order to maintain a level of consistency, a number of function prototypes are defined which should be implemented by all headers and modules. The functions are split into two types:
In addition to the defined helper functions, other functions may be included in modules and headers in order to make life easier for the developer. These will be specific to the individual modules and thus are not documented here.
Conventions used within the modules are as follows:
How each module is referenced will be specific to the programming language, however here's how to add the currently defined modules to your app:
Returns the identifier of Snarl's application registered Windows message.
int32 snDoRequest(str Request, int32 ReplyTimeout = 1000)
Sends Request to Snarl. ReplyTimeout indicates the number of milliseconds to wait before assuming a reply will not be received. See the API Reference for more details on the request format and supported commands.
Returns TRUE if Snarl is running, FALSE otherwise.
Returns the identifier of Snarl's system registered Windows message.
int32 snarl_notify(str Signature, str Class, str UID, str Password = "", str Title = "", str Text = "", str Icon = "", int32 Priority = 0, int32 Duration = -1, str Callback = "", int32 PercentValue = -1, str CustomData = "")
Provides a wrapper around the most common functionality provided by the notify command. See the API documentation for a more detailed explanation of the individual arguments.
int32 snarl_register(str Signature, str Name, str Icon, str Password = "", int32 ReplyTo = 0, int32 ReplyWith = 0, bool IsDaemon = FALSE)
Registers an application with Snarl.
Unregisters the application previously registered with Signature. If a password was provided when the application was registered, the same password must be provided in Password.
Returns the version number of the currently running Snarl instance.