Class: Gtk::PadController

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#action_groupGio::ActionGroup

Returns action-group.

Returns:

#action_group=(action_group) ⇒ Gio::ActionGroup

Parameters:

Returns:

#new(window, group, pad) ⇒ Gtk::PadController

Creates a new Gtk::PadController that will associate events from pad to actions. A nil pad may be provided so the controller manages all pad devices generically, it is discouraged to mix Gtk::PadController objects with nil and non-nil pad argument on the same window, as execution order is not guaranteed.

The Gtk::PadController is created with no mapped actions. In order to map pad events to actions, use gtk_pad_controller_set_action_entries() or gtk_pad_controller_set_action().

Parameters:

Returns:

#padGdk::Device

Returns pad.

Returns:

#pad=(pad) ⇒ Gdk::Device

Parameters:

Returns:

#set_action(type, index, mode, label, action_name) ⇒ nil

Adds an individual action to controller. This action will only be activated if the given button/ring/strip number in index is interacted while the current mode is mode. -1 may be used for simple cases, so the action is triggered on all modes.

The given label should be considered user-visible, so internationalization rules apply. Some windowing systems may be able to use those for user feedback.

Parameters:

  • type (Gtk::PadActionType)

    the type of pad feature that will trigger this action

  • index (Integer)

    the 0-indexed button/ring/strip number that will trigger this action

  • mode (Integer)

    the mode that will trigger this action, or -1 for all modes.

  • label (String)

    Human readable description of this action, this string should be deemed user-visible.

  • action_name (String)

    action name that will be activated in the GAction::Group

Returns:

  • (nil)

#set_action_entries(entries, n_entries) ⇒ nil

This is a convenience function to add a group of action entries on controller. See Gtk::PadActionEntry and gtk_pad_controller_set_action().

Parameters:

  • entries (Array<Gtk::PadActionEntry>)

    the action entries to set on controller

  • n_entries (Integer)

    the number of elements in entries

Returns:

  • (nil)