diff --git a/docs/host-lvgl.md b/docs/host-lvgl.md index 82ac44f..01a3f2a 100644 --- a/docs/host-lvgl.md +++ b/docs/host-lvgl.md @@ -57,6 +57,9 @@ scope): own display driver, which an embedded target does anyway. - Dialogs are resizable; overlay changes (combo drop, popup menu, toast) still invalidate the whole frame. +- DAW embedding (`NEUI_API_EMBED`): the seams are present so the host links and the API round-trips, + but LVGL owns the whole display - there is no foreign native parent, so `set_parent` is recorded + and ignored, `event_fd` is -1, and `pump_and_tick` is a no-op. **Known cost to be aware of on 565 targets**: LVGL's software vector path renders ThorVG only into ARGB8888/XRGB8888, so on RGB565 every vector task round-trips through a temporary full-framebuffer diff --git a/hosts/crossplatform/platform_lvgl.cpp b/hosts/crossplatform/platform_lvgl.cpp index ee42de2..1def87a 100644 --- a/hosts/crossplatform/platform_lvgl.cpp +++ b/hosts/crossplatform/platform_lvgl.cpp @@ -1437,9 +1437,19 @@ namespace xpl_host g_retired_windows.push_back(w); } - void platform_set_embed_parent(Session*, uint32_t, unsigned long) {} - int platform_embed_event_fd(void*) { return -1; } - void platform_embed_pump_and_tick(void*) {} + // DAW-embedding seams - LVGL owns the whole display, so there is no foreign + // native parent to embed into. The setter still records the value (as the + // null host does) so the public NEUI_API_EMBED state round-trips; nothing + // ever acts on it, and platform_create_plugwindow ignores wd.embed_parent. + void platform_set_embed_parent(Session* session, uint32_t widget_index, + void* native_parent) + { + if (!session) return; + auto* wd = session->get_widget(widget_index); + if (wd) wd->embed_parent = reinterpret_cast(native_parent); + } + int platform_embed_event_fd(void* /*native_handle*/) { return -1; } + void platform_embed_pump_and_tick(void* /*native_handle*/) {} void platform_destroy_window(WidgetData& wd) {