gi-notify-0.7.27: Libnotify bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Notify.Functions

Description

 
Synopsis

Methods

getAppName

getAppName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: The registered application name, passed to [funcinit].

Gets the application name registered.

getServerCaps

getServerCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m [Text]

Returns: a list of server capability strings.

Queries the server capabilities.

Synchronously queries the server for its capabilities and returns them in a list.

getServerInfo

getServerInfo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m (Bool, Text, Text, Text, Text)

Returns: True if successful, and the variables passed will be set, False on error. The returned strings must be freed with g_free

Queries the server for information.

Synchronously queries the server for its information, specifically, the name, vendor, server version, and the version of the notifications specification that it is compliant with.

init

init Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

appName: The name of the application initializing libnotify.

-> m Bool

Returns: True if successful, or False on error.

Initialized libnotify. This must be called before any other functions.

Starting from 0.8, if the provided appName is Nothing, libnotify will try to figure it out from the running application. Before it was not allowed, and was causing libnotify not to be initialized.

isInitted

isInitted Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Bool

Returns: True if libnotify is initialized, or False otherwise.

Gets whether or not libnotify is initialized.

setAppName

setAppName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

appName: The name of the application

-> m () 

Sets the application name.

uninit

uninit :: (HasCallStack, MonadIO m) => m () Source #

Uninitializes libnotify.

This should be called when the program no longer needs libnotify for the rest of its lifecycle, typically just before exitting.