• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 #ifndef PROTO_H
16 #define PROTO_H
17 
18 #include <sys/types.h>
19 
20 enum class MmiMessageId : int32_t {
21     INVALID,
22     INPUT_DEVICE,
23     INPUT_DEVICE_IDS,
24     INPUT_DEVICE_SUPPORT_KEYS,
25     ADD_INPUT_DEVICE_LISTENER,
26     INPUT_DEVICE_KEYBOARD_TYPE,
27     DISPLAY_INFO,
28     NOTICE_ANR,
29     MARK_PROCESS,
30     ON_SUBSCRIBE_KEY,
31     ON_KEY_EVENT,
32     ON_POINTER_EVENT,
33     REPORT_KEY_EVENT,
34     REPORT_POINTER_EVENT,
35     ON_DEVICE_ADDED,
36     ON_DEVICE_REMOVED,
37 
38 #ifdef OHOS_BUILD_ENABLE_COOPERATE
39     COOPERATION_ADD_LISTENER,
40     COOPERATION_MESSAGE,
41     COOPERATION_GET_STATE,
42 #endif // OHOS_BUILD_ENABLE_COOPERATE
43 };
44 
45 enum INPUT_DEVICE_TYPE {
46     INPUT_DEVICE_CAP_KEYBOARD = 0,
47     INPUT_DEVICE_CAP_POINTER = 1,
48     INPUT_DEVICE_CAP_TOUCH = 2,
49     INPUT_DEVICE_CAP_TABLET_TOOL = 3,
50     INPUT_DEVICE_CAP_TABLET_PAD = 4,
51     INPUT_DEVICE_CAP_GESTURE = 5,
52     INPUT_DEVICE_CAP_SWITCH = 6,
53     INPUT_DEVICE_CAP_JOYSTICK = 7,
54     INPUT_DEVICE_CAP_AISENSOR = 8,
55     INPUT_DEVICE_CAP_TOUCH_PAD = 9,
56     INPUT_DEVICE_CAP_REMOTE_CONTROL = 10,
57     INPUT_DEVICE_CAP_TRACK_BALL = 11,
58     INPUT_DEVICE_CAP_KNUCKLE = 12,
59     INPUT_DEVICE_CAP_TRACKPAD5 = 13,
60     INPUT_DEVICE_CAP_GAMEPAD = 14,
61 };
62 
63 enum KeyboardType {
64     KEYBOARD_TYPE_NONE,
65     KEYBOARD_TYPE_UNKNOWN,
66     KEYBOARD_TYPE_ALPHABETICKEYBOARD,
67     KEYBOARD_TYPE_DIGITALKEYBOARD,
68     KEYBOARD_TYPE_HANDWRITINGPEN,
69     KEYBOARD_TYPE_REMOTECONTROL,
70 };
71 
72 enum TokenType : int32_t {
73     TOKEN_INVALID = -1,
74     TOKEN_HAP = 0,
75     TOKEN_NATIVE,
76     TOKEN_SHELL,
77 };
78 
79 enum ANREventType {
80     ANR_DISPATCH,
81     ANR_MONITOR,
82 };
83 #endif // PROTO_H