2022-10-11 08:34:13 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2023-12-11 09:08:03 +00:00
|
|
|
/**
|
|
|
|
* @file
|
2024-01-15 15:09:12 +00:00
|
|
|
* @kit IMEKit
|
2023-12-11 09:08:03 +00:00
|
|
|
*/
|
|
|
|
|
2022-12-13 03:16:15 +00:00
|
|
|
import Want from './@ohos.app.ability.Want';
|
2023-03-30 09:12:47 +00:00
|
|
|
import type InputMethodExtensionContext from './@ohos.InputMethodExtensionContext';
|
2022-10-11 08:34:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The extension ability class of input method.
|
|
|
|
*
|
|
|
|
* @syscap SystemCapability.MiscServices.InputMethodFramework
|
2023-02-10 09:27:45 +00:00
|
|
|
* @StageModelOnly
|
2023-03-21 02:40:46 +00:00
|
|
|
* @since 9
|
2022-10-11 08:34:13 +00:00
|
|
|
*/
|
2022-10-21 07:44:09 +00:00
|
|
|
export default class InputMethodExtensionAbility {
|
2023-03-21 02:40:46 +00:00
|
|
|
/**
|
|
|
|
* Indicates input method extension ability context.
|
|
|
|
*
|
2024-07-07 02:35:27 +00:00
|
|
|
* @type { InputMethodExtensionContext }
|
2023-03-21 02:40:46 +00:00
|
|
|
* @syscap SystemCapability.MiscServices.InputMethodFramework
|
|
|
|
* @StageModelOnly
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
context: InputMethodExtensionContext;
|
2022-10-11 08:34:13 +00:00
|
|
|
|
2023-03-21 02:40:46 +00:00
|
|
|
/**
|
|
|
|
* Called back when a input method extension is started for initialization.
|
|
|
|
*
|
2023-03-29 06:10:00 +00:00
|
|
|
* @param { Want } want - Indicates the want of created service extension.
|
2023-03-21 02:40:46 +00:00
|
|
|
* @syscap SystemCapability.MiscServices.InputMethodFramework
|
|
|
|
* @StageModelOnly
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
onCreate(want: Want): void;
|
2022-10-11 08:34:13 +00:00
|
|
|
|
2023-03-21 02:40:46 +00:00
|
|
|
/**
|
|
|
|
* Called back before a input method extension is destroyed.
|
|
|
|
*
|
|
|
|
* @syscap SystemCapability.MiscServices.InputMethodFramework
|
|
|
|
* @StageModelOnly
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
onDestroy(): void;
|
|
|
|
}
|