2 * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef TMCAGLWM_STUB_STM_HPP
18 #define TMCAGLWM_STUB_STM_HPP
23 #define STM_CREATE_EVENT_ID(evt, ctg, area) \
24 ((evt) | ((ctg) << 8) | ((area) << 16))
26 #define STM_GET_EVENT_FROM_ID(id) \
29 #define STM_GET_CATEGORY_FROM_ID(id) \
32 #define STM_GET_AREA_FROM_ID(id) \
40 StmEvtNoRestrictionModeOff,
41 StmEvtNoRestrictionMode1On,
42 StmEvtNoRestrictionMode2On,
47 StmEvtNoMin = StmEvtNoNone,
48 StmEvtNoMax = StmEvtNoNum - 1,
62 StmCtgNoSoftwareKeyboard,
66 StmCtgNoMin = StmCtgNoNone,
67 StmCtgNoMax = StmCtgNoNum - 1,
78 StmAreaNoRestrictionNormal,
79 StmAreaNoRestrictionSplitMain,
80 StmAreaNoRestrictionSplitSub,
81 StmAreaNoSoftwareKyeboard,
85 StmAreaNoMin = StmAreaNoNone,
86 StmAreaNoMax = StmAreaNoNum - 1,
91 StmLayerNoHomescreen = 0,
93 StmLayerNoNearHomescreen,
94 StmLayerNoRestriction,
99 StmLayerNoMin = StmLayerNoHomescreen,
100 StmLayerNoMax = StmLayerNoNum - 1,
103 // Layout kind number
116 StmLayoutNoRstSplMain,
117 StmLayoutNoRstSplSub,
123 StmLayoutNoMin = StmLayoutNoNone,
124 StmLayoutNoMax = StmLayoutNoNum - 1,
129 StmModeNoRestrictionMode = 0,
133 StmModeNoMin = StmModeNoRestrictionMode,
134 StmModeNoMax = StmModeNoNum - 1,
137 // Enum for mode state
138 enum StmRestrictionModeSttNo {
139 StmRestrictionModeSttNoOff = 0,
140 StmRestrictionModeSttNo1On,
141 StmRestrictionModeSttNo2On,
145 extern const char* kStmEventName[];
146 extern const char* kStmCategoryName[];
147 extern const char* kStmAreaName[];
148 extern const char* kStmLayoutName[];
149 extern const char* kStmLayerName[];
150 extern const char* kStmModeName[];
151 extern const char** kStmModeStateNameList[];
154 typedef struct StmBaseState {
159 typedef struct StmState {
160 StmBaseState mode[StmModeNoNum];
161 StmBaseState layer[StmLayerNoNum];
165 void stmInitialize();
166 int stmTransitionState(int event_no, StmState* state);
170 #endif // TMCAGLWM_STUB_STM_HPP