use crate::interop::unmanaged_methods::{create_window_ex, WindowStyles};
use crate::offscreen_parent_window::OffscreenParentWindow;
use crate::window_impl::{WindowImpl, WindowKind, WindowProperties};
use ferroui_controls::{WindowDecorations, WindowState};
use std::rc::Rc;
pub struct EmbeddedWindowImpl;
impl EmbeddedWindowImpl {
#[allow(clippy::new_ret_no_self)]
pub fn new() -> Rc<WindowImpl> {
WindowImpl::create(
WindowKind::Embedded,
WindowProperties {
show_in_taskbar: false,
is_resizable: false,
is_minimizable: false,
is_maximizable: false,
decorations: WindowDecorations::None,
is_full_screen: false,
window_state: WindowState::Normal,
},
)
}
}
pub(crate) fn create_window(atom: u16) -> isize {
create_window_ex(0, atom, WindowStyles::WS_CHILD.bits(), 0, 0, 640, 480, OffscreenParentWindow::handle())
}