-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.h
33 lines (28 loc) · 882 Bytes
/
ui.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
#ifndef UI_H
#define UI_H
/**
* Initialize the chat user interface. Call this once at startup.
*/
void ui_init();
/**
* Add a message to the chat window. If username is NULL, the message is
* indented by two spaces.
*
* \param username The username string. Truncated to 8 characters by default.
* This function does *not* take ownership of this memory.
* \param message The message string. This function does *not* take ownership
* of this memory.
*/
void ui_add_message(char* username, char* message);
/**
* Read an input line, with some upper bound determined by the UI.
*
* \returns A pointer to allocated memory that holds the line. The caller is
* responsible for freeing this memory.
*/
char* ui_read_input();
/**
* Shut down the user interface. Call this once during shutdown.
*/
void ui_shutdown();
#endif