1 /*
2 * Copyright (C) 2024 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 #include "hardware_cursor_pointer_manager.h"
17
18 #include <thread>
19
20 #include "mmi_log.h"
21
22 #undef MMI_LOG_DOMAIN
23 #define MMI_LOG_DOMAIN MMI_LOG_CURSOR
24 #undef MMI_LOG_TAG
25 #define MMI_LOG_TAG "HardwareCursorPointerManager"
26
27 namespace OHOS {
28 namespace MMI {
SetTargetDevice(uint32_t devId)29 void HardwareCursorPointerManager::SetTargetDevice(uint32_t devId)
30 {
31 if (devId != devId_) {
32 devId_ = devId;
33 MMI_HILOGI("SetTargetDevice devId_ changed");
34 isEnableState_ = false;
35 }
36 }
37
IsSupported()38 bool HardwareCursorPointerManager::IsSupported()
39 {
40 isEnableState_ = true;
41 return true;
42 }
43
SetPosition(int32_t x,int32_t y)44 int32_t HardwareCursorPointerManager::SetPosition(int32_t x, int32_t y)
45 {
46 MMI_HILOGD("SetPosition, x:%{private}d, y:%{private}d", x, y);
47 return RET_OK;
48 }
49
EnableStats(bool enable)50 int32_t HardwareCursorPointerManager::EnableStats(bool enable)
51 {
52 CALL_DEBUG_ENTER;
53 MMI_HILOGD("EnableStats, enable:%{public}d", enable);
54 return RET_OK;
55 }
56
GetCursorStats(uint32_t & frameCount,uint32_t & vsyncCount)57 int32_t HardwareCursorPointerManager::GetCursorStats(uint32_t &frameCount, uint32_t &vsyncCount)
58 {
59 CALL_DEBUG_ENTER;
60 MMI_HILOGD("Get hardware cursor stats, frameCount:%{private}d, vsyncCount:%{private}d", frameCount, vsyncCount);
61 return RET_OK;
62 }
63 } // namespace MMI
64 } // namespace OHOS
65