On Windows, allow the creation of popup window (#1895)

Add with_owner_window to WindowBuilderExtWindows.
Add set_enable to WindowExtWindows.
This commit is contained in:
Rodrigodd 2021-04-10 10:47:19 -03:00 committed by GitHub
parent 629cd86c7c
commit dabcb1834d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 80 additions and 11 deletions

View file

@ -15,9 +15,16 @@ use crate::event::DeviceId as RootDeviceId;
use crate::icon::Icon;
use crate::window::Theme;
#[derive(Clone)]
pub enum Parent {
None,
ChildOf(HWND),
OwnedBy(HWND),
}
#[derive(Clone)]
pub struct PlatformSpecificWindowBuilderAttributes {
pub parent: Option<HWND>,
pub parent: Parent,
pub menu: Option<HMENU>,
pub taskbar_icon: Option<Icon>,
pub no_redirection_bitmap: bool,
@ -28,7 +35,7 @@ pub struct PlatformSpecificWindowBuilderAttributes {
impl Default for PlatformSpecificWindowBuilderAttributes {
fn default() -> Self {
Self {
parent: None,
parent: Parent::None,
menu: None,
taskbar_icon: None,
no_redirection_bitmap: false,