1.10
inputtslib.h
1/*
2 * Copyright (C) 2018 Microchip Technology Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef EGT_DETAIL_INPUT_INPUTTSLIB_H
7#define EGT_DETAIL_INPUT_INPUTTSLIB_H
8
14#include <egt/asio.hpp>
15#include <egt/detail/meta.h>
16#include <egt/input.h>
17#include <memory>
18#include <string>
19
20namespace egt
21{
22inline namespace v1
23{
24class Application;
25
26namespace detail
27{
28struct tslibimpl;
29
33class EGT_API InputTslib : public Input
34{
35public:
36
40 explicit InputTslib(Application& app, const std::string& path);
41
42 ~InputTslib() noexcept override;
43
44private:
45
46 void handle_read(const asio::error_code& error);
47
51 asio::posix::stream_descriptor m_input;
52
56 std::unique_ptr<tslibimpl> m_impl;
57
61 std::array<bool, 2> m_active{};
62
66 std::array<DisplayPoint, 2> m_last_point;
67};
68
69}
70}
71}
72
73#endif
Application definition.
Definition app.h:49
Base Input device class.
Definition input.h:39
Handles reading input from a tslib supported device.
Definition inputtslib.h:34
~InputTslib() noexcept override
InputTslib(Application &app, const std::string &path)
EGT framework namespace.
Definition animation.h:24