DungeonCrawl
Loading...
Searching...
No Matches
io_handler.h
Go to the documentation of this file.
1
5#ifndef IO_HANDLER_H
6#define IO_HANDLER_H
7
8#include "../common.h"// Added for COMMON_SUCCESS
10#include "input/input_types.h"
13
14#include <notcurses/notcurses.h>
15#include <stdbool.h>
16
17// Make the init_done flag accessible from other files
18extern volatile int init_done;
19
20// Global notcurses instance and standard plane
21// These are used directly for rendering and are no longer part of a separate output thread
22extern struct notcurses* nc;
23extern struct ncplane* stdplane;
24
31int init_io_handler(void);
32
41bool run_background_task(void (*callback)(void));
42
48void shutdown_io_handler(void);
49
50#endif// IO_HANDLER_H
Defines common macros, types, and global variables for color schemes and utilities.
Exposes functions for working with input.
Declares structs for possible input types.
bool run_background_task(void(*callback)(void))
Execute a function in a background thread.
Definition io_handler.c:73
int init_io_handler(void)
Initialize the IO handler.
Definition io_handler.c:29
void shutdown_io_handler(void)
Shutdown the IO handler.
Definition io_handler.c:84
Exposes functions for drawing to the screen.
Exposes functions for outputting to the console.