Constructor

GioSimpleActionnew

Declaration

GSimpleAction*
g_simple_action_new (
  const gchar* name,
  const GVariantType* parameter_type
)

Description

Creates a new action.

The created action is stateless. See g_simple_action_new_stateful() to create an action that has state.

Available since:2.28

Parameters

name

Type: const gchar*

The name of the action.

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

Type: GVariantType

The type of parameter that will be passed to handlers for the GSimpleAction::activate signal, or NULL for no parameter.

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

Return value

Type: GSimpleAction

A new GSimpleAction.

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