Repository navigation
Description
I've been looking at this from the GPUix Solid side because the features missing from my test projects DAW and Diffusion-style editor both need real canvas drawing.
I checked the current GPUIX 0.9 implementation. canvas is already in the React/JSX host types, but CustomElementRegistry::with_defaults() does not register a Canvas factory. So <canvas> currently falls through to the unknown custom-element path and paints nothing.
GPUIX already uses gpui::canvas() internally, and GPUI can paint quads, paths, and text directly. That looks like a good place to start without introducing a CPU bitmap or readback step.
I’d rewrite that section as:
A first Canvas2D-compatible implementation could start with the common drawing operations that cover basic custom rendering:
fillRect/strokeRectbeginPath,moveTo,lineTo,quadraticCurveTo,closePathfill/strokefillText
That would provide a useful base for charts, diagrams, waveforms, custom controls, visualizations, and other 2D rendering without trying to implement the entire Canvas2D API at once.
I would leave out getImageData, toDataURL, and other CPU readback APIs.
GPUIX already exposes activateWindow() and setWindowTitle(). The GPUI revision used by GPUIX also has runtime methods for:
window.minimize_window()
window.zoom_window()
window.toggle_fullscreen()Could GPUIX expose the same operations through the renderer?
renderer.minimizeWindow()
renderer.zoomWindow()
renderer.toggleFullscreen()I traced the existing window command code. On macOS, these can use the same update_window path as the current title and activation methods. On Windows, Linux, and FreeBSD, they can be added beside UiCommand::ActivateWindow and UiCommand::SetWindowTitle and forwarded to GPUI.
I don't see a GPUI fork change needed for these three operations.
This would let bindings expose the actual desktop controls instead of treating them as unsupported when GPUI already implements them. In GPUix Solid, I would keep the binding thin and add appWindow.minimize(), appWindow.zoom(), and appWindow.toggleFullscreen() after GPUIX exposes the renderer methods.
I'm opening the issue first because of the repos contributor guidance. If this API looks right, I can put together the implementation and tests.
Activity
Add native desktop window controls
release: @gpuix/[email protected], @gpuix/[email protected], and @gpuix/solid@…
A transition of the colour of a collapsed border no longer builds the…
A paint-only animation on a part of a table with collapsed borders is…