Constructor

Gtk.PadController.new

Declaration [src]

GtkPadController*
gtk_pad_controller_new (
  GActionGroup* group,
  GdkDevice* pad
)

Description [src]

Creates a new GtkPadController that will associate events from pad to actions.

A NULL pad may be provided so the controller manages all pad devices generically, it is discouraged to mix GtkPadController objects with NULL and non-NULL pad argument on the same toplevel window, as execution order is not guaranteed.

The GtkPadController 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().

Be aware that pad events will only be delivered to GtkWindows, so adding a pad controller to any other type of widget will not have an effect.

Parameters

group GActionGroup*
 

GActionGroup to trigger actions from

 Ownership is not transferred to the callee
pad GdkDevice*
 

A GDK_SOURCE_TABLET_PAD device, or NULL to handle all pads

 Can be NULL
 Ownership is not transferred to the callee

Return value

Returns: GtkPadController

A newly created GtkPadController

Ownership of the data is transferred to the caller