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 16sequenceable input_device..OHOS.MMI.InputDevice; 17sequenceable key_event..OHOS.MMI.KeyEvent; 18sequenceable key_option..OHOS.MMI.KeyOption; 19sequenceable long_press_event..OHOS.MMI.LongPressRequest; 20sequenceable pointer_event..OHOS.MMI.PointerEvent; 21sequenceable pixel_map..OHOS.Media.PixelMap; 22sequenceable shift_info..OHOS.MMI.ShiftWindowParam; 23sequenceable extra_data..OHOS.MMI.ExtraData; 24sequenceable mmi_event_map..OHOS.MMI.MmiEventMap; 25sequenceable OHOS.IRemoteObject; 26sequenceable touchpad_control_display_gain..OHOS.MMI.TouchpadCDG; 27sequenceable infrared_frequency_info..OHOS.MMI.InfraredFrequency; 28sequenceable pointer_style..OHOS.MMI.CustomCursorParcel; 29sequenceable pointer_style..OHOS.MMI.CursorOptionsParcel; 30sequenceable pointer_style..OHOS.MMI.CursorPixelMap; 31sequenceable window_info..OHOS.MMI.DisplayBindInfo; 32sequenceable pointer_style..OHOS.MMI.PointerStyle; 33sequenceable key_option..OHOS.MMI.KeyMonitorOption; 34 35interface OHOS.MMI.IAncoChannel; 36interface OHOS.MMI.IEventFilter; 37 38interface OHOS.MMI.IMultimodalInputConnect { 39 void AllocSocketFd([in] String programName, [in] int moduleType, 40 [out] FileDescriptorSan socketFd, [out] int tokenType); 41 void AddInputEventFilter([in] IEventFilter filter, [in]int filterId, [in] int priority, 42 [in] unsigned int deviceTags); 43 void NotifyNapOnline(); 44 void RemoveInputEventObserver(); 45 void RemoveInputEventFilter([in] int filterId); 46 void SetMouseScrollRows([in] int rows); 47 void GetMouseScrollRows([out] int rows); 48 void SetCustomCursorPixelMap([in] int windowId, [in] int focusX, [in] int focusY, [in] CursorPixelMap pixelMap); 49 void SetCustomCursor([in] int windowId, [in] CustomCursorParcel curParcel, [in] CursorOptionsParcel cOptionParcel); 50 void SetMouseIcon([in] int windowId, [in] CursorPixelMap pixelMap); 51 void SetPointerSize([in] int size); 52 void SetNapStatus([in] int pid, [in] int uid, [in] String bundleName, [in] int napStatus); 53 void GetPointerSize([out] int size); 54 void GetCursorSurfaceId([out] unsigned long surfaceId); 55 void SetMouseHotSpot([in] int pid, [in] int windowId, [in] int hotSpotX, [in] int hotSpotY); 56 void SetMousePrimaryButton([in] int primaryButton); 57 void GetMousePrimaryButton([out] int primaryButton); 58 void SetHoverScrollState([in] boolean state); 59 void GetHoverScrollState([out] boolean state); 60 void SetPointerVisible([in] boolean visible, [in] int priority); 61 void IsPointerVisible([out] boolean visible); 62 void MarkProcessed([in] int eventType, [in] int eventId); 63 void SetPointerColor([in] int color); 64 void GetPointerColor([out] int color); 65 void EnableCombineKey([in] boolean enable); 66 void SetPointerSpeed([in] int speed); 67 void GetPointerSpeed([out] int speed); 68 void SetPointerStyle([in] int windowId, [in] PointerStyle pointerStyle, [in] boolean isUiExtension); 69 void GetPointerStyle([in] int windowId, [out] PointerStyle pointerStyle, [in] boolean isUiExtension); 70 void SupportKeys([in] int deviceId, [in] int[] keys, [out] boolean[] keystroke); 71 void GetDeviceIds([out] int[] ids); 72 void GetDevice([in] int deviceId, [out] InputDevice inputDevice); 73 void RegisterDevListener(); 74 void UnregisterDevListener(); 75 void GetKeyboardType([in] int deviceId, [out] int keyboardType); 76 void SetKeyboardRepeatDelay([in] int delay); 77 void SetKeyboardRepeatRate([in] int rate); 78 void GetKeyboardRepeatDelay([out] int delay); 79 void GetKeyboardRepeatRate([out] int rate); 80 void AddInputHandler([in] int handlerType, [in] unsigned int eventType, 81 [in] int priority, [in] unsigned int deviceTags, [in] int[] actionsType); 82 void RemoveInputHandler([in] int handlerType, [in] unsigned int eventType, 83 [in] int priority, [in] unsigned int deviceTags, [in] int[] actionsType); 84 void AddPreInputHandler([in] int handlerId, [in] unsigned int eventType, [in] int[] keys); 85 void RemovePreInputHandler([in] int handlerId); 86 void AddGestureMonitor([in] int handlerType, [in] unsigned int eventType, 87 [in] unsigned int gestureType, [in] int fingers); 88 void RemoveGestureMonitor([in] int handlerType, [in] unsigned int eventType, 89 [in] unsigned int gestureType, [in] int fingers); 90 void MarkEventConsumed([in] int eventId); 91 void MoveMouseEvent([in] int offsetX, [in] int offsetY); 92 void InjectKeyEvent([in] KeyEvent keyEvent, [in] boolean isNativeInject); 93 void SubscribeKeyEvent([in] int subscribeId, [in] KeyOption keyOption); 94 void UnsubscribeKeyEvent([in] int subscribeId); 95 void SubscribeHotkey([in] int subscribeId, [in] KeyOption keyOption); 96 void UnsubscribeHotkey([in] int subscribeId); 97 void SubscribeKeyMonitor([in] KeyMonitorOption keyOption); 98 void UnsubscribeKeyMonitor([in] KeyMonitorOption keyOption); 99 void SubscribeSwitchEvent([in] int subscribeId, [in] int switchType); 100 void UnsubscribeSwitchEvent([in] int subscribeId); 101 void SubscribeTabletProximity([in] int subscribeId); 102 void UnsubscribetabletProximity([in] int subscribeId); 103 void SubscribeLongPressEvent([in] int subscribeId, [in] LongPressRequest longPressRequest); 104 void UnsubscribeLongPressEvent([in] int subscribeId); 105 void InjectPointerEvent([in] PointerEvent pointerEvent, [in] boolean isNativeInject, [in] int useCoordinate); 106 void InjectTouchPadEvent([in] PointerEvent pointerEvent, [in] TouchpadCDG touchpadCDG, [in] boolean isNativeInject); 107 void SetAnrObserver(); 108 void GetDisplayBindInfo([out] DisplayBindInfo[] infos); 109 void SetMoveEventFilters([in] boolean flag); 110 void SetCurrentUser([in] int userId); 111 void SetTouchpadThreeFingersTapSwitch([in] boolean switchFlag); 112 void GetTouchpadThreeFingersTapSwitch([out] boolean switchFlag); 113 void AddVirtualInputDevice([in] InputDevice device, [out] int deviceId); 114 void RemoveVirtualInputDevice([in] int deviceId); 115 void EnableHardwareCursorStats([in] boolean enable); 116 void GetHardwareCursorStats([out] unsigned int frameCount, [out] unsigned int vsyncCount); 117 void GetAllMmiSubscribedEvents([out] MmiEventMap mmiEventMap); 118 void SetDisplayBind([in] int deviceId, [in] int displayId, [out] String msg); 119 void GetFunctionKeyState([in] int funckey, [out] boolean state); 120 void SetFunctionKeyState([in] int funcKey, [in] boolean enable); 121 void SetPointerLocation([in] int x, [in] int y, [in] int displayId); 122 void GetPointerLocation([out] int displayId, [out] double displayX, [out] double displayY); 123 void ClearWindowPointerStyle([in] int pid, [in] int windowId); 124 void SetMouseCaptureMode([in] int windowId, [in] boolean isCaptureMode); 125 void GetWindowPid([in] int windowId, [out] int windowPid); 126 void AppendExtraData([in] ExtraData extraData); 127 void EnableInputDevice([in] boolean enable); 128 void SetKeyDownDuration([in] String businessId, [in] int delay); 129 void SetTouchpadScrollSwitch([in] boolean switchFlag); 130 void GetTouchpadScrollSwitch([out] boolean switchFlag); 131 void SetTouchpadScrollDirection([in] boolean state); 132 void GetTouchpadScrollDirection([out] boolean state); 133 void SetTouchpadTapSwitch([in] boolean switchFlag); 134 void GetTouchpadTapSwitch([out] boolean switchFlag); 135 void SetTouchpadPointerSpeed([in] int speed); 136 void GetTouchpadPointerSpeed([out] int speed); 137 void GetTouchpadCDG([out] TouchpadCDG touchpadCDG); 138 void SetTouchpadPinchSwitch([in] boolean switchFlag); 139 void GetTouchpadPinchSwitch([out] boolean switchFlag); 140 void SetTouchpadSwipeSwitch([in] boolean switchFlag); 141 void GetTouchpadSwipeSwitch([out] boolean switchFlag); 142 void SetTouchpadRightClickType([in] int type); 143 void GetTouchpadRightClickType([out] int type); 144 void SetTouchpadRotateSwitch([in] boolean rotateSwitch); 145 void GetTouchpadRotateSwitch([out] boolean rotateSwitch); 146 void SetTouchpadDoubleTapAndDragState([in] boolean switchFlag); 147 void GetTouchpadDoubleTapAndDragState([out] boolean switchFlag); 148 void SetShieldStatus([in] int shieldMode, [in] boolean isShield); 149 void GetShieldStatus([in] int shieldMode, [out] boolean isShield); 150 void GetKeyState([out] int[] pressedKeys, [out] Map<int, int> specialKeysState); 151 void Authorize([in] boolean isAuthorize); 152 void CancelInjection(); 153 void RequestInjection([out] int status, [out] int reqId); 154 void QueryAuthorizedStatus([out] int status); 155 void HasIrEmitter([out] boolean hasIrEmitter); 156 void GetInfraredFrequencies([out] InfraredFrequency[] requencys); 157 void TransmitInfrared([in] long number, [in] long[] pattern); 158 [macrodef OHOS_BUILD_ENABLE_VKEYBOARD] void CreateVKeyboardDevice([out] IRemoteObject vkeyboardDevice); 159 void SetPixelMapData([in] int infoId, [in] CursorPixelMap pixelMap); 160 void SetTouchpadScrollRows([in] int rows); 161 void GetTouchpadScrollRows([out] int rows); 162 void SetClientInfo([in] int pid, [in] unsigned long readThreadId); 163 void GetIntervalSinceLastInput([out] long timeInterval); 164 [macrodef OHOS_BUILD_ENABLE_MAGICCURSOR] void GetPointerSnapshot([out] CursorPixelMap pixelMap); 165 void TransferBinderClientSrv([in] IRemoteObject binderClientObject); 166 void SkipPointerLayer([in] boolean isSkip); 167 [macrodef OHOS_BUILD_ENABLE_ANCO] void AncoAddChannel([in] IAncoChannel channel); 168 [macrodef OHOS_BUILD_ENABLE_ANCO] void AncoRemoveChannel([in] IAncoChannel channel); 169 [macrodef OHOS_BUILD_ENABLE_ANCO] void CheckKnuckleEvent([in] float pointX, [in] float pointY, [out] boolean isKnuckleType); 170 void GetAllSystemHotkeys([out] KeyOption[] keyOptions); 171 void SetInputDeviceEnabled([in] int deviceId, [in] boolean enable, [in] int index); 172 void ShiftAppPointerEvent([in] ShiftWindowParam param, [in] boolean autoGenDown); 173 void SetMultiWindowScreenId([in] unsigned long screenId, [in] unsigned long displayNodeScreenId); 174 void QuerySwitchStatus([in] int switchType, [out] int status); 175 void SetKnuckleSwitch([in] boolean isKnuckleSwitch); 176 void LaunchAiScreenAbility(); 177 void GetMaxMultiTouchPointNum([out] int pointNum); 178 void SetInputDeviceConsumer([in] String[] deviceNames); 179 void ClearInputDeviceConsumer([in] String[] deviceNames); 180 void SubscribeInputActive([in] int subscribeId, [in] long interval); 181 void UnsubscribeInputActive([in] int subscribeId); 182 void SetMouseAccelerateMotionSwitch([in] int deviceId, [in] boolean enable); 183 void SwitchScreenCapturePermission([in] unsigned int permissionType, [in] boolean enable); 184 void ClearMouseHideFlag([in] int eventId); 185 void QueryPointerRecord([in] int count, [out] sharedptr<PointerEvent> [] pointerList); 186} 187