Notification
Object Hierarchy:
Description:
[
CCode ( type_id =
"notify_notification_get_type ()" ) ]
public class Notification :
Object
A passive pop-up notification.
Notification represents a passive pop-up notification. It can contain summary text, body text, and an icon, as
well as hints specifying how the notification should be presented. The notification is rendered by a notification daemon, and may present
the notification in any number of ways. As such, there is a clear separation of content and presentation, and this API enforces that.
Content:
Properties:
- public string app_name { owned get; set; }
The name of the application for the notification.
- public string body { owned get; set construct; }
The body of the notification.
- public int closed_reason { get; }
The closed reason of the notification.
- public string icon_name { owned get; set construct; }
The icon-name of the icon to be displayed on the notification.
- public int id { get; set construct; }
The Id of the notification.
- public string summary { owned get; set construct; }
The summary of the notification.
Creation methods:
Methods:
- public void add_action (string action, string label, owned ActionCallback callback)
Adds an action to a notification.
- public void clear_actions ()
Clears all actions from the notification.
- public void clear_hints ()
Clears all hints from the notification.
- public bool close () throws Error
Synchronously tells the notification server to hide the notification
on the screen.
- public int get_closed_reason ()
Returns the closed reason code for the notification.
- public void set_app_name (string app_name)
Sets the application name for the notification.
- public void set_category (string category)
Sets the category of this notification.
- public void set_hint (string key, Variant? value)
Sets a hint for key with value value.
- public void set_hint_byte (string key, uchar value)
Sets a hint with a byte value.
- public void set_hint_byte_array (string key, uchar[] value)
Sets a hint with a byte array value.
- public void set_hint_double (string key, double value)
Sets a hint with a double value.
- public void set_hint_int32 (string key, int value)
Sets a hint with a 32-bit integer value.
- public void set_hint_string (string key, string value)
Sets a hint with a string value.
- public void set_hint_uint32 (string key, uint value)
Sets a hint with an unsigned 32-bit integer value.
- public void set_icon_from_pixbuf (Pixbuf icon)
Sets the icon in the notification from a
Pixbuf.
- public void set_image_from_pixbuf (Pixbuf pixbuf)
Sets the image in the notification from a [class@GdkPixbuf.
- public void set_timeout (int timeout)
Sets the timeout of the notification.
- public void set_urgency (Urgency urgency)
Sets the urgency level of this notification.
- public bool show () throws Error
Tells the notification server to display the notification on the
screen.
- public bool update (string summary, string? body, string? icon)
Updates the notification text and icon.
Signals:
Inherited Members:
All known members inherited from class GLib.Object