Move all sources under atom/.
This commit is contained in:
parent
26ddbbb0ee
commit
516d46444d
217 changed files with 519 additions and 519 deletions
34
atom/browser/api/lib/app.coffee
Normal file
34
atom/browser/api/lib/app.coffee
Normal file
|
@ -0,0 +1,34 @@
|
|||
EventEmitter = require('events').EventEmitter
|
||||
|
||||
bindings = process.atomBinding 'app'
|
||||
|
||||
Application = bindings.Application
|
||||
Application::__proto__ = EventEmitter.prototype
|
||||
|
||||
app = new Application
|
||||
|
||||
app.getHomeDir = ->
|
||||
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
||||
|
||||
app.setApplicationMenu = (menu) ->
|
||||
require('menu').setApplicationMenu menu
|
||||
|
||||
app.getApplicationMenu = ->
|
||||
require('menu').getApplicationMenu()
|
||||
|
||||
app.commandLine =
|
||||
appendSwitch: bindings.appendSwitch,
|
||||
appendArgument: bindings.appendArgument
|
||||
|
||||
if process.platform is 'darwin'
|
||||
app.dock =
|
||||
bounce: (type='informational') -> bindings.dockBounce type
|
||||
cancelBounce: bindings.dockCancelBounce
|
||||
setBadge: bindings.dockSetBadgeText
|
||||
getBadge: bindings.dockGetBadgeText
|
||||
|
||||
# Support old event name.
|
||||
app.once 'ready', -> app.emit 'finish-launching'
|
||||
|
||||
# Only one App object pemitted.
|
||||
module.exports = app
|
Loading…
Add table
Add a link
Reference in a new issue