2018-09-22 12:28:50 +00:00
|
|
|
'use strict'
|
|
|
|
|
2018-09-13 16:10:51 +00:00
|
|
|
const { EventEmitter } = require('events')
|
2019-05-31 00:12:46 +00:00
|
|
|
const { deprecate } = require('electron')
|
2019-03-18 19:37:06 +00:00
|
|
|
const { systemPreferences, SystemPreferences } = process.electronBinding('system_preferences')
|
2016-04-24 12:13:46 +00:00
|
|
|
|
2017-11-02 04:05:27 +00:00
|
|
|
// SystemPreferences is an EventEmitter.
|
2016-08-02 11:38:35 +00:00
|
|
|
Object.setPrototypeOf(SystemPreferences.prototype, EventEmitter.prototype)
|
2017-11-02 04:05:27 +00:00
|
|
|
EventEmitter.call(systemPreferences)
|
2016-04-24 12:13:46 +00:00
|
|
|
|
2019-05-31 00:12:46 +00:00
|
|
|
if ('appLevelAppearance' in systemPreferences) {
|
2019-06-05 05:44:16 +00:00
|
|
|
deprecate.fnToProperty(SystemPreferences.prototype, 'appLevelAppearance', '_getAppLevelAppearance', '_setAppLevelAppearance')
|
2019-05-31 00:12:46 +00:00
|
|
|
}
|
|
|
|
|
2016-04-24 12:13:46 +00:00
|
|
|
module.exports = systemPreferences
|