diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-01 08:31:01 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-12 03:34:18 +0200 |
commit | f54e7e8c2aeb4fafebf0d5bd5570b060462c9ecf (patch) | |
tree | b3bcc7ca21cda7d655bfcc0d9ec26d4a6668f27f /src/escpos/parser.h |
Initial commit
Diffstat (limited to 'src/escpos/parser.h')
-rw-r--r-- | src/escpos/parser.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/escpos/parser.h b/src/escpos/parser.h new file mode 100644 index 0000000..373a251 --- /dev/null +++ b/src/escpos/parser.h @@ -0,0 +1,21 @@ +#pragma once + +#include <escpos/memory.h> +#include <stdbool.h> +#include <stdint.h> + +struct escpos_canvas { + uint8_t *data; + size_t w, h; +}; + +struct escpos_parser; +struct escpos_parser { + size_t (*read)(const struct escpos_parser *parser, void *ptr, const size_t size); + void (*write)(const struct escpos_parser *parser, const uint8_t *ptr, const size_t w, const size_t h); + struct escpos_canvas canvas; + struct escpos_mem window; +}; + +bool +escpos_parser_parse(struct escpos_parser *parser, const char *name); |