Module: Atk::Action

Defined in:
(unknown)

Overview

Atk::Action should be implemented by instances of #AtkObject classes with which the user can interact directly, i.e. buttons, checkboxes, scrollbars, e.g. components which are not “passive” providers of UI information.

Exceptions: when the user interaction is already covered by another appropriate interface such as Atk::EditableText (insert/delete text, etc.) or Atk::Value (set value) then these actions should not be exposed by Atk::Action as well.

Though most UI interactions on components should be invocable via keyboard as well as mouse, there will generally be a close mapping between “mouse actions” that are possible on a component and the AtkActions. Where mouse and keyboard actions are redundant in effect, Atk::Action should expose only one action rather than exposing redundant actions if possible. By convention we have been using “mouse centric” terminology for Atk::Action names.

Instance Method Summary collapse

Instance Method Details

#do_action(action, i) ⇒ TrueClass

Returns true if success, false otherwise.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

  • i (Integer)

    the action index corresponding to the action to be performed

Returns:

  • (TrueClass)

    true if success, false otherwise

#get_description(action, i) ⇒ String

not implement this interface.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

  • i (Integer)

    the action index corresponding to the action to be performed

Returns:

  • (String)

    a description string, or nil if action does

#get_keybinding(action, i) ⇒ String

this action, or nil if there is no keybinding for this action.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

  • i (Integer)

    the action index corresponding to the action to be performed

Returns:

  • (String)

    the keybinding which can be used to activate

#get_localized_name(action, i) ⇒ String

implement this interface.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

  • i (Integer)

    the action index corresponding to the action to be performed

Returns:

  • (String)

    a name string, or nil if action does not

#get_n_actions(action) ⇒ Integer

implement this interface.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

Returns:

  • (Integer)

    a the number of actions, or 0 if action does not

#get_name(action, i) ⇒ String

implement this interface.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

  • i (Integer)

    the action index corresponding to the action to be performed

Returns:

  • (String)

    a name string, or nil if action does not

#n_actionsInteger

Gets the number of accessible actions available on the object. If there are more than one, the first one is considered the “default” action of the object. implement this interface.

Returns:

  • (Integer)

    a the number of actions, or 0 if action does not

#set_description(action, i, desc) ⇒ TrueClass

Returns a gboolean representing if the description was successfully set;.

Parameters:

  • action (Atk::Action)

    a #GObject instance that implements AtkActionIface

  • i (Integer)

    the action index corresponding to the action to be performed

  • desc (String)

    the description to be assigned to this action

Returns:

  • (TrueClass)

    a gboolean representing if the description was successfully set;