Package org.gnome.gdk
Class ScrollEvent
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gdk.Event
org.gnome.gdk.ScrollEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gnome.gdk.Event
Event.EventImpl
-
Constructor Summary
ConstructorDescriptionScrollEvent
(MemorySegment address) Create a ScrollEvent proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected ScrollEvent
asParent()
Returns this instance as if it were its parent type.void
Extracts the scroll deltas of a scroll event.Extracts the direction of a scroll event.static Type
getType()
Get the GType of the ScrollEvent classgetUnit()
Extracts the scroll delta unit of a scroll event.boolean
isStop()
Check whether a scroll event is a stop scroll event.Methods inherited from class org.gnome.gdk.Event
eventsGetAngle, eventsGetCenter, eventsGetDistance, getAxes, getAxis, getDevice, getDeviceTool, getDisplay, getEventSequence, getEventType, getHistory, getModifierState, getPointerEmulated, getPosition, getSeat, getSurface, getTime, ref, triggersContextMenu, unref
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getMemoryLayout, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ScrollEvent
Create a ScrollEvent proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getDeltas
Extracts the scroll deltas of a scroll event.The deltas will be zero unless the scroll direction is
ScrollDirection.SMOOTH
.For the representation unit of these deltas, see
getUnit()
.- Parameters:
deltaX
- return location for x scroll deltadeltaY
- return location for y scroll delta
-
getDirection
Extracts the direction of a scroll event.- Returns:
- the scroll direction of this ScrollEvent
-
getUnit
Extracts the scroll delta unit of a scroll event.The unit will always be
ScrollUnit.WHEEL
if the scroll direction is notScrollDirection.SMOOTH
.- Returns:
- the scroll unit.
-
isStop
public boolean isStop()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.
- Returns:
true
if the event is a scroll stop event
-