basic implementation of main_window component and file list fixes

This commit is contained in:
2026-04-07 17:06:29 +03:00
parent 2414abbdcb
commit 9dabb06d99
14 changed files with 151 additions and 109 deletions
+4 -2
View File
@@ -30,11 +30,13 @@ int64_t u_utf8_conver_to_wide(const char *utf8_str, wchar_t **restrict wide_str,
return 0;
}
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str) {
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str, int max_len) {
wchar_t *wname = NULL;
size_t nsize = 0;
u_utf8_conver_to_wide(utf8_str, &wname, &nsize);
mvwaddwstr(win, y, x, wname);
/* mvwaddwstr(win, y, x, wname); */
wmove(win,(y),(x));
waddnwstr(win, wname, max_len);
free(wname);
return nsize;
}
+1 -1
View File
@@ -8,6 +8,6 @@
size_t u_utf8_code_points_count(const char *s);
int64_t u_utf8_convert_to_wide(const char *utf8_str, wchar_t **restrict wide_str,
size_t *restrict len);
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str);
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str, int max_len);
#endif