https://github.com/xigh/winit-up-to-date-simple-example
Simple (at least I tried) Rust winit example
https://github.com/xigh/winit-up-to-date-simple-example
rust windowing winit
Last synced: over 1 year ago
JSON representation
Simple (at least I tried) Rust winit example
- Host: GitHub
- URL: https://github.com/xigh/winit-up-to-date-simple-example
- Owner: xigh
- License: mit
- Created: 2024-03-15T20:51:21.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T21:10:07.000Z (about 2 years ago)
- Last Synced: 2025-01-08T06:20:05.494Z (over 1 year ago)
- Topics: rust, windowing, winit
- Language: Rust
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple (at least I tried) Rust winit example "0.29.15"
This simple example only create windows and manage windows list.
The [ZxWindow](https://github.com/xigh/winit-up-to-date-simple-example/blob/master/src/window/mod.rs#L27) structure is an abstration to a Window. You can put everything in here. For the moment, it only implements :
```rust
pub fn on_key_input(&mut self, code: KeyCode, pressed: bool, queue: &Rc)
```
Where [CmdQueue](https://github.com/xigh/winit-up-to-date-simple-example/blob/master/src/cmd.rs#L7) allows the method to communicate with the event_loop, by example, in order to create new windows (you can add other commands).
And the event_loop handles ZxWindow list. If this list is empty, the application exists.
# next steps :
- [ ] add wgpu stuff
- [ ] implements other events
- [ ] add async ops (threads, update cmdqueue)
- [ ] add fullscreen support
- [ ] add system tray icons