mac: Add win.beginSheet(sheet)/endSheet(sheet) API
This commit is contained in:
parent
2c5f4aadfb
commit
f2cbd7cb36
6 changed files with 38 additions and 0 deletions
|
@ -964,6 +964,18 @@ void NativeWindowMac::SetParentWindow(NativeWindow* parent) {
|
|||
[parent->GetNativeWindow() addChildWindow:window_ ordered:NSWindowAbove];
|
||||
}
|
||||
|
||||
void NativeWindowMac::BeginSheet(NativeWindow* sheet) {
|
||||
[window_ beginSheet:sheet->GetNativeWindow()
|
||||
completionHandler:^(NSModalResponse) {
|
||||
}];
|
||||
}
|
||||
|
||||
void NativeWindowMac::EndSheet(NativeWindow* sheet) {
|
||||
sheet->Hide();
|
||||
[window_ endSheet:sheet->GetNativeWindow()];
|
||||
sheet->CloseImmediately();
|
||||
}
|
||||
|
||||
gfx::NativeWindow NativeWindowMac::GetNativeWindow() {
|
||||
return window_;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue