final class Gtk.EventControllerScroll : Gtk.EventController
/* No available fields */
GtkEventControllerScroll is an event controller meant to handle
scroll events from mice and touchpads. It is capable of handling
both discrete and continuous scroll events, abstracting them both
GtkEventControllerScroll::scroll signal (deltas in the
discrete case are multiples of 1).
In the case of continuous scroll events,
GtkEventControllerScroll::scroll events between two
The behavior of the event controller can be modified by the
flags given at creation time, or modified at a later point through
gtk_event_controller_scroll_set_flags() (e.g. because the scrolling
conditions of the widget changed).
The controller can be set up to emit motion for either/both vertical and horizontal scroll events through #GTK_EVENT_CONTROLLER_SCROLL_VERTICAL,
If any axis is disabled, the respective
delta will be 0. Vertical scroll events will be translated to horizontal
motion for the devices incapable of horizontal scrolling.
The event controller can also be forced to emit discrete events on all devices through #GTK_EVENT_CONTROLLER_SCROLL_DISCRETE. This can be used to implement discrete actions triggered through scroll events (e.g. switching across combobox options).
The #GTK_EVENT_CONTROLLER_SCROLL_KINETIC flag toggles the emission of the
GtkEventControllerScroll::decelerate signal, emitted at the end of scrolling
with two X/Y velocity arguments that are consistent with the motion that
This object was added in 3.24.
Creates a new event controller that will handle scroll events
for the given
Gets the flags conditioning the scroll controller behavior.
Sets the flags conditioning scroll controller behavior.
Methods inherited from GtkEventController (5)
Gets the propagation phase at which
controller handles events.
GtkWidget this controller relates to.
Feeds an events into
controller, so it can be interpreted
and the controller actions triggered.
controller to a clean state. Every interaction
the controller did through
will be dropped at this point.
Sets the propagation phase at which a controller handles events.
The flags affecting event controller behavior.
Emitted after scroll is finished if the #GTK_EVENT_CONTROLLER_SCROLL_KINETIC
flag is set.
vel_y express the initial velocity that was
imprinted by the scroll events.
vel_y are expressed in pixels/ms.
Signals that the widget should scroll by the
amount specified by
Signals that a new scrolling operation has begun. It will only be emitted on devices capable of it.
Signals that a new scrolling operation has finished. It will only be emitted on devices capable of it.