add mouse-move event and click event position for tray
This commit is contained in:
parent
ee519b7552
commit
0b205019b6
7 changed files with 41 additions and 9 deletions
|
@ -86,8 +86,8 @@ mate::WrappableBase* Tray::New(mate::Handle<NativeImage> image,
|
|||
return new Tray(args->isolate(), args->GetThis(), image);
|
||||
}
|
||||
|
||||
void Tray::OnClicked(const gfx::Rect& bounds, int modifiers) {
|
||||
EmitWithFlags("click", modifiers, bounds);
|
||||
void Tray::OnClicked(const gfx::Rect& bounds, const gfx::Point& location, int modifiers) {
|
||||
EmitWithFlags("click", modifiers, bounds, location);
|
||||
}
|
||||
|
||||
void Tray::OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {
|
||||
|
@ -130,6 +130,10 @@ void Tray::OnMouseExited(const gfx::Point& location, int modifiers) {
|
|||
EmitWithFlags("mouse-leave", modifiers, location);
|
||||
}
|
||||
|
||||
void Tray::OnMouseMoved(const gfx::Point& location, int modifiers) {
|
||||
EmitWithFlags("mouse-move", modifiers, location);
|
||||
}
|
||||
|
||||
void Tray::OnDragEntered() {
|
||||
Emit("drag-enter");
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class Tray : public mate::TrackableObject<Tray>,
|
|||
~Tray() override;
|
||||
|
||||
// TrayIconObserver:
|
||||
void OnClicked(const gfx::Rect& bounds, int modifiers) override;
|
||||
void OnClicked(const gfx::Rect& bounds, const gfx::Point& location, int modifiers) override;
|
||||
void OnDoubleClicked(const gfx::Rect& bounds, int modifiers) override;
|
||||
void OnRightClicked(const gfx::Rect& bounds, int modifiers) override;
|
||||
void OnBalloonShow() override;
|
||||
|
@ -61,6 +61,7 @@ class Tray : public mate::TrackableObject<Tray>,
|
|||
void OnDragEnded() override;
|
||||
void OnMouseEntered(const gfx::Point& location, int modifiers) override;
|
||||
void OnMouseExited(const gfx::Point& location, int modifiers) override;
|
||||
void OnMouseMoved(const gfx::Point& location, int modifiers) override;
|
||||
|
||||
void SetImage(v8::Isolate* isolate, mate::Handle<NativeImage> image);
|
||||
void SetPressedImage(v8::Isolate* isolate, mate::Handle<NativeImage> image);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue