Bind TrayIcon to JS.
This commit is contained in:
parent
52d8d6fdb3
commit
6c7fe80ec5
13 changed files with 169 additions and 11 deletions
10
atom/browser/api/lib/tray.coffee
Normal file
10
atom/browser/api/lib/tray.coffee
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue