UNPKG

gpii-universal

Version:

Cross platform, core components of the GPII personalization infrastructure.

282 lines (280 loc) 14.2 kB
{ "gpiiKey": "highContrast", "preferences": { "contexts": { "gpii-default": { "name": "Default preferences", "preferences": { "http://registry.gpii.net/common/highContrast/enabled": true, "http://registry.gpii.net/common/highContrastTheme": "white-black" } } } }, "deviceContext": { "solutions": [ { "id": "com.microsoft.windows.highContrast" }, { "id": "net.gpii.uioPlus" } ], "OS": { "id": "win32", "version": "6.1.7601" } }, "solutionsRegistryEntries": { "com.microsoft.windows.highContrast": { "name": "Windows High Contrast", "contexts": { "OS": [ { "id": "win32", "version": ">=5.0" } ] }, "settingsHandlers": { "configure-spi": { "type": "gpii.windows.spiSettingsHandler", "liveness": "live", "options": { "getAction": "SPI_GETHIGHCONTRAST", "setAction": "SPI_SETHIGHCONTRAST", "uiParam": "struct_size", "pvParam": { "type": "struct", "name": "HIGHCONTRAST" }, "verifySettings": true }, "supportedSettings": { "HighContrastOn": { "schema": { "title": "High Contrast", "description": "Whether to enable/disable High Contrast.", "type": "boolean", "default": false } } }, "capabilitiesTransformations": { "HighContrastOn": { "transform": { "type": "fluid.transforms.binaryOp", "left": { "transform": { "type": "fluid.transforms.binaryOp", "leftPath": "http://registry\\.gpii\\.net/common/highContrast/enabled", "left": false, "operator": "||", "rightPath": "http://registry\\.gpii\\.net/common/highContrastTheme", "right": false } }, "operator": "&&", "right": { "transform": { "type": "fluid.transforms.binaryOp", "left": "", "leftPath": "http://registry\\.gpii\\.net/common/highContrastTheme", "operator": "!==", "right": "regular-contrast" } }, "outputPath": "value" }, "path": { "transform": { "type": "fluid.transforms.literalValue", "input": "pvParam.dwFlags.HCF_HIGHCONTRASTON" } } } }, "inverseCapabilitiesTransformations": { "http://registry\\.gpii\\.net/common/highContrast/enabled": "HighContrastOn.value" } }, "configure-registry": { "type": "gpii.windows.registrySettingsHandler", "liveness": "live", "options": { "hKey": "HKEY_CURRENT_USER", "path": "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes", "dataTypes": { "LastHighContrastTheme": "REG_SZ" } }, "supportedSettings": { "LastHighContrastTheme": { "schema": { "title": "High Contrast theme", "description": "High Contrast Theme.", "type": "string", "default": "%SystemRoot%\\resources\\Ease of Access Themes\\hcwhite.theme", "enum": [ "%SystemRoot%\\resources\\Ease of Access Themes\\hcwhite.theme", "%SystemRoot%\\resources\\Ease of Access Themes\\hcblack.theme", "%SystemRoot%\\resources\\Ease of Access Themes\\hc1.theme"] } } }, "capabilitiesTransformations": { "LastHighContrastTheme": { "transform": { "type": "fluid.transforms.valueMapper", "defaultInputPath": "http://registry\\.gpii\\.net/common/highContrastTheme", "match": { "black-white": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\hcwhite.theme", "white-black": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\hcblack.theme", "yellow-black": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\hc1.theme", "black-yellow": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\yellowOnBlack.theme", "lime-black": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\hc2.theme", "black-brown": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\blackOnBrown.theme", "gray-black": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\grayOnDark.theme", "grey-black": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\grayOnDark.theme", "gray-white": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\grayOnWhite.theme", "grey-white": "${{environment}.SystemRoot}\\resources\\Ease of Access Themes\\grayOnWhite.theme" } } } } } }, "configure": [ "settings.configure-registry", { "type": "gpii.windows.spiSettingsHandler.setHighContrastTheme", "filename": "${{registry}HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\LastHighContrastTheme}" }, "settings.configure-spi" ], "isInstalled": [ { "type": "gpii.deviceReporter.alwaysInstalled" } ] }, "net.gpii.uioPlus": { "name": "UIO+", "contexts": { "OS": [{ "id": "win32", "version": ">=5.0" }] }, "settingsHandlers": { "configuration": { "type": "gpii.settingsHandlers.webSockets", "liveness": "live", "options": { "path": "net.gpii.uioPlus" }, "supportedSettings": { "lineSpace": {}, "fontSize": {}, "characterSpace": {}, "inputsLargerEnabled": {}, "contrastTheme": {}, "selfVoicingEnabled": {}, "selectionTheme": {}, "tableOfContentsEnabled": {}, "simplifiedUiEnabled": {}, "syllabificationEnabled": {} }, "capabilitiesTransformations": { "lineSpace": "http://registry\\.gpii\\.net/common/lineSpace", "fontSize": { "transform": { "type": "fluid.transforms.round", "scale": 1, "input": { "transform": { "type": "fluid.transforms.binaryOp", "leftPath": "http://registry\\.gpii\\.net/common/fontSize", "right": 12, "operator": "/" } } } }, "characterSpace": { "transform": { "type": "fluid.transforms.round", "scale": 1, "input": { "transform": { "type": "fluid.transforms.linearScale", "offset": 1, "inputPath": "http://registry\\.gpii\\.net/common/characterSpace" } } } }, "inputsLargerEnabled": "http://registry\\.gpii\\.net/common/inputsLarger/enabled", "contrastTheme": { "transform": { "type": "fluid.transforms.condition", "condition": { "transform": { "type": "fluid.transforms.binaryOp", "left": { "transform": { "type": "fluid.transforms.binaryOp", "leftPath": "http://registry\\.gpii\\.net/common/highContrast/enabled", "left": false, "operator": "||", "rightPath": "http://registry\\.gpii\\.net/common/highContrastTheme", "right": false } }, "operator": "&&", "right": { "transform": { "type": "fluid.transforms.binaryOp", "left": "", "leftPath": "http://registry\\.gpii\\.net/common/highContrastTheme", "operator": "!==", "right": "regular-contrast" } } } }, "true": { "transform": { "type": "fluid.transforms.valueMapper", "defaultInputPath": "http://registry\\.gpii\\.net/common/highContrastTheme", "defaultOutputValue": "default", "match": { "black-white": "bw", "white-black": "wb", "black-yellow": "by", "yellow-black": "yb", "gray-dark": "gd", "gray-white": "gw", "black-brown": "bbr" } } }, "false": "default" } }, "selfVoicingEnabled": "http://registry\\.gpii\\.net/common/selfVoicing/enabled", "selectionTheme": "http://registry\\.gpii\\.net/common/highlightColor", "tableOfContentsEnabled": "http://registry\\.gpii\\.net/common/tableOfContents", "simplifiedUiEnabled": "http://registry\\.gpii\\.net/common/simplifiedUi/enabled", "syllabificationEnabled": "http://registry\\.gpii\\.net/common/syllabification/enabled" }, "inverseCapabilitiesTransformations": {} } }, "isInstalled": [ { "type": "gpii.deviceReporter.alwaysInstalled" } ] } } }