app_window 0.3.3

Cross-platform window library
Documentation
// SPDX-License-Identifier: MPL-2.0
use app_window::input::debug_window_show;
use app_window::input::keyboard::Keyboard;
use app_window::input::mouse::Mouse;
use some_executor::SomeExecutor;
use some_executor::observer::Observer;

async fn test_board() {
    #[cfg(target_arch = "wasm32")]
    std::panic::set_hook(Box::new(console_error_panic_hook::hook));
    let _k = Keyboard::coalesced().await;
    let _m = Mouse::coalesced().await;

    std::mem::forget(_k);
    std::mem::forget(_m);
}

fn main() {
    app_window::application::main(|| {
        app_window::application::submit_to_main_thread("show window".to_string(), || {
            debug_window_show();
        });

        let task = some_executor::task::Task::without_notifications(
            "input_main".into(),
            some_executor::task::Configuration::new(
                some_executor::hint::Hint::Unknown,
                some_executor::Priority::UserInteractive,
                some_executor::Instant::now(),
            ),
            test_board(),
        );
        some_executor::current_executor::current_executor()
            .spawn_objsafe(task.into_objsafe())
            .detach();
    });
}