diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 53204cd86638c2b2ba410dfadf53476d0956f8d2..9734962220b2af84c83fd140792583166a32879e 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -249,6 +249,204 @@ typedef struct Input_AxisEvent Input_AxisEvent; */ typedef struct Input_Hotkey Input_Hotkey; +typedef struct OH_PixelmapNative OH_PixelmapNative; + +typedef struct Input_CursorInfo Input_CursorInfo; + +typedef enum CursorStyle { + + /* Default */ + + DEFAULT, + + /* East arrow */ + + EAST, + + /* West arrow */ + + WEST, + + /* South arrow */ + + SOUTH, + + /* North arrow */ + + NORTH, + + /* East-west arrow */ + + WEST_EAST, + + /* North-south arrow */ + + NORTH_SOUTH, + + /* North-east arrow*/ + + NORTH_EAST, + + /* North-west arrow*/ + + NORTH_WEST, + + /* South-east arrow*/ + + SOUTH_EAST, + + /* South-west arrow*/ + + SOUTH_WEST, + + /* Northeast and southwest adjustment*/ + + NORTH_EAST_SOUTH_WEST, + + /* Northwest and southeast adjustment*/ + + NORTH_WEST_SOUTH_EAST, + + /* Cross (accurate selection)*/ + + CROSS, + + /* Copy*/ + + CURSOR_COPY, + + /* Forbid*/ + + CURSOR_FORBID, + + /* Sucker*/ + + COLOR_SUCKER, + + /* Grabbing hand*/ + + HAND_GRABBING, + + /* Opening hand*/ + + HAND_OPEN, + + /* Hand-shaped pointer*/ + + HAND_POINTING, + + /* Help*/ + + HELP, + + /* Move*/ + + MOVE, + + /* Left and right resizing*/ + + RESIZE_LEFT_RIGHT, + + /* Up and down resizing*/ + + RESIZE_UP_DOWN, + + /* Screenshot crosshair*/ + + SCREENSHOT_CHOOSE, + + /* Screenshot*/ + + SCREENSHOT_CURSOR, + + /* Text selection*/ + + TEXT_CURSOR, + + /* Zoom in*/ + + ZOOM_IN, + + /* Zoom out*/ + + ZOOM_OUT, + + /* Scrolling east*/ + + MIDDLE_BTN_EAST, + + /* Scrolling west*/ + + MIDDLE_BTN_WEST, + + /* Scrolling south*/ + + MIDDLE_BTN_SOUTH, + + /* Scrolling north*/ + + MIDDLE_BTN_NORTH, + + /* Scrolling north and south*/ + + MIDDLE_BTN_NORTH_SOUTH, + + /* Scrolling northeast*/ + + MIDDLE_BTN_NORTH_EAST, + + /* Scrolling northwest*/ + + MIDDLE_BTN_NORTH_WEST, + + /* Scrolling southeast*/ + + MIDDLE_BTN_SOUTH_EAST, + + /* Scrolling southwest*/ + + MIDDLE_BTN_SOUTH_WEST, + + /* Moving as a cone in four directions*/ + + MIDDLE_BTN_NORTH_SOUTH_WEST_EAST, + + /* Horizontal text selection*/ + + HORIZONTAL_TEXT_CURSOR, + + /* Precise selection*/ + + CURSOR_CROSS, + + /* Cursor with circle style*/ + + CURSOR_CIRCLE, + + /* Loading state with dynamic cursor*/ + + LOADING, + + /* Running state with dynamic cursor*/ + + RUNNING, + + /* Scrolling east and west*/ + + MIDDLE_BTN_EAST_WEST, + + /* Screen recorder cursor*/ + + SCREENRECORDER_CURSOR = 48, + + LASER_CURSOR = 49, + LASER_CURSOR_DOT = 50, + LASER_CURSOR_DOT_RED = 51, + DEVELOPER_DEFINED_ICON = -100, + TRANSPARENT_ICON = -101, + +} CursorStyle; + /** * @brief Enumerates error codes. * @@ -2180,6 +2378,17 @@ Input_Result OH_Input_QueryMaxTouchPoints(int32_t *count); * @since 20 */ Input_Result OH_Input_GetPointerLocation(int32_t *displayId, double *displayX, double *displayY); + +struct Input_CursorInfo* OH_Input_CreateCursorInfo(); +void OH_Input_DestroyCursorInfo(Input_CursorInfo** cursorInfo); +Input_Result OH_Input_GetCursorStyle(Input_CursorInfo* cursorInfo, CursorStyle* cursorStyle); +Input_Result OH_Input_GetCursorColor(Input_CursorInfo* cursorInfo, int32_t* cursorColor); +Input_Result OH_Input_GetCursorSize(Input_CursorInfo* cursorInfo, int32_t* cursorSize); +Input_Result OH_Input_GetCursorPixelmap(Input_CursorInfo* cursorInfo, OH_PixelmapNative** pixelmap); +Input_Result OH_Input_IsCursorVisible(Input_CursorInfo* cursorInfo, bool* visible); + +Input_Result OH_Input_GetMouseEventCursorInfo(const struct Input_MouseEvent* mouseEvent, Input_CursorInfo* cursorInfo); +Input_Result OH_Input_GetCursorInfo(Input_CursorInfo* cursorInfo); #ifdef __cplusplus } #endif diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 83ce83a89e1f7616f1a2209909699df32b1c7d9c..407c8aee04b510578a053491c2e7490447a1b744 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -585,5 +585,45 @@ { "first_introduced": "21", "name": "OH_Input_DispatchToNextHandler" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetMouseEventPointerStyle" + }, + { + "first_introduced": "20", + "name": "OH_Input_CreateCursorInfo" + }, + { + "first_introduced": "20", + "name": "OH_Input_DestroyCursorInfo" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetCursorStyle" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetCursorColor" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetCursorSize" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetCursorPixelmap" + }, + { + "first_introduced": "20", + "name": "OH_Input_IsCursorVisible" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetMouseEventCursorInfo" + }, + { + "first_introduced": "20", + "name": "OH_Input_GetCursorInfo" } ] \ No newline at end of file