MenuBarExtraDescriptor
Static description of a menu bar extra a droplet contributes.
struct MenuBarExtraDescriptor
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 menu content shown when the item is clicked.
@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 in the menu bar.
title
let title: String
Accessibility title for the status item, sentence case.