• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import {AsyncCallback} from './basic';
17import ExtensionContext from './application/ExtensionContext';
18
19/**
20 * The extension context class of input method.
21 *
22 * @since 9
23 * @syscap SystemCapability.MiscServices.InputMethodFramework
24 * @StageModelOnly
25 */
26export default class InputMethodExtensionContext extends ExtensionContext {
27    /**
28     * Destroy the input method extension.
29     *
30     * @since 9
31     * @syscap SystemCapability.MiscServices.InputMethodFramework
32     * @StageModelOnly
33     */
34    destroy(callback: AsyncCallback<void>): void;
35
36    /**
37     * Destroy the input method extension.
38     *
39     * @since 9
40     * @syscap SystemCapability.MiscServices.InputMethodFramework
41     * @returns { Promise<void> } the promise returned by the function.
42     * @StageModelOnly
43     */
44    destroy(): Promise<void>;
45}