cmdfx 0.3.1
Lightweight game engine for your terminal
Loading...
Searching...
No Matches
screen.h
Go to the documentation of this file.
1
11#pragma once
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17// Window API
18
23const char* Window_getTitle();
24
29void Window_setTitle(const char* title);
30
37void Window_getSize(int* width, int* height);
38
44void Window_setSize(int width, int height);
45
46// Screen API
47
54void Screen_getSize(int* width, int* height);
55
68void Screen_getMousePos(int* x, int* y);
69
81
88int Screen_setEchoEnabled(int enabled);
89
102
109int Screen_setLineBuffered(int enabled);
110
120
128
129#ifdef __cplusplus
130}
131#endif
int Screen_setLineBuffered(int enabled)
Sets whether or not line buffering is enabled.
void Window_setTitle(const char *title)
Sets the title of the terminal window.
void Window_setSize(int width, int height)
Sets the size of the terminal window.
void Screen_ensureInTerminal()
Ensures that the program is running in a terminal.
int Screen_setEchoEnabled(int enabled)
Sets whether or not echoing is enabled.
void Screen_getSize(int *width, int *height)
Gets the size of the screen, and stores it in the width and height variables.
int Screen_isEchoEnabled()
Gets whether or not echoing is enabled.
const char * Window_getTitle()
Gets the title of the terminal window.
int Screen_isInTerminal()
Checks if the program is running in a terminal.
void Screen_getMousePos(int *x, int *y)
Gets the position of the mouse, and stores it in the x and y variables.
int Screen_isLineBuffered()
Gets whether or not line buffering is enabled.
void Window_getSize(int *width, int *height)
Gets the size of the terminal window, and stores it in the width and height variables.