Add LayoutManager/BoxLayout APIs
This commit is contained in:
parent
b3edfd7d89
commit
322bde526c
14 changed files with 310 additions and 18 deletions
15
lib/browser/api/box-layout.js
Normal file
15
lib/browser/api/box-layout.js
Normal 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
|
8
lib/browser/api/layout-manager.js
Normal file
8
lib/browser/api/layout-manager.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
'use strict'
|
||||
|
||||
const {LayoutManager} = process.atomBinding('layout_manager')
|
||||
|
||||
LayoutManager.prototype._init = function () {
|
||||
}
|
||||
|
||||
module.exports = LayoutManager
|
|
@ -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'},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue