• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "accessible_ability_manager_service.h"
17 #include "accessibility_ut_helper.h"
18 #include "full_screen_magnification_manager.h"
19 
20 namespace OHOS {
21 namespace Accessibility {
22 
FullScreenMagnificationManager()23 FullScreenMagnificationManager::FullScreenMagnificationManager()
24 {
25 }
26 
EnableMagnification(int32_t centerX,int32_t centerY)27 void FullScreenMagnificationManager::EnableMagnification(int32_t centerX, int32_t centerY)
28 {
29     (void)centerX;
30     (void)centerY;
31     Accessibility::AccessibilityAbilityHelper::GetInstance().SetZoomState(true);
32 }
33 
ShowMagnification()34 void FullScreenMagnificationManager::ShowMagnification()
35 {
36     Accessibility::AccessibilityAbilityHelper::GetInstance().SetZoomState(true);
37 }
38 
ShowMagnificationWithPosition(PointerPos pos)39 void FullScreenMagnificationManager::ShowMagnificationWithPosition(PointerPos pos)
40 {
41     (void)pos;
42     Accessibility::AccessibilityAbilityHelper::GetInstance().SetZoomState(true);
43 }
44 
DisableMagnification(bool needClear)45 void FullScreenMagnificationManager::DisableMagnification(bool needClear)
46 {
47     (void)needClear;
48     Accessibility::AccessibilityAbilityHelper::GetInstance().SetZoomState(false);
49 }
50 
SetScale(float scaleSpan)51 void FullScreenMagnificationManager::SetScale(float scaleSpan)
52 {
53     (void)scaleSpan;
54 }
55 
MoveMagnification(int32_t deltaX,int32_t deltaY)56 void FullScreenMagnificationManager::MoveMagnification(int32_t deltaX, int32_t deltaY)
57 {
58     (void)deltaX;
59     (void)deltaY;
60 }
61 
PersistScale()62 void FullScreenMagnificationManager::PersistScale()
63 {
64 }
65 
RefreshWindowParam(RotationType type)66 void FullScreenMagnificationManager::RefreshWindowParam(RotationType type)
67 {
68     (void)type;
69 }
70 
ConvertCoordinates(int32_t posX,int32_t posY)71 PointerPos FullScreenMagnificationManager::ConvertCoordinates(int32_t posX, int32_t posY)
72 {
73     (void)posX;
74     (void)posY;
75     PointerPos pos = {0, 0};
76     return pos;
77 }
78 
ConvertGesture(uint32_t type,PointerPos coordinates)79 PointerPos FullScreenMagnificationManager::ConvertGesture(uint32_t type, PointerPos coordinates)
80 {
81     (void)type;
82     (void)coordinates;
83     PointerPos pos = {0, 0};
84     return pos;
85 }
86 
CheckTapOnHotArea(int32_t posX,int32_t posY)87 uint32_t FullScreenMagnificationManager::CheckTapOnHotArea(int32_t posX, int32_t posY)
88 {
89     (void)posX;
90     (void)posY;
91     return INVALID_GESTURE_TYPE;
92 }
93 
FollowFocuseElement(int32_t centerX,int32_t centerY)94 void FullScreenMagnificationManager::FollowFocuseElement(int32_t centerX, int32_t centerY)
95 {
96     (void)centerX;
97     (void)centerY;
98 }
99 
GetSourceCenter()100 PointerPos FullScreenMagnificationManager::GetSourceCenter()
101 {
102     PointerPos pos = {300, 400};
103     return pos;
104 }
105 
IsMagnificationWindowShow()106 bool FullScreenMagnificationManager::IsMagnificationWindowShow()
107 {
108     return Accessibility::AccessibilityAbilityHelper::GetInstance().GetZoomState();
109 }
110 
GetScale()111 float FullScreenMagnificationManager::GetScale()
112 {
113     return DEFAULT_SCALE;
114 }
115 } // namespace Accessibility
116 } // namespace OHOS