From 994f95b845e854379d59f6720d3fb0b38372dd0b Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 15 Nov 2020 11:29:10 -0800 Subject: [PATCH] Move inputter_t private bits to the bottom of the class Just a reorganization to clarify what parts are the interface. --- src/input.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/input.h b/src/input.h index 0bb328d92..e6232fbb7 100644 --- a/src/input.h +++ b/src/input.h @@ -23,21 +23,6 @@ void init_input(); struct input_mapping_t; class inputter_t { - input_event_queue_t event_queue_; - std::vector input_function_args_{}; - bool function_status_{false}; - - // We need a parser to evaluate bindings. - const std::shared_ptr parser_; - - void function_push_arg(wchar_t arg); - void function_push_args(readline_cmd_t code); - void mapping_execute(const input_mapping_t &m, bool allow_commands); - void mapping_execute_matching_or_generic(bool allow_commands); - bool mapping_is_match(const input_mapping_t &m); - maybe_t find_mapping(); - char_event_t read_characters_no_readline(); - public: /// Construct from a parser, and the fd from which to read. explicit inputter_t(parser_t &parser, int in = STDIN_FILENO); @@ -68,6 +53,22 @@ class inputter_t { /// Pop an argument from the function argument stack. wchar_t function_pop_arg(); + + private: + input_event_queue_t event_queue_; + std::vector input_function_args_{}; + bool function_status_{false}; + + // We need a parser to evaluate bindings. + const std::shared_ptr parser_; + + void function_push_arg(wchar_t arg); + void function_push_args(readline_cmd_t code); + void mapping_execute(const input_mapping_t &m, bool allow_commands); + void mapping_execute_matching_or_generic(bool allow_commands); + bool mapping_is_match(const input_mapping_t &m); + maybe_t find_mapping(); + char_event_t read_characters_no_readline(); }; struct input_mapping_name_t {