-
Notifications
You must be signed in to change notification settings - Fork 8.5k
/
Copy pathCommand.idl
57 lines (41 loc) · 1.6 KB
/
Command.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "AllShortcutActions.h"
import "ActionArgs.idl";
import "Profile.idl";
import "ColorScheme.idl";
import "TerminalWarnings.idl";
namespace Microsoft.Terminal.Settings.Model
{
enum ShortcutAction
{
Invalid = 0, // treat Invalid as unbound actions
// When adding a new action, add them to AllShortcutActions.h!
#define ON_ALL_ACTIONS(action) action,
ALL_SHORTCUT_ACTIONS
INTERNAL_SHORTCUT_ACTIONS
#undef ON_ALL_ACTIONS
};
[default_interface] runtimeclass ActionAndArgs {
ActionAndArgs();
ActionAndArgs(ShortcutAction action, IActionArgs args);
static String Serialize(IVector<ActionAndArgs> args);
static IVector<ActionAndArgs> Deserialize(String content);
IActionArgs Args;
ShortcutAction Action;
String GenerateID();
};
[default_interface] runtimeclass Command : ISettingsModelObject
{
Command();
String Name { get; };
String ID { get; };
String Description { get; };
ActionAndArgs ActionAndArgs { get; };
String IconPath;
Boolean HasNestedCommands { get; };
Windows.Foundation.Collections.IMapView<String, Command> NestedCommands { get; };
static IVector<Command> ParsePowerShellMenuComplete(String json, Int32 replaceLength);
static IVector<Command> HistoryToCommands(IVector<String> commandHistory, String commandline, Boolean directories, String iconPath);
}
}