// Copyright Epic Games, Inc. All Rights Reserved. using Avalonia.Controls; using FluentAvalonia.UI.Controls; namespace UnrealToolbox { enum TrayAppPluginState { Undefined, Ok, Busy, Paused, Error } /// /// Reported status of a plugin /// record class TrayAppPluginStatus(TrayAppPluginState State, string? Message = null, string? NotificationMessage = null) { public static TrayAppPluginStatus Default { get; } = new TrayAppPluginStatus(TrayAppPluginState.Undefined); } /// /// Plugin for the tray app /// interface ITrayAppPlugin : IAsyncDisposable { /// /// Name of the plugin to show in the settings page /// string Name { get; } /// /// Icon to show on the settings page /// IconSource Icon { get; } /// /// Refresh the state of this plugin. Called when the application is activated or focussed. /// void Refresh(); /// /// Get the current status of this plugin /// TrayAppPluginStatus GetStatus(); /// /// Determines if the plugin should be shown in the settings page /// bool HasSettingsPage(); /// /// Create a settings page for this plugin /// Control CreateSettingsPage(SettingsContext context); /// /// Allow the plugin to customize the tray icon context menu /// void PopulateContextMenu(NativeMenu contextMenu); } }