Debian Codegraph @

core/java/android/view/accessibility/IWindowMagnificationConnection.aidl

raw
1 /*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package android.view.accessibility;
18
19 import android.graphics.PointF;
20 import android.graphics.Rect;
21 import android.view.accessibility.IWindowMagnificationConnectionCallback;
22 import android.view.accessibility.IRemoteMagnificationAnimationCallback;
23
24 /**
25 * Interface for interaction between {@link AccessibilityManagerService}
26 * and {@link WindowMagnification} in SystemUI.
27 *
28 * @hide
29 */
30 oneway interface IWindowMagnificationConnection {
31
32 /**
33 * Enables window magnification on specified display with given center and scale and animation.
34 *
35 * @param displayId the logical display id.
36 * @param scale magnification scale.
37 * @param centerX the screen-relative X coordinate around which to center,
38 * or {@link Float#NaN} to leave unchanged.
39 * @param centerY the screen-relative Y coordinate around which to center,
40 * or {@link Float#NaN} to leave unchanged.
41 * @param magnificationFrameOffsetRatioX Indicate the X coordinate offset between
42 * frame position X and centerX
43 * @param magnificationFrameOffsetRatioY Indicate the Y coordinate offset between
44 * frame position Y and centerY
45 * @param callback The callback called when the animation is completed or interrupted.
46 */
47 void enableWindowMagnification(int displayId, float scale, float centerX, float centerY,
48 float magnificationFrameOffsetRatioX, float magnificationFrameOffsetRatioY,
49 in IRemoteMagnificationAnimationCallback callback);
50
51 /**
52 * Sets the scale of the window magnifier on specified display.
53 *
54 * @param displayId the logical display id.
55 * @param scale magnification scale.
56 */
57 void setScale(int displayId, float scale);
58
59 /**
60 * Disables window magnification on specified display with animation.
61 *
62 * @param displayId the logical display id.
63 * @param callback The callback called when the animation is completed or interrupted.
64 */
65 void disableWindowMagnification(int displayId,
66 in IRemoteMagnificationAnimationCallback callback);
67
68 /**
69 * Moves the window magnifier on the specified display. It has no effect while animating.
70 *
71 * @param displayId the logical display id.
72 * @param offsetX the amount in pixels to offset the window magnifier in the X direction, in
73 * current screen pixels.
74 * @param offsetY the amount in pixels to offset the window magnifier in the Y direction, in
75 * current screen pixels.
76 */
77 void moveWindowMagnifier(int displayId, float offsetX, float offsetY);
78
79 /**
80 * Moves the window magnifier on the given display.
81 *
82 * @param displayId the logical display id.
83 * @param positionX the x-axis position of the center of the magnified source bounds.
84 * @param positionY the y-axis position of the center of the magnified source bounds.
85 * @param callback the callback called when the animation is completed or interrupted.
86 */
87 void moveWindowMagnifierToPosition(int displayId, float positionX, float positionY,
88 in IRemoteMagnificationAnimationCallback callback);
89
90 /**
91 * Requests System UI show magnification mode button UI on the specified display.
92 *
93 * @param displayId the logical display id.
94 * @param magnificationMode the current magnification mode.
95 */
96 void showMagnificationButton(int displayId, int magnificationMode);
97
98 /**
99 * Requests System UI remove magnification mode button UI on the specified display.
100 *
101 * @param displayId the logical display id.
102 */
103 void removeMagnificationButton(int displayId);
104
105 /**
106 * Sets {@link IWindowMagnificationConnectionCallback} to receive the request or the callback.
107 *
108 * @param callback the interface to be called.
109 */
110 void setConnectionCallback(in IWindowMagnificationConnectionCallback callback);
111 }