lib-ui · crate
kinogaki-ui-shell
Kinogaki UI's native shell: opens the windows, runs the winit event loop, turns window events into kinogaki_ui input, paints each frame with kinogaki-ui-wgpu and drives an App.
- Repository
- lib-ui (kinogaki/lib-ui)
- Folder
libs/lib-ui/crates/shell- Source
- 20 files, 5,735 lines
- Tests
- 1 file, 491 lines
What it is
Kinogaki UI's native shell: opens the windows, runs the winit event loop, turns window events into kinogaki_ui input, paints each frame with kinogaki-ui-wgpu and drives an App.
The shell started as eframe and egui-winit 0.36.2 (MIT OR Apache-2.0); see the repository's THIRD_PARTY_NOTICES.md and docs/HISTORY.md.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-ui | lib-ui | normal | Kinogaki UI: the immediate-mode UI framework Kinogaki applications are built on. |
kinogaki-ui-wgpu | lib-ui | normal | kinogaki-ui drawn with wgpu. |
Third-party
| Crate | Version | Licence | Frozen in | As | Also used by |
|---|---|---|---|---|---|
arboard | 3.7.0 | MIT OR Apache-2.0 | lib-ui/vendor | normal | none |
log | 0.4.34 | MIT OR Apache-2.0 | lib-ui/vendor | normal | kinogaki-editor, kinogaki-image-pipeline, kinogaki-scene, kinogaki-shared, kinogaki-ui, kinogaki-ui-wgpu |
objc2 | 0.6.5 | MIT | lib-ui/vendor | normal | kinogaki-dialogs, kinogaki-editor, kinogaki-spectre |
objc2-app-kit | 0.3.2 | Zlib OR Apache-2.0 OR MIT | lib-ui/vendor | normal | kinogaki-dialogs, kinogaki-editor |
objc2-core-foundation | 0.3.2 | Zlib OR Apache-2.0 OR MIT | lib-ui/vendor | normal | kinogaki-shared |
objc2-foundation | 0.3.2 | MIT | lib-ui/vendor | normal | kinogaki-dialogs, kinogaki-shared, kinogaki-spectre |
raw-window-handle | 0.6.2 | MIT OR Apache-2.0 OR Zlib | lib-ui/vendor | normal | kinogaki-ui-wgpu |
wgpu | 30.0.1 | MIT OR Apache-2.0 | lib-ui/vendor | normal | kinogaki-color-wgpu, kinogaki-composit-wgpu, kinogaki-editor, kinogaki-render-api, kinogaki-shared, kinogaki-ui-wgpu, kinogaki-viewport-gpu |
winit | 0.30.13 | Apache-2.0 | lib-ui/vendor | normal | none |
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
kinogaki-studio | Core and the app | normal | Kinogaki Studio: the editor in a window, after the plugins load. |
Modules
app(private)What an application gives the shell: theAppit runs and theNativeOptionsof its root window.123 linesepi_integration(private)The application side of the run loop: runs thecrate::Appfor each pass and decides when the root window closes.268 linesmacos(private)macOS application details AppKit does not take from winit.25 linespainter(private)no module doc766 linesrun(private)no module doc314 linessys(private)The shell's only unsafe code, where winit and wgpu offer no safe way:316 linessys::fs_events(private)no module doc55 lineswatch(private)Watch: files watched for changes on disk, through the system's file-system events (macOS's FSEvents): a change to one, made by any application (written in place, written beside it and renamed over it, made where it was missing, removed), calls back on a ...107 lineswgpu_integration(private)The windowed run loop: one winit window per viewport, painted with wgpu, and the immediate viewports a pass opens.453 lineswgpu_integration::running(private)The running app: one pass of UI and painting per viewport, and window events.448 lineswgpu_integration::viewports(private)Viewport windows: creation, commands, immediate viewports and the UI's viewport output.358 lineswindow(private)eguibindings forwinit.509 lineswindow::clipboard(private)The window's system clipboard, read and written on a thread of its own: putting a large text there (an app's copy of tens of megabytes) never stalls the window, and a read waits for the writes asked before it.186 lineswindow::commands(private)Viewport commands applied to a winit window.260 lineswindow::create(private)Window creation from a viewport builder: attributes, monitor and display placement.301 lineswindow::dropped_file(private)no module doc23 lineswindow::input(private)Winit window events turned into UI input: pointer, touch, wheel, keyboard and IME.505 lineswindow::keys(private)Key, mouse button and cursor translations between winit and the UI.314 lineswindow::output(private)The UI's platform output applied to the window: cursor, clipboard, links and IME.220 lineswinit_integration(private)no module doc134 lines
Public types and traits
At the crate root
Traits App
Structs CreationContextNativeOptionsWatch
Enums ErrorFrameStage
Type aliases AppCreatorFrameTraceResult
Re-exported from other crates
From kinogaki_ui_wgpu AdapterLimitsSurfaceConfigWgpuConfiguration
By module: 7 public types and traits in 2 modules
app AppAppCreatorCreationContextFrameStageFrameTraceNativeOptions
watch Watch
Besides these, 1 public function at module level.
