summaryrefslogtreecommitdiff
path: root/quantum/painter/qp_stream.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-09-19 07:30:08 +1000
committerGitHub <noreply@github.com>2022-09-19 07:30:08 +1000
commit1849897444629403fc2e473da6d6f74f8f4f1b8c (patch)
tree6eeb53a35498b557dfc1e09031d11894ceb21209 /quantum/painter/qp_stream.h
parente9bdc4eeb14b12d49d7841c5a0090a68c25ff7ae (diff)
[QP] Add RGB565 surface. Docs clarification, cleanup, tabsification, and reordering. (#18396)
Diffstat (limited to 'quantum/painter/qp_stream.h')
-rw-r--r--quantum/painter/qp_stream.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/painter/qp_stream.h b/quantum/painter/qp_stream.h
index 878b9bf530..c0e745adc1 100644
--- a/quantum/painter/qp_stream.h
+++ b/quantum/painter/qp_stream.h
@@ -41,6 +41,8 @@ typedef struct qp_stream_t qp_stream_t;
uint32_t qp_stream_read_impl(void *output_buf, uint32_t member_size, uint32_t num_members, qp_stream_t *stream);
uint32_t qp_stream_write_impl(const void *input_buf, uint32_t member_size, uint32_t num_members, qp_stream_t *stream);
+#define qp_stream_close(stream_ptr) (((qp_stream_t *)(stream_ptr))->close((qp_stream_t *)(stream_ptr)))
+
#define STREAM_EOF ((int16_t)(-1))
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -52,6 +54,7 @@ struct qp_stream_t {
int (*seek)(qp_stream_t *stream, int32_t offset, int origin);
int32_t (*tell)(qp_stream_t *stream);
bool (*is_eof)(qp_stream_t *stream);
+ void (*close)(qp_stream_t *stream);
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -77,6 +80,6 @@ typedef struct qp_file_stream_t {
FILE * file;
} qp_file_stream_t;
-qp_file_stream_t qo_make_file_stream(FILE *f);
+qp_file_stream_t qp_make_file_stream(FILE *f);
#endif // QP_STREAM_HAS_FILE_IO