### Method

# Notify Notification add_action

#### Declaration [src]

    void
    notify_notification_add_action (
      NotifyNotification* notification,
      const char* action,
      const char* label,
      NotifyActionCallback callback,
      gpointer user_data,
      GFreeFunc free_func
    )

#### Description [src]

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

`action`

  Type: `const char*`

  The action ID.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`label`

  Type: `const char*`

  The human-readable action label.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`callback`

  Type: `NotifyActionCallback`

  The action’s callback function.

`user_data`

  Type: `gpointer`

  Optional custom data to pass to `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`free_func`

  Type: `GDestroyNotify`

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