summaryrefslogtreecommitdiff
path: root/src/kinds/pardes_addon.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kinds/pardes_addon.h')
-rw-r--r--src/kinds/pardes_addon.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/kinds/pardes_addon.h b/src/kinds/pardes_addon.h
index c3bfb354..9c101fee 100644
--- a/src/kinds/pardes_addon.h
+++ b/src/kinds/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 0u
+#define PA_ABI_MINOR 1u
#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 */
@@ -121,6 +121,14 @@ typedef struct pa_paint {
uint32_t cap, n;
float at, span;
uint32_t pointer, pad;
+ /* Optional since 3.1: one sketchbook SGPU v1 scene for this pane.
+ * Check api->abi >= 3.1 BEFORE reading these fields on an older host.
+ * NULL means unsupported. Copies bytes during the call (stack is OK);
+ * returns PA_OK or refuses. At most 4 MiB, last successful call wins.
+ * Keep cells/rasters as fallback: accepting a scene does not promise a
+ * GPU in every view. GPU scenes are display data, never saved state. */
+ int (*gpu)(void *ctx, const uint8_t *bytes, uint32_t n);
+ void *gpu_ctx;
} pa_paint;
/* ---- input ---- */
@@ -352,7 +360,7 @@ _Static_assert(sizeof(pa_cell) == 20, "pa_cell");
_Static_assert(sizeof(pa_window) == 24, "pa_window");
_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) == 32 && sizeof(pa_view) == 32 && sizeof(pa_tick) == 128, "pa_paint");
+_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) == 112 && sizeof(pa_out) == 16, "pa_api");
_Static_assert(sizeof(pa_word) == 32 && sizeof(pa_head) == 56, "pa_head");