Add keyboard modifiers payload to tray click events

* Add keyboard and mouse button bitsum to Tray click events payload
* Move getBoundsFromRect: to common event_util file
* Update documentation
This commit is contained in:
Nishanth Shanmugham 2015-07-27 03:15:51 -07:00
parent 99a8f29de9
commit 74b4522195
9 changed files with 70 additions and 42 deletions

View file

@ -40,12 +40,12 @@ mate::Wrappable* Tray::New(v8::Isolate* isolate, const gfx::Image& image) {
return new Tray(image);
}
void Tray::OnClicked(const gfx::Rect& bounds) {
Emit("clicked", bounds);
void Tray::OnClicked(const gfx::Rect& bounds, int modifiers) {
Emit("clicked", bounds, modifiers);
}
void Tray::OnDoubleClicked(const gfx::Rect& bounds) {
Emit("double-clicked", bounds);
void Tray::OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {
Emit("double-clicked", bounds, modifiers);
}
void Tray::OnBalloonShow() {
@ -60,8 +60,8 @@ void Tray::OnBalloonClosed() {
Emit("balloon-closed");
}
void Tray::OnRightClicked(const gfx::Rect& bounds) {
Emit("right-clicked", bounds);
void Tray::OnRightClicked(const gfx::Rect& bounds, int modifiers) {
Emit("right-clicked", bounds, modifiers);
}
void Tray::OnDropFiles(const std::vector<std::string>& files) {