• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     WEST_EAST = 5,      // Drag left-right mouse style
26     NORTH_SOUTH = 6,    // Drag up-down mouse style
27     NORTH_EAST_SOUTH_WEST = 11,
28     NORTH_WEST_SOUTH_EAST = 12,
29     CROSS = 13,
30     CURSOR_COPY = 14,
31     CURSOR_FORBID = 15,
32     HAND_GRABBING = 17,
33     HAND_POINTING = 19, // Hyperlink mouse style
34     HELP = 20,
35     CURSOR_MOVE = 21,
36     RESIZE_LEFT_RIGHT = 22,
37     RESIZE_UP_DOWN = 23,
38     TEXT_CURSOR = 26,   // Text editing mouse style
39     ZOOM_IN = 27,
40     ZOOM_OUT = 28,
41 };
42 
43 class ACE_EXPORT MouseStyle : public AceType {
44     DECLARE_ACE_TYPE(MouseStyle, AceType)
45 
46 public:
47     static RefPtr<MouseStyle> CreateMouseStyle();
48 
49     virtual bool SetPointerStyle(int32_t windowId, MouseFormat pointerStyle) const = 0;
50     virtual int32_t GetPointerStyle(int32_t windowId, int32_t& pointerStyle) const = 0;
51     virtual bool ChangePointerStyle(int32_t windowId, MouseFormat mouseFormat) const = 0;
52 };
53 
54 } // namespace OHOS::Ace
55 
56 #endif // FOUNDATION_ACE_FRAMEWORKS_BASE_MOUSESTYLE_MOUSE_STYLE_MANAGER_H