electron/atom/browser/api/lib/tray.js

29 lines
751 B
JavaScript
Raw Normal View History

2016-01-12 02:40:23 +00:00
var EventEmitter, Tray, deprecate;
deprecate = require('electron').deprecate;
EventEmitter = require('events').EventEmitter;
Tray = process.atomBinding('tray').Tray;
Tray.prototype.__proto__ = EventEmitter.prototype;
Tray.prototype._init = function() {
/* Deprecated. */
deprecate.rename(this, 'popContextMenu', 'popUpContextMenu');
deprecate.event(this, 'clicked', 'click');
deprecate.event(this, 'double-clicked', 'double-click');
deprecate.event(this, 'right-clicked', 'right-click');
return deprecate.event(this, 'balloon-clicked', 'balloon-click');
};
Tray.prototype.setContextMenu = function(menu) {
this._setContextMenu(menu);
/* Keep a strong reference of menu. */
return this.menu = menu;
};
module.exports = Tray;