mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
33 lines
623 B
C
33 lines
623 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "../cli_ansi.h"
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
typedef struct CliShell CliShell;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Key combo handler
|
||
|
|
* @return true if the event was handled, false otherwise
|
||
|
|
*/
|
||
|
|
typedef bool (*CliShellKeyComboAction)(CliKeyCombo combo, void* context);
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
CliKeyCombo combo;
|
||
|
|
CliShellKeyComboAction action;
|
||
|
|
} CliShellKeyComboRecord;
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
CliShellKeyComboAction fallback;
|
||
|
|
size_t count;
|
||
|
|
CliShellKeyComboRecord records[];
|
||
|
|
} CliShellKeyComboSet;
|
||
|
|
|
||
|
|
void cli_shell_execute_command(CliShell* cli_shell, FuriString* command);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|