1/* 2 * Copyright (c) 2025 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 BasicServicesKit 19 */ 20 21/** 22 * Defines information about the word selection panel. 23 * @typedef PanelInfo 24 * @syscap SystemCapability.SelectionInput.Selection 25 * @systemapi 26 * @since 20 27 */ 28 29export interface PanelInfo { 30 /** 31 * Type of the word selection panel. 32 * @type { PanelType } 33 * @default MENU_PANEL 34 * @syscap SystemCapability.SelectionInput.Selection 35 * @systemapi 36 * @since 20 37 */ 38 panelType: PanelType; 39 40 /** 41 * X-coordinate of the upper left corner of the word selection panel on the screen. 42 * @type { number } 43 * @syscap SystemCapability.SelectionInput.Selection 44 * @systemapi 45 * @since 20 46 */ 47 x: number; 48 49 /** 50 * Y-coordinate of the upper left corner of the word selection panel on the screen. 51 * @type { number } 52 * @syscap SystemCapability.SelectionInput.Selection 53 * @systemapi 54 * @since 20 55 */ 56 y: number; 57 58 /** 59 * Width of the word selection panel. 60 * @type { number } 61 * @syscap SystemCapability.SelectionInput.Selection 62 * @systemapi 63 * @since 20 64 */ 65 width: number; 66 67 /** 68 * Height of the word selection panel. 69 * @type { number } 70 * @syscap SystemCapability.SelectionInput.Selection 71 * @systemapi 72 * @since 20 73 */ 74 height: number; 75} 76 77/** 78 * Enumerates the types of the word selection panel. 79 * @enum { number } 80 * @syscap SystemCapability.SelectionInput.Selection 81 * @systemapi 82 * @since 20 83 */ 84 85export enum PanelType { 86 /** 87 * Menu panel. 88 * @syscap SystemCapability.SelectionInput.Selection 89 * @systemapi 90 * @since 20 91 */ 92 MENU_PANEL = 1, 93 94 /** 95 * Main panel. 96 * @syscap SystemCapability.SelectionInput.Selection 97 * @systemapi 98 * @since 20 99 */ 100 MAIN_PANEL = 2 101}