37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#ifndef __TUI_H__
|
|
#define __TUI_H__
|
|
|
|
#include <ncurses.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
#include "main.h"
|
|
#include "users.h"
|
|
|
|
#define STANDARD_WIN_COLOUR 1
|
|
#define HIGHLIGHT_COLOUR 2
|
|
#define CONTRAST_WIN_COLOUR 6
|
|
#define ERROR_WIN_COLOUR 7
|
|
#define WARNING_WIN_COLOUR 8
|
|
#define SUCCESS_WIN_COLOUR 9
|
|
|
|
void initWindow(WINDOW *_win, int window_x, int terminal_x, int terminal_y, int window_colourpair, char *header);
|
|
|
|
// type = 1 - success, 2 - warning, 3 - failure
|
|
void dialogWindow(BYTE _type, char *_message, int terminal_x, int terminal_y);
|
|
|
|
void uartDialog(char *uart_adress, int terminal_x, int terminal_y);
|
|
|
|
void mainMenu(list_t *person_list, char *db_filename, int terminal_x, int terminal_y);
|
|
|
|
void personListing(list_t *person_list, int terminal_x, int terminal_y);
|
|
|
|
void personSearch(list_t *person_list, int terminal_x, int terminal_y);
|
|
|
|
void personInfo(list_t *_list, node_t *_person, int terminal_x, int terminal_y);
|
|
|
|
int exportDialog(list_t *_list, int terminal_x, int terminal_y);
|
|
|
|
void editDatabaseMenu(list_t *_person_list, int terminal_x, int terminal_y);
|
|
|
|
#endif |