add_action


Description:

public void add_action (string action, string label, owned ActionCallback callback)

Adds an action to a notification.

When the action is invoked, the specified callback function will be called, along with the value passed to user_data.

Parameters:

this

The notification.

action

The action ID.

label

The human-readable action label.

callback

The action's callback function.

free_func

An optional function to free user_data when the notification is destroyed.

user_data

Optional custom data to pass to callback.