diff options
| author | cflip <cflip@cflip.net> | 2023-01-11 11:18:24 -0700 |
|---|---|---|
| committer | cflip <cflip@cflip.net> | 2023-01-11 11:18:24 -0700 |
| commit | 61c387397d03c479ca110a02bfa78cd39fa82656 (patch) | |
| tree | c0c4a538867eef968e9c977053470999e89400bd /window.h | |
| parent | 9e6f24187ebe2577fde7c7a971a8cc408f4aeaac (diff) | |
Get editor size from the window instead of the terminal
Previously the editor would resize itself upon startup by finding the
size of the current terminal window, but now that it is running in an
actual window it should get the number of rows and columns from there.
This also adds parameters for the window size in rows and columns to the
window_init() function.
Diffstat (limited to 'window.h')
| -rw-r--r-- | window.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3,9 +3,10 @@ struct editor_state; -void window_init(); +void window_init(const char *title, int rows, int cols); int window_handle_event(struct editor_state *editor); void window_redraw(struct editor_state *editor); +void window_get_size(int *rows, int *cols); void window_destroy(); #endif |
