ScrollEventProtocol
public protocol ScrollEventProtocol : EventProtocol
The ScrollEventProtocol
protocol exposes the methods and properties of an underlying GdkScrollEvent
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see ScrollEvent
.
Alternatively, use ScrollEventRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
An event related to a scrolling motion.
-
Untyped pointer to the underlying
GdkScrollEvent
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
scroll_event_ptr
Default implementationTyped pointer to the underlying
GdkScrollEvent
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GdkScrollEvent
instance.Declaration
Swift
var scroll_event_ptr: UnsafeMutablePointer<GdkScrollEvent>! { get }
-
Required Initialiser for types conforming to
ScrollEventProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getDeltas(deltaX:
Extension methoddeltaY: ) Extracts the scroll deltas of a scroll event.
The deltas will be zero unless the scroll direction is
GDK_SCROLL_SMOOTH
.Declaration
Swift
@inlinable func getDeltas(deltaX: UnsafeMutablePointer<CDouble>!, deltaY: UnsafeMutablePointer<CDouble>!)
-
getDirection()
Extension methodExtracts the direction of a scroll event.
Declaration
Swift
@inlinable func getDirection() -> GdkScrollDirection
-
direction
Extension methodExtracts the direction of a scroll event.
Declaration
Swift
@inlinable var direction: GdkScrollDirection { get }
-
isStop
Extension methodCheck 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.
Declaration
Swift
@inlinable var isStop: Bool { get }