[][src]Type Definition rubrail::Touchbar

type Touchbar = Box<RustTouchbarDelegateWrapper>;

Controller for creating and using Touch Bar UIs

The Touchbar type provides the interface between Rust and the Apple Touch Bar system. It handles communication with the Touch Bar service, delegation of UI and touch events, and memory management of Objective-C objects. All creation and modification of Touch Bar UIs is done through it.

This implementation uses private Apple APIs to create an always-available menu to the Control Strip region, which can be accessed regardless of which application is in focus. Apps using it are not permitted in the App Store.

There should typically be one Touchbar type alocated per application. Rubrail does not enforce the singleton pattern automatically, so it is up to the application to guarantee that there is only one. Theoretically, one application can have multiple disjoint entries in the Touch Bar by creating more than one Touchbar, and Rubrail allows this though it is not tested.

See the documentation of the TTouchbar trait for usage.

Example

extern crate rubrail;
use rubrail::TTouchbar;
fn main() {
  let controller = rubrail::Touchbar::alloc("test");
}

Trait Implementations

impl TTouchbar for Touchbar[src]

type T = Touchbar

A concrete implementation of TTouchbar