// SPDX-FileCopyrightText: © 2026 Vladimir Zorin // SPDX-License-Identifier: LicenseRef-OWL-1.0-or-later // Licensed under OWL v1.0+. See LICENSE. /* Shared surface layout for C modules that read term.gfx surfaces directly * (gfx_core.c owns the type; drm_core.c blits from it). The struct and the * metatable name must match what luaopen_term_gfx_core registers — any * consumer validates a userdata with luaL_checkudata(L, idx, GFX_SURFACE_MT). */ #ifndef LILUSH_GFX_CORE_H #define LILUSH_GFX_CORE_H #include #define GFX_SURFACE_MT "term.gfx.surface" typedef struct { int w; int h; uint8_t *px; /* w*h*4, RGBA row-major; NULL only between alloc failure and __gc */ } gfx_surface_t; #endif /* LILUSH_GFX_CORE_H */