Safe Haskell | None |
---|
Low level bindings to libnotify
See also https://developer.gnome.org/libnotify/0.7/NotifyNotification.html. Haddocks here are mostly excerpts from there
- data NotifyNotification
- notify_notification_new :: String -> String -> String -> IO NotifyNotification
- notify_notification_update :: NotifyNotification -> String -> String -> String -> IO Bool
- notify_notification_show :: NotifyNotification -> IO Bool
- notify_notification_set_app_name :: NotifyNotification -> String -> IO ()
- data Timeout
- notify_notification_set_timeout :: NotifyNotification -> Timeout -> IO ()
- notify_notification_set_category :: NotifyNotification -> String -> IO ()
- data Urgency
- notify_notification_set_urgency :: NotifyNotification -> Urgency -> IO ()
- notify_notification_set_icon_from_pixbuf :: NotifyNotification -> Pixbuf -> IO ()
- notify_notification_set_image_from_pixbuf :: NotifyNotification -> Pixbuf -> IO ()
- notify_notification_set_hint_int32 :: NotifyNotification -> String -> Int32 -> IO ()
- notify_notification_set_hint_uint32 :: NotifyNotification -> String -> Word32 -> IO ()
- notify_notification_set_hint_double :: NotifyNotification -> String -> Double -> IO ()
- notify_notification_set_hint_string :: NotifyNotification -> String -> String -> IO ()
- notify_notification_set_hint_byte :: NotifyNotification -> String -> Word8 -> IO ()
- notify_notification_set_hint_byte_array :: NotifyNotification -> String -> ByteString -> IO ()
- notify_notification_clear_hints :: NotifyNotification -> IO ()
- notify_notification_add_action :: NotifyNotification -> String -> String -> (NotifyNotification -> String -> IO ()) -> IO ()
- notify_notification_clear_actions :: NotifyNotification -> IO ()
- notify_notification_close :: NotifyNotification -> IO Bool
- notify_notification_get_closed_reason :: NotifyNotification -> IO Int
Documentation
data NotifyNotification Source
An opaque notification token
:: String | Summary |
-> String | Body |
-> String | Icon (icon name or file name) |
-> IO NotifyNotification |
Create a new NotifyNotification
Only summary is required
notify_notification_updateSource
:: NotifyNotification | |
-> String | Summary |
-> String | Body |
-> String | Icon (icon name or file name) |
-> IO Bool |
Update the notification text and icon
notify_notification_show :: NotifyNotification -> IO BoolSource
Display the notification on the screen
notify_notification_set_app_name :: NotifyNotification -> String -> IO ()Source
Set the application name for the notification
Used to override an application name for a specific notification.
See also notify_init
and notify_set_app_name
Timeout after which notification is closed
notify_notification_set_timeout :: NotifyNotification -> Timeout -> IO ()Source
Set the timeout of the notification
notify_notification_set_category :: NotifyNotification -> String -> IO ()Source
Set the category of the notification
The urgency level of the notification
notify_notification_set_urgency :: NotifyNotification -> Urgency -> IO ()Source
Set the urgency level of the notification
notify_notification_set_icon_from_pixbuf :: NotifyNotification -> Pixbuf -> IO ()Source
Deprecated: Use notify_notification_set_image_from_pixbuf instead
Set the icon in the notification from the Pixbuf
notify_notification_set_image_from_pixbuf :: NotifyNotification -> Pixbuf -> IO ()Source
Set the icon in the notification from the Pixbuf
notify_notification_set_hint_int32 :: NotifyNotification -> String -> Int32 -> IO ()Source
Set a hint with a 32-bit integer value
notify_notification_set_hint_uint32 :: NotifyNotification -> String -> Word32 -> IO ()Source
Set a hint with an unsigned 32-bit integer value
notify_notification_set_hint_double :: NotifyNotification -> String -> Double -> IO ()Source
Set a hint with a double value
notify_notification_set_hint_string :: NotifyNotification -> String -> String -> IO ()Source
Set a hint with a string value
notify_notification_set_hint_byte :: NotifyNotification -> String -> Word8 -> IO ()Source
Set a hint with a byte value
notify_notification_set_hint_byte_array :: NotifyNotification -> String -> ByteString -> IO ()Source
Set a hint with a byte array value
notify_notification_clear_hints :: NotifyNotification -> IO ()Source
Clear all hints
notify_notification_add_action :: NotifyNotification -> String -> String -> (NotifyNotification -> String -> IO ()) -> IO ()Source
Add an action to a notification. When the action is invoked, the specified callback function will be called
For the callback to be *actually* invoked, some kind of magical glib mainLoop
thing
should be running
notify_notification_clear_actions :: NotifyNotification -> IO ()Source
Clear all actions
notify_notification_close :: NotifyNotification -> IO BoolSource
Hide the notification from the screen
notify_notification_get_closed_reason :: NotifyNotification -> IO IntSource
Get the closed reason code for the notification