From 2c82a4bf311f331c0ed8b149503e4d73f0fa4477 Mon Sep 17 00:00:00 2001 From: Mikael Olenfalk Date: Wed, 25 Mar 2020 08:54:16 +0100 Subject: [PATCH] Remove unused file --- .../ftxui/component/event_input_listener.hpp | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 include/ftxui/component/event_input_listener.hpp diff --git a/include/ftxui/component/event_input_listener.hpp b/include/ftxui/component/event_input_listener.hpp deleted file mode 100644 index f90fdd7..0000000 --- a/include/ftxui/component/event_input_listener.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef FTXUI_COMPONENT_EVENT_INPUT_LISTENER_HPP -#define FTXUI_COMPONENT_EVENT_INPUT_LISTENER_HPP - -#include -#include -#include - -#include "event.hpp" - -#ifdef WIN32 - #include - #include - #include -#endif - -namespace ftxui { - -// Receives input events from the OS and turns them into -// Event objects and sends to a consumer -// -// On NIX systems: -// - uses SIGWINCH for resize -// - uses getchar() for keypresses -// -// On Windows systems: -// - Uses ReadConsoleInput for resize and keypresses -class EventInputListener { - public: - EventInputListener(std::function consumer); - ~EventInputListener(); - - void stop(); - - private: - char readchar(); - void readchar_thread_func(std::function consumer); - - std::atomic quit_{false}; - std::thread readchar_thread_; -#ifndef _WIN32 - using signal_handler_t = void (*)(int); - signal_handler_t old_sigwinch_handler_; -#else - void input_thread_func(std::function consumer); - - std::mutex input_queue_mutex_; - std::condition_variable input_queue_condvar_; - std::deque input_queue_; - std::thread input_event_thread_; -#endif -}; - -} // namespace ftxui - -#endif /* end of include guard: FTXUI_COMPONENT_EVENT_INPUT_LISTENER_HPP */