Vixen
02b45cc4
csharp
public interface IPlatformSupplement

What one operating system knows that a portable platform implementation does not.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Vixen.Platform.Desktop covers Windows, Linux and macOS through SDL, and SDL genuinely covers most of it. What it cannot cover is the part where the three operating systems have nothing in common: a file picker, an image on the clipboard, a thread pinned to a core, how hot the machine is. Those live in Vixen.Platform.Windows, .Linux and .MacOS, and this is how they get in — the portable implementation builds the services it can, hands them over, and uses what comes back.

Augmenting, not replacing. A supplement is expected to keep most of what it is given: macOS can answer Thermal and has no better answer than SDL's for BatteryLevel, so the sensible macOS implementation wraps the baseline rather than reimplementing it. That is also why Augment returns the capabilities: a supplement that supplies pickers has earned NativeDialogs for the platform that hosts it, and nothing else is in a position to decide that.

Threading. Constructed and disposed on the thread that owns the platform. The services it returns follow whatever their own contracts say, which for the clipboard and the dialogs is that same thread.

Fields and properties (1)

  • string Name

    A name for logs and crash reports: "Windows", "macOS".

Methods (1)

Used by (8)

  • DesktopPlatformVixen.Platform.Desktop
  • DesktopPlatformOptionsVixen.Platform.Desktop
  • DesktopSupplementTestsVixen.Platform.Desktop.Tests
  • DesktopSupplementsVixen.Platform.Desktop
  • LinuxPlatformSupplementVixen.Platform.Linux
  • MacOSPlatformSupplementVixen.Platform.MacOS
  • RecordingSupplementVixen.Platform.Desktop.Tests
  • WindowsPlatformSupplementVixen.Platform.Windows