1/* 2 * Copyright (c) 2023 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 16/** 17 * @file 18 * @kit IMEKit 19 */ 20 21/** 22 * Panel information. 23 * 24 * @typedef PanelInfo 25 * @syscap SystemCapability.MiscServices.InputMethodFramework 26 * @since 11 27 */ 28export interface PanelInfo { 29 /** 30 * Panel type. 31 * 32 * @type { PanelType } 33 * @syscap SystemCapability.MiscServices.InputMethodFramework 34 * @since 11 35 */ 36 type: PanelType; 37 38 /** 39 * <p>Flag of Panel.</p> 40 * <p>Currently only using for SOFT_KEYBOARD panel.</p> 41 * 42 * @type { ?PanelFlag } 43 * @default FLG_FIXED 44 * @syscap SystemCapability.MiscServices.InputMethodFramework 45 * @since 11 46 */ 47 flag?: PanelFlag; 48} 49 50/** 51 * Enumerates the flags of panel. 52 * 53 * @enum { number } 54 * @syscap SystemCapability.MiscServices.InputMethodFramework 55 * @since 11 56 */ 57export enum PanelFlag { 58 /** 59 * Fixed style. 60 * <p>It's provided for the panel with type of SOFT_KEYBOARD. 61 * When the flag is set, the soft keyboard is fixed at the bottom of the screen.</p> 62 * 63 * @syscap SystemCapability.MiscServices.InputMethodFramework 64 * @since 11 65 */ 66 FLAG_FIXED = 0, 67 68 /** 69 * Floating style. 70 * <p>It's provided for the panel with type of SOFT_KEYBOARD. 71 * When the flag is set, the soft keyboard is floating.</p> 72 * 73 * @syscap SystemCapability.MiscServices.InputMethodFramework 74 * @since 11 75 */ 76 FLAG_FLOATING, 77 78 /** 79 * Candidate style. 80 * <p>It's provided for the panel with type of SOFT_KEYBOARD. 81 * When the flag is set, the soft keyboard is a candidate window which will show the possible characters when user types a input code. 82 * Panel with candidate style will not be automatically shown or hidden by input method service. 83 * Input method application developers are supposed to control the panel status on their own.</p> 84 * 85 * @syscap SystemCapability.MiscServices.InputMethodFramework 86 * @since 11 87 */ 88 FLAG_CANDIDATE 89} 90 91/** 92 * Enumerates the types of panel. 93 * 94 * @enum { number } 95 * @syscap SystemCapability.MiscServices.InputMethodFramework 96 * @since 11 97 */ 98export enum PanelType { 99 /** 100 * Panel for displaying a virtual soft keyboard. 101 * 102 * @syscap SystemCapability.MiscServices.InputMethodFramework 103 * @since 11 104 */ 105 SOFT_KEYBOARD = 0, 106 107 /** 108 * Panel for displaying status bar. 109 * 110 * @syscap SystemCapability.MiscServices.InputMethodFramework 111 * @since 11 112 */ 113 STATUS_BAR 114} 115