Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / common / screen-framework / include / Screen.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
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 /**
20  * @file Screen.h
21  *
22  * Simple screen.
23  *
24  */
25
26 #pragma once
27
28 #include "Display.h"
29
30 #if CONFIG_HAVE_DISPLAY
31
32 #include "ScreenManager.h"
33
34 #include <string>
35
36 class Screen
37 {
38 public:
39     enum FocusType
40     {
41         NONE,
42         BLUR,
43         UNBLUR,
44         NEXT,
45         PREVIOUS
46     };
47
48     virtual ~Screen() = default;
49
50     virtual std::string GetTitle() { return "Untitled"; }
51
52     virtual std::string GetButtonText(int id);
53
54     virtual void Display() {}
55
56     virtual void Enter(bool pushed) {}
57
58     virtual void Exit(bool popped) {}
59
60     virtual bool IsFocusable() { return false; }
61
62     virtual void Focus(FocusType focus) {}
63
64     virtual void Action() {}
65 };
66
67 #endif // CONFIG_HAVE_DISPLAY