Merge pull request #9760 from shubham2892/Add-mouse-enter-and-mouse-exit-event-for-Tray
Add mouse-enter and mouse-exit events for tray
This commit is contained in:
commit
e44f655503
7 changed files with 69 additions and 1 deletions
|
@ -122,6 +122,14 @@ void Tray::OnDropText(const std::string& text) {
|
|||
Emit("drop-text", text);
|
||||
}
|
||||
|
||||
void Tray::OnMouseEntered(const gfx::Point& location, int modifiers) {
|
||||
EmitWithFlags("mouse-enter", modifiers, location);
|
||||
}
|
||||
|
||||
void Tray::OnMouseExited(const gfx::Point& location, int modifiers) {
|
||||
EmitWithFlags("mouse-leave", modifiers, location);
|
||||
}
|
||||
|
||||
void Tray::OnDragEntered() {
|
||||
Emit("drag-enter");
|
||||
}
|
||||
|
|
|
@ -59,6 +59,8 @@ class Tray : public mate::TrackableObject<Tray>,
|
|||
void OnDragEntered() override;
|
||||
void OnDragExited() override;
|
||||
void OnDragEnded() override;
|
||||
void OnMouseEntered(const gfx::Point& location, int modifiers) override;
|
||||
void OnMouseExited(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