Core types and patterns. The crate is used as gpui::*.
Entry point. Creates the platform, wgpu device, and event loop. Use Application::new().run().
Application context passed to the run callback. Provides window creation, global state, and platform access.
Context available inside a view. Used for notifications, listeners, spawning child views.
Trait that every view must implement. Returns the element tree. Takes &mut self, &mut Window, &mut Context<Self>.
Building block. All UI is composed of elements via the builder pattern. Most UI uses div() with style modifiers.
Chainable style methods on every element.
Event listeners need .id() on the element. Listeners receive 4 args: (this, event, window, cx).
For WASM targets, use #[wasm_bindgen(start)] and console_error_panic_hook.