Type Alias (GI Alias)

Gio-2.0GioActionEntryObj

Type for action entries used in the overridden ActionMap.add_action_entries

type ActionEntryObj = {
    activate?: (
        _source: Gio.SimpleAction,
        parameter: GLib.Variant | null,
    ) => void;
    change_state?: (
        _source: Gio.SimpleAction,
        value: GLib.Variant | null,
    ) => void;
    name: string;
    parameter_type?: string;
    state?: string;
}
Index

Properties

activate?: (_source: Gio.SimpleAction, parameter: GLib.Variant | null) => void

The callback to connect to the "activate" signal of the action

change_state?: (_source: Gio.SimpleAction, value: GLib.Variant | null) => void

The callback to connect to the "change-state" signal of the action

name: string

The name of the action

parameter_type?: string

The type of the parameter that must match the parameter_type specified in the entry

state?: string

The initial state of the action