ferroui-win32 0.3.0

The Windows platform backend: windows, the message loop, input, screens and the software surface over the Win32 API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! The hidden window that owns the windows without a taskbar button and is
//! the parent of embedded windows before they are placed.

use crate::simple_window::SimpleWindow;

/// The hidden parent window of the calling thread.
pub struct OffscreenParentWindow;

impl OffscreenParentWindow {
    /// The handle of the hidden parent window, which is created on first
    /// use and lives as long as the thread.
    pub fn handle() -> isize {
        ferroui_base::ferro_thread_local! {
            static SIMPLE_WINDOW: SimpleWindow = SimpleWindow::new(None);
        }
        SIMPLE_WINDOW.with(SimpleWindow::handle)
    }
}