Function manage

Source
pub fn manage(
    on_layout: impl FnMut(LayoutArgs) -> LayoutNode + Send + 'static,
) -> LayoutRequester
Expand description

Manages layout requests from the compositor.

You must call this function to begin handling incoming layout requests. Whenever a layout request comes in, on_layout will be called with the arguments of the layout. The closure must then return the root of a layout tree through a LayoutNode.

This returns a LayoutRequester that allows you to force the compositor to emit a layout request.

See the module level documentation for more information on how to generate layouts.