mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-31 02:08:08 +01:00
This makes it possible for encoders to output better representation of the actual objects instead of working with chopped up segments. * IAnsiConsole.Write now takes an IRenderable instead of segments * Calculating cell width does no longer require a render context * Removed RenderContext.LegacyConsole * Removed RenderContext.Encoding * Added Capabilities.Unicode
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using Spectre.Console.Rendering;
|
|
|
|
namespace Spectre.Console
|
|
{
|
|
/// <summary>
|
|
/// Represents a console.
|
|
/// </summary>
|
|
public interface IAnsiConsole
|
|
{
|
|
/// <summary>
|
|
/// Gets the console profile.
|
|
/// </summary>
|
|
Profile Profile { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the console cursor.
|
|
/// </summary>
|
|
IAnsiConsoleCursor Cursor { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the console input.
|
|
/// </summary>
|
|
IAnsiConsoleInput Input { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the exclusivity mode.
|
|
/// </summary>
|
|
IExclusivityMode ExclusivityMode { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the render pipeline.
|
|
/// </summary>
|
|
RenderPipeline Pipeline { get; }
|
|
|
|
/// <summary>
|
|
/// Clears the console.
|
|
/// </summary>
|
|
/// <param name="home">If the cursor should be moved to the home position.</param>
|
|
void Clear(bool home);
|
|
|
|
/// <summary>
|
|
/// Writes a <see cref="IRenderable"/> to the console.
|
|
/// </summary>
|
|
/// <param name="renderable">The <see cref="IRenderable"/> to write.</param>
|
|
void Write(IRenderable renderable);
|
|
}
|
|
}
|