--- /dev/null
+/*
+ * Copyright(c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+internal static partial class Interop
+{
+ internal static partial class Vconf
+ {
+ [global::System.Runtime.InteropServices.DllImport("libvconf.so.0", EntryPoint = "vconf_get_bool")]
+ internal static extern int GetVconfBool(string key, out bool value);
+
+ [global::System.Runtime.InteropServices.DllImport("libvconf.so.0", EntryPoint = "vconf_set_bool")]
+ internal static extern int SetVconfBool(string key, bool value);
+ }
+}
using Tizen.Applications;\r
using System.Runtime.InteropServices;\r
using System.Collections.Generic;\r
+using static Interop.Vconf;\r
\r
namespace SettingAccessibility\r
{\r
{\r
static Navigator navigator;\r
static ScrollableBase settingScroll;\r
+ private static readonly string VconfkeyAccessibilityTts = "db/setting/accessibility/tts";\r
\r
protected override void OnCreate(string contentInfo, Window window)\r
{\r
if (e.IsSelected)\r
{\r
Tizen.Log.Debug("NUI", "Switch is selected! Screen Reader turns on. \n");\r
- // TODO : Need to add new Enable API\r
- //Accessibility.BridgeEnableAutoInit();\r
+ int ret = SetVconfBool(VconfkeyAccessibilityTts, true);\r
+ if (ret != 0)\r
+ {\r
+ Tizen.Log.Error("NUI", "Setting vconf is failed. error code ["+ret+"] \n");\r
+ }\r
}\r
else\r
{\r
Tizen.Log.Debug("NUI", "Switch is unselected! Screen Reader turns off. \n");\r
- // TODO : Need to add new Disable API\r
- //Accessibility.BridgeDisableAutoInit();\r
+ int ret = SetVconfBool(VconfkeyAccessibilityTts, false);\r
+ if (ret != 0)\r
+ {\r
+ Tizen.Log.Error("NUI", "Setting vconf is failed. error code ["+ret+"] \n");\r
+ }\r
}\r
};\r
// Extra is placed at the end(right end) of the item.\r