[][src]Struct libscroll::Scrollview

pub struct Scrollview { /* fields omitted */ }

Represents a single scrollview and tracks all state related to it.

Methods

impl Scrollview[src]

pub fn sample(&mut self, timestamp: u64) -> AxisVector<f64>[src]

Gives the current best estimate for the position of the content relative to the viewport in device pixels

pub fn new() -> Scrollview[src]

Create a new scrollview with default settings

Warning: these settings are unlikely to be particularly useful, so set_geometry(), set_avg_frametime(), and any other relevant initialization functions still need to be used

pub fn del(_: Scrollview)[src]

Deletes/deinitializes the current scrollview

Primarily intended for ffi use, Scrollview implements Drop where deinitialization is required, so this is only useful for ffi use

NOTE: likely will be removed, not sure why I put this in here to begin with

pub fn set_geometry(
    &mut self,
    content_height: f64,
    content_width: f64,
    viewport_height: f64,
    viewport_width: f64
)
[src]

Set the geometry for the given scrollview

Can be used both on scrollview initialization and on scrollview resize

pub fn animating(&self) -> bool[src]

True if scrollview should continue to be polled even in absence of events (fling or other animation in progress)

pub fn push_pan(&mut self, axis: Axis, amount: f64, timestamp: Option<u64>)[src]

Enqueue a pan event for the referenced scrollview

pub fn push_fling(&mut self, timestamp: Option<u64>)[src]

Enqueue a fling (finger lift at any velocity) for the referenced scrollview

pub fn push_interrupt(&mut self, timestamp: Option<u64>)[src]

Enqueue a scroll interrupt (finger down at any time, gesture start) for the referenced scrollview

pub fn set_source(&mut self, source: Source)[src]

Set what device type is going to be providing any events that follow until the next source is declared

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.