Get a key from the user. More...
Include dependency graph for get.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | KeyEvent |
| An event such as a keypress. More... | |
Macros | |
| #define | GETCH_NO_FLAGS 0 |
| No flags are set. | |
| #define | GETCH_IGNORE_MACRO (1 << 0) |
| Don't use MacroEvents. | |
| #define | MFF_NO_FLAGS 0 |
| No flags are set. | |
| #define | MFF_DEPRECATED (1 << 1) |
| Redraw the pager. | |
Typedefs | |
| typedef uint8_t | GetChFlags |
| Flags for mutt_getch(), e.g. GETCH_NO_FLAGS. | |
| typedef uint8_t | MenuFuncFlags |
| Flags, e.g. MFF_DEPRECATED. | |
Functions | |
| ARRAY_HEAD (KeyEventArray, struct KeyEvent) | |
| void | array_add (struct KeyEventArray *a, int ch, int op) |
| Add an event to the end of the array. | |
| struct KeyEvent * | array_pop (struct KeyEventArray *a) |
| Remove an event from the array. | |
| void | array_to_endcond (struct KeyEventArray *a) |
| Clear the array until an OP_END_COND. | |
| void | generic_tokenize_push_string (char *s) |
| Parse and queue a 'push' command. | |
| void | mutt_flushinp (void) |
| Empty all the keyboard buffers. | |
| void | mutt_flush_macro_to_endcond (void) |
| Drop a macro from the input buffer. | |
| struct KeyEvent | mutt_getch (GetChFlags flags) |
| Read a character from the input buffer. | |
| void | mutt_push_macro_event (int ch, int op) |
| Add the character/operation to the macro buffer. | |
| 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_unget_string (const char *s) |
| Return a string to the input buffer. | |
Variables | |
| struct KeyEventArray | MacroEvents |
| These are used for macros and exec/push commands. | |
| struct KeyEventArray | UngetKeyEvents |
| These are used in all other "normal" situations, and are not ignored when passing GETCH_IGNORE_MACRO. | |
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.h.
| typedef uint8_t GetChFlags |
Flags for mutt_getch(), e.g. GETCH_NO_FLAGS.
| typedef uint8_t MenuFuncFlags |
Flags, e.g. MFF_DEPRECATED.
| ARRAY_HEAD | ( | KeyEventArray | , |
| struct KeyEvent | ) |
Here is the call graph for this function:| void array_add | ( | struct KeyEventArray * | a, |
| int | ch, | ||
| int | op ) |
| struct KeyEvent * array_pop | ( | struct KeyEventArray * | a | ) |
Remove an event from the array.
| a | Array |
| ptr | Event |
Definition at line 70 of file get.c.
Here is the caller graph for this function:| void array_to_endcond | ( | struct KeyEventArray * | a | ) |
| 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 348 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_flushinp | ( | void | ) |
Empty all the keyboard buffers.
Definition at line 58 of file get.c.
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 166 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 210 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 155 of file get.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void mutt_unget_ch | ( | int | ch | ) |
| void mutt_unget_op | ( | int | op | ) |
| void mutt_unget_string | ( | const char * | s | ) |
|
extern |
These are used for macros and exec/push commands.
They can be temporarily ignored by passing GETCH_IGNORE_MACRO
|
extern |
These are used in all other "normal" situations, and are not ignored when passing GETCH_IGNORE_MACRO.