diff options
author | Joursoir <chat@joursoir.net> | 2021-11-23 13:30:51 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-11-23 13:30:51 +0300 |
commit | 7fa2e3d34f4cf2bbf611e3af70def1fab3a8a33f (patch) | |
tree | 1087c7a888d0bc94bccc158699b3499ecb5cd557 /Library/UefiShellUfmCommandLib/panel.h | |
parent | ca42c5ae860d5e902c2cc349b6c7ca065d2dfd8d (diff) | |
download | ufm-7fa2e3d34f4cf2bbf611e3af70def1fab3a8a33f.tar.gz ufm-7fa2e3d34f4cf2bbf611e3af70def1fab3a8a33f.tar.bz2 ufm-7fa2e3d34f4cf2bbf611e3af70def1fab3a8a33f.zip |
implement the panel
Diffstat (limited to 'Library/UefiShellUfmCommandLib/panel.h')
-rw-r--r-- | Library/UefiShellUfmCommandLib/panel.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Library/UefiShellUfmCommandLib/panel.h b/Library/UefiShellUfmCommandLib/panel.h new file mode 100644 index 0000000..b0492e7 --- /dev/null +++ b/Library/UefiShellUfmCommandLib/panel.h @@ -0,0 +1,52 @@ +#ifndef UFM_PANEL_H +#define UFM_PANEL_H + +#include <Uefi.h> + +struct screen; +struct window; +struct dir_list; +struct fs_array; + +struct panel_ctx { + struct window *wname, *wsize, *wmodt; + struct window *winfo; + BOOLEAN show_fs; // is filesystems showing now? + + CONST CHAR16 *cwd; // current work directory + + UINTN curline; // current line + struct dir_list *dirs; // directory contents + struct fs_array *fsa; // aviable file systems + + UINTN list_lines; // number of lines in the files list + UINTN start_entry; // file index at the beginning of the files list + UINTN marked; // count of marked files +}; + +/* + * Creates a panel with given parameters. Filled with files from the + * specified path + * + * scr: the information of the screen + * path: the pointer to path string + * cols: the number of columns + * lines: the number of lines + * x: the column coordinate (starts from 0) of upper left corner of the window + * y: the line coordinate (starts from 0) of upper left corner of the window + * + * return: A pointer to the allocated structure or NULL if allocation fails +*/ +struct panel_ctx *panel_alloc(struct screen *scr, CONST CHAR16 *path, + INT32 cols, INT32 lines, INT32 x, INT32 y); + +/* + * Deletes the panel, frees the structure + * + * w: the panel on which to operate + * + * return: VOID +*/ +VOID panel_release(struct panel_ctx *p); + +#endif /* UFM_PANEL_H */ |