Application.Driver.cs 1.4 KB

1234567891011121314151617181920212223242526272829
  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. /// <summary>
  9. /// Gets or sets whether <see cref="Application.Driver"/> will be forced to output only the 16 colors defined in
  10. /// <see cref="ColorName16"/>. The default is <see langword="false"/>, meaning 24-bit (TrueColor) colors will be output
  11. /// as long as the selected <see cref="ConsoleDriver"/> supports TrueColor.
  12. /// </summary>
  13. [SerializableConfigurationProperty (Scope = typeof (SettingsScope))]
  14. public static bool Force16Colors { get; set; }
  15. /// <summary>
  16. /// Forces the use of the specified driver (one of "fake", "ansi", "curses", "net", or "windows"). If not
  17. /// specified, the driver is selected based on the platform.
  18. /// </summary>
  19. /// <remarks>
  20. /// Note, <see cref="Application.Init(ConsoleDriver, string)"/> will override this configuration setting if called
  21. /// with either `driver` or `driverName` specified.
  22. /// </remarks>
  23. [SerializableConfigurationProperty (Scope = typeof (SettingsScope))]
  24. public static string ForceDriver { get; set; } = string.Empty;
  25. }