Bind TrayIcon to JS.

This commit is contained in:
Cheng Zhao 2014-05-30 23:57:54 +08:00
parent 52d8d6fdb3
commit 6c7fe80ec5
13 changed files with 169 additions and 11 deletions

View file

@ -0,0 +1,10 @@
EventEmitter = require('events').EventEmitter
bindings = process.atomBinding 'tray'
Tray = bindings.Tray
Tray::__proto__ = EventEmitter.prototype
Tray::setContextMenu = (menu) ->
@_setContextMenu menu
@menu = menu # Keep a strong reference of menu.
module.exports = Tray