Skip to main content

GCDirectionPadElement

Trait GCDirectionPadElement 

Source
pub unsafe trait GCDirectionPadElement: GCPhysicalInputElement {
    // Provided methods
    unsafe fn xyAxes(&self) -> Retained<ProtocolObject<dyn GCAxis2DInput>>
       where Self: Sized + Message { ... }
    unsafe fn xAxis(&self) -> Retained<ProtocolObject<dyn GCAxisInput>>
       where Self: Sized + Message { ... }
    unsafe fn yAxis(&self) -> Retained<ProtocolObject<dyn GCAxisInput>>
       where Self: Sized + Message { ... }
    unsafe fn up(&self) -> Retained<AnyObject>
       where Self: Sized + Message { ... }
    unsafe fn down(&self) -> Retained<AnyObject>
       where Self: Sized + Message { ... }
    unsafe fn left(&self) -> Retained<AnyObject>
       where Self: Sized + Message { ... }
    unsafe fn right(&self) -> Retained<AnyObject>
       where Self: Sized + Message { ... }
}
Available on crate features GCDirectionPadElement and GCPhysicalInputElement only.
Expand description

An object conforming to GCDirectionPadElementrepresents a four-way directional control element.

A direction pad element contains a common grouping of 2 axis inputs, which can also be interpreted as 2 sets of mutually exclusive button pairs. Only one button in each pair, {up, down} and {left, right}, can be pressed at any given time.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn xyAxes(&self) -> Retained<ProtocolObject<dyn GCAxis2DInput>>
where Self: Sized + Message,

Available on crate feature GCAxis2DInput only.

The x,y position of the dpad input.

Source

unsafe fn xAxis(&self) -> Retained<ProtocolObject<dyn GCAxisInput>>
where Self: Sized + Message,

Available on crate feature GCAxisInput only.

The horizontal/x-component of the dpad input.

Source

unsafe fn yAxis(&self) -> Retained<ProtocolObject<dyn GCAxisInput>>
where Self: Sized + Message,

Available on crate feature GCAxisInput only.

The vertical/y-component of the dpad input.

Source

unsafe fn up(&self) -> Retained<AnyObject>
where Self: Sized + Message,

Available on crate features GCLinearInput and GCPressedStateInput only.

The positive y-component of the dpad input.

Source

unsafe fn down(&self) -> Retained<AnyObject>
where Self: Sized + Message,

Available on crate features GCLinearInput and GCPressedStateInput only.

The negative y-component of the dpad input.

Source

unsafe fn left(&self) -> Retained<AnyObject>
where Self: Sized + Message,

Available on crate features GCLinearInput and GCPressedStateInput only.

The negative x-component of the dpad input.

Source

unsafe fn right(&self) -> Retained<AnyObject>
where Self: Sized + Message,

Available on crate features GCLinearInput and GCPressedStateInput only.

The positive x-component of the dpad input.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn GCDirectionPadElement

Source§

impl ProtocolType for dyn GCDirectionPadElement

Source§

const NAME: &'static str = "GCDirectionPadElement"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> GCDirectionPadElement for ProtocolObject<T>

Implementors§