Class

MaplibreNativeFfiMomentumDecay

Description [src]

final class MaplibreNativeFfi.MomentumDecay : GObject.Object
{
  /* No available fields */
}

How one part of a gesture’s momentum slows from its release speed.

Speeds and distances are in the part’s unit: logical pixels for pan, zoom levels for zoom, and degrees for bearing and pitch. A setting whose bit isn’t set takes the part’s default, which MaplibreNativeFfiGestureMomentum lists. min_speed is finite and not negative, and every other number is finite and positive. A friction decay can serve every release, as a preset that matches a platform’s scrolling. An eased glide takes its direction from the part’s velocity, and its distance and duration from the caller’s plan.

A member that a has_ method reports on is unset until its property or setter sets it.

See mln_momentum_decay in the C API reference.

Ancestors

Constructors

maplibre_native_ffi_momentum_decay_new

Creates a MaplibreNativeFfiMomentumDecay whose members are zero, empty, or unset.

Instance methods

maplibre_native_ffi_momentum_decay_get_distance

Gets MaplibreNativeFfiMomentumDecay:distance.

maplibre_native_ffi_momentum_decay_get_duration_ms

Gets MaplibreNativeFfiMomentumDecay:duration-ms.

maplibre_native_ffi_momentum_decay_get_easing

Gets MaplibreNativeFfiMomentumDecay:easing.

maplibre_native_ffi_momentum_decay_get_half_life_ms

Gets MaplibreNativeFfiMomentumDecay:half-life-ms.

maplibre_native_ffi_momentum_decay_get_max_distance

Gets MaplibreNativeFfiMomentumDecay:max-distance.

maplibre_native_ffi_momentum_decay_get_max_speed

Gets MaplibreNativeFfiMomentumDecay:max-speed.

maplibre_native_ffi_momentum_decay_get_min_speed

Gets MaplibreNativeFfiMomentumDecay:min-speed.

maplibre_native_ffi_momentum_decay_get_model

Gets MaplibreNativeFfiMomentumDecay:model.

maplibre_native_ffi_momentum_decay_get_stop_speed

Gets MaplibreNativeFfiMomentumDecay:stop-speed.

maplibre_native_ffi_momentum_decay_has_distance

Whether MaplibreNativeFfiMomentumDecay:distance is set.

maplibre_native_ffi_momentum_decay_has_duration_ms

Whether MaplibreNativeFfiMomentumDecay:duration-ms is set.

maplibre_native_ffi_momentum_decay_has_easing

Whether MaplibreNativeFfiMomentumDecay:easing is set.

maplibre_native_ffi_momentum_decay_has_half_life_ms

Whether MaplibreNativeFfiMomentumDecay:half-life-ms is set.

maplibre_native_ffi_momentum_decay_has_max_distance

Whether MaplibreNativeFfiMomentumDecay:max-distance is set.

maplibre_native_ffi_momentum_decay_has_max_speed

Whether MaplibreNativeFfiMomentumDecay:max-speed is set.

maplibre_native_ffi_momentum_decay_has_min_speed

Whether MaplibreNativeFfiMomentumDecay:min-speed is set.

maplibre_native_ffi_momentum_decay_has_model

Whether MaplibreNativeFfiMomentumDecay:model is set.

maplibre_native_ffi_momentum_decay_has_stop_speed

Whether MaplibreNativeFfiMomentumDecay:stop-speed is set.

maplibre_native_ffi_momentum_decay_set_distance

Sets MaplibreNativeFfiMomentumDecay:distance.

maplibre_native_ffi_momentum_decay_set_duration_ms

Sets MaplibreNativeFfiMomentumDecay:duration-ms.

maplibre_native_ffi_momentum_decay_set_easing

Sets MaplibreNativeFfiMomentumDecay:easing.

maplibre_native_ffi_momentum_decay_set_half_life_ms

Sets MaplibreNativeFfiMomentumDecay:half-life-ms.

maplibre_native_ffi_momentum_decay_set_max_distance

Sets MaplibreNativeFfiMomentumDecay:max-distance.

maplibre_native_ffi_momentum_decay_set_max_speed

Sets MaplibreNativeFfiMomentumDecay:max-speed.

maplibre_native_ffi_momentum_decay_set_min_speed

Sets MaplibreNativeFfiMomentumDecay:min-speed.

maplibre_native_ffi_momentum_decay_set_model

Sets MaplibreNativeFfiMomentumDecay:model.

maplibre_native_ffi_momentum_decay_set_stop_speed

Sets MaplibreNativeFfiMomentumDecay:stop-speed.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

MaplibreNativeFfi.MomentumDecay:distance

Required for MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_EASE.

MaplibreNativeFfi.MomentumDecay:duration-ms

Required for MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_EASE.

MaplibreNativeFfi.MomentumDecay:easing

For MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_EASE, the share of distance covered over the share of duration_ms. Its control points are between 0 and 1, so the glide never passes its distance. Defaults to (0, 0, 0.25, 1), the curve that camera animations ease along by default. Android’s scroll fling follows (0.175, 0.5, 0.35, 1).

MaplibreNativeFfi.MomentumDecay:half-life-ms

For MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_FRICTION, how long the speed takes to halve.

MaplibreNativeFfi.MomentumDecay:max-distance

The farthest the part moves. A friction release that would move farther starts slower, so it ends sooner, and a planned glide moves at most this far over its duration.

MaplibreNativeFfi.MomentumDecay:max-speed

For MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_FRICTION, a faster release counts as this.

MaplibreNativeFfi.MomentumDecay:min-speed

A slower release starts no momentum.

MaplibreNativeFfi.MomentumDecay:stop-speed

For MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_FRICTION, the speed at which it ends.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct MaplibreNativeFfiMomentumDecayClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.