X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=taskasaur.c;h=15dcb9ae53d212e20aae33ed9a820f07611e6fe5;hb=63ddce932065c2d05cf6412f52fd5c4637e195a3;hp=50b72d4ab43c7769f834c1895463dd456fede760;hpb=8fb19bb7969617821e9c2c1c64d113ff2c26abaf;p=taskasaur.git diff --git a/taskasaur.c b/taskasaur.c index 50b72d4..15dcb9a 100644 --- a/taskasaur.c +++ b/taskasaur.c @@ -1,39 +1,32 @@ + #include "headers/parser.h" +#include "headers/render.h" +#include "headers/menu.h" +#include "headers/utils.h" int main(int argc, char** argv) { - Board* board; - - board = begin_parse("test_board.md"); - - for (int i = 0; i < board->todolist_count; i++) { - TodoList* todolist; - printf("List =-=-=-=-=-==-=-=-=-=-=-\n"); - todolist = board->todolist_list[i]; - printf("List name: %s\n", todolist->list_name); - printf("Num of items: %d\n", todolist->item_count); - - for (int j = 0; j < todolist->item_count; j++) { - TodoItem* todoitem; - printf("Item =-=-=-=-=-\n"); - todoitem = todolist->item_list[j]; - printf("Item name: %s\n", todoitem->item_name); - printf("Description: %s\n", todoitem->description); - printf("Num of subtasks: %d\n", todoitem->subtask_count); - - for (int k = 0; k < todoitem->subtask_count; k++) { - SubTask* subtask; - int done; - - subtask = todoitem->subtask_list[k]; - printf("Subtask: %s, %d\n", subtask->subtask_name, subtask->done); - } - } + /* Board* board; */ + /* board = begin_parse("test_board.md"); */ + /* log_todo(board); */ + + /* init curses */ + init_tscurses(); + + getch(); + MenuItem** item_list = malloc(4*sizeof(MenuItem*)); + for (int i = 0; i < 3; i++) { + item_list[i] = create_menuitem("lmao"); } - /* printf("%d\n", board->todolist_count); */ - /* printf("%s\n", board->todolist_list[1]->list_name); */ + item_list[3] = 0; + + Menu* menu = create_menu(item_list); + + exit_tscurses(); + return 0; } +