Mercurial > hg > nnchat
comparison ui.h @ 713:93d0e1547842
th-libs now uses stdbool.h if possible, so we need to rename all
BOOL/TRUE/FALSE to bool/true/false.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Dec 2022 13:20:25 +0200 |
parents | 6fa9c36d0634 |
children |
comparison
equal
deleted
inserted
replaced
712:3a3e4fc53ac7 | 713:93d0e1547842 |
---|---|
38 | 38 |
39 typedef struct | 39 typedef struct |
40 { | 40 { |
41 th_ringbuf_t *data; // "Backbuffer" data for this window | 41 th_ringbuf_t *data; // "Backbuffer" data for this window |
42 int pos; // Current position in the window, 0 = real time | 42 int pos; // Current position in the window, 0 = real time |
43 BOOL dirty; | 43 bool dirty; |
44 | 44 |
45 int num; | 45 int num; |
46 char *id; // Chatter ID, NULL = main window | 46 char *id; // Chatter ID, NULL = main window |
47 | 47 |
48 nn_line_t *line; | 48 nn_line_t *line; |
55 | 55 |
56 | 56 |
57 typedef struct | 57 typedef struct |
58 { | 58 { |
59 time_t prevKeepAlive; | 59 time_t prevKeepAlive; |
60 BOOL insertMode, isError, update, mask, done; | 60 bool insertMode, isError, update, mask, done; |
61 th_conn_t *conn; | 61 th_conn_t *conn; |
62 void (*debugMsg)(const char *fmt, ...); | 62 void (*debugMsg)(const char *fmt, ...); |
63 } nn_editstate_t; | 63 } nn_editstate_t; |
64 | 64 |
65 | 65 |
66 extern nn_window_t *currWin; | 66 extern nn_window_t *currWin; |
67 extern BOOL appCursesInit, appQuitFlag; | 67 extern bool appCursesInit, appQuitFlag; |
68 extern int scrHeight, scrWidth; | 68 extern int scrHeight, scrWidth; |
69 | 69 |
70 BOOL nnwin_init(int delay); | 70 bool nnwin_init(int delay); |
71 void nnwin_shutdown(); | 71 void nnwin_shutdown(); |
72 void nnwin_reset(void); | 72 void nnwin_reset(void); |
73 | 73 |
74 void nnwin_update(BOOL force, BOOL mask, nn_editbuf_t *ebuf, const char *username, const unsigned int usercolor); | 74 void nnwin_update(bool force, bool mask, nn_editbuf_t *ebuf, const char *username, const unsigned int usercolor); |
75 | 75 |
76 nn_window_t * nnwin_main_window(); | 76 nn_window_t * nnwin_main_window(); |
77 nn_window_t * nnwin_get(const int index); | 77 nn_window_t * nnwin_get(const int index); |
78 nn_window_t * nnwin_find(const char *id); | 78 nn_window_t * nnwin_find(const char *id); |
79 void nnwin_set_current(nn_window_t *); | 79 void nnwin_set_current(nn_window_t *); |
80 | 80 |
81 BOOL nnwin_open(const char *name, BOOL curwin); | 81 bool nnwin_open(const char *name, bool curwin); |
82 void nnwin_close(nn_window_t *win); | 82 void nnwin_close(nn_window_t *win); |
83 | 83 |
84 int nnwin_print(nn_window_t *win, const char *fmt); | 84 int nnwin_print(nn_window_t *win, const char *fmt); |
85 | 85 |
86 void nnwin_input_process(nn_editbuf_t *editBuf, nn_editstate_t *editState, | 86 void nnwin_input_process(nn_editbuf_t *editBuf, nn_editstate_t *editState, |
87 BOOL (*callback)(int, nn_editbuf_t *, nn_editstate_t *)); | 87 bool (*callback)(int, nn_editbuf_t *, nn_editstate_t *)); |
88 | 88 |
89 char * nnwin_prompt_requester(BOOL allowEmpty, nn_editstate_t *, | 89 char * nnwin_prompt_requester(bool allowEmpty, nn_editstate_t *, |
90 BOOL (*callback)(int, nn_editbuf_t *, nn_editstate_t *), | 90 bool (*callback)(int, nn_editbuf_t *, nn_editstate_t *), |
91 void (*update)(nn_editbuf_t *, nn_editstate_t *)); | 91 void (*update)(nn_editbuf_t *, nn_editstate_t *)); |
92 | 92 |
93 | 93 |
94 BOOL nn_log_open(nn_window_t *win); | 94 bool nn_log_open(nn_window_t *win); |
95 void nn_log_close(nn_window_t *win); | 95 void nn_log_close(nn_window_t *win); |
96 | 96 |
97 #endif | 97 #endif |