| Line | Branch | Exec | Source | 
|---|---|---|---|
| 1 | #ifndef TERMINAL_INPUT_H | ||
| 2 | #define TERMINAL_INPUT_H | ||
| 3 | |||
| 4 | #include "key.h" | ||
| 5 | #include "terminal.h" | ||
| 6 | #include "util/debug.h" | ||
| 7 | #include "util/macros.h" | ||
| 8 | |||
| 9 | 8 | static inline bool is_newly_detected_feature ( | |
| 10 | TermFeatureFlags existing, // Existing Terminal::features bits | ||
| 11 | TermFeatureFlags detected, // Return value from query.h function | ||
| 12 | TermFeatureFlags feature // Feature flag to test | ||
| 13 | ) { | ||
| 14 | 8 | BUG_ON(!IS_POWER_OF_2(feature)); | |
| 15 | // (detected & feature) && !(existing & feature) | ||
| 16 | 8 | return ~existing & detected & feature; | |
| 17 | } | ||
| 18 | |||
| 19 | KeyCode term_read_input(Terminal *term, unsigned int esc_timeout_ms) NONNULL_ARGS; | ||
| 20 | |||
| 21 | #endif | ||
| 22 |