-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue_ncurses.h
76 lines (62 loc) · 1.47 KB
/
vue_ncurses.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef VUE_NCURSES_H
#define VUE_NCURSES_H
#include <time.h>
#include <ncurses.h>
#include "vue.h"
#define SAVED_KEYS 5
typedef struct VueNCURSES {
Vue base;
} VueNCURSES;
typedef struct NCURSESData {
WINDOW *win;
WINDOW *scoreboard;
WINDOW *msg;
Vue *self;
char *msg_text;
time_t* start_date;
} NCURSESData;
/**
* @brief Main function for the NCURSES Vue
* @param self The Vue
*/
int VueNCURSES_main(Vue *self);
/**
* @brief Draw the border for the NCURSES view
* @param data The NCURSES data
*/
void VueNCURSES_draw_border(NCURSESData* data);
/**
* @brief Initialize the NCURSES view
* @param data The NCURSES data
*/
void VueNCURSES_init(NCURSESData* data);
/**
* @brief Estimate the value based on the width
* @param a The value to estimate
* @param w1 The original width
* @param w2 The new width
* @return The estimated value
*/
int VueNCURSES_estimate(const int a, const int w1, const int w2);
/**
* @brief Get the length of a number
* @param number The number
* @return The length of the number
*/
int VueNCURSES_number_length(int number);
/**
* @brief Draw the window for the NCURSES view
* @param data The NCURSES data
*/
void VueNCURSES_draw_window(NCURSESData* data);
/**
* @brief Main loop for the NCURSES view
* @param data The NCURSES data
*/
void VueNCURSES_loop(NCURSESData* data);
/**
* @brief Destroy the NCURSES view
* @param data The NCURSES data
*/
void VueNCURSES_destroy(NCURSESData* data);
#endif // VUE_NCURSES_H