Constructor

GtkActionnew

deprecated: 3.10 since: 2.4

Declaration [src]

GtkAction*
gtk_action_new (
  const gchar* name,
  const gchar* label,
  const gchar* tooltip,
  const gchar* stock_id
)

Description [src]

Creates a new GtkAction object. To add the action to a GtkActionGroup and set the accelerator for the action, call gtk_action_group_add_action_with_accel(). See the [UI Definition section][XML-UI] for information on allowed action names.

Available since: 2.4

Deprecated since: 3.10

Use GAction instead, associating it to a widget with GtkActionable or creating a GtkMenu with gtk_menu_new_from_model().

Parameters

name

Type: const gchar*

A unique name for the action.

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

Type: const gchar*

The label displayed in menu items and on buttons, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
tooltip

Type: const gchar*

A tooltip for the action, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
stock_id

Type: const gchar*

The stock icon to display in widgets representing the action, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: GtkAction

A new GtkAction.

The caller of the function takes ownership of the data, and is responsible for freeing it.