mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-11 11:44:03 +02:00
docs: Move the GNotification SECTION
Move it to the struct docs. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk> Helps: #3037
This commit is contained in:
@@ -28,26 +28,24 @@
|
|||||||
#include "gioenumtypes.h"
|
#include "gioenumtypes.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gnotification
|
* GNotification:
|
||||||
* @short_description: User Notifications (pop up messages)
|
|
||||||
* @include: gio/gio.h
|
|
||||||
*
|
*
|
||||||
* #GNotification is a mechanism for creating a notification to be shown
|
* `GNotification` is a mechanism for creating a notification to be shown
|
||||||
* to the user -- typically as a pop-up notification presented by the
|
* to the user — typically as a pop-up notification presented by the
|
||||||
* desktop environment shell.
|
* desktop environment shell.
|
||||||
*
|
*
|
||||||
* The key difference between #GNotification and other similar APIs is
|
* The key difference between `GNotification` and other similar APIs is
|
||||||
* that, if supported by the desktop environment, notifications sent
|
* that, if supported by the desktop environment, notifications sent
|
||||||
* with #GNotification will persist after the application has exited,
|
* with `GNotification` will persist after the application has exited,
|
||||||
* and even across system reboots.
|
* and even across system reboots.
|
||||||
*
|
*
|
||||||
* Since the user may click on a notification while the application is
|
* Since the user may click on a notification while the application is
|
||||||
* not running, applications using #GNotification should be able to be
|
* not running, applications using `GNotification` should be able to be
|
||||||
* started as a D-Bus service, using #GApplication.
|
* started as a D-Bus service, using [class@Gio.Application].
|
||||||
*
|
*
|
||||||
* In order for #GNotification to work, the application must have installed
|
* In order for `GNotification` to work, the application must have installed
|
||||||
* a `.desktop` file. For example:
|
* a `.desktop` file. For example:
|
||||||
* |[
|
* ```
|
||||||
* [Desktop Entry]
|
* [Desktop Entry]
|
||||||
* Name=Test Application
|
* Name=Test Application
|
||||||
* Comment=Description of what Test Application does
|
* Comment=Description of what Test Application does
|
||||||
@@ -59,32 +57,24 @@
|
|||||||
* StartupNotify=true
|
* StartupNotify=true
|
||||||
* DBusActivatable=true
|
* DBusActivatable=true
|
||||||
* X-GNOME-UsesNotifications=true
|
* X-GNOME-UsesNotifications=true
|
||||||
* ]|
|
* ```
|
||||||
*
|
*
|
||||||
* The `X-GNOME-UsesNotifications` key indicates to GNOME Control Center
|
* The `X-GNOME-UsesNotifications` key indicates to GNOME Control Center
|
||||||
* that this application uses notifications, so it can be listed in the
|
* that this application uses notifications, so it can be listed in the
|
||||||
* Control Center’s ‘Notifications’ panel.
|
* Control Center’s ‘Notifications’ panel.
|
||||||
*
|
*
|
||||||
* The `.desktop` file must be named as `org.gnome.TestApplication.desktop`,
|
* The `.desktop` file must be named as `org.gnome.TestApplication.desktop`,
|
||||||
* where `org.gnome.TestApplication` is the ID passed to g_application_new().
|
* where `org.gnome.TestApplication` is the ID passed to
|
||||||
|
* [ctor@Gio.Application.new].
|
||||||
*
|
*
|
||||||
* User interaction with a notification (either the default action, or
|
* User interaction with a notification (either the default action, or
|
||||||
* buttons) must be associated with actions on the application (ie:
|
* buttons) must be associated with actions on the application (ie:
|
||||||
* "app." actions). It is not possible to route user interaction
|
* `app.` actions). It is not possible to route user interaction
|
||||||
* through the notification itself, because the object will not exist if
|
* through the notification itself, because the object will not exist if
|
||||||
* the application is autostarted as a result of a notification being
|
* the application is autostarted as a result of a notification being
|
||||||
* clicked.
|
* clicked.
|
||||||
*
|
*
|
||||||
* A notification can be sent with g_application_send_notification().
|
* A notification can be sent with [method@Gio.Application.send_notification].
|
||||||
*
|
|
||||||
* Since: 2.40
|
|
||||||
**/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GNotification:
|
|
||||||
*
|
|
||||||
* This structure type is private and should only be accessed using the
|
|
||||||
* public APIs.
|
|
||||||
*
|
*
|
||||||
* Since: 2.40
|
* Since: 2.40
|
||||||
**/
|
**/
|
||||||
|
Reference in New Issue
Block a user