Add accessibility submenu 01/45001/2 accepted/tizen/tv/20150731.005305 submit/tizen/20150730.133345
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 30 Jul 2015 09:51:40 +0000 (18:51 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 30 Jul 2015 10:47:52 +0000 (19:47 +0900)
Accessibility submenu will be used to launch accessibility features, like screen reader, screen magnification etc.

Change-Id: Ibdaba51b45d199155e02549463e5f2940aa01b0a

data/images/ico_settings_accessibility.png [new file with mode: 0644]
data/viewer/icon.edc
json/accessibility.json [new file with mode: 0644]
json/maincatalog.json
src/settings_provider.c

diff --git a/data/images/ico_settings_accessibility.png b/data/images/ico_settings_accessibility.png
new file mode 100644 (file)
index 0000000..0829cfc
Binary files /dev/null and b/data/images/ico_settings_accessibility.png differ
index c4b673e..44f67a3 100644 (file)
@@ -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 (file)
index 0000000..a05afaf
--- /dev/null
@@ -0,0 +1,34 @@
+{
+       "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"
+                                       }
+                               ]
+                       }
+               }
+       },
+       "settingtree": {
+               "accessibility": {
+                       "subsettingitems": [
+                               "screen-reader"
+                       ],
+                       "parentitem": "maincatalog"
+               }
+       }
+}
+
index 85aa908..887a747 100644 (file)
                        "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"
                }
index b61d070..ae5ef59 100644 (file)
@@ -41,6 +41,7 @@
 #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/setting/accessibility/tts"
 
 #define SYSTEM_LANGUAGE_DEFAULT_VALUE "en_US.utf8"
 #define WAKEUP_TIMER_SETUP_DEFAULT_VALUE "OFF"
@@ -66,7 +67,8 @@ enum item_type {
        SYSTEM_RESET,
        SYSTEM_PASSCODE,
        SYSTEM_CLOCK_MODE,
-       CHANNEL_LOCK
+       CHANNEL_LOCK,
+       SCREEN_READER,
 };
 
 struct keymap {
@@ -150,6 +152,10 @@ static struct keymap item_keymap[] = {
        {
                .key = "settings/channel/channel_lock",
                .type = CHANNEL_LOCK
+       },
+       {
+               "settings/accessibility/screen_reader",
+               SCREEN_READER
        }
 };
 
@@ -610,6 +616,9 @@ 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;
        default:
                break;
        }
@@ -639,6 +648,9 @@ 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;
        default:
                break;
        }