diff options
-rw-r--r-- | data/images/ico_settings_accessibility.png | bin | 0 -> 5304 bytes | |||
-rw-r--r-- | data/viewer/icon.edc | 60 | ||||
-rw-r--r-- | json/accessibility.json | 57 | ||||
-rw-r--r-- | json/maincatalog.json | 8 | ||||
-rw-r--r-- | src/settings_provider.cpp | 26 |
5 files changed, 148 insertions, 3 deletions
diff --git a/data/images/ico_settings_accessibility.png b/data/images/ico_settings_accessibility.png Binary files differnew file mode 100644 index 0000000..0829cfc --- /dev/null +++ b/data/images/ico_settings_accessibility.png diff --git a/data/viewer/icon.edc b/data/viewer/icon.edc index c4b673e..44f67a3 100644 --- a/data/viewer/icon.edc +++ b/data/viewer/icon.edc @@ -418,4 +418,62 @@ group { target: "icon"; } } -}
\ No newline at end of file +} + +group { + name: "accessibility"; + images { + image: "ico_settings_accessibility.png" COMP; + } + parts { + part { + name: "icon"; + type: IMAGE; + scale: 1; + description { + state: "default" 0.0; + image.normal: "ico_settings_accessibility.png"; + color: 255 255 255 153; + } + description { + state: "focused" 0.0; + image.normal: "ico_settings_accessibility.png"; + } + description { + state: "highlight" 0.0; + inherit: "focused" 0.0; + color: 255 255 255 255; + } + } + } + programs { + program { + name: MAIN_BTN_NORMAL; + signal: MAIN_BTN_NORMAL; + source: MAIN_BTN; + action: STATE_SET "default" 0.0; + target: "icon"; + } + program { + name: MAIN_BTN_FOCUSED; + signal: MAIN_BTN_FOCUSED; + source: MAIN_BTN; + action: STATE_SET "focused" 0.0; + target: "icon"; + } + program { + name: MAIN_BTN_UNFOCUSED; + signal: MAIN_BTN_UNFOCUSED; + source: MAIN_BTN; + action: STATE_SET "default" 0.0; + target: "icon"; + } + program { + name: MAIN_BTN_HIGHLIGHT; + signal: MAIN_BTN_HIGHLIGHT; + source: MAIN_BTN; + action: STATE_SET "highlight" 0.0; + target: "icon"; + } + } +} diff --git a/json/accessibility.json b/json/accessibility.json new file mode 100644 index 0000000..ecf70d5 --- /dev/null +++ b/json/accessibility.json @@ -0,0 +1,57 @@ +{ + "settingitems": { + "screen-reader": { + "display-name": "Screen Reader", + "style": "title.value", + "setting-ui": { + "style": "ctxpopup" + }, + "data": { + "key": "settings/accessibility/screen_reader", + "type": "bool", + "list": [ + { + "display-value": "OFF", + "value": "0" + }, + { + "display-value": "ON", + "value": "1" + } + ] + } + }, + "magnifier": { + "display-name": "Magnifier", + "style": "title.value", + "status": "disabled", + "setting-ui": { + "style": "ctxpopup" + }, + "data": { + "key": "settings/accessibility/magnifier", + "type": "bool", + "list": [ + { + "display-value": "OFF", + "value": "0" + }, + { + "display-value": "ON", + "value": "1" + } + ] + } + } + }, + "settingtree": { + "accessibility": { + "subsettingitems": [ + "screen-reader", + "magnifier" + ], + "parentitem": "maincatalog" + } + } +} + diff --git a/json/maincatalog.json b/json/maincatalog.json index 85aa908..887a747 100644 --- a/json/maincatalog.json +++ b/json/maincatalog.json @@ -34,6 +34,11 @@ "display-name": "SUPPORT", "style": "animicon", "resource-file": "support.edj" + }, + "accessibility": { + "display-name": "ACCESSIBILITY", + "style": "animicon", + "resource-file": "accessibility.edj" } }, "settingtree": { @@ -45,7 +50,8 @@ "network", "device-manager", "system", - "support" + "support", + "accessibility" ], "parentitem": "maincatalog" } diff --git a/src/settings_provider.cpp b/src/settings_provider.cpp index ddf3bc5..3ad54cd 100644 --- a/src/settings_provider.cpp +++ b/src/settings_provider.cpp @@ -42,6 +42,8 @@ #define KEY_SUBTITLE_LANGUAGE "db/menu/subtitle/subtitlelanguage" #define KEY_SYSTEM_LANGUAGE "db/menu_widget/language" #define KEY_SYSTEM_COUNTRY "db/menu_widget/regionformat" +#define KEY_ACCESSIBILITY_SCREEN_READER "db/menu/accessibility/screen_reader" +#define KEY_ACCESSIBILITY_MAGNIFIER "db/menu/accessibility/magnifier" #define SYSTEM_LANGUAGE_DEFAULT_VALUE "en_US.utf8" #define WAKEUP_TIMER_SETUP_DEFAULT_VALUE "OFF" @@ -67,7 +69,9 @@ enum item_type { SYSTEM_RESET, SYSTEM_PASSCODE, SYSTEM_CLOCK_MODE, - CHANNEL_LOCK + CHANNEL_LOCK, + SCREEN_READER, + MAGNIFIER, }; struct keymap { @@ -151,6 +155,14 @@ static struct keymap item_keymap[] = { { "settings/channel/channel_lock", CHANNEL_LOCK + }, + { + "settings/accessibility/screen_reader", + SCREEN_READER + }, + { + "settings/accessibility/magnifier", + MAGNIFIER } }; @@ -611,6 +623,12 @@ static int _set_bool(const char *key, const int val) case CHANNEL_LOCK: r = vconf_set_bool(KEY_CHANNEL_LOCK, val); break; + case SCREEN_READER: + r = vconf_set_bool(KEY_ACCESSIBILITY_SCREEN_READER, val); + break; + case MAGNIFIER: + r = vconf_set_bool(KEY_ACCESSIBILITY_MAGNIFIER, val); + break; default: break; } @@ -640,6 +658,12 @@ static int _get_bool(const char *key, int *val) case CHANNEL_LOCK: r = vconf_get_bool(KEY_CHANNEL_LOCK, val); break; + case SCREEN_READER: + r = vconf_get_bool(KEY_ACCESSIBILITY_SCREEN_READER, val); + break; + case MAGNIFIER: + r = vconf_get_bool(KEY_ACCESSIBILITY_MAGNIFIER, val); + break; default: break; } |