easysql/node_modules/monaco-editor/esm/vs/base/common/ime.js
2025-12-29 18:35:04 +08:00

34 lines
910 B
JavaScript

import { Emitter } from './event.js';
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
class IMEImpl {
constructor() {
this._onDidChange = new Emitter();
this.onDidChange = this._onDidChange.event;
this._enabled = true;
}
get enabled() {
return this._enabled;
}
/**
* Enable IME
*/
enable() {
this._enabled = true;
this._onDidChange.fire();
}
/**
* Disable IME
*/
disable() {
this._enabled = false;
this._onDidChange.fire();
}
}
const IME = new IMEImpl();
export { IME, IMEImpl };