namespace LiveWall.Sdk; // --------------------------------------------------------------------------------------------- // Events published on IPluginEvents. Subscribe from ILiveWallPlugin.Initialize: // // context.Events.Subscribe(e => context.Log.Info($"now: {e.Source}")); // // Handlers always run on the WPF UI thread. // --------------------------------------------------------------------------------------------- /// The host finished starting: settings are loaded and the wallpaper is attached. public sealed class AppStartedEvent { public string HostVersion { get; init; } = ""; public string PluginApiVersion { get; init; } = ""; } /// LiveWall is shutting down. Unsubscribe and release resources now. public sealed class AppStoppingEvent { public string Reason { get; init; } = "exit"; } /// A new wallpaper was applied (kind/source/renderer as they are now). public sealed class WallpaperChangedEvent { public string Kind { get; init; } = ""; public string Source { get; init; } = ""; public string RendererName { get; init; } = ""; public bool FromPlugin { get; init; } } /// Playback started, stopped or was suspended (lock screen, battery, fullscreen…). public sealed class PlaybackChangedEvent { public bool IsPlaying { get; init; } public bool IsPaused { get; init; } public string Reason { get; init; } = ""; } /// Interactive mode was toggled. public sealed class InteractionChangedEvent { public bool Interactive { get; init; } } /// Any settings change. is the property name that changed. public sealed class SettingsChangedEvent { public string Property { get; init; } = ""; public ISettingsSnapshot Snapshot { get; init; } = null!; } /// Display topology changed or the wallpaper was re-attached. public sealed class DisplayChangedEvent { public IReadOnlyList Devices { get; init; } = Array.Empty(); public bool Reattached { get; init; } } /// Session state (lock screen, battery, remote desktop) changed. public sealed class SessionChangedEvent { public bool Locked { get; init; } public bool OnBattery { get; init; } public bool RemoteSession { get; init; } } /// Something failed inside the host; useful for plugins that surface errors. public sealed class HostErrorEvent { public string Message { get; init; } = ""; public string Source { get; init; } = ""; } /// Plugin-to-plugin messaging: publish any class you like. public sealed class PluginMessageEvent { public string FromPluginId { get; init; } = ""; public string Topic { get; init; } = ""; public string? Payload { get; init; } }