mgui-shell-winit 0.8.0

winit 适配层:Window → WindowShell / ShellEvent,以及软件回退窗口句柄
Documentation
use std::sync::Arc;

use winit::window::Window;

/// 软件回退窗口句柄(不暴露 winit 类型给应用)。
#[derive(Clone)]
pub struct SoftwareWindow {
    window: Arc<Window>,
}

impl SoftwareWindow {
    pub fn new(window: Arc<Window>) -> Self {
        Self { window }
    }

    /// 交给 `mgui-software::SoftwarePresenter::new` 使用。
    pub fn into_inner(self) -> Arc<Window> {
        self.window
    }
}