Skip to main content

Crate day_toolkit_appkit

Crate day_toolkit_appkit 

Source
Expand description

day-toolkit-appkit: the macos-appkit backend (DESIGN.md §9). objc2, pure Rust, no shim.

Handle = Retained<NSView>. Containers are flipped NSViews (top-left origin, so Day’s frames apply directly and survive diffing). One custom target class (DayTarget) forwards target/action + text-delegate callbacks into the Day event sink, node-id keyed (§8.3).

Re-exports§

pub use ext::*;

Modules§

ext
Tweaks (docs/tweaks.md): typed access to the NSView behind a Day-created piece.
res

Structs§

AppKit

Statics§

RENDERERS
Renderers registered by external Day Piece crates (§8.2 layer 3 — linkme convenience).

Functions§

emit
Emit an event into day-core’s queue (public: external Day Piece renderers use this too).
lifecycle_supported
Which lifecycle phases this desktop backend delivers (docs/lifecycle.md): the universal set. macOS has no true background/foreground or memory-warning lifecycle. const so day::require_lifecycle! can reject unsupported phases at compile time. Must agree with the Toolkit::supports_lifecycle default (which also returns is_universal).
toolbar_image
Icon resolution for a piece renderer’s own NSToolbar items (see toolbar::image_for). The NSImage a toolbar item draws for icon: the SF Symbol for a standard symbol, the staged vector (as a template image) for a bundled one. Public as crate::toolbar_image for the piece renderers that build their own NSToolbar on a Day window (the settings panel’s preference tabs), so their items resolve icons exactly as Day’s toolbar does.

Type Aliases§

Handle