mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-22 04:38:09 +08:00
Add a Producer/Consumer system.
It allow you to create the two end of a pipe: A producer and consumer. The producer can be moved into another thread. Several producer can be created if necessary. This will ease merging: https://github.com/ArthurSonzogni/FTXUI/pull/11
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <ftxui/component/producer_consumer.hpp>
|
||||
|
||||
namespace ftxui {
|
||||
|
||||
@@ -20,7 +21,7 @@ struct Event {
|
||||
static Event Character(const std::string&);
|
||||
static Event Special(const std::string&);
|
||||
|
||||
static Event GetEvent(std::function<char()> getchar);
|
||||
static void Convert(Consumer<char>& in, Producer<Event>& out, char c);
|
||||
|
||||
// --- Arrow ---
|
||||
static Event ArrowLeft;
|
||||
|
Reference in New Issue
Block a user