js_resized_event_channel

Crates.iojs_resized_event_channel
lib.rsjs_resized_event_channel
version
sourcesrc
created_at2024-10-12 03:50:18.541742
updated_at2024-12-08 07:15:43.722164
descriptionjs resized event channel (only supports full size window)
homepage
repositoryhttps://github.com/Bruce0203/js_resized_event_channel
max_upload_size
id1406105
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(Bruce0203)

documentation

README

 use js_resized_event_channel::{JsResizeEventChannel, ResizeEventChannel};
 use winit::{dpi::PhysicalSize, event_loop::EventLoop, window::WindowAttributes};

 fn main() {
     let event_loop: EventLoop<()> = EventLoop::new().unwrap();
     let window = event_loop
         .create_window(WindowAttributes::default())
         .unwrap();
     let resize_event_channel = JsResizeEventChannel::init(&window);
     event_loop
         .run(|event, event_loop| {
             if resize_event_channel.try_recv_resized_event() {
                 let _ = window.request_inner_size(resize_event_channel.size());
             }
         })
         .unwrap();
 }

Commit count: 49

cargo fmt