aboutsummaryrefslogtreecommitdiffstats
path: root/libtracebitmap.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libtracebitmap.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libtracebitmap.h b/libtracebitmap.h
new file mode 100644
index 0000000..1f8b13e
--- /dev/null
+++ b/libtracebitmap.h
@@ -0,0 +1,25 @@
+/* See LICENSE file for copyright and license details. */
+#ifndef LIBTRACEBITMAP_H
+#define LIBTRACEBITMAP_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+#define LIBTRACEBITMAP_INK_OFF 0
+#define LIBTRACEBITMAP_INK_ON 1
+/* Other values in (struct libtracebitmap_bitmap).image invoke undefined behaviour */
+
+struct libtracebitmap_bitmap {
+ size_t height;
+ size_t width;
+ uint8_t *image; /* (uint8_t [.height][.width]) */
+};
+
+int libtracebitmap_trace(
+ struct libtracebitmap_bitmap *bitmap, /* image will be erased, but not deallocated */
+ int (*new_component)(int negative, void *user_data),
+ int (*new_stop)(size_t y, size_t x, void *user_data),
+ int (*component_finished)(void *user_data),
+ void *user_data);
+
+#endif