lurq 0.22.2

A Rust UI toolkit with typed components, retained state, reactive signals, GPU rendering, and DevTools.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{images::WgpuExternalImageSlot, impl_into_node};

impl_into_node!(GpuViewport);

/// A Lurq element backed by a texture rendered through the shared WGPU device.
///
/// Standard node builders provide sizing, mouse/scroll handlers, keyboard
/// focus, and drag capture; this component only supplies the zero-copy image.
impl GpuViewport {
  pub fn new(slot: WgpuExternalImageSlot) -> Self {
    Self::from_node(crate::node::Node::image(slot.image_data()))
  }
}