• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 FINGERSENSE_MANAGER_H
17 #define FINGERSENSE_MANAGER_H
18 #include "singleton.h"
19 
20 namespace OHOS {
21 namespace MMI {
22 struct TouchType {
23     int32_t id { 0 };
24     float x { 0 };
25     float y { 0 };
26     float touch_major { 0 };
27     float touch_minor { 0 };
28     float pressure { 0 };
29     float orientation { 0 };
30     float tool_major { 0 };
31     float tool_minor { 0 };
32     int32_t touch_kind { 0 };
33 };
34 
35 class FingersenseManager final {
36     DECLARE_DELAYED_SINGLETON(FingersenseManager);
37 public:
38     DISALLOW_COPY_AND_MOVE(FingersenseManager);
39     void Init();
40     void KnuckleClassifyTouch(TouchType *rawTouch);
41 };
42 } // namespace MMI
43 } // namespace OHOS
44 #endif // FINGERSENSE_MANAGER_H