From 31eacdeefe6099e68dd8596faab8108671e4c6a5 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Fri, 11 Apr 2025 23:37:41 +0000 Subject: refactor(core): Move SandConfig into own header file --- src/core/config.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/core/config.h (limited to 'src/core/config.h') diff --git a/src/core/config.h b/src/core/config.h new file mode 100644 index 0000000..389a146 --- /dev/null +++ b/src/core/config.h @@ -0,0 +1,15 @@ +#ifndef SAND_CONFIG_H +#define SAND_CONFIG_H + +// This module defines the configuration type. This is a fully transparent (i.e. +// not opaque) type which the consumer of the core library is supposed to +// assemble themselves. It contains hooks which the State will use for all effects. + +// This handler is used for output from the user-supplied actual program. +typedef void (* SandPrintHandler)(const char *message, size_t length); + +typedef struct { + SandPrintHandler print_handler; +} SandConfig; + +#endif -- cgit v1.2.3