From a448b4deabb1e6cda01b084b954b35011493234c Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Fri, 4 Jul 2025 14:57:59 +0800 Subject: [PATCH] add AutoFillPopupConfig Signed-off-by: zhangzezhong --- frameworks/ets/ets/BUILD.gn | 34 ++++++++++++++ .../ets/application/AutoFillPopupConfig.ets | 47 +++++++++++++++++++ .../ets/ets/application/AutoFillRect.ets | 28 +++++++++++ 3 files changed, 109 insertions(+) create mode 100644 frameworks/ets/ets/application/AutoFillPopupConfig.ets create mode 100644 frameworks/ets/ets/application/AutoFillRect.ets diff --git a/frameworks/ets/ets/BUILD.gn b/frameworks/ets/ets/BUILD.gn index ae9a2fc41a8..e62197487d0 100644 --- a/frameworks/ets/ets/BUILD.gn +++ b/frameworks/ets/ets/BUILD.gn @@ -498,6 +498,38 @@ ohos_prebuilt_etc("ability_runtime_app_state_data_abc_etc") { deps = [ ":ability_runtime_app_state_data_abc" ] } +generate_static_abc("ability_runtime_auto_fill_popup_config_abc") { + base_url = "./" + files = [ "./application/AutoFillPopupConfig.ets" ] + + is_boot_abc = "True" + device_dst_file = "/system/framework/ability_runtime_auto_fill_popup_config_abc.abc" +} + +ohos_prebuilt_etc("ability_runtime_auto_fill_popup_config_abc_etc") { + source = "$target_out_dir/ability_runtime_auto_fill_popup_config_abc.abc" + module_install_dir = "framework" + subsystem_name = "ability" + part_name = "ability_runtime" + deps = [ ":ability_runtime_auto_fill_popup_config_abc" ] +} + +generate_static_abc("ability_runtime_auto_fill_rect_abc") { + base_url = "./" + files = [ "./application/AutoFillRect.ets" ] + + is_boot_abc = "True" + device_dst_file = "/system/framework/ability_runtime_auto_fill_rect_abc.abc" +} + +ohos_prebuilt_etc("ability_runtime_auto_fill_rect_abc_etc") { + source = "$target_out_dir/ability_runtime_auto_fill_rect_abc.abc" + module_install_dir = "framework" + subsystem_name = "ability" + part_name = "ability_runtime" + deps = [ ":ability_runtime_auto_fill_rect_abc" ] +} + generate_static_abc("ability_runtime_process_data_abc") { base_url = "./" files = [ "./application/ProcessData.ets" ] @@ -821,6 +853,8 @@ group("ets_packages") { ":ability_runtime_ability_utils_abc_etc", ":ability_runtime_app_manager_abc_etc", ":ability_runtime_app_state_data_abc_etc", + ":ability_runtime_auto_fill_popup_config_abc_etc", + ":ability_runtime_auto_fill_rect_abc_etc", ":ability_runtime_application_context_abc_etc", ":ability_runtime_base_context_abc_etc", ":ability_runtime_configuration_abc_etc", diff --git a/frameworks/ets/ets/application/AutoFillPopupConfig.ets b/frameworks/ets/ets/application/AutoFillPopupConfig.ets new file mode 100644 index 00000000000..27611c0a5c3 --- /dev/null +++ b/frameworks/ets/ets/application/AutoFillPopupConfig.ets @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 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. + */ + +export default interface AutoFillPopupConfig { + popupSize?: PopupSize; + placement?: PopupPlacement; +} +export interface PopupSize { + width: number; + height: number; +} +export enum PopupPlacement { + LEFT = 0, + RIGHT = 1, + TOP = 2, + BOTTOM = 3, + TOP_LEFT = 4, + TOP_RIGHT = 5, + BOTTOM_LEFT = 6, + BOTTOM_RIGHT = 7, + LEFT_TOP = 8, + LEFT_BOTTOM = 9, + RIGHT_TOP = 10, + RIGHT_BOTTOM = 11, + NONE = 12 +} + +class AutoFillPopupConfigImpl implements AutoFillPopupConfig { + popupSize?: PopupSize; + placement?: PopupPlacement; +} +class PopupSizeImpl implements PopupSize { + width: number; + height: number; +} diff --git a/frameworks/ets/ets/application/AutoFillRect.ets b/frameworks/ets/ets/application/AutoFillRect.ets new file mode 100644 index 00000000000..c29f7bedfdb --- /dev/null +++ b/frameworks/ets/ets/application/AutoFillRect.ets @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025 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. + */ + +export default interface AutoFillRect { + left: number; + top: number; + width: number; + height: number; +} + +class AutoFillRectImpl implements AutoFillRect { + left: number; + top: number; + width: number; + height: number; +} \ No newline at end of file -- Gitee