Skip to main content

mgui_shell_winit/
software.rs

1use std::sync::Arc;
2
3use winit::window::Window;
4
5/// 软件回退窗口句柄(不暴露 winit 类型给应用)。
6#[derive(Clone)]
7pub struct SoftwareWindow {
8    window: Arc<Window>,
9}
10
11impl SoftwareWindow {
12    pub fn new(window: Arc<Window>) -> Self {
13        Self { window }
14    }
15
16    /// 交给 `mgui-software::SoftwarePresenter::new` 使用。
17    pub fn into_inner(self) -> Arc<Window> {
18        self.window
19    }
20}