GestureSingle
Object Hierarchy:
Gtk.GestureSingle
Gtk.GestureSingle
Gtk.GestureSingle
Gtk.Gesture
Gtk.Gesture
Gtk.Gesture->Gtk.GestureSingle
Gtk.EventController
Gtk.EventController
Gtk.EventController->Gtk.Gesture
GLib.Object
GLib.Object
GLib.Object->Gtk.EventController
Description:
[
CCode ( type_id =
"gtk_gesture_single_get_type ()" ) ]
public class GestureSingle :
Gesture
GestureSingle is a subclass of Gesture , optimized (
although not restricted) for dealing with mouse and single-touch gestures.
Under interaction, these gestures stick to the first interacting sequence, which is accessible through
get_current_sequence while the gesture is being interacted with.
By default gestures react to both gdk_button_primary and touch events,
set_touch_only can be used to change the touch behavior. Callers may
also specify a different mouse button number to interact with through
set_button , or react to any mouse button by setting 0. While the gesture is active, the button being currently pressed can be known
through get_current_button .
Content:
Properties:
public uint button { get ; set ; }
Mouse button number to listen to, or 0 to listen for any button.
public bool exclusive { get ; set ; }
Whether the gesture is exclusive.
public bool touch_only { get ; set ; }
Whether the gesture handles only touch events.
Creation methods:
Methods:
public uint get_button ()
Returns the button number this
listens for, or 0 if this reacts to any button press.
public uint get_current_button ()
Returns the button number currently interacting with
this , or 0 if there is none.
public EventSequence ? get_current_sequence ()
Returns the event sequence currently interacting with
this .
public bool get_exclusive ()
Gets whether a gesture is exclusive.
public bool get_touch_only ()
Returns true if the gesture is only
triggered by touch events.
public void set_button (uint button)
Sets the button number this listens
to.
public void set_exclusive (bool exclusive)
Sets whether this is exclusive.
public void set_touch_only (bool touch_only)
If touch_only
is true ,
this will only handle events of type TOUCH_BEGIN ,
TOUCH_UPDATE or TOUCH_END .
Inherited Members:
All known members inherited from class Gtk.Gesture
All known members inherited from class Gtk.EventController
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref