mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 21:33:09 +02:00
gnotification: Improve docs around GVariant ownership
Add a few missing introspection annotations too. This doesn’t change any of the ownership handling behaviour, just documents what’s there. What’s there seems to be correct, to the extent that I can see. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
af6bf2dc02
commit
18574d1ba9
@ -102,7 +102,7 @@ struct _GNotification
|
|||||||
gchar *category;
|
gchar *category;
|
||||||
GPtrArray *buttons;
|
GPtrArray *buttons;
|
||||||
gchar *default_action;
|
gchar *default_action;
|
||||||
GVariant *default_action_target;
|
GVariant *default_action_target; /* (nullable) (owned), not floating */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -615,11 +615,17 @@ g_notification_get_button_with_action (GNotification *notification,
|
|||||||
/*< private >
|
/*< private >
|
||||||
* g_notification_get_default_action:
|
* g_notification_get_default_action:
|
||||||
* @notification: a #GNotification
|
* @notification: a #GNotification
|
||||||
* @action: (nullable): return location for the default action
|
* @action: (out) (optional) (nullable) (transfer full): return location for the
|
||||||
* @target: (nullable): return location for the target of the default action
|
* default action, or %NULL if unset
|
||||||
|
* @target: (out) (optional) (nullable) (transfer full): return location for the
|
||||||
|
* target of the default action, or %NULL if unset
|
||||||
*
|
*
|
||||||
* Gets the action and target for the default action of @notification.
|
* Gets the action and target for the default action of @notification.
|
||||||
*
|
*
|
||||||
|
* If this function returns %TRUE, @action is guaranteed to be set to a non-%NULL
|
||||||
|
* value (if a pointer is passed to @action). @target may still return a %NULL
|
||||||
|
* value, as the default action may have no target.
|
||||||
|
*
|
||||||
* Returns: %TRUE if @notification has a default action
|
* Returns: %TRUE if @notification has a default action
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
@ -736,7 +742,7 @@ g_notification_set_default_action_and_target (GNotification *notification,
|
|||||||
* application-wide action (start with "app.").
|
* application-wide action (start with "app.").
|
||||||
*
|
*
|
||||||
* If @target is non-%NULL, @action will be activated with @target as
|
* If @target is non-%NULL, @action will be activated with @target as
|
||||||
* its parameter.
|
* its parameter. If @target is floating, it will be consumed.
|
||||||
*
|
*
|
||||||
* When no default action is set, the application that the notification
|
* When no default action is set, the application that the notification
|
||||||
* was sent on is activated.
|
* was sent on is activated.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user