2019-05-03 00:29:04 +02:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
import "IKeyBindings.idl";
|
2021-04-09 00:46:16 +02:00
|
|
|
import "IControlAppearance.idl";
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2021-03-17 21:47:24 +01:00
|
|
|
namespace Microsoft.Terminal.Control
|
2019-05-03 00:29:04 +02:00
|
|
|
{
|
|
|
|
enum ScrollbarState
|
|
|
|
{
|
|
|
|
Visible = 0,
|
|
|
|
Hidden
|
|
|
|
};
|
|
|
|
|
2020-02-25 23:19:57 +01:00
|
|
|
enum TextAntialiasingMode
|
|
|
|
{
|
|
|
|
Grayscale = 0,
|
|
|
|
Cleartype,
|
|
|
|
Aliased
|
|
|
|
};
|
|
|
|
|
2019-05-03 00:29:04 +02:00
|
|
|
// Class Description:
|
|
|
|
// TerminalSettings encapsulates all settings that control the
|
|
|
|
// TermControl's behavior. In these settings there is both the entirety
|
|
|
|
// of the Core ITerminalSettings interface, and any additional settings
|
|
|
|
// for specifically the control.
|
2021-09-23 21:45:54 +02:00
|
|
|
interface IControlSettings requires Microsoft.Terminal.Core.ICoreSettings,
|
|
|
|
Microsoft.Terminal.Control.IControlAppearance
|
2019-05-03 00:29:04 +02:00
|
|
|
{
|
2020-02-28 01:37:56 +01:00
|
|
|
String ProfileName;
|
2021-11-10 22:19:52 +01:00
|
|
|
String ProfileSource;
|
2020-02-28 01:37:56 +01:00
|
|
|
|
2021-09-23 21:45:54 +02:00
|
|
|
Boolean UseAcrylic { get; };
|
|
|
|
ScrollbarState ScrollState { get; };
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2021-11-16 13:22:35 +01:00
|
|
|
Boolean UseAtlasEngine { get; };
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2021-09-23 21:45:54 +02:00
|
|
|
String FontFace { get; };
|
|
|
|
Int32 FontSize { get; };
|
|
|
|
Windows.UI.Text.FontWeight FontWeight { get; };
|
|
|
|
String Padding { get; };
|
|
|
|
Windows.Foundation.Collections.IMap<String, UInt32> FontFeatures { get; };
|
|
|
|
Windows.Foundation.Collections.IMap<String, Single> FontAxes { get; };
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2021-09-23 21:45:54 +02:00
|
|
|
Microsoft.Terminal.Control.IKeyBindings KeyBindings { get; };
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2021-09-23 21:45:54 +02:00
|
|
|
Boolean CopyOnSelect { get; };
|
|
|
|
Boolean FocusFollowMouse { get; };
|
2020-03-25 22:09:49 +01:00
|
|
|
|
2021-09-23 21:45:54 +02:00
|
|
|
String Commandline { get; };
|
|
|
|
String StartingDirectory { get; };
|
|
|
|
String EnvironmentVariables { get; };
|
2019-05-03 00:29:04 +02:00
|
|
|
|
2021-09-23 21:45:54 +02:00
|
|
|
TextAntialiasingMode AntialiasingMode { get; };
|
2020-06-09 00:31:28 +02:00
|
|
|
|
Implement user-specified pixel shaders, redux (#8565)
Co-authored-by: mrange <marten_range@hotmail.com>
I loved the pixel shaders in #7058, but that PR needed a bit of polish
to be ready for ingestion. This PR is almost _exactly_ that PR, with
some small changes.
* It adds a new pre-profile setting `"experimental.pixelShaderPath"`,
which lets the user set a pixel shader to use with the Terminal.
- CHANGED FROM #7058: It does _not_ add any built-in shaders.
- CHANGED FROM #7058: it will _override_
`experimental.retroTerminalEffect`
* It adds a bunch of sample shaders in `samples/shaders`. Included:
- A NOP shader as a base to build from.
- An "invert" shader that inverts the colors, as a simple example
- An "grayscale" shader that converts all colors to grayscale, as a
simple example
- An "raster bars" shader that draws some colored bars on the screen
with a drop shadow, as a more involved example
- The original retro terminal effects, as a more involved example
- It also includes a broken shader, as an example of what heppens
when the shader fails to compile
- CHANGED FROM #7058: It does _not_ add the "retroII" shader we were
all worried about.
* When a shader fails to be found or fails to compile, we'll display an
error dialog to the user with a relevant error message.
- CHANGED FROM #7058: Originally, #7058 would display "error bars"
on the screen. I've removed that, and had the Terminal disable the
shader entirely then.
* Renames the `toggleRetroEffect` action to `toggleShaderEffect`.
(`toggleRetroEffect` is now an alias to `toggleShaderEffect`). This
action will turn the shader OR the retro effects on/off.
`toggleShaderEffect` works the way you'd expect it to, but the mental
math on _how_ is a little weird. The logic is basically:
```
useShader = shaderEffectsEnabled ?
(pixelShaderProvided ?
pixelShader :
(retroEffectEnabled ?
retroEffect : null
)
) :
null
```
and `toggleShaderEffect` toggles `shaderEffectsEnabled`.
* If you've got both a shader and retro enabled, `toggleShaderEffect`
will toggle between the shader on/off.
* If you've got a shader and retro disabled, `toggleShaderEffect` will
toggle between the shader on/off.
References #6191
References #7058
Closes #7013
Closes #3930 "Add setting to retro terminal shader to control blur
radius, color"
Closes #3929 "Add setting to retro terminal shader to enable drawing
scanlines"
- At this point, just roll your own version of the shader.
2020-12-15 21:40:22 +01:00
|
|
|
// Experimental Settings
|
2021-09-23 21:45:54 +02:00
|
|
|
Boolean ForceFullRepaintRendering { get; };
|
|
|
|
Boolean SoftwareRendering { get; };
|
2019-05-03 00:29:04 +02:00
|
|
|
};
|
|
|
|
}
|