Interface

Gio-2.0GioActionInterface

Interface for implementing Action. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_activate(parameter?: GLib.Variant<any>): void;
    vfunc_change_state(value: GLib.Variant): void;
    vfunc_get_enabled(): boolean;
    vfunc_get_name(): string;
    vfunc_get_parameter_type(): GLib.VariantType<any>;
    vfunc_get_state(): GLib.Variant<any>;
    vfunc_get_state_hint(): GLib.Variant<any>;
    vfunc_get_state_type(): GLib.VariantType<any>;
}

Hierarchy (View Summary)

Index

Methods

  • Activates the action.

    parameter must be the correct type of parameter for the action (ie: the parameter type given at construction time). If the parameter type was NULL then parameter must also be NULL.

    If the parameter GLib.Variant is floating, it is consumed.

    Parameters

    • Optionalparameter: GLib.Variant<any>

      the parameter to the activation

    Returns void

  • Checks if action is currently enabled.

    An action must be enabled in order to be activated or in order to have its state changed from outside callers.

    Returns boolean

  • Requests a hint about the valid range of values for the state of action.

    If NULL is returned it either means that the action is not stateful or that there is no hint about the valid range of values for the state of the action.

    If a GLib.Variant array is returned then each item in the array is a possible value for the state. If a GLib.Variant pair (ie: two-tuple) is returned then the tuple specifies the inclusive lower and upper bound of valid values for the state.

    In any case, the information is merely a hint. It may be possible to have a state value outside of the hinted range and setting a value within the range may fail.

    The return value (if non-NULL) should be freed with GLib.Variant.unref when it is no longer required.

    Returns GLib.Variant<any>