Improve some docs
This commit is contained in:
parent
6a8b51adb5
commit
185e18ad4f
|
|
@ -27,6 +27,9 @@ pub struct FullOutput {
|
||||||
pub pixels_per_point: f32,
|
pub pixels_per_point: f32,
|
||||||
|
|
||||||
/// All the active viewports, including the root.
|
/// All the active viewports, including the root.
|
||||||
|
///
|
||||||
|
/// It is up to the integration to spawn a native window for each viewport,
|
||||||
|
/// and to close any window that no longer has a viewport in this map.
|
||||||
pub viewport_output: ViewportIdMap<ViewportOutput>,
|
pub viewport_output: ViewportIdMap<ViewportOutput>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -964,6 +964,9 @@ impl ViewportCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Describes a viewport, i.e. a native window.
|
/// Describes a viewport, i.e. a native window.
|
||||||
|
///
|
||||||
|
/// This is returned by [`crate::Context::run`] on each frame, and should be applied
|
||||||
|
/// by the integration.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct ViewportOutput {
|
pub struct ViewportOutput {
|
||||||
/// Id of our parent viewport.
|
/// Id of our parent viewport.
|
||||||
|
|
@ -976,6 +979,10 @@ pub struct ViewportOutput {
|
||||||
pub class: ViewportClass,
|
pub class: ViewportClass,
|
||||||
|
|
||||||
/// The window attrbiutes such as title, position, size, etc.
|
/// The window attrbiutes such as title, position, size, etc.
|
||||||
|
///
|
||||||
|
/// Use this when first constructing the native window.
|
||||||
|
/// Also check for changes in it using [`ViewportBuilder::patch`],
|
||||||
|
/// and apply them as needed.
|
||||||
pub builder: ViewportBuilder,
|
pub builder: ViewportBuilder,
|
||||||
|
|
||||||
/// The user-code that shows the GUI, used for deferred viewports.
|
/// The user-code that shows the GUI, used for deferred viewports.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue