SimpleAction

constructor(name: String, parameterType: <Error class: unknown class>? = null)

Creates a new action.

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

Return

a new #GSimpleAction

Since

2.28

Parameters

name

the name of the action

parameterType

the type of parameter that will be passed to handlers for the #GSimpleAction::activate signal, or null for no parameter


constructor(name: String, parameterType: <Error class: unknown class>? = null, state: <Error class: unknown class>)

Creates a new stateful action.

All future state values must have the same #GVariantType as the initial

Return

a new #GSimpleAction

Since

2.28

Parameters

name

the name of the action

parameterType

the type of the parameter that will be passed to handlers for the #GSimpleAction::activate signal, or null for no parameter

state

the initial state of the action


constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)