Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/browser/controller/editContext/native/screenReaderUtils.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { IComputedEditorOptions } from '../../../../common/config/editorOptions.js';
7
import { Selection } from '../../../../common/core/selection.js';
8
9
export interface IScreenReaderContent {
10
11
dispose(): void;
12
13
/**
14
* Handle screen reader content before cutting the content
15
*/
16
onWillCut(): void;
17
18
/**
19
* Handle screen reader content before pasting the content
20
*/
21
onWillPaste(): void;
22
23
/**
24
* Handle focus changes
25
*/
26
onFocusChange(newFocusValue: boolean): void;
27
28
/**
29
* Handle configuration changes
30
*/
31
onConfigurationChanged(options: IComputedEditorOptions): void;
32
33
/**
34
* Update the screen reader content given the selection. It will update the content and set the range within the screen reader content if needed.
35
*/
36
updateScreenReaderContent(primarySelection: Selection): void;
37
38
/**
39
* Update the scroll top value of the screen reader content
40
*/
41
updateScrollTop(primarySelection: Selection): void;
42
}
43
44