Add LayoutManager/BoxLayout APIs

This commit is contained in:
Cheng Zhao 2018-05-22 17:08:27 +09:00
parent b3edfd7d89
commit 322bde526c
14 changed files with 310 additions and 18 deletions

View file

@ -0,0 +1,15 @@
'use strict'
const electron = require('electron')
const {LayoutManager} = electron
const {BoxLayout} = process.atomBinding('box_layout')
Object.setPrototypeOf(BoxLayout.prototype, LayoutManager.prototype)
BoxLayout.prototype._init = function () {
// Call parent class's _init.
LayoutManager.prototype._init.call(this)
}
module.exports = BoxLayout

View file

@ -0,0 +1,8 @@
'use strict'
const {LayoutManager} = process.atomBinding('layout_manager')
LayoutManager.prototype._init = function () {
}
module.exports = LayoutManager

View file

@ -2,6 +2,7 @@
module.exports = [
{name: 'app', file: 'app'},
{name: 'autoUpdater', file: 'auto-updater'},
{name: 'BoxLayout', file: 'box-layout'},
{name: 'BrowserView', file: 'browser-view'},
{name: 'BrowserWindow', file: 'browser-window'},
{name: 'contentTracing', file: 'content-tracing'},
@ -9,6 +10,7 @@ module.exports = [
{name: 'globalShortcut', file: 'global-shortcut'},
{name: 'ipcMain', file: 'ipc-main'},
{name: 'inAppPurchase', file: 'in-app-purchase'},
{name: 'LayoutManager', file: 'layout-manager'},
{name: 'Menu', file: 'menu'},
{name: 'MenuItem', file: 'menu-item'},
{name: 'net', file: 'net'},