| 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 |
GI.Notify.Objects.Notification
Description
- newtype Notification = Notification (ManagedPtr Notification)
- class GObject o => IsNotification o
- toNotification :: (MonadIO m, IsNotification o) => o -> m Notification
- noNotification :: Maybe Notification
- notificationAddAction :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> ActionCallback -> m ()
- notificationClearActions :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- notificationClearHints :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- notificationClose :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- notificationGetClosedReason :: (HasCallStack, MonadIO m, IsNotification a) => a -> m Int32
- notificationNew :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Maybe Text -> m Notification
- notificationSetAppName :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()
- notificationSetCategory :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()
- notificationSetHint :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe GVariant -> m ()
- notificationSetHintByte :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Word8 -> m ()
- notificationSetHintByteArray :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> ByteString -> m ()
- notificationSetHintDouble :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Double -> m ()
- notificationSetHintInt32 :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Int32 -> m ()
- notificationSetHintString :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> m ()
- notificationSetHintUint32 :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Word32 -> m ()
- notificationSetIconFromPixbuf :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) => a -> b -> m ()
- notificationSetImageFromPixbuf :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) => a -> b -> m ()
- notificationSetTimeout :: (HasCallStack, MonadIO m, IsNotification a) => a -> Int32 -> m ()
- notificationSetUrgency :: (HasCallStack, MonadIO m, IsNotification a) => a -> Urgency -> m ()
- notificationShow :: (HasCallStack, MonadIO m, IsNotification a) => a -> m ()
- notificationUpdate :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe Text -> Maybe Text -> m Bool
- constructNotificationAppName :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationAppName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- setNotificationAppName :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- clearNotificationBody :: (MonadIO m, IsNotification o) => o -> m ()
- constructNotificationBody :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationBody :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- setNotificationBody :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- getNotificationClosedReason :: (MonadIO m, IsNotification o) => o -> m Int32
- clearNotificationIconName :: (MonadIO m, IsNotification o) => o -> m ()
- constructNotificationIconName :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationIconName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- setNotificationIconName :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- constructNotificationId :: IsNotification o => Int32 -> IO (GValueConstruct o)
- getNotificationId :: (MonadIO m, IsNotification o) => o -> m Int32
- setNotificationId :: (MonadIO m, IsNotification o) => o -> Int32 -> m ()
- clearNotificationSummary :: (MonadIO m, IsNotification o) => o -> m ()
- constructNotificationSummary :: IsNotification o => Text -> IO (GValueConstruct o)
- getNotificationSummary :: (MonadIO m, IsNotification o) => o -> m (Maybe Text)
- setNotificationSummary :: (MonadIO m, IsNotification o) => o -> Text -> m ()
- type C_NotificationClosedCallback = Ptr () -> Ptr () -> IO ()
- type NotificationClosedCallback = IO ()
- afterNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
- genClosure_NotificationClosed :: NotificationClosedCallback -> IO Closure
- mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback)
- noNotificationClosedCallback :: Maybe NotificationClosedCallback
- onNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
- wrap_NotificationClosedCallback :: NotificationClosedCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype Notification Source #
Constructors
| Notification (ManagedPtr Notification) |
class GObject o => IsNotification o Source #
Instances
toNotification :: (MonadIO m, IsNotification o) => o -> m Notification Source #
Methods
addAction
notificationAddAction Source #
Arguments
| :: (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
notificationClearActions Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a) | |
| => a |
|
| -> m () |
Clears all actions from the notification.
clearHints
notificationClearHints Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a) | |
| => a |
|
| -> m () |
Clears all hints from the notification.
close
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a) | |
| => a |
|
| -> m () | (Can throw |
Synchronously tells the notification server to hide the notification on the screen.
getClosedReason
notificationGetClosedReason Source #
Arguments
| :: (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
Arguments
| :: (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
notificationSetAppName Source #
Arguments
| :: (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
notificationSetCategory Source #
Arguments
| :: (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
Arguments
| :: (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
notificationSetHintByte Source #
Arguments
| :: (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
notificationSetHintByteArray Source #
Arguments
| :: (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
notificationSetHintDouble Source #
Arguments
| :: (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
notificationSetHintInt32 Source #
Arguments
| :: (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
notificationSetHintString Source #
Arguments
| :: (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
notificationSetHintUint32 Source #
Arguments
| :: (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
notificationSetIconFromPixbuf Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a, IsPixbuf b) | |
| => a |
|
| -> b |
|
| -> 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 |
|
| -> b |
|
| -> m () |
Sets the image in the notification from a Pixbuf.
setTimeout
notificationSetTimeout Source #
Arguments
| :: (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
notificationSetUrgency Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a) | |
| => a |
|
| -> Urgency |
|
| -> m () |
Sets the urgency level of this notification.
See: Urgency
show
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a) | |
| => a |
|
| -> m () | (Can throw |
Tells the notification server to display the notification on the screen.
update
Arguments
| :: (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
constructNotificationAppName :: IsNotification o => Text -> IO (GValueConstruct o) Source #
getNotificationAppName :: (MonadIO m, IsNotification o) => o -> m (Maybe Text) Source #
setNotificationAppName :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
body
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 #
setNotificationBody :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
closedReason
getNotificationClosedReason :: (MonadIO m, IsNotification o) => o -> m Int32 Source #
iconName
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 #
setNotificationIconName :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
id
constructNotificationId :: IsNotification o => Int32 -> IO (GValueConstruct o) Source #
getNotificationId :: (MonadIO m, IsNotification o) => o -> m Int32 Source #
setNotificationId :: (MonadIO m, IsNotification o) => o -> Int32 -> m () Source #
summary
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 #
setNotificationSummary :: (MonadIO m, IsNotification o) => o -> Text -> m () Source #
Signals
closed
type NotificationClosedCallback = IO () Source #
afterNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId Source #
mk_NotificationClosedCallback :: C_NotificationClosedCallback -> IO (FunPtr C_NotificationClosedCallback) Source #
onNotificationClosed :: (IsNotification a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId Source #
wrap_NotificationClosedCallback :: NotificationClosedCallback -> Ptr () -> Ptr () -> IO () Source #