terminal/src/cascadia/TerminalSettingsModel/Profile.idl
PankajBhojwani 227ec3777a
Add a setting to flash the pane when BEL is emitted (#9270)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
Adds a new bellStyle called `window`. When `window` is set and a BEL is emitted, we flash the pane that emitted it. 

Additionally, changes bellStyle in the SUI to a list of checkboxes instead of radio buttons, to match bellStyle being a flag-enum. Deprecates 'BellStyle::Visual' in the schema, but still allows it to be set in the json (it maps to `Window | Taskbar`)

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References
#6700 

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [ ] Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
GIF in Teams
2021-05-24 22:51:03 +00:00

87 lines
3 KiB
Plaintext

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "IAppearanceConfig.idl";
#include "IInheritable.idl.h"
#define INHERITABLE_PROFILE_SETTING(Type, Name) \
_BASE_INHERITABLE_SETTING(Type, Name); \
Microsoft.Terminal.Settings.Model.Profile Name##OverrideSource { get; }
namespace Microsoft.Terminal.Settings.Model
{
// This tag is used to identify the context in which the Profile was created
enum OriginTag
{
Custom = 0,
InBox,
Generated,
Fragment,
ProfilesDefaults
};
enum CloseOnExitMode
{
Never = 0,
Graceful,
Always
};
[flags]
enum BellStyle
{
// !! If you update this, you must update the values in TerminalSettingsEditor/Profiles.xaml
Audible = 0x1,
Window = 0x2,
Taskbar = 0x4,
All = 0xffffffff
};
[default_interface] runtimeclass Profile : Windows.Foundation.IStringable {
Profile();
Profile(Guid guid);
OriginTag Origin { get; };
INHERITABLE_PROFILE_SETTING(String, Name);
Boolean HasGuid();
Guid Guid;
INHERITABLE_PROFILE_SETTING(String, Source);
Boolean HasConnectionType();
Guid ConnectionType;
INHERITABLE_PROFILE_SETTING(Boolean, Hidden);
INHERITABLE_PROFILE_SETTING(String, Icon);
INHERITABLE_PROFILE_SETTING(CloseOnExitMode, CloseOnExit);
INHERITABLE_PROFILE_SETTING(String, TabTitle);
INHERITABLE_PROFILE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, TabColor);
INHERITABLE_PROFILE_SETTING(Boolean, SuppressApplicationTitle);
INHERITABLE_PROFILE_SETTING(Boolean, UseAcrylic);
INHERITABLE_PROFILE_SETTING(Double, AcrylicOpacity);
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.Control.ScrollbarState, ScrollState);
INHERITABLE_PROFILE_SETTING(String, FontFace);
INHERITABLE_PROFILE_SETTING(Int32, FontSize);
INHERITABLE_PROFILE_SETTING(Windows.UI.Text.FontWeight, FontWeight);
INHERITABLE_PROFILE_SETTING(String, Padding);
INHERITABLE_PROFILE_SETTING(String, Commandline);
INHERITABLE_PROFILE_SETTING(String, StartingDirectory);
String EvaluatedStartingDirectory { get; };
IAppearanceConfig DefaultAppearance { get; };
INHERITABLE_PROFILE_SETTING(IAppearanceConfig, UnfocusedAppearance);
INHERITABLE_PROFILE_SETTING(Microsoft.Terminal.Control.TextAntialiasingMode, AntialiasingMode);
INHERITABLE_PROFILE_SETTING(Boolean, ForceFullRepaintRendering);
INHERITABLE_PROFILE_SETTING(Boolean, SoftwareRendering);
INHERITABLE_PROFILE_SETTING(Int32, HistorySize);
INHERITABLE_PROFILE_SETTING(Boolean, SnapOnInput);
INHERITABLE_PROFILE_SETTING(Boolean, AltGrAliasing);
INHERITABLE_PROFILE_SETTING(BellStyle, BellStyle);
}
}