Expand description

Utils is a dumping ground for various methods that don’t really have a particular module they belong to. These are typically internal, and if you rely on them… well, don’t be surprised if they go away one day.

Modules

Helper methods for OS version checking.

Structs

Upstream core graphics does not implement Encode for certain things, so we wrap them here - these are only used in reading certain types passed to us from some delegate methods.

A CellFactory is an struct that stores closures that instantiate view types.

Traits

A generic trait that’s used throughout multiple different controls in this framework - acts as a guard for whether something is a (View|Window|etc)Controller.

Functions

A helper method for ensuring that Cocoa is running in multi-threaded mode.

Asynchronously execute a callback on the main thread via Grand Central Dispatch.

Utility method for taking a pointer and grabbing the corresponding delegate in Rust. This is theoretically safe:

Synchronously execute a callback on the main thread via Grand Central Dispatch.