Method

HandySwipeableget_swipe_area

since: 1.0

Declaration [src]

void
hdy_swipeable_get_swipe_area (
  HdySwipeable* self,
  HdyNavigationDirection navigation_direction,
  gboolean is_drag,
  GdkRectangle* rect
)

Description [src]

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.

Swipe area is only considered for direct swipes (as in, not initiated by HdySwipeGroup).

If not implemented, the default implementation returns the allocation of self, allowing swipes from anywhere.

Available since: 1.0

Parameters

navigation_direction

Type: HdyNavigationDirection

The direction of the swipe.

is_drag

Type: gboolean

Whether the swipe is caused by a dragging gesture.

rect

Type: GdkRectangle

A pointer to a rectangle to store the swipe area.

The argument will be set by the function.
The returned data is owned by the instance.