appium-novawindows2-driver 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +557 -557
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +3 -4
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/app.d.ts.map +1 -1
  7. package/build/lib/commands/app.js +53 -45
  8. package/build/lib/commands/app.js.map +1 -1
  9. package/build/lib/commands/device.d.ts.map +1 -1
  10. package/build/lib/commands/device.js +2 -0
  11. package/build/lib/commands/device.js.map +1 -1
  12. package/build/lib/commands/element.d.ts.map +1 -1
  13. package/build/lib/commands/element.js +42 -12
  14. package/build/lib/commands/element.js.map +1 -1
  15. package/build/lib/commands/extension.d.ts.map +1 -1
  16. package/build/lib/commands/extension.js +29 -17
  17. package/build/lib/commands/extension.js.map +1 -1
  18. package/build/lib/commands/file.d.ts +5 -0
  19. package/build/lib/commands/file.d.ts.map +1 -0
  20. package/build/lib/commands/file.js +49 -0
  21. package/build/lib/commands/file.js.map +1 -0
  22. package/build/lib/commands/functions.d.ts.map +1 -1
  23. package/build/lib/commands/functions.js +189 -187
  24. package/build/lib/commands/functions.js.map +1 -1
  25. package/build/lib/commands/index.d.ts +3 -0
  26. package/build/lib/commands/index.d.ts.map +1 -1
  27. package/build/lib/commands/index.js +2 -0
  28. package/build/lib/commands/index.js.map +1 -1
  29. package/build/lib/commands/powershell.d.ts.map +1 -1
  30. package/build/lib/commands/powershell.js +114 -68
  31. package/build/lib/commands/powershell.js.map +1 -1
  32. package/build/lib/constraints.d.ts +18 -0
  33. package/build/lib/constraints.d.ts.map +1 -1
  34. package/build/lib/constraints.js +18 -0
  35. package/build/lib/constraints.js.map +1 -1
  36. package/build/lib/driver.d.ts.map +1 -1
  37. package/build/lib/driver.js +35 -4
  38. package/build/lib/driver.js.map +1 -1
  39. package/build/lib/powershell/converter.d.ts.map +1 -1
  40. package/build/lib/powershell/converter.js +12 -0
  41. package/build/lib/powershell/converter.js.map +1 -1
  42. package/build/lib/powershell/elements.d.ts.map +1 -1
  43. package/build/lib/powershell/elements.js +270 -265
  44. package/build/lib/powershell/elements.js.map +1 -1
  45. package/build/lib/winapi/user32.js.map +1 -1
  46. package/build/lib/xpath/core.d.ts +2 -2
  47. package/build/lib/xpath/core.d.ts.map +1 -1
  48. package/build/lib/xpath/core.js +32 -26
  49. package/build/lib/xpath/core.js.map +1 -1
  50. package/build/lib/xpath/functions.d.ts +1 -1
  51. package/build/lib/xpath/functions.d.ts.map +1 -1
  52. package/build/lib/xpath/functions.js +2 -2
  53. package/build/lib/xpath/functions.js.map +1 -1
  54. package/build/tsconfig.tsbuildinfo +1 -0
  55. package/package.json +67 -62
  56. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -97
  57. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
  58. package/.github/PULL_REQUEST_TEMPLATE.md +0 -28
  59. package/.github/workflows/lint-build.yml +0 -30
  60. package/.github/workflows/release.yml +0 -39
  61. package/.releaserc +0 -41
  62. package/CHANGELOG.md +0 -33
  63. package/eslint.config.mjs +0 -11
  64. package/examples/api_test.js +0 -69
  65. package/examples/concurrency_test.js +0 -82
  66. package/examples/debug_test.js +0 -36
  67. package/examples/stress_test.js +0 -94
  68. package/examples/verify_driver.js +0 -142
  69. package/lib/commands/actions.ts +0 -229
  70. package/lib/commands/app.ts +0 -227
  71. package/lib/commands/device.ts +0 -41
  72. package/lib/commands/element.ts +0 -242
  73. package/lib/commands/extension.ts +0 -640
  74. package/lib/commands/functions.ts +0 -192
  75. package/lib/commands/index.ts +0 -28
  76. package/lib/commands/powershell.ts +0 -256
  77. package/lib/commands/system.ts +0 -7
  78. package/lib/constants.ts +0 -1
  79. package/lib/constraints.ts +0 -43
  80. package/lib/driver.ts +0 -266
  81. package/lib/enums.ts +0 -96
  82. package/lib/powershell/common.ts +0 -137
  83. package/lib/powershell/conditions.ts +0 -169
  84. package/lib/powershell/converter.ts +0 -373
  85. package/lib/powershell/core.ts +0 -29
  86. package/lib/powershell/elements.ts +0 -584
  87. package/lib/powershell/index.ts +0 -7
  88. package/lib/powershell/regex.ts +0 -77
  89. package/lib/powershell/types.ts +0 -208
  90. package/lib/util.ts +0 -52
  91. package/lib/winapi/types/index.ts +0 -7
  92. package/lib/winapi/types/input.ts +0 -12
  93. package/lib/winapi/types/keyeventf.ts +0 -14
  94. package/lib/winapi/types/mouseeventf.ts +0 -37
  95. package/lib/winapi/types/scancode.ts +0 -96
  96. package/lib/winapi/types/systemmetric.ts +0 -215
  97. package/lib/winapi/types/virtualkey.ts +0 -354
  98. package/lib/winapi/types/xmousebutton.ts +0 -8
  99. package/lib/winapi/user32.ts +0 -842
  100. package/lib/xpath/core.ts +0 -699
  101. package/lib/xpath/functions.ts +0 -366
  102. package/lib/xpath/index.ts +0 -2
  103. package/tsconfig.json +0 -13
@@ -1,208 +0,0 @@
1
- import { Enum } from '../enums';
2
-
3
- export const CultureInfoProperty = Object.freeze({
4
- CULTURE: 'culture',
5
- } as const);
6
-
7
- export const AutomationHeadingLevelProperty = Object.freeze({
8
- HEADING_LEVEL: 'headinglevel',
9
- } as const);
10
-
11
- export const PointProperty = Object.freeze({
12
- CLICKABLE_POINT: 'clickablepoint',
13
- } as const);
14
-
15
- export const ControlTypeProperty = Object.freeze({
16
- CONTROL_TYPE: 'controltype',
17
- } as const);
18
-
19
- export const AutomationElementProperty = Object.freeze({
20
- LABELED_BY: 'labeledby',
21
- } as const);
22
-
23
- export const OrientationTypeProperty = Object.freeze({
24
- ORIENTATION: 'orientation',
25
- } as const);
26
-
27
- export const RectProperty = Object.freeze({
28
- BOUNDING_RECTANGLE: 'boundingrectangle',
29
- });
30
-
31
- export const Int32ArrayProperty = Object.freeze({
32
- RUNTIME_ID: 'runtimeid',
33
- });
34
-
35
- export const Int32Property = Object.freeze({
36
- SIZE_OF_SET: 'sizeofset',
37
- POSITION_IN_SET: 'positioninset',
38
- PROCESS_ID: 'processid',
39
- NATIVE_WINDOW_HANDLE: 'nativewindowhandle',
40
- } as const);
41
-
42
- export const StringProperty = Object.freeze({
43
- AUTOMATION_ID: 'automationid',
44
- ITEM_TYPE: 'itemtype',
45
- LOCALIZED_CONTROL_TYPE: 'localizedcontroltype',
46
- NAME: 'name',
47
- ACCELERATOR_KEY: 'acceleratorkey',
48
- ACCESS_KEY: 'accesskey',
49
- CLASS_NAME: 'classname',
50
- HELP_TEXT: 'helptext',
51
- FRAMEWORK_ID: 'frameworkid',
52
- ITEM_STATUS: 'itemstatus',
53
- } as const);
54
-
55
- export const BooleanProperty = Object.freeze({
56
- HAS_KEYBOARD_FOCUS: 'haskeyboardfocus',
57
- IS_OFFSCREEN: 'isoffscreen',
58
- IS_DIALOG: 'isdialog',
59
- IS_CONTROL_ELEMENT: 'iscontrolelement',
60
- IS_CONTENT_ELEMENT: 'iscontentelement',
61
- IS_PASSWORD: 'ispassword',
62
- IS_KEYBOARD_FOCUSABLE: 'iskeyboardfocusable',
63
- IS_ENABLED: 'isenabled',
64
- IS_REQUIRED_FOR_FORM: 'isrequiredforform',
65
- IS_DOCK_PATTERN_AVAILABLE: 'isdockpatternavailable',
66
- IS_EXPAND_COLLAPSE_PATTERN_AVAILABLE: 'isexpandcollapsepatternavailable',
67
- IS_GRID_ITEM_PATTERN_AVAILABLE: 'isgriditempatternavailable',
68
- IS_GRID_PATTERN_AVAILABLE: 'isgridpatternavailable',
69
- IS_INVOKE_PATTERN_AVAILABLE: 'isinvokepatternavailable',
70
- IS_MULTIPLE_VIEW_PATTERN_AVAILABLE: 'ismultipleviewpatternavailable',
71
- IS_RANGE_VALUE_PATTERN_AVAILABLE: 'israngevaluepatternavailable',
72
- IS_SELECTION_ITEM_PATTERN_AVAILABLE: 'isselectionitempatternavailable',
73
- IS_SELECTION_PATTERN_AVAILABLE: 'isselectionpatternavailable',
74
- IS_SCROLL_PATTERN_AVAILABLE: 'isscrollpatternavailable',
75
- IS_SYNCHRONIZED_INPUT_PATTERN_AVAILABLE: 'issynchronizedinputpatternavailable',
76
- IS_SCROLL_ITEM_PATTERN_AVAILABLE: 'isscrollitempatternavailable',
77
- IS_VIRTUALIZED_ITEM_PATTERN_AVAILABLE: 'isvirtualizeditempatternavailable',
78
- IS_ITEM_CONTAINER_PATTERN_AVAILABLE: 'isitemcontainerpatternavailable',
79
- IS_TABLE_PATTERN_AVAILABLE: 'istablepatternavailable',
80
- IS_TABLE_ITEM_PATTERN_AVAILABLE: 'istableitempatternavailable',
81
- IS_TEXT_PATTERN_AVAILABLE: 'istextpatternavailable',
82
- IS_TOGGLE_PATTERN_AVAILABLE: 'istogglepatternavailable',
83
- IS_TRANSFORM_PATTERN_AVAILABLE: 'istransformpatternavailable',
84
- IS_VALUE_PATTERN_AVAILABLE: 'isvaluepatternavailable',
85
- IS_WINDOW_PATTERN_AVAILABLE: 'iswindowpatternavailable',
86
- } as const);
87
-
88
- export const Property = Object.freeze(Object.assign({},
89
- CultureInfoProperty,
90
- AutomationHeadingLevelProperty,
91
- PointProperty,
92
- ControlTypeProperty,
93
- AutomationElementProperty,
94
- OrientationTypeProperty,
95
- RectProperty,
96
- Int32Property,
97
- Int32ArrayProperty,
98
- StringProperty,
99
- BooleanProperty,
100
- )) as typeof CultureInfoProperty
101
- & typeof AutomationHeadingLevelProperty
102
- & typeof PointProperty
103
- & typeof ControlTypeProperty
104
- & typeof AutomationElementProperty
105
- & typeof OrientationTypeProperty
106
- & typeof RectProperty
107
- & typeof Int32Property
108
- & typeof Int32ArrayProperty
109
- & typeof StringProperty
110
- & typeof BooleanProperty;
111
-
112
- export type CultureInfoProperty = Enum<typeof CultureInfoProperty>;
113
- export type AutomationHeadingLevelProperty = Enum<typeof AutomationHeadingLevelProperty>;
114
- export type PointProperty = Enum<typeof PointProperty>;
115
- export type ControlTypeProperty = Enum<typeof ControlTypeProperty>;
116
- export type AutomationElementProperty = Enum<typeof AutomationElementProperty>;
117
- export type OrientationTypeProperty = Enum<typeof OrientationTypeProperty>;
118
- export type RectProperty = Enum<typeof RectProperty>;
119
- export type Int32ArrayProperty = Enum<typeof Int32ArrayProperty>;
120
- export type Int32Property = Enum<typeof Int32Property>;
121
- export type StringProperty = Enum<typeof StringProperty>;
122
- export type BooleanProperty = Enum<typeof BooleanProperty>;
123
-
124
- export type Property = CultureInfoProperty
125
- | AutomationHeadingLevelProperty
126
- | PointProperty
127
- | ControlTypeProperty
128
- | AutomationElementProperty
129
- | OrientationTypeProperty
130
- | RectProperty
131
- | Int32Property
132
- | Int32ArrayProperty
133
- | StringProperty
134
- | BooleanProperty;
135
-
136
- export const OrientationType = Object.freeze({
137
- NONE: 'none',
138
- HORIZONTAL: 'horizontal',
139
- VERTICAL: 'vertical',
140
- } as const);
141
-
142
- export type OrientationType = Enum<typeof OrientationType>;
143
-
144
- export const AutomationHeadingLevel = Object.freeze({
145
- NONE: 'none',
146
- LEVEL1: 'level1',
147
- LEVEL2: 'level2',
148
- LEVEL3: 'level3',
149
- LEVEL4: 'level4',
150
- LEVEL5: 'level5',
151
- LEVEL6: 'level6',
152
- LEVEL7: 'level7',
153
- LEVEL8: 'level8',
154
- LEVEL9: 'level9',
155
- } as const);
156
-
157
- export type AutomationHeadingLevel = Enum<typeof AutomationHeadingLevel>;
158
-
159
- export const ControlType = Object.freeze({
160
- BUTTON: 'button',
161
- CALENDAR: 'calendar',
162
- CHECK_BOX: 'checkbox',
163
- COMBO_BOX: 'combobox',
164
- EDIT: 'edit',
165
- HYPERLINK: 'hyperlink',
166
- IMAGE: 'image',
167
- LIST_ITEM: 'listitem',
168
- LIST: 'list',
169
- MENU: 'menu',
170
- MENU_BAR: 'menubar',
171
- MENU_ITEM: 'menuitem',
172
- PROGRESS_BAR: 'progressbar',
173
- RADIO_BUTTON: 'radiobutton',
174
- SCROLL_BAR: 'scrollbar',
175
- SLIDER: 'slider',
176
- SPINNER: 'spinner',
177
- STATUS_BAR: 'statusbar',
178
- TAB: 'tab',
179
- TAB_ITEM: 'tabitem',
180
- TEXT: 'text',
181
- TOOL_BAR: 'toolbar',
182
- TOOL_TIP: 'tooltip',
183
- TREE: 'tree',
184
- TREE_ITEM: 'treeitem',
185
- CUSTOM: 'custom',
186
- GROUP: 'group',
187
- THUMB: 'thumb',
188
- DATA_GRID: 'datagrid',
189
- DATA_ITEM: 'dataitem',
190
- DOCUMENT: 'document',
191
- SPLIT_BUTTON: 'splitbutton',
192
- WINDOW: 'window',
193
- PANE: 'pane',
194
- HEADER: 'header',
195
- HEADER_ITEM: 'headeritem',
196
- TABLE: 'table',
197
- TITLE_BAR: 'titlebar',
198
- SEPARATOR: 'separator',
199
- } as const);
200
-
201
- export type ControlType = Enum<typeof ControlType>;
202
-
203
- export const ExtraControlType = Object.freeze({
204
- SEMANTIC_ZOOM: 'semanticzoom',
205
- APP_BAR: 'appbar',
206
- } as const);
207
-
208
- export type ExtraControlType = Enum<typeof ExtraControlType>;
package/lib/util.ts DELETED
@@ -1,52 +0,0 @@
1
- import { errors } from '@appium/base-driver';
2
-
3
- const SupportedEasingFunctions = Object.freeze([
4
- 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out',
5
- ]);
6
-
7
- export function assertSupportedEasingFunction(value: string) {
8
- const cubicBezierRegex = /^cubic-bezier\(\s*(0|1|0?\.\d+|\d+(\.\d+)?)\s*,\s*(-?0|-?1|-?0?\.\d+|-?\d+(\.\d+)?)\s*,\s*(0|1|0?\.\d+|\d+(\.\d+)?)\s*,\s*(-?0|-?1|-?0?\.\d+|-?\d+(\.\d+)?)\s*\)$/;
9
- if (!SupportedEasingFunctions.includes(value) && !cubicBezierRegex.test(value)) {
10
- throw new errors.InvalidArgumentError(`Unsupported or invalid easing function '${value}' in appium:smoothPointerMove capability.`
11
- + `Supported functions are [${SupportedEasingFunctions.join[', ']}, cubic-bezier(x1,y1,x2,y2)].`);
12
- }
13
- }
14
-
15
- export function sleep(ms: number): Promise<void> {
16
- return new Promise((resolve) => setTimeout(resolve, Math.max(ms, 0)));
17
- }
18
-
19
- export function $(literals: TemplateStringsArray, ...substitutions: number[]) {
20
- substitutions.forEach((index) => {
21
- if (!Number.isInteger(index) && index < 0) {
22
- throw new errors.InvalidArgumentError(`Indices must be positive integers starting from 0. Received: ${index}`);
23
- }
24
- });
25
-
26
- return new DeferredStringTemplate(literals, substitutions);
27
- }
28
-
29
- export class DeferredStringTemplate {
30
- private literals: TemplateStringsArray;
31
- private substitutions: number[];
32
-
33
- constructor(literals: TemplateStringsArray, substitutions: number[]) {
34
- this.literals = literals;
35
- this.substitutions = substitutions;
36
-
37
- substitutions.forEach((index) => {
38
- if (!Number.isInteger(index) || index < 0) {
39
- throw new errors.InvalidArgumentError(`Indices must be positive integers starting from 0. Received: ${index}`);
40
- }
41
- });
42
- }
43
-
44
- format(...args: any[]): string {
45
- const out: string[] = [];
46
- for (let i = 0, k = 0; i < this.literals.length; i++, k++) {
47
- out[k] = this.literals[i];
48
- out[++k] = args[this.substitutions[i]]?.toString();
49
- }
50
- return out.join('');
51
- }
52
- }
@@ -1,7 +0,0 @@
1
- export * from './virtualkey';
2
- export * from './scancode';
3
- export * from './keyeventf';
4
- export * from './mouseeventf';
5
- export * from './input';
6
- export * from './systemmetric';
7
- export * from './xmousebutton';
@@ -1,12 +0,0 @@
1
- import { Enum } from '../../enums';
2
-
3
- export const InputType = Object.freeze({
4
- /** The event is a mouse event. Use the mi structure of the union. */
5
- INPUT_MOUSE: 0,
6
- /** The event is a keyboard event. Use the ki structure of the union. */
7
- INPUT_KEYBOARD: 1,
8
- /** The event is a hardware event. Use the hi structure of the union. */
9
- INPUT_HARDWARE: 2,
10
- } as const);
11
-
12
- export type InputType = Enum<typeof InputType>;
@@ -1,14 +0,0 @@
1
- import { FlagsEnum } from '../../enums';
2
-
3
- export const KeyEventFlags = Object.freeze({
4
- /** If specified, the wScan scan code consists of a sequence of two bytes, where the first byte has a value of 0xE0. See Extended-Key Flag for more info. */
5
- KEYEVENTF_EXTENDEDKEY: 0x0001,
6
- /** If specified, the key is being released. If not specified, the key is being pressed. */
7
- KEYEVENTF_KEYUP: 0x0002,
8
- /** If specified, wScan identifies the key and wVk is ignored. */
9
- KEYEVENTF_SCANCODE: 0x0008,
10
- /** If specified, the system synthesizes a VK_PACKET keystroke. The wVk parameter must be zero. This flag can only be combined with the KEYEVENTF_KEYUP flag. For more information, see the Remarks section. */
11
- KEYEVENTF_UNICODE: 0x0004,
12
- } as const);
13
-
14
- export type KeyEventFlags = FlagsEnum<typeof KeyEventFlags>;
@@ -1,37 +0,0 @@
1
- // import { FlagsEnum } from './enums';
2
-
3
- export const MouseEventFlags = Object.freeze({
4
- /** Movement occurred. */
5
- MOUSEEVENTF_MOVE: 0x0001,
6
- /** The left button was pressed. */
7
- MOUSEEVENTF_LEFTDOWN: 0x0002,
8
- /** The left button was released. */
9
- MOUSEEVENTF_LEFTUP: 0x0004,
10
- /** The right button was pressed. */
11
- MOUSEEVENTF_RIGHTDOWN: 0x0008,
12
- /** The right button was released. */
13
- MOUSEEVENTF_RIGHTUP: 0x0010,
14
- /** The middle button was pressed. */
15
- MOUSEEVENTF_MIDDLEDOWN: 0x0020,
16
- /** The middle button was released. */
17
- MOUSEEVENTF_MIDDLEUP: 0x0040,
18
- /** An X button was pressed. */
19
- MOUSEEVENTF_XDOWN: 0x0080,
20
- /** An X button was released. */
21
- MOUSEEVENTF_XUP: 0x0100,
22
- /** The wheel was moved, if the mouse has a wheel. The amount of movement is specified in mouseData. */
23
- MOUSEEVENTF_WHEEL: 0x0800,
24
- /** The wheel was moved horizontally, if the mouse has a wheel. The amount of movement is specified in mouseData.
25
- Windows XP/2000: This value is not supported. */
26
- MOUSEEVENTF_HWHEEL: 0x1000,
27
- /** The WM_MOUSEMOVE messages will not be coalesced. The default behavior is to coalesce WM_MOUSEMOVE messages.
28
- Windows XP/2000: This value is not supported. */
29
- MOUSEEVENTF_MOVE_NOCOALESCE: 0x2000,
30
- /** Maps coordinates to the entire desktop. Must be used with MOUSEEVENTF_ABSOLUTE.*/
31
- MOUSEEVENTF_VIRTUALDESK: 0x4000,
32
- /** The dx and dy members contain normalized absolute coordinates. If the flag is not set, dxand dy contain relative data (the change in position since the last reported position). This flag can be set, or not set, regardless of what kind of mouse or other pointing device, if any, is connected to the system. For further information about relative mouse motion, see the following Remarks section. */
33
- MOUSEEVENTF_ABSOLUTE: 0x8000,
34
- } as const);
35
-
36
- export type MouseEventFlags = number; // FlagsEnum<typeof MouseEventFlags> produces a tuple type that is too large to represent
37
-
@@ -1,96 +0,0 @@
1
- import { Enum } from '../../enums';
2
-
3
- export const ScanCode = Object.freeze({
4
- Esc: 0x01,
5
- N1: 0x02,
6
- N2: 0x03,
7
- N3: 0x04,
8
- N4: 0x05,
9
- N5: 0x06,
10
- N6: 0x07,
11
- N7: 0x08,
12
- N8: 0x09,
13
- N9: 0x0A,
14
- N0: 0x0B,
15
- MINUS: 0x0C,
16
- EQUAL: 0x0D,
17
- BACKSPACE: 0x0E,
18
- TAB: 0x0F,
19
- Q: 0x10,
20
- W: 0x11,
21
- E: 0x12,
22
- R: 0x13,
23
- T: 0x14,
24
- Y: 0x15,
25
- U: 0x16,
26
- I: 0x17,
27
- O: 0x18,
28
- P: 0x19,
29
- OPEN_BRACKETS: 0x1A,
30
- CLOSE_BRACKETS: 0x1B,
31
- ENTER: 0x1C,
32
- LCTRL: 0x1D,
33
- A: 0x1E,
34
- S: 0x1F,
35
- D: 0x20,
36
- F: 0x21,
37
- G: 0x22,
38
- H: 0x23,
39
- J: 0x24,
40
- K: 0x25,
41
- L: 0x26,
42
- SEMICOLON: 0x27,
43
- APOSTROPHE: 0x28,
44
- BACKTICK: 0x29,
45
- LSHIFT: 0x2A,
46
- BACKSLASH: 0x2B,
47
- Z: 0x2C,
48
- X: 0x2D,
49
- C: 0x2E,
50
- V: 0x2F,
51
- B: 0x30,
52
- N: 0x31,
53
- M: 0x32,
54
- COMMA: 0x33,
55
- PERIOD: 0x34,
56
- SLASH: 0x35,
57
- RSHIFT: 0x36,
58
- KEYPAD_ASTERISK: 0x37,
59
- LALT: 0x38,
60
- SPACE: 0x39,
61
- CAPS_LOCK: 0x3A,
62
- F1: 0x3B,
63
- F2: 0x3C,
64
- F3: 0x3D,
65
- F4: 0x3E,
66
- F5: 0x3F,
67
- F6: 0x40,
68
- F7: 0x41,
69
- F8: 0x42,
70
- F9: 0x43,
71
- F10: 0x44,
72
- NUM_LOCK: 0x45,
73
- SCROLL_LOCK: 0x46,
74
- KEYPAD7_HOME: 0x47,
75
- KEYPAD8_UP: 0x48,
76
- KEYPAD9_PG_UP: 0x49,
77
- KEYPAD_MINUS: 0x4A,
78
- KEYPAD4_LEFT: 0x4B,
79
- KEYPAD5: 0x4C,
80
- KEYPAD6_RIGHT: 0x4D,
81
- KEYPAD_PLUS: 0x4E,
82
- KEYPAD1_END: 0x4F,
83
- KEYPAD2_DOWN: 0x50,
84
- KEYPAD3_PG_DN: 0x51,
85
- KEYPAD0_INS: 0x52,
86
- KEYPAD_PERIOD_DEL: 0x53,
87
- FN: 0x56,
88
- F11: 0x57,
89
- F12: 0x58,
90
- ESCAPE_CODE: 0xE0,
91
- LWIN: 0x5B,
92
- RWIN: 0x5C,
93
- MENU: 0x5D,
94
- } as const);
95
-
96
- export type ScanCode = Enum<typeof ScanCode>;
@@ -1,215 +0,0 @@
1
- import { Enum } from '../../enums';
2
-
3
- export const SystemMetric = Object.freeze({
4
- /** The flags that specify how the system arranged minimized windows. For more information, see the Remarks section in this topic. */
5
- SM_ARRANGE: 56,
6
- /** The value that specifies how the system is started:
7
- 0 Normal boot
8
- 1 Fail-safe boot
9
- 2 Fail-safe with network boot
10
- A fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses the user startup files. */
11
- SM_CLEANBOOT: 67,
12
- /** The number of display monitors on a desktop. For more information, see the Remarks section in this topic. */
13
- SM_CMONITORS: 80,
14
- /** The number of buttons on a mouse, or zero if no mouse is installed. */
15
- SM_CMOUSEBUTTONS: 43,
16
- /** Reflects the state of the laptop or slate mode, 0 for Slate Mode and non-zero otherwise. When this system metric changes, the system sends a broadcast message via WM_SETTINGCHANGE with "ConvertibleSlateMode" in the LPARAM. Note that this system metric doesn't apply to desktop PCs. In that case, use GetAutoRotationState. */
17
- SM_CONVERTIBLESLATEMODE: 0x2003,
18
- /** The width of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D look. */
19
- SM_CXBORDER: 5,
20
- /** The nominal width of a cursor, in pixels. */
21
- SM_CXCURSOR: 13,
22
- /** This value is the same as SM_CXFIXEDFRAME. */
23
- SM_CXDLGFRAME: 7,
24
- /** The width of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must occur within the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a double-click. The two clicks must also occur within a specified time.
25
- To set the width of the double-click rectangle, call SystemParametersInfo with SPI_SETDOUBLECLKWIDTH. */
26
- SM_CXDOUBLECLK: 36,
27
- /** The number of pixels on either side of a mouse-down point that the mouse pointer can move before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value is negative, it is subtracted from the left of the mouse-down point and added to the right of it. */
28
- SM_CXDRAG: 68,
29
- /** The width of a 3-D border, in pixels. This metric is the 3-D counterpart of SM_CXBORDER. */
30
- SM_CXEDGE: 45,
31
- /** The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border.
32
- This value is the same as SM_CXDLGFRAME. */
33
- SM_CXFIXEDFRAME: 7,
34
- /** The width of the left and right edges of the focus rectangle that the DrawFocusRect draws. This value is in pixels.
35
- Windows 2000: This value is not supported. */
36
- SM_CXFOCUSBORDER: 83,
37
- /** This value is the same as SM_CXSIZEFRAME. */
38
- SM_CXFRAME: 32,
39
- /** The width of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the portion of the screen that is not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value. */
40
- SM_CXFULLSCREEN: 16,
41
- /** The width of the arrow bitmap on a horizontal scroll bar, in pixels. */
42
- SM_CXHSCROLL: 21,
43
- /** The width of the thumb box in a horizontal scroll bar, in pixels. */
44
- SM_CXHTHUMB: 10,
45
- /** The system large width of an icon, in pixels. The LoadIcon function can load only icons with the dimensions that SM_CXICON and SM_CYICON specifies. See Icon Sizes for more info. */
46
- SM_CXICON: 11,
47
- /** The width of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CXICON. */
48
- SM_CXICONSPACING: 38,
49
- /** The default width, in pixels, of a maximized top-level window on the primary display monitor. */
50
- SM_CXMAXIMIZED: 61,
51
- /** The default maximum width of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. */
52
- SM_CXMAXTRACK: 59,
53
- /** The width of the default menu check-mark bitmap, in pixels. */
54
- SM_CXMENUCHECK: 71,
55
- /** The width of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels. */
56
- SM_CXMENUSIZE: 54,
57
- /** The minimum width of a window, in pixels. */
58
- SM_CXMIN: 28,
59
- /** The width of a minimized window, in pixels. */
60
- SM_CXMINIMIZED: 57,
61
- /** The width of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. This value is always greater than or equal to SM_CXMINIMIZED. */
62
- SM_CXMINSPACING: 47,
63
- /** The minimum tracking width of a window, in pixels. The user cannot drag the window frame to a size smaller than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. */
64
- SM_CXMINTRACK: 34,
65
- /** The amount of border padding for captioned windows, in pixels.
66
- Windows XP/2000: This value is not supported. */
67
- SM_CXPADDEDBORDER: 92,
68
- /** The width of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, HORZRES). */
69
- SM_CXSCREEN: 0,
70
- /** The width of a button in a window caption or title bar, in pixels. */
71
- SM_CXSIZE: 30,
72
- /** The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.
73
- This value is the same as SM_CXFRAME. */
74
- SM_CXSIZEFRAME: 32,
75
- /** The system small width of an icon, in pixels. Small icons typically appear in window captions and in small icon view. See Icon Sizes for more info. */
76
- SM_CXSMICON: 49,
77
- /** The width of small caption buttons, in pixels. */
78
- SM_CXSMSIZE: 52,
79
- /** The width of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN metric is the coordinates for the left side of the virtual screen. */
80
- SM_CXVIRTUALSCREEN: 78,
81
- /** The width of a vertical scroll bar, in pixels. */
82
- SM_CXVSCROLL: 2,
83
- /** The height of a window border, in pixels. This is equivalent to the SM_CYEDGE value for windows with the 3-D look. */
84
- SM_CYBORDER: 6,
85
- /** The height of a caption area, in pixels. */
86
- SM_CYCAPTION: 4,
87
- /** The nominal height of a cursor, in pixels. */
88
- SM_CYCURSOR: 14,
89
- /** This value is the same as SM_CYFIXEDFRAME. */
90
- SM_CYDLGFRAME: 8,
91
- /** The height of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must occur within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a double-click. The two clicks must also occur within a specified time.
92
- To set the height of the double-click rectangle, call SystemParametersInfo with SPI_SETDOUBLECLKHEIGHT. */
93
- SM_CYDOUBLECLK: 37,
94
- /** The number of pixels above and below a mouse-down point that the mouse pointer can move before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value is negative, it is subtracted from above the mouse-down point and added below it. */
95
- SM_CYDRAG: 69,
96
- /** The height of a 3-D border, in pixels. This is the 3-D counterpart of SM_CYBORDER. */
97
- SM_CYEDGE: 46,
98
- /** The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border.
99
- This value is the same as SM_CYDLGFRAME. */
100
- SM_CYFIXEDFRAME: 8,
101
- /** The height of the top and bottom edges of the focus rectangle drawn by DrawFocusRect. This value is in pixels.
102
- Windows 2000: This value is not supported. */
103
- SM_CYFOCUSBORDER: 84,
104
- /** This value is the same as SM_CYSIZEFRAME. */
105
- SM_CYFRAME: 33,
106
- /** The height of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value. */
107
- SM_CYFULLSCREEN: 17,
108
- /** The height of a horizontal scroll bar, in pixels. */
109
- SM_CYHSCROLL: 3,
110
- /** The system large height of an icon, in pixels. The LoadIcon function can load only icons with the dimensions that SM_CXICON and SM_CYICON specifies. See Icon Sizes for more info. */
111
- SM_CYICON: 12,
112
- /** The height of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CYICON. */
113
- SM_CYICONSPACING: 39,
114
- /** For double byte character set versions of the system, this is the height of the Kanji window at the bottom of the screen, in pixels. */
115
- SM_CYKANJIWINDOW: 18,
116
- /** The default height, in pixels, of a maximized top-level window on the primary display monitor. */
117
- SM_CYMAXIMIZED: 62,
118
- /** The default maximum height of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. */
119
- SM_CYMAXTRACK: 60,
120
- /** The height of a single-line menu bar, in pixels. */
121
- SM_CYMENU: 15,
122
- /** The height of the default menu check-mark bitmap, in pixels. */
123
- SM_CYMENUCHECK: 72,
124
- /** The height of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels. */
125
- SM_CYMENUSIZE: 55,
126
- /** The minimum height of a window, in pixels. */
127
- SM_CYMIN: 29,
128
- /** The height of a minimized window, in pixels. */
129
- SM_CYMINIMIZED: 58,
130
- /** The height of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. This value is always greater than or equal to SM_CYMINIMIZED. */
131
- SM_CYMINSPACING: 48,
132
- /** The minimum tracking height of a window, in pixels. The user cannot drag the window frame to a size smaller than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message. */
133
- SM_CYMINTRACK: 35,
134
- /** The height of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES). */
135
- SM_CYSCREEN: 1,
136
- /** The height of a button in a window caption or title bar, in pixels. */
137
- SM_CYSIZE: 31,
138
- /** The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.
139
- This value is the same as SM_CYFRAME. */
140
- SM_CYSIZEFRAME: 33,
141
- /** The height of a small caption, in pixels. */
142
- SM_CYSMCAPTION: 51,
143
- /** The system small height of an icon, in pixels. Small icons typically appear in window captions and in small icon view. See Icon Sizes for more info. */
144
- SM_CYSMICON: 50,
145
- /** The height of small caption buttons, in pixels. */
146
- SM_CYSMSIZE: 53,
147
- /** The height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The SM_YVIRTUALSCREEN metric is the coordinates for the top of the virtual screen. */
148
- SM_CYVIRTUALSCREEN: 79,
149
- /** The height of the arrow bitmap on a vertical scroll bar, in pixels. */
150
- SM_CYVSCROLL: 20,
151
- /** The height of the thumb box in a vertical scroll bar, in pixels. */
152
- SM_CYVTHUMB: 9,
153
- /** Nonzero if User32.dll supports DBCS; otherwise, 0. */
154
- SM_DBCSENABLED: 42,
155
- /** Nonzero if the debug version of User.exe is installed; otherwise, 0. */
156
- SM_DEBUG: 22,
157
- /** Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; otherwise, 0. The return value is a bitmask that specifies the type of digitizer input supported by the device. For more information, see Remarks.
158
- Windows Server 2008, Windows Vista and Windows XP/2000: This value is not supported. */
159
- SM_DIGITIZER: 94,
160
- /** Nonzero if Input Method Manager/Input Method Editor features are enabled; otherwise, 0.
161
- SM_IMMENABLED indicates whether the system is ready to use a Unicode-based IME on a Unicode application. To ensure that a language-dependent IME works, check SM_DBCSENABLED and the system ANSI code page. Otherwise the ANSI-to-Unicode conversion may not be performed correctly, or some components like fonts or registry settings may not be present. */
162
- SM_IMMENABLED: 82,
163
- /** Nonzero if there are digitizers in the system; otherwise, 0.
164
- SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum number of contacts supported by every digitizer in the system. If the system has only single-touch digitizers, the return value is 1. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can provide.
165
- Windows Server 2008, Windows Vista and Windows XP/2000: This value is not supported. */
166
- SM_MAXIMUMTOUCHES: 95,
167
- /** Nonzero if the current operating system is the Windows XP, Media Center Edition, 0 if not. */
168
- SM_MEDIACENTER: 87,
169
- /** Nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; 0 if the menus are left-aligned. */
170
- SM_MENUDROPALIGNMENT: 40,
171
- /** Nonzero if the system is enabled for Hebrew and Arabic languages, 0 if not. */
172
- SM_MIDEASTENABLED: 74,
173
- /** Nonzero if a mouse is installed; otherwise, 0. This value is rarely zero, because of support for virtual mice and because some systems detect the presence of the port instead of the presence of a mouse. */
174
- SM_MOUSEPRESENT: 19,
175
- /** Nonzero if a mouse with a horizontal scroll wheel is installed; otherwise 0. */
176
- SM_MOUSEHORIZONTALWHEELPRESENT: 91,
177
- /** Nonzero if a mouse with a vertical scroll wheel is installed; otherwise 0. */
178
- SM_MOUSEWHEELPRESENT: 75,
179
- /** The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use. */
180
- SM_NETWORK: 63,
181
- /** Nonzero if the Microsoft Windows for Pen computing extensions are installed; zero otherwise. */
182
- SM_PENWINDOWS: 41,
183
- /** This system metric is used in a Terminal Services environment to determine if the current Terminal Server session is being remotely controlled. Its value is nonzero if the current session is remotely controlled; otherwise, 0.
184
- You can use terminal services management tools such as Terminal Services Manager (tsadmin.msc) and shadow.exe to control a remote session. When a session is being remotely controlled, another user can view the contents of that session and potentially interact with it. */
185
- SM_REMOTECONTROL: 0x2001,
186
- /** This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services client session, the return value is nonzero. If the calling process is associated with the Terminal Services console session, the return value is 0. Windows Server 2003 and Windows XP: The console session is not necessarily the physical console. For more information, see WTSGetActiveConsoleSessionId. */
187
- SM_REMOTESESSION: 0x1000,
188
- /** Nonzero if all the display monitors have the same color format, otherwise, 0. Two displays can have the same bit depth, but different color formats. For example, the red, green, and blue pixels can be encoded with different numbers of bits, or those bits can be located in different places in a pixel color value. */
189
- SM_SAMEDISPLAYFORMAT: 81,
190
- /** This system metric should be ignored; it always returns 0. */
191
- SM_SECURE: 44,
192
- /** The build number if the system is Windows Server 2003 R2; otherwise, 0. */
193
- SM_SERVERR2: 89,
194
- /** Nonzero if the user requires an application to present information visually in situations where it would otherwise present the information only in audible form; otherwise, 0. */
195
- SM_SHOWSOUNDS: 70,
196
- /** Nonzero if the current session is shutting down; otherwise, 0.
197
- Windows 2000: This value is not supported. */
198
- SM_SHUTTINGDOWN: 0x2000,
199
- /** Nonzero if the computer has a low-end (slow) processor; otherwise, 0. */
200
- SM_SLOWMACHINE: 73,
201
- /** Nonzero if the current operating system is Windows 7 Starter Edition, Windows Vista Starter, or Windows XP Starter Edition; otherwise, 0. */
202
- SM_STARTER: 88,
203
- /** Nonzero if the meanings of the left and right mouse buttons are swapped; otherwise, 0. */
204
- SM_SWAPBUTTON: 23,
205
- /** Reflects the state of the docking mode, 0 for Undocked Mode and non-zero otherwise. When this system metric changes, the system sends a broadcast message via WM_SETTINGCHANGE with "SystemDockMode" in the LPARAM. */
206
- SM_SYSTEMDOCKED: 0x2004,
207
- /** Nonzero if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows Vista or Windows 7 and the Tablet PC Input service is started; otherwise, 0. The SM_DIGITIZER setting indicates the type of digitizer input supported by a device running Windows 7 or Windows Server 2008 R2. For more information, see Remarks. */
208
- SM_TABLETPC: 86,
209
- /** The coordinates for the left side of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CXVIRTUALSCREEN metric is the width of the virtual screen. */
210
- SM_XVIRTUALSCREEN: 76,
211
- /** The coordinates for the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CYVIRTUALSCREEN metric is the height of the virtual screen. */
212
- SM_YVIRTUALSCREEN: 77,
213
- });
214
-
215
- export type SystemMetric = Enum<typeof SystemMetric>;