2020-12-11 22:34:21 +01:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
import "EnumEntry.idl";
|
|
|
|
import "MainPage.idl";
|
2021-07-09 22:43:58 +02:00
|
|
|
import "Appearances.idl";
|
2020-12-11 22:34:21 +01:00
|
|
|
|
|
|
|
#include "ViewModelHelpers.idl.h"
|
|
|
|
|
2021-02-20 00:50:52 +01:00
|
|
|
#define OBSERVABLE_PROJECTED_PROFILE_SETTING(Type, Name) \
|
|
|
|
OBSERVABLE_PROJECTED_SETTING(Type, Name); \
|
2021-04-09 00:46:16 +02:00
|
|
|
Object Name##OverrideSource { get; }
|
2021-02-20 00:50:52 +01:00
|
|
|
|
2020-12-11 22:34:21 +01:00
|
|
|
namespace Microsoft.Terminal.Settings.Editor
|
|
|
|
{
|
|
|
|
runtimeclass ProfileViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
|
|
|
{
|
2021-03-08 17:45:12 +01:00
|
|
|
Windows.Foundation.Collections.IObservableVector<Font> CompleteFontList { get; };
|
|
|
|
Windows.Foundation.Collections.IObservableVector<Font> MonospaceFontList { get; };
|
2021-05-17 04:26:47 +02:00
|
|
|
Microsoft.Terminal.Settings.Model.TerminalSettings TermSettings { get; };
|
2021-03-08 17:45:12 +01:00
|
|
|
|
2021-08-04 00:25:23 +02:00
|
|
|
void SetAcrylicOpacityPercentageValue(Double value);
|
|
|
|
void SetPadding(Double value);
|
|
|
|
|
2020-12-18 00:14:07 +01:00
|
|
|
Boolean CanDeleteProfile { get; };
|
|
|
|
Boolean IsBaseLayer;
|
2021-01-23 00:46:41 +01:00
|
|
|
Boolean UseParentProcessDirectory;
|
|
|
|
Boolean UseCustomStartingDirectory { get; };
|
2021-07-09 22:43:58 +02:00
|
|
|
AppearanceViewModel DefaultAppearance { get; };
|
2021-05-21 19:34:25 +02:00
|
|
|
Guid OriginalProfileGuid { get; };
|
2021-07-14 01:33:22 +02:00
|
|
|
Boolean HasUnfocusedAppearance { get; };
|
|
|
|
Boolean EditableUnfocusedAppearance { get; };
|
|
|
|
Boolean ShowUnfocusedAppearance { get; };
|
|
|
|
AppearanceViewModel UnfocusedAppearance { get; };
|
|
|
|
|
|
|
|
void CreateUnfocusedAppearance(Windows.Foundation.Collections.IMapView<String, Microsoft.Terminal.Settings.Model.ColorScheme> Schemes, IHostedInWindow WindowRoot);
|
|
|
|
void DeleteUnfocusedAppearance();
|
2020-12-18 00:14:07 +01:00
|
|
|
|
2021-02-20 00:50:52 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Name);
|
|
|
|
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Guid, Guid);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Source);
|
|
|
|
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Guid, ConnectionType);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, Hidden);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Icon);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.CloseOnExitMode, CloseOnExit);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, TabTitle);
|
Introduce MS.Term.Core.Color to replace W.U.Color for Core/Control/TSM (#9658)
This pull request introduces Microsoft.Terminal.Core.Color as an
alternative to both Windows.UI.Color and uint32_t/COLORREF in the
TerminalCore, ...Control, ...SettingsModel and ...SettingsEditor layers.
M.T.C.Color is trivially convertible to/from til::color and therefore
to/from COLORREF, W.U.Color, and any other color representation we might
need².
I've replaced almost every use of W.U.Color and uint32_t-as-color in the
above layers, with minor exception¹.
The need for this work is twofold.
First: We cannot bear a dependency from TerminalCore (which should,
on paper, be Windows 7 compatible) on Windows.UI or any other WinRT
namespace.
This work removes one big dependency on Windows.UI, but it does not go
all the way.
Second: TerminalCore chose to communicate mostly in packed uint32s
(COLORREF), which was inherently lossy and dangerous.
¹ The UI layers (TerminalControl, TerminalApp) still use
Windows.UI.Color as they are intimately connected to the UWP XAML UI.
² In the future, we might even be able to *use* the alpha channel...
## PR Checklist
* [x] I ran into the need for this when I introduced cursor inversion
* [X] Fixes a longstanding itch
## Validation Steps Performed
Built and ran all tests for the impacted layers, even the local ones!
2021-03-30 22:15:49 +02:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, TabColor);
|
2021-02-20 00:50:52 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, SuppressApplicationTitle);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, UseAcrylic);
|
2021-09-20 19:08:13 +02:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Double, Opacity);
|
2021-03-17 21:47:24 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Control.ScrollbarState, ScrollState);
|
2021-02-20 00:50:52 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Padding);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, Commandline);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(String, StartingDirectory);
|
2021-03-17 21:47:24 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Control.TextAntialiasingMode, AntialiasingMode);
|
2021-02-20 00:50:52 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, ForceFullRepaintRendering);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, SoftwareRendering);
|
Introduce MS.Term.Core.Color to replace W.U.Color for Core/Control/TSM (#9658)
This pull request introduces Microsoft.Terminal.Core.Color as an
alternative to both Windows.UI.Color and uint32_t/COLORREF in the
TerminalCore, ...Control, ...SettingsModel and ...SettingsEditor layers.
M.T.C.Color is trivially convertible to/from til::color and therefore
to/from COLORREF, W.U.Color, and any other color representation we might
need².
I've replaced almost every use of W.U.Color and uint32_t-as-color in the
above layers, with minor exception¹.
The need for this work is twofold.
First: We cannot bear a dependency from TerminalCore (which should,
on paper, be Windows 7 compatible) on Windows.UI or any other WinRT
namespace.
This work removes one big dependency on Windows.UI, but it does not go
all the way.
Second: TerminalCore chose to communicate mostly in packed uint32s
(COLORREF), which was inherently lossy and dangerous.
¹ The UI layers (TerminalControl, TerminalApp) still use
Windows.UI.Color as they are intimately connected to the UWP XAML UI.
² In the future, we might even be able to *use* the alpha channel...
## PR Checklist
* [x] I ran into the need for this when I introduced cursor inversion
* [X] Fixes a longstanding itch
## Validation Steps Performed
Built and ran all tests for the impacted layers, even the local ones!
2021-03-30 22:15:49 +02:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, Foreground);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, Background);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, SelectionBackground);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, CursorColor);
|
2021-02-20 00:50:52 +01:00
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Int32, HistorySize);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, SnapOnInput);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Boolean, AltGrAliasing);
|
|
|
|
OBSERVABLE_PROJECTED_PROFILE_SETTING(Microsoft.Terminal.Settings.Model.BellStyle, BellStyle);
|
2020-12-11 22:34:21 +01:00
|
|
|
}
|
|
|
|
|
2020-12-18 00:14:07 +01:00
|
|
|
runtimeclass DeleteProfileEventArgs
|
|
|
|
{
|
|
|
|
Guid ProfileGuid { get; };
|
|
|
|
}
|
|
|
|
|
2021-03-08 17:45:12 +01:00
|
|
|
enum ProfilesPivots
|
|
|
|
{
|
2021-01-26 00:06:33 +01:00
|
|
|
General = 0,
|
|
|
|
Appearance = 1,
|
|
|
|
Advanced = 2
|
|
|
|
};
|
|
|
|
|
2020-12-11 22:34:21 +01:00
|
|
|
runtimeclass ProfilePageNavigationState
|
|
|
|
{
|
|
|
|
IHostedInWindow WindowRoot; // necessary to send the right HWND into the file picker dialogs.
|
|
|
|
|
2021-01-26 00:06:33 +01:00
|
|
|
ProfileViewModel Profile;
|
|
|
|
ProfilesPivots LastActivePivot;
|
2020-12-18 00:14:07 +01:00
|
|
|
|
2021-07-14 01:33:22 +02:00
|
|
|
void CreateUnfocusedAppearance();
|
|
|
|
void DeleteUnfocusedAppearance();
|
|
|
|
|
2020-12-18 00:14:07 +01:00
|
|
|
event Windows.Foundation.TypedEventHandler<ProfilePageNavigationState, DeleteProfileEventArgs> DeleteProfile;
|
2020-12-11 22:34:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
[default_interface] runtimeclass Profiles : Windows.UI.Xaml.Controls.Page, Windows.UI.Xaml.Data.INotifyPropertyChanged
|
|
|
|
{
|
|
|
|
Profiles();
|
|
|
|
ProfilePageNavigationState State { get; };
|
|
|
|
|
2021-05-25 00:51:03 +02:00
|
|
|
Boolean IsBellStyleFlagSet(UInt32 flag);
|
|
|
|
void SetBellStyleAudible(Windows.Foundation.IReference<Boolean> on);
|
|
|
|
void SetBellStyleWindow(Windows.Foundation.IReference<Boolean> on);
|
|
|
|
void SetBellStyleTaskbar(Windows.Foundation.IReference<Boolean> on);
|
|
|
|
|
2020-12-11 22:34:21 +01:00
|
|
|
IInspectable CurrentAntiAliasingMode;
|
|
|
|
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> AntiAliasingModeList { get; };
|
|
|
|
|
|
|
|
IInspectable CurrentCloseOnExitMode;
|
|
|
|
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> CloseOnExitModeList { get; };
|
|
|
|
|
|
|
|
IInspectable CurrentScrollState;
|
|
|
|
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> ScrollStateList { get; };
|
2021-08-04 00:25:23 +02:00
|
|
|
|
2021-09-20 19:08:13 +02:00
|
|
|
Windows.UI.Xaml.Controls.Slider OpacitySlider { get; };
|
2020-12-11 22:34:21 +01:00
|
|
|
}
|
|
|
|
}
|