2015-11-12 18:28:04 +08:00
|
|
|
{EventEmitter} = require 'events'
|
|
|
|
{Tray} = process.atomBinding 'tray'
|
2014-05-30 23:57:54 +08:00
|
|
|
|
|
|
|
Tray::__proto__ = EventEmitter.prototype
|
2015-08-10 13:00:15 +08:00
|
|
|
|
2014-05-30 23:57:54 +08:00
|
|
|
Tray::setContextMenu = (menu) ->
|
|
|
|
@_setContextMenu menu
|
|
|
|
@menu = menu # Keep a strong reference of menu.
|
|
|
|
|
2015-08-10 13:00:15 +08:00
|
|
|
# Keep compatibility with old APIs.
|
|
|
|
Tray::popContextMenu = Tray::popUpContextMenu
|
|
|
|
|
2014-05-30 23:57:54 +08:00
|
|
|
module.exports = Tray
|