# Independent custom windows (M6)

`et.custom-window.v1` is an optional C service. Declare the `custom-window`
capability and feature in the plugin manifest, then request
`ET_SERVICE_CUSTOM_WINDOW` or use `et::sdk::Window`. The service registers one
worker-owned window per plugin. `show()` opens or focuses it; `focus()` and
`close()` require no broker UI model. A user close is reported through `is_open`
after the next `tick()`. The worker calls `tick()` at approximately 60 Hz.

All calls and callbacks are serialized on the worker dispatcher. Native window,
graphics and ImGui pointers stay in the plugin module; no pointer crosses IPC.
Callbacks should return promptly so heartbeats and ET service results can run.
Exceptions or failed frames fail only that plugin worker. Worker shutdown closes
the window before the plugin's `stop()` callback; `stop()` should also clean up
idempotently. Background jobs cannot invoke the window service.

The [imgui-inspector](../examples/imgui-inspector/README.md) example builds
against the exported SDK. It uses GLFW 3.4 and Dear ImGui 1.92.3 with OpenGL 3.3
on Windows and Linux X11. Both source distributions and their licenses are
included under `vendor/`. On Linux, install OpenGL and X11 development packages
including Xrandr, Xinerama, Xcursor and Xi. The example has no Qt dependency.

Open **Examples / ImGui inspector** in the Plugins menu, then use **Open / reopen**.
The ET panel offers focus and close; the independent window plots live RPM and
can select another channel or refresh ET metadata. The native window uses GLFW
input and updates ImGui font scale from the current monitor content scale.
This is an independent OS window, not an embedded or docked Qt Quick surface.

Windows acceptance: `scripts/verify-plugin-window.ps1` builds the exported
example, verifies actual nonuniform OpenGL framebuffer pixels, native mouse and
keyboard events, resize, close/reopen, worker crash containment and ET panel
registration. It can run with a system-only PATH against a staged host. Linux
uses the same source/backend with X11. Pi/ARM64 rendering, a physical second
monitor, monitor hot-plug and Wayland are separate platform gates.
