Get a key from the user. More...
#include "config.h"#include <ctype.h>#include <stdbool.h>#include <stddef.h>#include <unistd.h>#include "mutt/lib.h"#include "config/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "get.h"#include "menu/lib.h"#include "globals.h"#include "keymap.h"#include "menu.h"#include "module_data.h"#include "monitor.h"
Include dependency graph for get.c:Go to the source code of this file.
Functions | |
| void | mutt_flushinp (void) |
| MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData. | |
| struct KeyEvent * | array_pop (struct KeyEventArray *a) |
| Remove an event from the array. | |
| void | array_add (struct KeyEventArray *a, int ch, int op) |
| Add an event to the end of the array. | |
| void | array_to_endcond (struct KeyEventArray *a) |
| Clear the array until an OP_END_COND. | |
| void | mutt_unget_ch (int ch) |
| Return a keystroke to the input buffer. | |
| void | mutt_unget_op (int op) |
| Return an operation to the input buffer. | |
| void | mutt_push_macro_event (int ch, int op) |
| Add the character/operation to the macro buffer. | |
| void | mutt_flush_macro_to_endcond (void) |
| Drop a macro from the input buffer. | |
| int | mutt_monitor_getch (void) |
| Get a character and poll the filesystem monitor. | |
| struct KeyEvent | mutt_getch (GetChFlags flags) |
| Read a character from the input buffer. | |
| void | km_error_key (const struct MenuDefinition *md) |
| Handle an unbound key sequence. | |
| void | generic_tokenize_push_string (char *s) |
| Parse and queue a 'push' command. | |
| KeyGatherFlags | gather_functions (const struct MenuDefinition *md, const keycode_t *keys, int key_len, struct KeymapMatchArray *kma) |
| Find functions whose keybindings match. | |
| struct KeyEvent | km_dokey (const struct MenuDefinition *md, GetChFlags flags) |
| Determine what a keypress should do. | |
Variables | |
| static const int | MaxKeyLoop = 10 |
| XXX. | |
Get a key from the user.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file get.c.
| void mutt_flushinp | ( | void | ) |
MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData.
Empty all the keyboard buffers
Definition at line 60 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct KeyEvent * array_pop | ( | struct KeyEventArray * | a | ) |
Remove an event from the array.
| a | Array |
| ptr | Event |
Definition at line 73 of file get.c.
Here is the caller graph for this function:| void array_add | ( | struct KeyEventArray * | a, |
| int | ch, | ||
| int | op ) |
| void array_to_endcond | ( | struct KeyEventArray * | a | ) |
| void mutt_unget_ch | ( | int | ch | ) |
| void mutt_unget_op | ( | int | op | ) |
| void mutt_push_macro_event | ( | int | ch, |
| int | op ) |
Add the character/operation to the macro buffer.
| ch | Character to add |
| op | Operation to add |
Adds the ch/op to the macro buffer. This should be used for macros, push, and exec commands only.
Definition at line 144 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_flush_macro_to_endcond | ( | void | ) |
Drop a macro from the input buffer.
All the macro text is deleted until an OP_END_COND command, or the buffer is empty.
Definition at line 156 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_monitor_getch | ( | void | ) |
Get a character and poll the filesystem monitor.
| num | Character pressed |
| ERR | Timeout |
Definition at line 168 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct KeyEvent mutt_getch | ( | GetChFlags | flags | ) |
Read a character from the input buffer.
| flags | Flags, e.g. GETCH_IGNORE_MACRO |
| obj | KeyEvent to process |
The priority for reading events is:
This function can return:
{ 0, OP_ABORT }{ 0, OP_REPAINT }{ 0, OP_TIMEOUT } Definition at line 201 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void km_error_key | ( | const struct MenuDefinition * | md | ) |
Handle an unbound key sequence.
| md | Menu Definition |
Definition at line 287 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void generic_tokenize_push_string | ( | char * | s | ) |
Parse and queue a 'push' command.
| s | String to push into the key queue |
Parses s for <function> syntax and adds the whole sequence the macro buffer.
Definition at line 311 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| KeyGatherFlags gather_functions | ( | const struct MenuDefinition * | md, |
| const keycode_t * | keys, | ||
| int | key_len, | ||
| struct KeymapMatchArray * | kma ) |
Find functions whose keybindings match.
| [in] | md | Menu Definition of all valid functions |
| [in] | keys | User-entered key string to match |
| [in] | key_len | Length of key string |
| [out] | kma | Array for the results |
| flags | Results, e.g. KEY_GATHER_MATCH |
Definition at line 386 of file get.c.
Here is the caller graph for this function:| struct KeyEvent km_dokey | ( | const struct MenuDefinition * | md, |
| GetChFlags | flags ) |
Determine what a keypress should do.
| md | Menu Definition |
| flags | Flags, e.g. GETCH_IGNORE_MACRO |
| ptr | Event |
Definition at line 437 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function: