123b3eb3cSopenharmony_ci/* 223b3eb3cSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License. 523b3eb3cSopenharmony_ci * You may obtain a copy of the License at 623b3eb3cSopenharmony_ci * 723b3eb3cSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 823b3eb3cSopenharmony_ci * 923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and 1323b3eb3cSopenharmony_ci * limitations under the License. 1423b3eb3cSopenharmony_ci */ 1523b3eb3cSopenharmony_ci 1623b3eb3cSopenharmony_ci#ifndef FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H 1723b3eb3cSopenharmony_ci#define FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H 1823b3eb3cSopenharmony_ci 1923b3eb3cSopenharmony_ci#include "base/memory/ace_type.h" 2023b3eb3cSopenharmony_ci#include "base/image/pixel_map.h" 2123b3eb3cSopenharmony_ci 2223b3eb3cSopenharmony_cinamespace OHOS::Ace { 2323b3eb3cSopenharmony_ci 2423b3eb3cSopenharmony_cienum class MouseFormat : int32_t { 2523b3eb3cSopenharmony_ci DEFAULT = 0, // Default mouse style 2623b3eb3cSopenharmony_ci EAST = 1, // Eastwards arrow 2723b3eb3cSopenharmony_ci WEST = 2, // Westwards arrow 2823b3eb3cSopenharmony_ci SOUTH = 3, // Southwards arrow 2923b3eb3cSopenharmony_ci NORTH = 4, // Northwards arrow 3023b3eb3cSopenharmony_ci WEST_EAST = 5, // Drag left-right mouse style 3123b3eb3cSopenharmony_ci NORTH_SOUTH = 6, // Drag up-down mouse style 3223b3eb3cSopenharmony_ci NORTH_EAST = 7, 3323b3eb3cSopenharmony_ci NORTH_WEST = 8, 3423b3eb3cSopenharmony_ci SOUTH_EAST = 9, 3523b3eb3cSopenharmony_ci SOUTH_WEST = 10, 3623b3eb3cSopenharmony_ci NORTH_EAST_SOUTH_WEST = 11, 3723b3eb3cSopenharmony_ci NORTH_WEST_SOUTH_EAST = 12, 3823b3eb3cSopenharmony_ci CROSS = 13, 3923b3eb3cSopenharmony_ci CURSOR_COPY = 14, 4023b3eb3cSopenharmony_ci CURSOR_FORBID = 15, 4123b3eb3cSopenharmony_ci COLOR_SUCKER = 16, 4223b3eb3cSopenharmony_ci HAND_GRABBING = 17, 4323b3eb3cSopenharmony_ci HAND_OPEN = 18, 4423b3eb3cSopenharmony_ci HAND_POINTING = 19, // Hyperlink mouse style 4523b3eb3cSopenharmony_ci HELP = 20, 4623b3eb3cSopenharmony_ci CURSOR_MOVE = 21, 4723b3eb3cSopenharmony_ci RESIZE_LEFT_RIGHT = 22, 4823b3eb3cSopenharmony_ci RESIZE_UP_DOWN = 23, 4923b3eb3cSopenharmony_ci SCREENSHOT_CHOOSE = 24, 5023b3eb3cSopenharmony_ci SCREENSHOT_CURSOR = 25, 5123b3eb3cSopenharmony_ci TEXT_CURSOR = 26, // Text editing mouse style 5223b3eb3cSopenharmony_ci ZOOM_IN = 27, 5323b3eb3cSopenharmony_ci ZOOM_OUT = 28, 5423b3eb3cSopenharmony_ci MIDDLE_BTN_EAST = 29, 5523b3eb3cSopenharmony_ci MIDDLE_BTN_WEST = 30, 5623b3eb3cSopenharmony_ci MIDDLE_BTN_SOUTH = 31, 5723b3eb3cSopenharmony_ci MIDDLE_BTN_NORTH = 32, 5823b3eb3cSopenharmony_ci MIDDLE_BTN_NORTH_SOUTH = 33, 5923b3eb3cSopenharmony_ci MIDDLE_BTN_NORTH_EAST = 34, 6023b3eb3cSopenharmony_ci MIDDLE_BTN_NORTH_WEST = 35, 6123b3eb3cSopenharmony_ci MIDDLE_BTN_SOUTH_EAST = 36, 6223b3eb3cSopenharmony_ci MIDDLE_BTN_SOUTH_WEST = 37, 6323b3eb3cSopenharmony_ci MIDDLE_BTN_NORTH_SOUTH_WEST_EAST = 38, 6423b3eb3cSopenharmony_ci HORIZONTAL_TEXT_CURSOR = 39, 6523b3eb3cSopenharmony_ci CURSOR_CROSS = 40, 6623b3eb3cSopenharmony_ci CURSOR_CIRCLE = 41, 6723b3eb3cSopenharmony_ci LOADING = 42, 6823b3eb3cSopenharmony_ci RUNNING = 43, 6923b3eb3cSopenharmony_ci CURSOR_NONE = 46, 7023b3eb3cSopenharmony_ci CONTEXT_MENU = 47, 7123b3eb3cSopenharmony_ci ALIAS = 48, 7223b3eb3cSopenharmony_ci}; 7323b3eb3cSopenharmony_ci 7423b3eb3cSopenharmony_ciclass ACE_EXPORT MouseStyle : public AceType { 7523b3eb3cSopenharmony_ci DECLARE_ACE_TYPE(MouseStyle, AceType) 7623b3eb3cSopenharmony_ci 7723b3eb3cSopenharmony_cipublic: 7823b3eb3cSopenharmony_ci static RefPtr<MouseStyle> CreateMouseStyle(); 7923b3eb3cSopenharmony_ci 8023b3eb3cSopenharmony_ci virtual bool SetPointerStyle(int32_t windowId, MouseFormat pointerStyle) const = 0; 8123b3eb3cSopenharmony_ci virtual int32_t GetPointerStyle(int32_t windowId, int32_t& pointerStyle) const = 0; 8223b3eb3cSopenharmony_ci virtual bool ChangePointerStyle(int32_t windowId, MouseFormat mouseFormat) const = 0; 8323b3eb3cSopenharmony_ci virtual void SetMouseIcon( 8423b3eb3cSopenharmony_ci int32_t windowId, MouseFormat pointerStyle, std::shared_ptr<Media::PixelMap> pixelMap) const {}; 8523b3eb3cSopenharmony_ci virtual void SetCustomCursor( 8623b3eb3cSopenharmony_ci int32_t windowId, int32_t focusX, int32_t focusY, std::shared_ptr<Media::PixelMap> pixelMap) const {}; 8723b3eb3cSopenharmony_ci virtual void SetPointerVisible(MouseFormat pointerStyle) const {}; 8823b3eb3cSopenharmony_ci}; 8923b3eb3cSopenharmony_ci 9023b3eb3cSopenharmony_ci} // namespace OHOS::Ace 9123b3eb3cSopenharmony_ci 9223b3eb3cSopenharmony_ci#endif // FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H