• 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 
16 #ifndef PROTO_H
17 #define PROTO_H
18 
19 #include <sys/types.h>
20 
21 enum class MmiMessageId : int32_t {
22     INVALID,
23     ADD_INPUT_DEVICE_LISTENER,
24     DISPLAY_INFO,
25     NOTICE_ANR,
26     MARK_PROCESS,
27     ON_SUBSCRIBE_KEY,
28     ON_SUBSCRIBE_KEY_MONITOR,
29     ON_SUBSCRIBE_SWITCH,
30     ON_KEY_EVENT,
31     ON_POINTER_EVENT,
32     REPORT_KEY_EVENT,
33     REPORT_POINTER_EVENT,
34     ON_DEVICE_ADDED,
35     ON_DEVICE_REMOVED,
36     SCINFO_CONFIG,
37     WINDOW_AREA_INFO,
38     NOTIFY_BUNDLE_NAME,
39     WINDOW_INFO,
40     WINDOW_STATE_ERROR_CALLBACK,
41     WINDOW_STATE_ERROR_NOTIFY,
42     ON_SUBSCRIBE_LONG_PRESS,
43     SET_INPUT_DEVICE_ENABLED,
44     ON_PRE_KEY_EVENT,
45     ON_SUBSCRIBE_TABLET,
46 };
47 
48 enum TokenType : int32_t {
49     TOKEN_INVALID = -1,
50     TOKEN_HAP = 0,
51     TOKEN_NATIVE,
52     TOKEN_SHELL,
53     TOKEN_SYSTEM_HAP,
54 };
55 
56 enum ANTTimeOutTime : int64_t {
57     INPUT_UI_TIMEOUT_TIME = 5 * 1000000
58 };
59 
60 enum ANREventType {
61     ANR_DISPATCH,
62     ANR_MONITOR,
63     ANR_EVENT_TYPE_NUM,
64 };
65 #endif // PROTO_H
66