Menu package is now a full core.Service with typed IPC messages. TaskSetAppMenu carries MenuItems with OnClick closures (in-process IPC). Co-Authored-By: Virgil <virgil@lethean.io>
14 lines
384 B
Go
14 lines
384 B
Go
package menu
|
|
|
|
import "forge.lthn.ai/core/go/pkg/core"
|
|
|
|
// Register creates a factory closure that captures the Platform adapter.
|
|
func Register(p Platform) func(*core.Core) (any, error) {
|
|
return func(c *core.Core) (any, error) {
|
|
return &Service{
|
|
ServiceRuntime: core.NewServiceRuntime[Options](c, Options{}),
|
|
platform: p,
|
|
manager: NewManager(p),
|
|
}, nil
|
|
}
|
|
}
|