diff options
author | Joursoir <chat@joursoir.net> | 2021-12-01 19:55:57 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-12-01 19:55:57 +0300 |
commit | 547e80784f8a4ff5fc558870121cb7da591891fb (patch) | |
tree | 36e498b311580c1821d0b3db0dd4694da7744766 /Library/UefiShellUfmCommandLib/actions.c | |
parent | 1742773eee5ead8b2a96fc1151c584d24a49d161 (diff) | |
download | ufm-547e80784f8a4ff5fc558870121cb7da591891fb.tar.gz ufm-547e80784f8a4ff5fc558870121cb7da591891fb.tar.bz2 ufm-547e80784f8a4ff5fc558870121cb7da591891fb.zip |
implement shortcuts and some actions
Diffstat (limited to 'Library/UefiShellUfmCommandLib/actions.c')
-rw-r--r-- | Library/UefiShellUfmCommandLib/actions.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Library/UefiShellUfmCommandLib/actions.c b/Library/UefiShellUfmCommandLib/actions.c new file mode 100644 index 0000000..8c75c67 --- /dev/null +++ b/Library/UefiShellUfmCommandLib/actions.c @@ -0,0 +1,55 @@ +#include <Library/UefiLib.h> +#include <Library/DebugLib.h> +#include <Library/ShellLib.h> +#include <Library/UefiBootServicesTableLib.h> + +#include "dir.h" +#include "fs.h" + +#include "menu-bar.h" +#include "command-bar.h" +#include "panel.h" +#include "filemanager.h" +#include "actions.h" + +BOOLEAN jump_up(VOID) +{ + panel_move_cursor(fm_ctx.curpanel, fm_ctx.curpanel->curline - 1); + return TRUE; +} + +BOOLEAN jump_down(VOID) +{ + panel_move_cursor(fm_ctx.curpanel, fm_ctx.curpanel->curline + 1); + return TRUE; +} + +BOOLEAN change_panel(VOID) +{ + panel_set_active(fm_ctx.curpanel, FALSE); + fm_ctx.curpanel = (fm_ctx.curpanel == fm_ctx.left) ? fm_ctx.right : fm_ctx.left; + panel_set_active(fm_ctx.curpanel, TRUE); + return TRUE; +} + +BOOLEAN mark(VOID) +{ + panel_mark_file(fm_ctx.curpanel, fm_ctx.curpanel->curline); + return TRUE; +} + +BOOLEAN show_filesystems(VOID) +{ + return panel_cd_to(fm_ctx.curpanel, NULL); +} + +BOOLEAN do_nothing(VOID) +{ + return TRUE; +} + +BOOLEAN quit(VOID) +{ + fm_ctx.flag_run = FALSE; + return TRUE; +} |