Implement 'drop-files' tray event on OS X.
This commit is contained in:
parent
2cd6ad1a97
commit
d342c9a6df
7 changed files with 49 additions and 4 deletions
|
@ -64,6 +64,10 @@ void Tray::OnRightClicked(const gfx::Rect& bounds) {
|
|||
Emit("right-clicked", bounds);
|
||||
}
|
||||
|
||||
void Tray::OnDropFiles(const std::vector<std::string>& files) {
|
||||
Emit("drop-files", files);
|
||||
}
|
||||
|
||||
bool Tray::IsDestroyed() const {
|
||||
return !tray_icon_;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define ATOM_BROWSER_API_ATOM_API_TRAY_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/api/event_emitter.h"
|
||||
#include "atom/browser/ui/tray_icon_observer.h"
|
||||
|
@ -41,12 +42,13 @@ class Tray : public mate::EventEmitter,
|
|||
virtual ~Tray();
|
||||
|
||||
// TrayIconObserver:
|
||||
void OnClicked(const gfx::Rect&) override;
|
||||
void OnClicked(const gfx::Rect& bounds) override;
|
||||
void OnDoubleClicked() override;
|
||||
void OnBalloonShow() override;
|
||||
void OnBalloonClicked() override;
|
||||
void OnBalloonClosed() override;
|
||||
void OnRightClicked(const gfx::Rect&) override;
|
||||
void OnRightClicked(const gfx::Rect& bounds) override;
|
||||
void OnDropFiles(const std::vector<std::string>& files) override;
|
||||
|
||||
// mate::Wrappable:
|
||||
bool IsDestroyed() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue