1 #ifndef FILE_BROWSER_H_ 2 #define FILE_BROWSER_H_ 3 4 #include "common.h" 5 #include "free_glyph.h" 6 7 #include <SDL2/SDL.h> 8 9 typedef struct { 10 Files files; 11 size_t cursor; 12 String_Builder dir_path; 13 String_Builder file_path; 14 } File_Browser; 15 16 Errno fb_open_dir(File_Browser *fb, const char *dir_path); 17 Errno fb_change_dir(File_Browser *fb); 18 void fb_render(const File_Browser *fb, SDL_Window *window, Free_Glyph_Atlas *atlas, Simple_Renderer *sr); 19 const char *fb_file_path(File_Browser *fb); 20 21 #endif // FILE_BROWSER_H_
