gui/pkg/notification/messages.go
Claude 84ec201a05
Some checks failed
Security Scan / security (push) Failing after 28s
feat: notification perms/categories, dock progress/bounce, webview zoom/print
Notification: RevokePermission, RegisterCategory, action broadcasts
Dock: SetProgressBar, Bounce/StopBounce, ActionProgressChanged
Webview: QueryZoom, TaskSetZoom, TaskSetURL, TaskPrint (with PDF export)
MCP: 4 new event tools (emit, on, off, list)
Environment: HasFocusFollowsMouse query
ContextMenu: Update, Destroy, GetAll, OnShutdown cleanup

Core upgraded to v0.8.0-alpha.1 (added alongside existing v0.3.3 —
full module path migration pending).

All 17 packages build and test clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 15:19:39 +01:00

33 lines
1.4 KiB
Go

package notification
// QueryPermission returns current notification permission status. Result: PermissionStatus
type QueryPermission struct{}
// TaskSend sends a native notification, falling back to dialog on failure.
type TaskSend struct{ Options NotificationOptions }
// TaskRequestPermission requests notification permission from the OS. Result: bool (granted)
type TaskRequestPermission struct{}
// TaskRevokePermission revokes previously granted notification permission. Result: nil
type TaskRevokePermission struct{}
// TaskRegisterCategory registers a notification category with its actions.
// c.PERFORM(notification.TaskRegisterCategory{Category: notification.NotificationCategory{ID: "message", Actions: actions}})
type TaskRegisterCategory struct{ Category NotificationCategory }
// ActionNotificationClicked is broadcast when the user clicks a notification body.
type ActionNotificationClicked struct{ ID string }
// ActionNotificationActionTriggered is broadcast when the user activates a notification action button.
// c.RegisterAction(func(_ *core.Core, msg core.Message) error {
// if a, ok := msg.(notification.ActionNotificationActionTriggered); ok { ... }
// return nil
// })
type ActionNotificationActionTriggered struct {
NotificationID string `json:"notificationId"`
ActionID string `json:"actionId"`
}
// ActionNotificationDismissed is broadcast when the user dismisses a notification.
type ActionNotificationDismissed struct{ ID string }