:right-sidebar: True ScrollEvent =================================================================== .. currentmodule:: gi.repository.Gdk .. class:: ScrollEvent(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gdk.Event` An event related to a scrolling motion. Methods ------- .. rst-class:: interim-class .. class:: ScrollEvent :no-index: .. method:: get_deltas() -> ~typing.Tuple[float, float] Extracts the scroll deltas of a scroll event. The deltas will be zero unless the scroll direction is :const:`~gi.repository.Gdk.ScrollDirection.SMOOTH`. For the representation unit of these deltas, see :obj:`~gi.repository.Gdk.ScrollEvent.get_unit`\. .. method:: get_direction() -> ~gi.repository.Gdk.ScrollDirection Extracts the direction of a scroll event. .. method:: get_unit() -> ~gi.repository.Gdk.ScrollUnit Extracts the scroll delta unit of a scroll event. The unit will always be :const:`~gi.repository.Gdk.ScrollUnit.WHEEL` if the scroll direction is not :const:`~gi.repository.Gdk.ScrollDirection.SMOOTH`. .. versionadded:: 4.8 .. method:: is_stop() -> bool Check whether a scroll event is a stop scroll event. Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity. Stop scroll events always have a delta of 0/0.