| | |
| | | using System.Text.Json.Serialization; |
| | | using Moli.Desktop.Plugins; |
| | | |
| | | namespace Moli.Desktop.Layout; |
| | |
| | | public override string ToString() => Value; |
| | | } |
| | | |
| | | public enum DisplayLayer |
| | | { |
| | | [JsonStringEnumMemberName("desktop")] |
| | | Desktop, |
| | | |
| | | [JsonStringEnumMemberName("normal")] |
| | | Normal, |
| | | |
| | | [JsonStringEnumMemberName("app-top")] |
| | | AppTop, |
| | | |
| | | [JsonStringEnumMemberName("global-top")] |
| | | GlobalTop |
| | | } |
| | | |
| | | public sealed record WidgetRuntimeState |
| | | { |
| | | public required WidgetInstanceId InstanceId { get; init; } |
| | |
| | | public required RectD Bounds { get; init; } |
| | | public required MonitorId MonitorId { get; init; } |
| | | public bool IsVisible { get; init; } = true; |
| | | public bool LayoutIsVisible { get; init; } = true; |
| | | public bool IsLocked { get; init; } |
| | | public double Opacity { get; init; } = 1; |
| | | public bool ClickThrough { get; init; } = true; |
| | | public bool LayoutClickThrough { get; init; } = true; |
| | | public bool IsInteractable { get; init; } |
| | | public bool HasSessionInteractable { get; init; } |
| | | public DisplayLayer DisplayLayer { get; init; } = DisplayLayer.Desktop; |
| | | } |
| | | |
| | | public sealed record WidgetLayoutPatch |
| | |
| | | public double? Opacity { get; init; } |
| | | public bool? ClickThrough { get; init; } |
| | | public double? Scale { get; init; } |
| | | public DisplayLayer? DisplayLayer { get; init; } |
| | | } |