|
virtual | ~Notification () |
|
GNotification* | gobj () |
| Provides access to the underlying C GObject. More...
|
|
const GNotification* | gobj () const |
| Provides access to the underlying C GObject. More...
|
|
GNotification* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
|
|
void | set_title (const Glib::ustring& title) |
| Sets the title of notification to title. More...
|
|
void | set_body (const Glib::ustring& body) |
| Sets the body of notification to body. More...
|
|
void | set_icon (const Glib::RefPtr< Icon >& icon) |
| Sets the icon of notification to icon. More...
|
|
void | set_urgent (bool urgent=true) |
| Sets or unsets whether notification is marked as urgent. More...
|
|
void | add_button (const Glib::ustring& label, const Glib::ustring& detailed_action) |
| Adds a button to notification that activates the action in detailed_action when clicked. More...
|
|
template<typename T_Value > |
void | add_button (const Glib::ustring& label, const Glib::ustring& action, const T_Value& target) |
| Adds a button that activates action when clicked. More...
|
|
void | add_button_variant (const Glib::ustring& label, const Glib::ustring& action, const Glib::VariantBase& target) |
| Adds a button to notification that activates action when clicked. More...
|
|
void | set_default_action (const Glib::ustring& detailed_action) |
| Sets the default action of notification to detailed_action. More...
|
|
template<typename T_Value > |
void | set_default_action (const Glib::ustring& action, const T_Value& target) |
| Sets the default action to action. More...
|
|
void | set_default_action_variant (const Glib::ustring& action, const Glib::VariantBase& target) |
| Sets the default action of notification to action. More...
|
|
void* | get_data (const QueryQuark& key) |
|
void | set_data (const Quark& key, void* data) |
|
void | set_data (const Quark& key, void* data, DestroyNotify notify) |
|
void | remove_data (const QueryQuark& quark) |
|
void* | steal_data (const QueryQuark& quark) |
|
void | set_property_value (const Glib::ustring& property_name, const Glib::ValueBase& value) |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
void | get_property_value (const Glib::ustring& property_name, Glib::ValueBase& value) const |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
template<class PropertyType > |
void | set_property (const Glib::ustring& property_name, const PropertyType& value) |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
template<class PropertyType > |
void | get_property (const Glib::ustring& property_name, PropertyType& value) const |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
void | connect_property_changed (const Glib::ustring& property_name, const sigc::slot< void >& slot) |
| You can use the signal_changed() signal of the property proxy instead, but this is necessary when using the reduced API. More...
|
|
sigc::connection | connect_property_changed_with_return (const Glib::ustring& property_name, const sigc::slot< void >& slot) |
| You can use the signal_changed() signal of the property proxy instead, but this is necessary when using the reduced API. More...
|
|
void | freeze_notify () |
| Increases the freeze count on object. More...
|
|
void | thaw_notify () |
| Reverts the effect of a previous call to freeze_notify(). More...
|
|
virtual void | reference () const |
| Increment the reference count for this object. More...
|
|
virtual void | unreference () const |
| Decrement the reference count for this object. More...
|
|
GObject* | gobj () |
| Provides access to the underlying C GObject. More...
|
|
const GObject* | gobj () const |
| Provides access to the underlying C GObject. More...
|
|
GObject* | gobj_copy () const |
| Give a ref-ed copy to someone. Use for direct struct access. More...
|
|
User Notifications (pop up messages).
Gio::Notification is a mechanism for creating a notification to be shown to the user – typically as a pop-up notification presented by the desktop environment shell.
The key difference between Notification and other similar APIs is that, if supported by the desktop environment, notifications sent with Notification will persist after the application has exited, and even across system reboots.
Since the user may click on a notification while the application is not running, applications using Notification should be able to be started as a D-Bus service, using Gio::Application.
User interaction with a notification (either the default action, or buttons) must be associated with actions on the application (ie: "app." actions). It is not possible to route user interaction through the notification itself, because the object will not exist if the application is autostarted as a result of a notification being clicked.
A notification can be sent with Gio::Application::send_notification().
- Since glibmm 2.40:
void Gio::Notification::set_default_action |
( |
const Glib::ustring& |
detailed_action) | |
|
Sets the default action of notification to detailed_action.
This action is activated when the notification is clicked on.
The action in detailed_action must be an application-wide action (it must start with "app."). If detailed_action contains a target, the given action will be activated with that target as its parameter. See g_action_parse_detailed_name() for a description of the format for detailed_action.
When no default action is set, the application that the notification was sent on is activated.
- Since glibmm 2.40:
- Parameters
-
detailed_action | A detailed action name. |
Sets the default action of notification to action.
This action is activated when the notification is clicked on. It must be an application-wide action (start with "app.").
If target_format is given, it is used to collect remaining positional parameters into a GVariant instance, similar to Glib::variant_new().
If target is non-0
, action will be activated with target as its parameter.
When no default action is set, the application that the notification was sent on is activated.
- Since glibmm 2.40:
- Parameters
-
action | An action name. |
target | A GVariant to use as action's parameter, or 0 . |