Add 'blur' window event.

This commit is contained in:
Cheng Zhao 2013-05-24 17:58:39 +08:00
parent edf2e84895
commit 9c86978da0
2 changed files with 5 additions and 0 deletions

View file

@ -67,6 +67,10 @@ void Window::OnWindowClosed() {
delete this;
}
void Window::OnWindowBlur() {
Emit("blur");
}
// static
v8::Handle<v8::Value> Window::New(const v8::Arguments &args) {
v8::HandleScope scope;

View file

@ -37,6 +37,7 @@ class Window : public EventEmitter,
const std::string& title) OVERRIDE;
virtual void WillCloseWindow(bool* prevent_default) OVERRIDE;
virtual void OnWindowClosed() OVERRIDE;
virtual void OnWindowBlur() OVERRIDE;
private:
static v8::Handle<v8::Value> New(const v8::Arguments &args);