Application.Driver.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #nullable enable
  2. namespace Terminal.Gui;
  3. public static partial class Application // Driver abstractions
  4. {
  5. internal static bool _forceFakeConsole;
  6. /// <summary>Gets the <see cref="ConsoleDriver"/> that has been selected. See also <see cref="ForceDriver"/>.</summary>
  7. public static ConsoleDriver? Driver { get; internal set; }
  8. // BUGBUG: Force16Colors should be nullable.
  9. /// <summary>
  10. /// Gets or sets whether <see cref="Application.Driver"/> will be forced to output only the 16 colors defined in
  11. /// <see cref="ColorName16"/>. The default is <see langword="false"/>, meaning 24-bit (TrueColor) colors will be output
  12. /// as long as the selected <see cref="ConsoleDriver"/> supports TrueColor.
  13. /// </summary>
  14. [SerializableConfigurationProperty (Scope = typeof (SettingsScope))]
  15. public static bool Force16Colors { get; set; }
  16. // BUGBUG: ForceDriver should be nullable.
  17. /// <summary>
  18. /// Forces the use of the specified driver (one of "fake", "ansi", "curses", "net", or "windows"). If not
  19. /// specified, the driver is selected based on the platform.
  20. /// </summary>
  21. /// <remarks>
  22. /// Note, <see cref="Application.Init(ConsoleDriver, string)"/> will override this configuration setting if called
  23. /// with either `driver` or `driverName` specified.
  24. /// </remarks>
  25. [SerializableConfigurationProperty (Scope = typeof (SettingsScope))]
  26. public static string ForceDriver { get; set; } = string.Empty;
  27. /// <summary>
  28. /// Collection of sixel images to write out to screen when updating.
  29. /// Only add to this collection if you are sure terminal supports sixel format.
  30. /// </summary>
  31. public static List<SixelToRender> Sixel = new List<SixelToRender> ();
  32. }