方法
GioNotificationadd_button_with_target
从:2.40
[−]
声明 [源]
void
g_notification_add_button_with_target (
GNotification* notification,
const gchar* label,
const gchar* action,
const gchar* target_format,
...
)
[−]
描述 [源]
向notification
添加一个按钮,当点击时激活action
。action
必须是一个跨应用操作(它必须以“app.”开头)。
如果提供了target_format
,则用它来收集剩余的位置参数到一个GVariant
实例,类似于g_variant_new()。action
将以该GVariant
作为其参数被激活。
[−]
参数
标签
-
类型:
const gchar*
按钮标签。
数据由方法的调用者所有。 值是一个以NUL终止的UTF-8字符串。 操作
-
类型:
const gchar*
一个操作名称。
数据由方法的调用者所有。 值是一个以NUL终止的UTF-8字符串。 目标格式
-
类型:
const gchar*
一个
GVariant
格式字符串,或NULL
。此参数可以是 NULL
。数据由方法的调用者所有。 值是一个以NUL终止的UTF-8字符串。 ...
-
类型:
位置参数,由
target_format
确定。