2016-05-15 13:41:30 +00:00
|
|
|
const {EventEmitter} = require('events')
|
|
|
|
const {Tray} = process.atomBinding('tray')
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-03-29 00:51:11 +00:00
|
|
|
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-03-24 20:15:04 +00:00
|
|
|
Tray.prototype.setContextMenu = function (menu) {
|
|
|
|
this._setContextMenu(menu)
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-14 18:35:29 +00:00
|
|
|
// Keep a strong reference of menu.
|
2016-03-29 00:40:40 +00:00
|
|
|
this.menu = menu
|
2016-03-24 20:15:04 +00:00
|
|
|
}
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-03-24 20:15:04 +00:00
|
|
|
module.exports = Tray
|