class Gdk::ScrollEvent
- Gdk::ScrollEvent
- Gdk::Event
- Reference
- Object
Overview
An event related to a scrolling motion.
Defined in:
lib/gi-crystal/src/auto/gdk-4.0/scroll_event.crConstructors
-
.new
Initialize a new
ScrollEvent
.
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#deltas(delta_x : Float64, delta_y : Float64) : Nil
Extracts the scroll deltas of a scroll event.
-
#direction : Gdk::ScrollDirection
Extracts the direction of a scroll event.
-
#is_stop : Bool
Check whether a scroll event is a stop scroll event.
-
#unit : Gdk::ScrollUnit
Extracts the scroll delta unit of a scroll event.
Instance methods inherited from class Gdk::Event
_get_angle(event2 : Gdk::Event, angle : Float64) : Bool
_get_angle,
_get_center(event2 : Gdk::Event, x : Float64, y : Float64) : Bool
_get_center,
_get_distance(event2 : Gdk::Event, distance : Float64) : Bool
_get_distance,
axes(axes : Enumerable(Float64)) : Boolaxes(*axes : Float64) axes, axis(axis_use : Gdk::AxisUse, value : Float64) : Bool axis, device : Gdk::Device? device, device_tool : Gdk::DeviceTool? device_tool, display : Gdk::Display? display, event_sequence : Gdk::EventSequence event_sequence, event_type : Gdk::EventType event_type, finalize finalize, history : Enumerable(Gdk::TimeCoord)? history, modifier_state : Gdk::ModifierType modifier_state, pointer_emulated : Bool pointer_emulated, position(x : Float64, y : Float64) : Bool position, seat : Gdk::Seat? seat, surface : Gdk::Surface? surface, time : UInt32 time, to_unsafe : Pointer(Void) to_unsafe, triggers_context_menu : Bool triggers_context_menu
Class methods inherited from class Gdk::Event
g_type : UInt64
g_type
Constructor Detail
Class Method Detail
Instance Method Detail
Extracts the scroll deltas of a scroll event.
The deltas will be zero unless the scroll direction is %GDK_SCROLL_SMOOTH.
For the representation unit of these deltas, see
Gdk::ScrollEvent#unit
.
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.
Extracts the scroll delta unit of a scroll event.
The unit will always be %GDK_SCROLL_UNIT_WHEEL if the scroll direction is not %GDK_SCROLL_SMOOTH.