Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / lock-app / cc13x2x7_26x2x7 / main / include / AppEvent.h
1 /*
2  *
3  *    Copyright (c) 2018 Nest Labs, Inc.
4  *    All rights reserved.
5  *
6  *    Licensed under the Apache License, Version 2.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19 #ifndef APP_EVENT_H
20 #define APP_EVENT_H
21
22 struct AppEvent;
23 typedef void (*EventHandler)(AppEvent *);
24
25 struct AppEvent
26 {
27     enum AppEventType
28     {
29         kEventType_None = 0,
30         kEventType_ButtonLeft,
31         kEventType_ButtonRight,
32         kEventType_AppEvent,
33     };
34
35     enum AppEventButtonType
36     {
37         kAppEventButtonType_None = 0,
38         kAppEventButtonType_Clicked,
39         kAppEventButtonType_LongClicked,
40     };
41
42     enum AppEventType Type;
43
44     union
45     {
46         struct
47         {
48             enum AppEventButtonType Type;
49         } ButtonEvent;
50
51         struct
52         {
53             void * Context;
54         } BoltLockEvent;
55     };
56
57     EventHandler Handler;
58 };
59
60 #endif // APP_EVENT_H