VirtualTouch.h
Go to the documentation of this file.
1 /****
2  * VirtualTouch.h
3  *
4  * Copyright 2023 mikee47 <mike@sillyhouse.net>
5  *
6  * This file is part of the Sming-Graphics Library
7  *
8  * This library is free software: you can redistribute it and/or modify it under the terms of the
9  * GNU General Public License as published by the Free Software Foundation, version 3 or later.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with this library.
16  * If not, see <https://www.gnu.org/licenses/>.
17  *
18  * @author: May 2021 - mikee47 <mike@sillyhouse.net>
19  *
20  ****/
21 
22 #pragma once
23 
24 #include <Graphics/Touch.h>
25 
26 namespace Graphics
27 {
28 namespace Display
29 {
30 class Virtual;
31 }
32 
33 class VirtualTouch : public Touch
34 {
35 public:
36  VirtualTouch(Display::Virtual& display);
37 
38  bool begin()
39  {
40  return true;
41  }
42 
43  void end()
44  {
45  }
46 
47  /* Touch */
48 
49  Size getNativeSize() const override;
50 
51  State getState() const override
52  {
53  return state;
54  }
55 
56 private:
57  State state;
58 };
59 
60 } // namespace Graphics
Size getNativeSize() const override
Get physical size of display.
Definition: Virtual.h:30
State getState() const override
Get current state.
Definition: VirtualTouch.h:70
VirtualTouch(Display::Virtual &display)
bool begin()
Definition: VirtualTouch.h:57
void end()
Definition: VirtualTouch.h:62
Definition: Display.h:21