mac: Add win.disable/enable/isEnabled() API
This commit is contained in:
parent
214dd97165
commit
1a4b4a65c9
7 changed files with 76 additions and 0 deletions
|
@ -293,6 +293,18 @@ bool Window::IsVisible() {
|
|||
return window_->IsVisible();
|
||||
}
|
||||
|
||||
void Window::Disable() {
|
||||
window_->Disable();
|
||||
}
|
||||
|
||||
void Window::Enable() {
|
||||
window_->Enable();
|
||||
}
|
||||
|
||||
bool Window::IsEnabled() {
|
||||
return window_->IsEnabled();
|
||||
}
|
||||
|
||||
void Window::Maximize() {
|
||||
window_->Maximize();
|
||||
}
|
||||
|
@ -726,6 +738,9 @@ void Window::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("showInactive", &Window::ShowInactive)
|
||||
.SetMethod("hide", &Window::Hide)
|
||||
.SetMethod("isVisible", &Window::IsVisible)
|
||||
.SetMethod("enable", &Window::Enable)
|
||||
.SetMethod("disable", &Window::Disable)
|
||||
.SetMethod("isEnabled", &Window::IsEnabled)
|
||||
.SetMethod("maximize", &Window::Maximize)
|
||||
.SetMethod("unmaximize", &Window::Unmaximize)
|
||||
.SetMethod("isMaximized", &Window::IsMaximized)
|
||||
|
|
|
@ -95,6 +95,9 @@ class Window : public mate::TrackableObject<Window>,
|
|||
void ShowInactive();
|
||||
void Hide();
|
||||
bool IsVisible();
|
||||
void Disable();
|
||||
void Enable();
|
||||
bool IsEnabled();
|
||||
void Maximize();
|
||||
void Unmaximize();
|
||||
bool IsMaximized();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue