summaryrefslogtreecommitdiff
path: root/abi/pardes_addon.h
diff options
context:
space:
mode:
Diffstat (limited to 'abi/pardes_addon.h')
-rw-r--r--abi/pardes_addon.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/abi/pardes_addon.h b/abi/pardes_addon.h
index 2f5c53de..d8257a0b 100644
--- a/abi/pardes_addon.h
+++ b/abi/pardes_addon.h
@@ -37,7 +37,7 @@
/* Major in the high half: an addon of another major is refused. */
#define PA_ABI_MAJOR 3u
-#define PA_ABI_MINOR 2u
+#define PA_ABI_MINOR 3u
#define PA_ABI ((PA_ABI_MAJOR << 16) | PA_ABI_MINOR)
#define PA_OK 0
#define PA_RASTER_MAX (32u << 20) /* a placement's w*h*4 above this is dropped, said once */
@@ -234,6 +234,11 @@ typedef struct pa_api {
* PA_PLAIN kind's block, nor its token) `paint` alone reads; no other
* call reads it, or anything made from it. 0: refused. */
uint32_t (*draw)(const void *in, uint32_t n);
+ /* Since 3.3 (check api->size): the addon panicked (a Zig addon's
+ * `pub const panic = addon.panic;`, a C addon's fatal error). pardes ends
+ * as at a panic of its own: its crash record written, its terminal put
+ * back, its clients told; it does not return. */
+ void (*panic)(const char *msg, uint32_t n);
} pa_api;
/* A token of api->draw's. */
#define PA_DRAWN 0x80000000u
@@ -390,7 +395,7 @@ _Static_assert(sizeof(pa_rect) == 16 && sizeof(pa_cells) == 8, "pa_rect");
_Static_assert(sizeof(pa_placement) == 80, "pa_placement");
_Static_assert(sizeof(pa_paint) == 48 && sizeof(pa_view) == 32 && sizeof(pa_tick) == 128, "pa_paint");
_Static_assert(sizeof(pa_key) == 8 && sizeof(pa_mouse) == 16, "pa_key");
-_Static_assert(sizeof(pa_api) == 120 && sizeof(pa_out) == 16, "pa_api");
+_Static_assert(sizeof(pa_api) == 128 && sizeof(pa_out) == 16, "pa_api");
_Static_assert(sizeof(pa_word) == 32 && sizeof(pa_head) == 56, "pa_head");
_Static_assert(sizeof(pa_ops) == 208, "pa_ops");
#endif