2015-11-13 08:41:33 +00:00
|
|
|
{deprecate} = require 'electron'
|
2015-11-12 10:28:04 +00:00
|
|
|
{EventEmitter} = require 'events'
|
2014-05-30 15:57:54 +00:00
|
|
|
|
2015-11-13 08:41:33 +00:00
|
|
|
{Tray} = process.atomBinding 'tray'
|
2014-05-30 15:57:54 +00:00
|
|
|
Tray::__proto__ = EventEmitter.prototype
|
2015-08-10 05:00:15 +00:00
|
|
|
|
2015-11-13 08:41:33 +00:00
|
|
|
Tray::_init = ->
|
|
|
|
# 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'
|
|
|
|
deprecate.event this, 'balloon-clicked', 'balloon-click'
|
|
|
|
|
2014-05-30 15:57:54 +00:00
|
|
|
Tray::setContextMenu = (menu) ->
|
|
|
|
@_setContextMenu menu
|
|
|
|
@menu = menu # Keep a strong reference of menu.
|
|
|
|
|
|
|
|
module.exports = Tray
|