Struct PanAction

Source
pub struct PanAction(/* private fields */);

Implementations§

Source§

impl PanAction

Source

pub fn new() -> PanAction

Creates a new PanAction instance

§Returns

the newly created PanAction

Trait Implementations§

Source§

impl Clone for PanAction

Source§

fn clone(&self) -> PanAction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PanAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PanAction

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for PanAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for PanAction

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for PanAction

Source§

fn cmp(&self, other: &PanAction) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: ObjectType> PartialEq<T> for PanAction

Source§

fn eq(&self, other: &T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: ObjectType> PartialOrd<T> for PanAction

Source§

fn partial_cmp(&self, other: &T) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StaticType for PanAction

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl Eq for PanAction

Source§

impl IsA<Action> for PanAction

Source§

impl IsA<ActorMeta> for PanAction

Source§

impl IsA<GestureAction> for PanAction

Source§

impl IsA<InitiallyUnowned> for PanAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<O> ActorMetaExt for O
where O: IsA<ActorMeta>,

Source§

fn get_actor(&self) -> Option<Actor>

Retrieves a pointer to the Actor that owns self Read more
Source§

fn get_enabled(&self) -> bool

Retrieves whether self is enabled Read more
Source§

fn get_name(&self) -> Option<GString>

Retrieves the name set using ActorMetaExt::set_name Read more
Source§

fn set_enabled(&self, is_enabled: bool)

Sets whether self should be enabled or not Read more
Source§

fn set_name(&self, name: &str)

Sets the name of self Read more
Source§

fn connect_property_actor_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

fn connect_property_enabled_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

fn connect_property_name_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Cast for T
where T: ObjectType,

Source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
Source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
Source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: CanDowncast<T>,

Tries to downcast to a subclass or interface implementor T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: CanDowncast<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
Source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
Source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
Source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
Source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

impl<O> GestureActionExt for O
where O: IsA<GestureAction>,

Source§

fn cancel(&self)

Cancel a GestureAction before it begins
Source§

fn get_device(&self, point: u32) -> Option<InputDevice>

Retrieves the InputDevice of a touch point. Read more
Source§

fn get_last_event(&self, point: u32) -> Option<Event>

Retrieves a reference to the last ClutterEvent for a touch point. Call clutter_event_copy if you need to store the reference somewhere. Read more
Source§

fn get_motion_coords(&self, point: u32) -> (f32, f32)

Retrieves the coordinates, in stage space, of the latest motion event during the dragging. Read more
Source§

fn get_motion_delta(&self, point: u32) -> (f32, f32, f32)

Retrieves the incremental delta since the last motion event during the dragging. Read more
Source§

fn get_n_current_points(&self) -> u32

Retrieves the number of points currently active. Read more
Source§

fn get_n_touch_points(&self) -> i32

Retrieves the number of requested points to trigger the gesture. Read more
Source§

fn get_press_coords(&self, point: u32) -> (f32, f32)

Retrieves the coordinates, in stage space, of the press event that started the dragging for a specific touch point. Read more
Source§

fn get_release_coords(&self, point: u32) -> (f32, f32)

Retrieves the coordinates, in stage space, where the touch point was last released. Read more
Source§

fn get_sequence(&self, point: u32) -> Option<EventSequence>

Retrieves the EventSequence of a touch point. Read more
Source§

fn get_threshold_trigger_distance(&self) -> (f32, f32)

Retrieves the threshold trigger distance of the gesture self, as set using GestureActionExt::set_threshold_trigger_distance. Read more
Source§

fn get_threshold_trigger_edge(&self) -> GestureTriggerEdge

Retrieves the edge trigger of the gesture self, as set using GestureActionExt::set_threshold_trigger_edge. Read more
Source§

fn get_velocity(&self, point: u32) -> (f32, f32, f32)

Retrieves the velocity, in stage pixels per millisecond, of the latest motion event during the dragging. Read more
Source§

fn set_n_touch_points(&self, nb_points: i32)

Sets the number of points needed to trigger the gesture. Read more
Source§

fn set_threshold_trigger_distance(&self, x: f32, y: f32)

Sets the threshold trigger distance for the gesture drag threshold, if any. Read more
Source§

fn set_threshold_trigger_edge(&self, edge: GestureTriggerEdge)

Sets the edge trigger for the gesture drag threshold, if any. Read more
Source§

fn get_property_threshold_trigger_distance_x(&self) -> f32

The horizontal trigger distance to be used by the action to either emit the GestureAction::gesture-begin signal or to emit the GestureAction::gesture-cancel signal. Read more
Source§

fn get_property_threshold_trigger_distance_y(&self) -> f32

The vertical trigger distance to be used by the action to either emit the GestureAction::gesture-begin signal or to emit the GestureAction::gesture-cancel signal. Read more
Source§

fn connect_gesture_begin<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O, &Actor) -> bool + 'static,

The ::gesture_begin signal is emitted when the Actor to which a GestureAction has been applied starts receiving a gesture. Read more
Source§

fn connect_gesture_cancel<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O, &Actor) + 'static,

The ::gesture-cancel signal is emitted when the ongoing gesture gets cancelled from the GestureAction::gesture-progress signal handler. Read more
Source§

fn connect_gesture_end<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O, &Actor) + 'static,

The ::gesture-end signal is emitted at the end of the gesture gesture, when the pointer’s button is released Read more
Source§

fn connect_gesture_progress<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O, &Actor) -> bool + 'static,

The ::gesture-progress signal is emitted for each motion event after the GestureAction::gesture-begin signal has been emitted. Read more
Source§

fn connect_property_n_touch_points_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ObjectExt for T
where T: ObjectType,

Source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
Source§

fn get_type(&self) -> Type

Source§

fn get_object_class(&self) -> &ObjectClass

Source§

fn set_properties( &self, property_values: &[(&str, &dyn ToValue)], ) -> Result<(), BoolError>

Source§

fn set_property<'a, N>( &self, property_name: N, value: &dyn ToValue, ) -> Result<(), BoolError>
where N: Into<&'a str>,

Source§

fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError>
where N: Into<&'a str>,

Source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Safety Read more
Source§

unsafe fn get_qdata<QD>(&self, key: Quark) -> Option<&QD>
where QD: 'static,

Safety Read more
Source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Safety Read more
Source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Safety Read more
Source§

unsafe fn get_data<QD>(&self, key: &str) -> Option<&QD>
where QD: 'static,

Safety Read more
Source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Safety Read more
Source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Source§

fn stop_signal_emission(&self, signal_name: &str)

Source§

fn disconnect(&self, handler_id: SignalHandlerId)

Source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Source§

fn notify<'a, N>(&self, property_name: N)
where N: Into<&'a str>,

Source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Source§

fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool
where N: Into<&'a str>,

Source§

fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type>
where N: Into<&'a str>,

Source§

fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec>
where N: Into<&'a str>,

Source§

fn list_properties(&self) -> Vec<ParamSpec>

Source§

fn connect<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Source§

fn connect_local<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value> + 'static,

Source§

unsafe fn connect_unsafe<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value>,

Source§

fn emit<'a, N>( &self, signal_name: N, args: &[&dyn ToValue], ) -> Result<Option<Value>, BoolError>
where N: Into<&'a str>,

Source§

fn downgrade(&self) -> WeakRef<T>

Source§

fn bind_property<'a, O, N, M>( &'a self, source_property: N, target: &'a O, target_property: M, ) -> BindingBuilder<'a>
where O: ObjectType, N: Into<&'a str>, M: Into<&'a str>,

Source§

fn ref_count(&self) -> u32

Source§

impl<O> PanActionExt for O
where O: IsA<PanAction>,

Source§

fn get_acceleration_factor(&self) -> f64

Retrieves the initial acceleration factor for interpolated ::pan events. Read more
Source§

fn get_constrained_motion_delta(&self, point: u32) -> (f32, f32, f32)

Retrieves the delta, in stage space, dependent on the current state of the PanAction, and respecting the constraint specified by the PanAction:pan-axis property. Read more
Source§

fn get_deceleration(&self) -> f64

Retrieves the deceleration rate of interpolated ::pan events. Read more
Source§

fn get_interpolate(&self) -> bool

Checks if the action should emit ::pan events even after releasing the pointer during a panning gesture, to emulate some kind of kinetic inertia. Read more
Source§

fn get_interpolated_coords(&self) -> (f32, f32)

Retrieves the coordinates, in stage space, of the latest interpolated event, analogous to GestureActionExt::get_motion_coords. Read more
Source§

fn get_interpolated_delta(&self) -> (f32, f32, f32)

Retrieves the delta, in stage space, since the latest interpolated event, analogous to GestureActionExt::get_motion_delta. Read more
Source§

fn get_pan_axis(&self) -> PanAxis

Retrieves the axis constraint set by PanActionExt::set_pan_axis Read more
Source§

fn set_acceleration_factor(&self, factor: f64)

Factor applied to the momentum velocity at the time of releasing the pointer when generating interpolated ::pan events. Read more
Source§

fn set_deceleration(&self, rate: f64)

Sets the deceleration rate of the interpolated ::pan events generated after a pan gesture. This is approximately the value that the momentum at the time of releasing the pointer is divided by every 60th of a second. Read more
Source§

fn set_interpolate(&self, should_interpolate: bool)

Sets whether the action should emit interpolated ::pan events after the drag has ended, to emulate the gesture kinetic inertia. Read more
Source§

fn set_pan_axis(&self, axis: PanAxis)

Restricts the panning action to a specific axis Read more
Source§

fn connect_pan<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O, &Actor, bool) -> bool + 'static,

The ::pan signal is emitted to keep track of the motion during a pan gesture. is_interpolated is set to true during the interpolation phase of the pan, after the drag has ended and the :interpolate property was set to true. Read more
Source§

fn connect_pan_stopped<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O, &Actor) + 'static,

The ::pan-stopped signal is emitted at the end of the interpolation phase of the pan action, only when :interpolate is set to true. Read more
Source§

fn connect_property_acceleration_factor_notify<F>( &self, f: F, ) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

fn connect_property_deceleration_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

fn connect_property_interpolate_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

fn connect_property_pan_axis_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&O) + 'static,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToValue for T
where T: SetValue + ?Sized,

Source§

fn to_value(&self) -> Value

Returns a Value clone of self.
Source§

fn to_value_type(&self) -> Type

Returns the type identifer of self. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Super, Sub> CanDowncast<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,