diff --git a/bundle.json b/bundle.json index 48bcdb06..b312cdf6 100644 --- a/bundle.json +++ b/bundle.json @@ -84,6 +84,7 @@ "header": { "header_files": [ "window.h", + "window_accessibility_controller.h", "window_manager.h", "window_option.h", "window_scene.h", diff --git a/interfaces/innerkits/wm/window_accessibility_controller.h b/interfaces/innerkits/wm/window_accessibility_controller.h new file mode 100644 index 00000000..a0b77715 --- /dev/null +++ b/interfaces/innerkits/wm/window_accessibility_controller.h @@ -0,0 +1,34 @@ +/* + * 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. + */ + +#ifndef OHOS_ROSEN_WINDOW_ACCESSIBILITY_CONTROLLER_H +#define OHOS_ROSEN_WINDOW_ACCESSIBILITY_CONTROLLER_H + +#include +#include "wm_single_instance.h" + +namespace OHOS::Rosen { +class WindowAccessibilityController { +WM_DECLARE_SINGLE_INSTANCE_BASE(WindowAccessibilityController); +public: + void SetAnchorAndScale(int32_t x, int32_t y, float scale); + void SetAnchorOffset(int32_t deltaX, int32_t deltaY); + void OffWindowZoom(); +private: + WindowAccessibilityController(); + ~WindowAccessibilityController() = default; +}; +} // namespace OHOS::Rosen +#endif // OHOS_ROSEN_WINDOW_ACCESSIBILITY_CONTROLLER_H \ No newline at end of file diff --git a/wm/BUILD.gn b/wm/BUILD.gn index 4d7ba260..229ace6c 100644 --- a/wm/BUILD.gn +++ b/wm/BUILD.gn @@ -42,6 +42,7 @@ ohos_shared_library("libwm") { "src/static_call.cpp", "src/vsync_station.cpp", "src/window.cpp", + "src/window_accessibility_controller.cpp", "src/window_adapter.cpp", "src/window_agent.cpp", "src/window_impl.cpp", diff --git a/wm/src/window_accessibility_controller.cpp b/wm/src/window_accessibility_controller.cpp new file mode 100644 index 00000000..8e5ca3c4 --- /dev/null +++ b/wm/src/window_accessibility_controller.cpp @@ -0,0 +1,35 @@ +/* + * 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. + */ + +#include "window_accessibility_controller.h" + +namespace OHOS::Rosen { +WM_IMPLEMENT_SINGLE_INSTANCE(WindowAccessibilityController) +WindowAccessibilityController::WindowAccessibilityController() +{ +} + +void WindowAccessibilityController::SetAnchorAndScale(int32_t x, int32_t y, float scale) +{ +} + +void WindowAccessibilityController::SetAnchorOffset(int32_t deltaX, int32_t deltaY) +{ +} + +void WindowAccessibilityController::OffWindowZoom() +{ +} +} // namespace OHOS::Rosen \ No newline at end of file