1 /* 2 * Copyright (c) 2022 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 #ifndef FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H 17 #define FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H 18 19 #include "base/memory/ace_type.h" 20 21 namespace OHOS::Ace { 22 23 enum class MouseFormat : int32_t { 24 DEFAULT = 0, // Default mouse style 25 EAST = 1, // Eastwards arrow 26 WEST = 2, // Westwards arrow 27 SOUTH = 3, // Southwards arrow 28 NORTH = 4, // Northwards arrow 29 WEST_EAST = 5, // Drag left-right mouse style 30 NORTH_SOUTH = 6, // Drag up-down mouse style 31 NORTH_EAST_SOUTH_WEST = 11, 32 NORTH_WEST_SOUTH_EAST = 12, 33 CROSS = 13, 34 CURSOR_COPY = 14, 35 CURSOR_FORBID = 15, 36 HAND_GRABBING = 17, 37 HAND_OPEN = 18, 38 HAND_POINTING = 19, // Hyperlink mouse style 39 HELP = 20, 40 CURSOR_MOVE = 21, 41 RESIZE_LEFT_RIGHT = 22, 42 RESIZE_UP_DOWN = 23, 43 TEXT_CURSOR = 26, // Text editing mouse style 44 ZOOM_IN = 27, 45 ZOOM_OUT = 28, 46 MIDDLE_BTN_EAST = 29, 47 MIDDLE_BTN_WEST = 30, 48 MIDDLE_BTN_SOUTH = 31, 49 MIDDLE_BTN_NORTH = 32, 50 MIDDLE_BTN_NORTH_SOUTH = 33, 51 MIDDLE_BTN_NORTH_EAST = 34, 52 MIDDLE_BTN_NORTH_WEST = 35, 53 MIDDLE_BTN_SOUTH_EAST = 36, 54 MIDDLE_BTN_SOUTH_WEST = 37, 55 MIDDLE_BTN_NORTH_SOUTH_WEST_EAST = 38, 56 }; 57 58 class ACE_EXPORT MouseStyle : public AceType { 59 DECLARE_ACE_TYPE(MouseStyle, AceType) 60 61 public: 62 static RefPtr<MouseStyle> CreateMouseStyle(); 63 64 virtual bool SetPointerStyle(int32_t windowId, MouseFormat pointerStyle) const = 0; 65 virtual int32_t GetPointerStyle(int32_t windowId, int32_t& pointerStyle) const = 0; 66 virtual bool ChangePointerStyle(int32_t windowId, MouseFormat mouseFormat) const = 0; 67 }; 68 69 } // namespace OHOS::Ace 70 71 #endif // FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H