Add systemPreferences.setUserDefault for macOS

This API can be used to e.g. enable key repeat by setting
`ApplePressAndHoldEnabled` to `false` (see also #47).
This commit is contained in:
Birunthan Mohanathas 2016-11-28 15:08:22 -08:00
parent fb74f5576d
commit 486b6b9096
7 changed files with 169 additions and 11 deletions

View file

@ -67,6 +67,7 @@ void SystemPreferences::BuildPrototype(
.SetMethod("unsubscribeLocalNotification",
&SystemPreferences::UnsubscribeLocalNotification)
.SetMethod("getUserDefault", &SystemPreferences::GetUserDefault)
.SetMethod("setUserDefault", &SystemPreferences::SetUserDefault)
.SetMethod("isSwipeTrackingFromScrollEventsEnabled",
&SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled)
#endif