ce55be4a-fb5f-4981-b507-0f4.../Sources/MioPlugin.swift

23 lines
654 B
Swift
Raw Normal View History

//
// MioPlugin.swift
// MioIsland Plugin SDK (duplicated into each external plugin)
//
// At runtime, @objc protocol conformance is matched by selector
// signatures, not by module identity, so this standalone copy
// works even though the host defines its own MioPlugin protocol
// in a different Swift module.
//
import AppKit
@objc protocol MioPlugin: AnyObject {
var id: String { get }
var name: String { get }
var icon: String { get }
var version: String { get }
func activate()
func deactivate()
func makeView() -> NSView
@objc optional func viewForSlot(_ slot: String, context: [String: Any]) -> NSView?
}