Expand description
The View Process API.
Zng isolates all render and windowing related code to a different process (the view-process), this crate
provides the API that must be implemented to create a view-process backend, plus the Controller
that
can be used from an app-process to spawn and communicate with a view-process.
§VERSION
The VERSION
of this crate must match exactly in both App-Process and View-Process, otherwise a runtime
panic error is generated.
§Same Process Patch
Dynamically loaded same process implementers must propagate a StaticPatch
, otherwise the view will not connect.
§Crate
This crate is part of the zng
project.
§Cargo Features
This crate provides 2 feature flags, 1 enabled by default.
§"ipc"
Enables creation of separate or pre-build view.
Only enables in cfg(not(any(target_os = "android", target_arch = "wasm32", target_os = "ios")))
builds.
Enabled by default.
§"var"
Implement IntoVar<T>
for API types.
Modules§
- access
- Accessibility and automation types.
- api_
extension - API extension types.
- clipboard
- Clipboard types.
- config
- System config types.
- dialog
- Native dialog types.
- display_
list - Frame builder types.
- drag_
drop - Drag&drop types.
- font
- Font types.
- image
- Image types.
- ipc
- IPC types.
- keyboard
- Keyboard types.
- mouse
- Mouse types.
- touch
- Touch types.
- window
- Window, surface and frame types.
Structs§
- AxisId
- Identifier for a specific analog axis on some device.
- Border
Side - Border side line style and color.
- Controller
- View Process controller, used in the App Process.
- Device
Id - Device ID in channel.
- Drag
Drop Id - Identifier for a drag drop operation.
- Gradient
Stop - Offset and color in a gradient.
- Inited
- View process is online.
- Reference
Frame Id - Identifies a reference frame.
- Request
- Packaged API request.
- Response
- Packaged API response.
- Static
Patch - Dynamic view-process “same process” implementations must patch the static variables used by the view-api. This patch also propagates the tracing and log contexts.
- View
Config - Configuration for starting a view-process.
- View
Process Gen - View-process generation, starts at one and changes every respawn, it is never zero.
- View
Process Offline - The View-Process disconnected or has not finished initializing, try again after the inited event.
Enums§
- Alpha
Type - Pixel color alpha type.
- Border
Style - The line style for the sides of a widget’s border.
- Event
- System and User events sent from the View Process.
- Extend
Mode - Gradient extend mode.
- Focus
Result - Result of a focus request.
- Image
Rendering - Image scaling algorithm in the renderer.
- Ime
- IME preview or insert event.
- Line
Orientation - Orientation of a straight line.
- Line
Style - Represents a line style.
- MixBlend
Mode - Color mix blend mode.
- Repeat
Mode - Nine-patch border repeat mode.
- Transform
Style - Defines if a widget is part of the same 3D space as the parent.
Constants§
- VERSION
- The App Process and View Process must be build using the same exact version and this is validated during run-time, causing a panic if the versions don’t match.
Traits§
- Api
- The view-process API.