   openFocusedWindowDevTools: ->
     BrowserWindow.getFocusedWindow()?.openDevTools
       detach: true
+  getWindowsIndex: ->
+    return global.windowsIndex
+  getWindow: (name) ->
+    return global.windowsIndex[name]
+  getMainWindow: ->
+    return global.mainWindow

        'web-security': false
        'plugins': true
    current = new BrowserWindow options
    # Default menu in v0.27.3
    if process.versions['electron'] >= '0.27.3'
      current.setMenu options.menu || null

_ = require 'underscore'
{BrowserWindow} = require 'electron'
global.windows = windows = []
global.windowsIndex = windowsIndex = {}

forceClose = false
state = []  # Window state before hide
