gi-notify-0.7.11: Libnotify bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Notify.Objects.Notification

Contents

Description

 

Synopsis

Exported types

Methods

addAction

notificationAddAction Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

action: The action ID.

-> Text

label: The human-readable action label.

-> ActionCallback

callback: The action's callback function.

-> m () 

Adds an action to a notification. When the action is invoked, the specified callback function will be called, along with the value passed to userData.

clearActions

notificationClearActions Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> m () 

Clears all actions from the notification.

clearHints

notificationClearHints Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> m () 

Clears all hints from the notification.

close

notificationClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> m ()

(Can throw GError)

Synchronously tells the notification server to hide the notification on the screen.

getClosedReason

notificationGetClosedReason Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> m Int32

Returns: The closed reason code.

Returns the closed reason code for the notification. This is valid only after the "closed" signal is emitted.

new

notificationNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

summary: The required summary text.

-> Maybe Text

body: The optional body text.

-> Maybe Text

icon: The optional icon theme icon name or filename.

-> m Notification

Returns: The new Notification.

Creates a new Notification. The summary text is required, but all other parameters are optional.

setAppName

notificationSetAppName Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: a Notification

-> Text

appName: the localised application name

-> m () 

Sets the application name for the notification. If this function is not called or if appName is Nothing, the application name will be set from the value used in init or overridden with setAppName.

Since: 0.7.3

setCategory

notificationSetCategory Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

category: The category.

-> m () 

Sets the category of this notification. This can be used by the notification server to filter or display the data in a certain way.

setHint

notificationSetHint Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: a Notification

-> Text

key: the hint key

-> Maybe GVariant

value: the hint value, or Nothing to unset the hint

-> m () 

Sets a hint for key with value value. If value is Nothing, a previously set hint for key is unset.

If value is floating, it is consumed.

Since: 0.6

setHintByte

notificationSetHintByte Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

key: The hint.

-> Word8

value: The hint's value.

-> m () 

Deprecated: (Since version 0.6.)Use notificationSetHint instead

Sets a hint with a byte value.

setHintByteArray

notificationSetHintByteArray Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

key: The hint.

-> ByteString

value: The hint's value.

-> m () 

Deprecated: (Since version 0.6.)Use notificationSetHint instead

Sets a hint with a byte array value. The length of value must be passed as len.

setHintDouble

notificationSetHintDouble Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

key: The hint.

-> Double

value: The hint's value.

-> m () 

Deprecated: (Since version 0.6.)Use notificationSetHint instead

Sets a hint with a double value.

setHintInt32

notificationSetHintInt32 Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

key: The hint.

-> Int32

value: The hint's value.

-> m () 

Deprecated: (Since version 0.6.)Use notificationSetHint instead

Sets a hint with a 32-bit integer value.

setHintString

notificationSetHintString Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

key: The hint.

-> Text

value: The hint's value.

-> m () 

Deprecated: (Since version 0.6.)Use notificationSetHint instead

Sets a hint with a string value.

setHintUint32

notificationSetHintUint32 Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Text

key: The hint.

-> Word32

value: The hint's value.

-> m () 

Deprecated: (Since version 0.6.)Use notificationSetHint instead

Sets a hint with an unsigned 32-bit integer value.

setIconFromPixbuf

notificationSetIconFromPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) 
=> a

notification: The notification.

-> b

icon: The icon.

-> m () 

Deprecated: use notificationSetImageFromPixbuf instead.

Sets the icon in the notification from a Pixbuf.

setImageFromPixbuf

notificationSetImageFromPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) 
=> a

notification: The notification.

-> b

pixbuf: The image.

-> m () 

Sets the image in the notification from a Pixbuf.

setTimeout

notificationSetTimeout Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Int32

timeout: The timeout in milliseconds.

-> m () 

Sets the timeout of the notification. To set the default time, pass EXPIRES_DEFAULT as timeout. To set the notification to never expire, pass EXPIRES_NEVER.

Note that the timeout may be ignored by the server.

setUrgency

notificationSetUrgency Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> Urgency

urgency: The urgency level.

-> m () 

Sets the urgency level of this notification.

See: Urgency

show

data NotificationShowMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationShowMethodInfo a signature Source # 

notificationShow Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification.

-> m ()

(Can throw GError)

Tells the notification server to display the notification on the screen.

update

notificationUpdate Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotification a) 
=> a

notification: The notification to update.

-> Text

summary: The new required summary text.

-> Maybe Text

body: The optional body text.

-> Maybe Text

icon: The optional icon theme icon name or filename.

-> m Bool

Returns: True, unless an invalid parameter was passed.

Updates the notification text and icon. This won't send the update out and display it on the screen. For that, you will need to call notificationShow.

Properties

appName

data NotificationAppNamePropertyInfo Source #

Instances

AttrInfo NotificationAppNamePropertyInfo Source # 
type AttrOrigin NotificationAppNamePropertyInfo Source # 
type AttrLabel NotificationAppNamePropertyInfo Source # 
type AttrGetType NotificationAppNamePropertyInfo Source # 
type AttrBaseTypeConstraint NotificationAppNamePropertyInfo Source # 
type AttrSetTypeConstraint NotificationAppNamePropertyInfo Source # 
type AttrAllowedOps NotificationAppNamePropertyInfo Source # 

body

data NotificationBodyPropertyInfo Source #

Instances

AttrInfo NotificationBodyPropertyInfo Source # 
type AttrOrigin NotificationBodyPropertyInfo Source # 
type AttrLabel NotificationBodyPropertyInfo Source # 
type AttrGetType NotificationBodyPropertyInfo Source # 
type AttrBaseTypeConstraint NotificationBodyPropertyInfo Source # 
type AttrSetTypeConstraint NotificationBodyPropertyInfo Source # 
type AttrAllowedOps NotificationBodyPropertyInfo Source # 

closedReason

data NotificationClosedReasonPropertyInfo Source #

Instances

AttrInfo NotificationClosedReasonPropertyInfo Source # 
type AttrOrigin NotificationClosedReasonPropertyInfo Source # 
type AttrLabel NotificationClosedReasonPropertyInfo Source # 
type AttrGetType NotificationClosedReasonPropertyInfo Source # 
type AttrBaseTypeConstraint NotificationClosedReasonPropertyInfo Source # 
type AttrSetTypeConstraint NotificationClosedReasonPropertyInfo Source # 
type AttrAllowedOps NotificationClosedReasonPropertyInfo Source # 

iconName

data NotificationIconNamePropertyInfo Source #

Instances

AttrInfo NotificationIconNamePropertyInfo Source # 
type AttrOrigin NotificationIconNamePropertyInfo Source # 
type AttrLabel NotificationIconNamePropertyInfo Source # 
type AttrGetType NotificationIconNamePropertyInfo Source # 
type AttrBaseTypeConstraint NotificationIconNamePropertyInfo Source # 
type AttrSetTypeConstraint NotificationIconNamePropertyInfo Source # 
type AttrAllowedOps NotificationIconNamePropertyInfo Source # 

id

data NotificationIdPropertyInfo Source #

Instances

AttrInfo NotificationIdPropertyInfo Source # 
type AttrOrigin NotificationIdPropertyInfo Source # 
type AttrLabel NotificationIdPropertyInfo Source # 
type AttrGetType NotificationIdPropertyInfo Source # 
type AttrBaseTypeConstraint NotificationIdPropertyInfo Source # 
type AttrSetTypeConstraint NotificationIdPropertyInfo Source # 
type AttrAllowedOps NotificationIdPropertyInfo Source # 

summary

data NotificationSummaryPropertyInfo Source #

Instances

AttrInfo NotificationSummaryPropertyInfo Source # 
type AttrOrigin NotificationSummaryPropertyInfo Source # 
type AttrLabel NotificationSummaryPropertyInfo Source # 
type AttrGetType NotificationSummaryPropertyInfo Source # 
type AttrBaseTypeConstraint NotificationSummaryPropertyInfo Source # 
type AttrSetTypeConstraint NotificationSummaryPropertyInfo Source # 
type AttrAllowedOps NotificationSummaryPropertyInfo Source # 

Signals

closed