Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype Notification = Notification (ManagedPtr Notification)
- class GObject o => IsNotification o
- toNotification :: IsNotification o => o -> IO Notification
- noNotification :: Maybe Notification
- data NotificationAddActionMethodInfo
- notificationAddAction :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> ActionCallback -> m ()
- data NotificationClearActionsMethodInfo
- notificationClearActions :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- data NotificationClearHintsMethodInfo
- notificationClearHints :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- data NotificationCloseMethodInfo
- notificationClose :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- data NotificationGetClosedReasonMethodInfo
- notificationGetClosedReason :: (HasCallStack, MonadIO m, IsNotification a) => a -> m Int32
- notificationNew :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Maybe Text -> m Notification
- data NotificationSetAppNameMethodInfo
- notificationSetAppName :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()
- data NotificationSetCategoryMethodInfo
- notificationSetCategory :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()
- data NotificationSetHintMethodInfo
- notificationSetHint :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe GVariant -> m ()
- data NotificationSetHintByteMethodInfo
- notificationSetHintByte :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Word8 -> m ()
- data NotificationSetHintByteArrayMethodInfo
- notificationSetHintByteArray :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> ByteString -> m ()
- data NotificationSetHintDoubleMethodInfo
- notificationSetHintDouble :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Double -> m ()
- data NotificationSetHintInt32MethodInfo
- notificationSetHintInt32 :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Int32 -> m ()
- data NotificationSetHintStringMethodInfo
- notificationSetHintString :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> m ()
- data NotificationSetHintUint32MethodInfo
- notificationSetHintUint32 :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Word32 -> m ()
- data NotificationSetIconFromPixbufMethodInfo
- notificationSetIconFromPixbuf :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) => a -> b -> m ()
- data NotificationSetImageFromPixbufMethodInfo
- notificationSetImageFromPixbuf :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) => a -> b -> m ()
- data NotificationSetTimeoutMethodInfo
- notificationSetTimeout :: (HasCallStack, MonadIO m, IsNotification a) => a -> Int32 -> m ()
- data NotificationSetUrgencyMethodInfo
- notificationSetUrgency :: (HasCallStack, MonadIO m, IsNotification a) => a -> Urgency -> m ()
- data NotificationShowMethodInfo
- notificationShow :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- data NotificationUpdateMethodInfo
- notificationUpdate :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe Text -> Maybe Text -> m Bool
- data NotificationAppNamePropertyInfo
- constructNotificationAppName :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationAppName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- notificationAppName :: AttrLabelProxy "appName"
- setNotificationAppName :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- data NotificationBodyPropertyInfo
- clearNotificationBody :: (MonadIO m, IsNotification o) => o -> m ()
- constructNotificationBody :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationBody :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- notificationBody :: AttrLabelProxy "body"
- setNotificationBody :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- data NotificationClosedReasonPropertyInfo
- getNotificationClosedReason :: (MonadIO m, IsNotification o) => o -> m Int32
- notificationClosedReason :: AttrLabelProxy "closedReason"
- data NotificationIconNamePropertyInfo
- clearNotificationIconName :: (MonadIO m, IsNotification o) => o -> m ()
- constructNotificationIconName :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationIconName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- notificationIconName :: AttrLabelProxy "iconName"
- setNotificationIconName :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- data NotificationIdPropertyInfo
- constructNotificationId :: IsNotification o => Int32 -> IO (GValueConstruct o)
- getNotificationId :: (MonadIO m, IsNotification o) => o -> m Int32
- notificationId :: AttrLabelProxy "id"
- setNotificationId :: (MonadIO m, IsNotification o) => o -> Int32 -> m ()
- data NotificationSummaryPropertyInfo
- clearNotificationSummary :: (MonadIO m, IsNotification o) => o -> m ()
- constructNotificationSummary :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationSummary :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- notificationSummary :: AttrLabelProxy "summary"
- setNotificationSummary :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- type C_NotificationClosedCallback = Ptr () -> Ptr () -> IO ()
- type NotificationClosedCallback = IO ()
- data NotificationClosedSignalInfo
- afterNotificationClosed :: (GObject a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
- genClosure_NotificationClosed :: NotificationClosedCallback -> IO Closure
- mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback)
- noNotificationClosedCallback :: Maybe NotificationClosedCallback
- onNotificationClosed :: (GObject a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
- wrap_NotificationClosedCallback :: NotificationClosedCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype Notification Source #
GObject Notification Source # | |
IsObject Notification Source # | |
IsNotification Notification Source # | |
((~) * info (ResolveNotificationMethod t Notification), MethodInfo * info Notification p) => IsLabel t (Notification -> p) Source # | |
((~) * info (ResolveNotificationMethod t Notification), MethodInfo * info Notification p) => IsLabelProxy t (Notification -> p) Source # | |
HasAttributeList * Notification Source # | |
type AttributeList Notification Source # | |
type SignalList Notification Source # | |
class GObject o => IsNotification o Source #
toNotification :: IsNotification o => o -> IO Notification Source #
Methods
addAction
data NotificationAddActionMethodInfo Source #
((~) * signature (Text -> Text -> ActionCallback -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationAddActionMethodInfo a signature Source # | |
notificationAddAction Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> ActionCallback |
|
-> 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
data NotificationClearActionsMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationClearActionsMethodInfo a signature Source # | |
notificationClearActions Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m () |
Clears all actions from the notification.
clearHints
data NotificationClearHintsMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationClearHintsMethodInfo a signature Source # | |
notificationClearHints Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m () |
Clears all hints from the notification.
close
data NotificationCloseMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationCloseMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m () | (Can throw |
Synchronously tells the notification server to hide the notification on the screen.
getClosedReason
data NotificationGetClosedReasonMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsNotification a) => MethodInfo * NotificationGetClosedReasonMethodInfo a signature Source # | |
notificationGetClosedReason Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m Notification | Returns: The new |
Creates a new Notification
. The summary text is required, but
all other parameters are optional.
setAppName
data NotificationSetAppNameMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetAppNameMethodInfo a signature Source # | |
notificationSetAppName Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> 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
data NotificationSetCategoryMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetCategoryMethodInfo a signature Source # | |
notificationSetCategory Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> 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
data NotificationSetHintMethodInfo Source #
((~) * signature (Text -> Maybe GVariant -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> 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
data NotificationSetHintByteMethodInfo Source #
((~) * signature (Text -> Word8 -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintByteMethodInfo a signature Source # | |
notificationSetHintByte Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Word8 |
|
-> m () |
Deprecated: (Since version 0.6.)Use notificationSetHint
instead
Sets a hint with a byte value.
setHintByteArray
data NotificationSetHintByteArrayMethodInfo Source #
((~) * signature (Text -> ByteString -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintByteArrayMethodInfo a signature Source # | |
notificationSetHintByteArray Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> ByteString |
|
-> 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
data NotificationSetHintDoubleMethodInfo Source #
((~) * signature (Text -> Double -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintDoubleMethodInfo a signature Source # | |
notificationSetHintDouble Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> m () |
Deprecated: (Since version 0.6.)Use notificationSetHint
instead
Sets a hint with a double value.
setHintInt32
data NotificationSetHintInt32MethodInfo Source #
((~) * signature (Text -> Int32 -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintInt32MethodInfo a signature Source # | |
notificationSetHintInt32 Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 0.6.)Use notificationSetHint
instead
Sets a hint with a 32-bit integer value.
setHintString
data NotificationSetHintStringMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintStringMethodInfo a signature Source # | |
notificationSetHintString Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m () |
Deprecated: (Since version 0.6.)Use notificationSetHint
instead
Sets a hint with a string value.
setHintUint32
data NotificationSetHintUint32MethodInfo Source #
((~) * signature (Text -> Word32 -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetHintUint32MethodInfo a signature Source # | |
notificationSetHintUint32 Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Word32 |
|
-> m () |
Deprecated: (Since version 0.6.)Use notificationSetHint
instead
Sets a hint with an unsigned 32-bit integer value.
setIconFromPixbuf
data NotificationSetIconFromPixbufMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsNotification a, IsPixbuf b) => MethodInfo * NotificationSetIconFromPixbufMethodInfo a signature Source # | |
notificationSetIconFromPixbuf Source #
:: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) | |
=> a |
|
-> b |
|
-> m () |
Deprecated: use notificationSetImageFromPixbuf
instead.
Sets the icon in the notification from a Pixbuf
.
setImageFromPixbuf
data NotificationSetImageFromPixbufMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsNotification a, IsPixbuf b) => MethodInfo * NotificationSetImageFromPixbufMethodInfo a signature Source # | |
notificationSetImageFromPixbuf Source #
:: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) | |
=> a |
|
-> b |
|
-> m () |
Sets the image in the notification from a Pixbuf
.
setTimeout
data NotificationSetTimeoutMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetTimeoutMethodInfo a signature Source # | |
notificationSetTimeout Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Int32 |
|
-> 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
data NotificationSetUrgencyMethodInfo Source #
((~) * signature (Urgency -> m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationSetUrgencyMethodInfo a signature Source # | |
notificationSetUrgency Source #
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Urgency |
|
-> m () |
Sets the urgency level of this notification.
See: Urgency
show
data NotificationShowMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsNotification a) => MethodInfo * NotificationShowMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> m () | (Can throw |
Tells the notification server to display the notification on the screen.
update
data NotificationUpdateMethodInfo Source #
((~) * signature (Text -> Maybe Text -> Maybe Text -> m Bool), MonadIO m, IsNotification a) => MethodInfo * NotificationUpdateMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsNotification a) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m Bool | Returns: |
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 #
constructNotificationAppName :: IsNotification o => Text -> IO (GValueConstruct o) Source #
getNotificationAppName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) Source #
notificationAppName :: AttrLabelProxy "appName" Source #
setNotificationAppName :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
body
data NotificationBodyPropertyInfo Source #
clearNotificationBody :: (MonadIO m, IsNotification o) => o -> m () Source #
constructNotificationBody :: IsNotification o => Text -> IO (GValueConstruct o) Source #
getNotificationBody :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) Source #
notificationBody :: AttrLabelProxy "body" Source #
setNotificationBody :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
closedReason
data NotificationClosedReasonPropertyInfo Source #
getNotificationClosedReason :: (MonadIO m, IsNotification o) => o -> m Int32 Source #
notificationClosedReason :: AttrLabelProxy "closedReason" Source #
iconName
data NotificationIconNamePropertyInfo Source #
clearNotificationIconName :: (MonadIO m, IsNotification o) => o -> m () Source #
constructNotificationIconName :: IsNotification o => Text -> IO (GValueConstruct o) Source #
getNotificationIconName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) Source #
notificationIconName :: AttrLabelProxy "iconName" Source #
setNotificationIconName :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
id
data NotificationIdPropertyInfo Source #
constructNotificationId :: IsNotification o => Int32 -> IO (GValueConstruct o) Source #
getNotificationId :: (MonadIO m, IsNotification o) => o -> m Int32 Source #
notificationId :: AttrLabelProxy "id" Source #
setNotificationId :: (MonadIO m, IsNotification o) => o -> Int32 -> m () Source #
summary
data NotificationSummaryPropertyInfo Source #
clearNotificationSummary :: (MonadIO m, IsNotification o) => o -> m () Source #
constructNotificationSummary :: IsNotification o => Text -> IO (GValueConstruct o) Source #
getNotificationSummary :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) Source #
notificationSummary :: AttrLabelProxy "summary" Source #
setNotificationSummary :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
Signals
closed
type NotificationClosedCallback = IO () Source #
afterNotificationClosed :: (GObject a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId Source #
mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback) Source #
onNotificationClosed :: (GObject a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId Source #
wrap_NotificationClosedCallback :: NotificationClosedCallback -> Ptr () -> Ptr () -> IO () Source #