chore: move the view APIs to their own directory (#14722)
* chore: move the view APIs to their own directory * move view api cpp files
This commit is contained in:
parent
77fb9cf416
commit
a524c5ec12
18 changed files with 43 additions and 43 deletions
15
lib/browser/api/views/box-layout.js
Normal file
15
lib/browser/api/views/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
|
15
lib/browser/api/views/button.js
Normal file
15
lib/browser/api/views/button.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict'
|
||||
|
||||
const electron = require('electron')
|
||||
|
||||
const { View } = electron
|
||||
const { Button } = process.atomBinding('button')
|
||||
|
||||
Object.setPrototypeOf(Button.prototype, View.prototype)
|
||||
|
||||
Button.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
View.prototype._init.call(this)
|
||||
}
|
||||
|
||||
module.exports = Button
|
15
lib/browser/api/views/label-button.js
Normal file
15
lib/browser/api/views/label-button.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict'
|
||||
|
||||
const electron = require('electron')
|
||||
|
||||
const { Button } = electron
|
||||
const { LabelButton } = process.atomBinding('label_button')
|
||||
|
||||
Object.setPrototypeOf(LabelButton.prototype, Button.prototype)
|
||||
|
||||
LabelButton.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
Button.prototype._init.call(this)
|
||||
}
|
||||
|
||||
module.exports = LabelButton
|
8
lib/browser/api/views/layout-manager.js
Normal file
8
lib/browser/api/views/layout-manager.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
'use strict'
|
||||
|
||||
const { LayoutManager } = process.atomBinding('layout_manager')
|
||||
|
||||
LayoutManager.prototype._init = function () {
|
||||
}
|
||||
|
||||
module.exports = LayoutManager
|
15
lib/browser/api/views/text-field.js
Normal file
15
lib/browser/api/views/text-field.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict'
|
||||
|
||||
const electron = require('electron')
|
||||
|
||||
const { View } = electron
|
||||
const { TextField } = process.atomBinding('text_field')
|
||||
|
||||
Object.setPrototypeOf(TextField.prototype, View.prototype)
|
||||
|
||||
TextField.prototype._init = function () {
|
||||
// Call parent class's _init.
|
||||
View.prototype._init.call(this)
|
||||
}
|
||||
|
||||
module.exports = TextField
|
Loading…
Add table
Add a link
Reference in a new issue