MenuBarExtraDescriptor
Static description of a menu bar extra a droplet contributes.
struct MenuBarExtraDescriptor
Static description of a menu bar extra a droplet contributes. The host shows it as a tile in Droppy's Command Center, the panel under Droppy's one menu bar icon.
Initializers
init(title:systemImage:makeContent:)
init(title: String, systemImage: String, makeContent: @escaping @MainActor @Sendable () -> AnyView)
Creates a descriptor.
Properties
makeContent
let makeContent: @MainActor @Sendable () -> AnyView
Builds the content shown when the tile is pressed.
Called each time the content opens, on the descriptor read at that moment, so a value the closure captures is current for that opening. The host shows it as a detail over the Command Center's page, at the panel's width; give a list that can grow without bound a fixed height and let it scroll.
@Sendable is explicit rather than inferred. A host compiled with approachable concurrency (SE-0434) treats every global-actor-isolated function type as @Sendable already, while this module's interface is emitted without that feature. Leaving it implicit therefore made the two spellings of the SAME type disagree across the module boundary, and Droppy's own conformance to this protocol failed to compile with a "sendability of function types does not match" error that named no difference a reader could see. Written out, it means one thing everywhere.
systemImage
let systemImage: String
SF Symbol shown on the tile.
title
let title: String
The tile's title, also read by VoiceOver, sentence case.