Struct zng_view_api::window::WindowRequest
source · pub struct WindowRequest {Show 22 fields
pub id: WindowId,
pub title: Txt,
pub state: WindowStateAll,
pub kiosk: bool,
pub default_position: bool,
pub video_mode: VideoMode,
pub visible: bool,
pub taskbar_visible: bool,
pub always_on_top: bool,
pub movable: bool,
pub resizable: bool,
pub icon: Option<ImageId>,
pub cursor: Option<CursorIcon>,
pub cursor_image: Option<ImageId>,
pub transparent: bool,
pub capture_mode: bool,
pub render_mode: RenderMode,
pub focus_indicator: Option<FocusIndicator>,
pub focus: bool,
pub extensions: Vec<(ApiExtensionId, ApiExtensionPayload)>,
pub access_root: AccessNodeId,
pub ime_area: Option<DipRect>,
}Expand description
Configuration of a new window.
Fields§
§id: WindowIdID that will identify the new window.
title: TxtTitle text.
state: WindowStateAllWindow state, position, size and restore rectangle.
kiosk: boolLock-in kiosk mode.
If true the app-process will only set fullscreen states, never hide or minimize the window, never
make the window chrome visible and only request an opaque window. The view-process implementer is expected
to also never exit the fullscreen state, even temporally.
The app-process does not expect the view-process to configure the operating system to run in kiosk mode, but if possible to detect the view-process can assert that it is running in kiosk mode, logging an error if the assert fails.
default_position: boolIf the initial position should be provided the operating system,
if this is not possible the state.restore_rect.origin is used.
video_mode: VideoModeVideo mode used when the window is in exclusive state.
visible: boolWindow visibility.
taskbar_visible: boolWindow taskbar icon visibility.
always_on_top: boolIf the window is “top-most”.
movable: boolIf the user can move the window.
resizable: boolIf the user can resize the window.
icon: Option<ImageId>Window icon.
cursor: Option<CursorIcon>Window cursor icon and visibility.
cursor_image: Option<ImageId>Window custom cursor.
transparent: boolIf the window is see-through in pixels that are not fully opaque.
capture_mode: boolIf all or most frames will be screen captured.
If false all resources for capturing frame images
are discarded after each screenshot request.
render_mode: RenderModeRender mode preference for this window.
focus_indicator: Option<FocusIndicator>Focus request indicator on init.
focus: boolEnsures the window is focused after open, if not set the initial focus is decided by the windows manager, usually focusing the new window only if the process that causes the window has focus.
extensions: Vec<(ApiExtensionId, ApiExtensionPayload)>Initial payload for API extensions.
The zng-view crate implements this by calling RendererExtension::configure with the payload.
access_root: AccessNodeIdInitial accessibility info tree root widget.
This is used to declare a placeholder node on the first request for accessibility info, the Event::AccessInit event
is send to the window if any accessibility service requests the tree, the window must send the full info at that moment,
after the init the window should assume that accessibility info is required for the lifetime of the window and updates must be send.
ime_area: Option<DipRect>IME cursor area, if IME is enabled.
Implementations§
source§impl WindowRequest
impl WindowRequest
sourcepub fn enforce_kiosk(&mut self)
pub fn enforce_kiosk(&mut self)
Corrects invalid values if kiosk is true.
An error is logged for each invalid value.
Trait Implementations§
source§impl Clone for WindowRequest
impl Clone for WindowRequest
source§fn clone(&self) -> WindowRequest
fn clone(&self) -> WindowRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more