diff options
Diffstat (limited to 'src/xbm.h')
-rw-r--r-- | src/xbm.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/xbm.h b/src/xbm.h new file mode 100644 index 0000000..9b71568 --- /dev/null +++ b/src/xbm.h @@ -0,0 +1,25 @@ +#pragma once +#include <stdbool.h> +#include <stddef.h> +#include <sys/types.h> +#include <stdio.h> + + +struct xbm { + unsigned int width; + unsigned int height; + size_t bits_size; + size_t bits_len; + char *bits; +}; + +typedef struct xbm xbm_t; + +void init_xbm (xbm_t *xbm); +void free_xbm (xbm_t *xbm); +bool alloc_xbm (xbm_t *xbm, const size_t size); +bool load_xbm ( + FILE *f, + xbm_t *xbm, + unsigned int *width, + unsigned int *height); |