GamepadMethods

pub trait GamepadMethods<D: DomTypes> {
    // Required methods
    fn Id(&self) -> DOMString;
    fn Index(&self) -> i32;
    fn Connected(&self) -> bool;
    fn Timestamp(&self) -> Finite<f64>;
    fn Mapping(&self) -> DOMString;
    fn Buttons(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>);
    fn Axes(
        &self,
        cx: SafeJSContext,
        _can_gc: CanGc,
        retval: MutableHandleValue<'_>,
    );
    fn VibrationActuator(&self) -> DomRoot<D::GamepadHapticActuator>;
    fn Hand(&self) -> GamepadHand;
    fn GetPose(&self) -> Option<DomRoot<D::GamepadPose>>;
}

Required Methods§

Source

fn Id(&self) -> DOMString

Source

fn Index(&self) -> i32

Source

fn Connected(&self) -> bool

Source

fn Timestamp(&self) -> Finite<f64>

Source

fn Mapping(&self) -> DOMString

Source

fn Buttons(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>)

Source

fn Axes( &self, cx: SafeJSContext, _can_gc: CanGc, retval: MutableHandleValue<'_>, )

Source

fn VibrationActuator(&self) -> DomRoot<D::GamepadHapticActuator>

Source

fn Hand(&self) -> GamepadHand

Source

fn GetPose(&self) -> Option<DomRoot<D::GamepadPose>>

Implementors§