Application.Driver.cs 1.9 KB

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