Package ch.bailu.gtk.adw
Class Swipeable
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.Interface
ch.bailu.gtk.adw.Swipeable
- All Implemented Interfaces:
PointerInterface
An interface for swipeable widgets.
The `AdwSwipeable` interface is implemented by all swipeable widgets.
See [class@SwipeTracker] for details about implementing it.
The `AdwSwipeable` interface is implemented by all swipeable widgets.
See [class@SwipeTracker] for details about implementing it.
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/iface.Swipeable.html
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the progress @self will snap back to after the gesture is canceled.static ClassHandler
double
Gets the swipe distance of @self.static int
static long
static TypeSystem.TypeSize
double
Gets the current progress of @self.void
getSwipeArea
(int navigation_direction, boolean is_drag, Rectangle rect) Gets the area @self can start a swipe from for the given direction and
gesture type.static long
static TypeSystem.TypeSize
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
Swipeable
-
-
Method Details
-
getClassHandler
-
getCancelProgress
public double getCancelProgress()Gets the progress @self will snap back to after the gesture is canceled.- Returns:
- the cancel progress, unitless
-
getDistance
public double getDistance()Gets the swipe distance of @self.
This corresponds to how many pixels 1 unit represents.- Returns:
- the swipe distance in pixels
-
getProgress
public double getProgress()Gets the current progress of @self.- Returns:
- the current progress, unitless
-
getSwipeArea
Gets the area @self can start a swipe from for the given direction and
gesture type.
This can be used to restrict swipes to only be possible from a certain area,
for example, to only allow edge swipes, or to have a draggable element and
ignore swipes elsewhere.
If not implemented, the default implementation returns the allocation of
@self, allowing swipes from anywhere.- Parameters:
navigation_direction
- the direction of the swipeis_drag
- whether the swipe is caused by a dragging gesturerect
- a pointer to a rectangle to store the swipe area
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-