Fix formatting 64/195064/1
authorLukasz Wlazly <l.wlazly@partner.samsung.com>
Mon, 10 Dec 2018 09:35:04 +0000 (10:35 +0100)
committerLukasz Wlazly <l.wlazly@partner.samsung.com>
Mon, 10 Dec 2018 09:35:04 +0000 (10:35 +0100)
Change-Id: Iefee3f0b1594c6fd0fc642a2c99f525fab7e0c3d

49 files changed:
src/AccessibilityLauncherPage.cpp
src/AccessibilityLauncherPage.hpp
src/AccessoriesSwitchesPage.cpp
src/AccessoriesSwitchesPage.hpp
src/ActionPage.hpp
src/AddSwitchPage.cpp
src/AddSwitchPage.hpp
src/CameraSwitchesPage.cpp
src/CameraSwitchesPage.hpp
src/GenGroupItemData.hpp
src/MainData.cpp
src/MainData.hpp
src/RemoveSwitchPage.cpp
src/ScreenReaderPage.cpp
src/ScreenReaderPage.hpp
src/ScreenReaderSettingsPage.cpp
src/ScreenSwitchPage.cpp
src/ScreenSwitchPage.hpp
src/SetValueLayout.cpp
src/SetValueLayout.hpp
src/SetValuePage.cpp
src/SetValuePage.hpp
src/SettingAccessibility.hpp
src/SettingPopup.cpp
src/SettingPopup.hpp
src/SwitchesPage.cpp
src/SwitchesPage.hpp
src/TranslatedString.cpp
src/TranslatedString.hpp
src/UniversalSwitchConfiguration.hpp
src/UniversalSwitchPage.cpp
src/UniversalSwitchPage.hpp
src/UniversalSwitchSettingsPage.cpp
src/UniversalSwitchSettingsPage.hpp
src/UpdateSwitchPage.cpp
src/UpdateSwitchPage.hpp
src/setting-accessibility-main.cpp
src/setting-accessibility-universal-switch-dbus.cpp
src/setting-accessibility-universal-switch-dbus.h
src/setting-accessibility.cpp
src/setting-accessibility.h
src/setting-common-draw-genlist.cpp
src/setting-common-draw-widget.cpp
src/setting-common-draw-widget.h
src/setting-common-general-func.cpp
src/setting-common-view.cpp
src/setting-common-view.h
src/setting-debug.h
src/utils.hpp

index 4ae0a66..5df9de3 100644 (file)
@@ -23,7 +23,8 @@
 
 #include <string>
 
-namespace {
+namespace
+{
        const std::string LAUNCHER_NAMES[3] = {
                "IDS_ST_BODY_ACCESSIBILITY",
                "IDS_ST_MBODY_SCREEN_READER_HTTS",
@@ -34,7 +35,7 @@ namespace {
 
 AccessibilityLauncherPage::AccessibilityLauncherPage(SettingAccessibility *ad)
 {
-    auto items = new ItemWrapper[utils::lenOf(LAUNCHER_NAMES)];
+       auto items = new ItemWrapper[utils::lenOf(LAUNCHER_NAMES)];
 
        retm_if(items == NULL, "new failed");
        for (auto i = 0u; i < utils::lenOf(LAUNCHER_NAMES); ++i)
@@ -60,19 +61,19 @@ AccessibilityLauncherPage::AccessibilityLauncherPage(SettingAccessibility *ad)
        }
 
        item = createGendialGroupItem(
-                       genlist, &itc_1text_1icon, onMouseUpGendialListCb, items, SwallowType::ICON_RADIO, state,
-                       state ? "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON" : "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF",
-                       {}, checkboxCb);
+                          genlist, &itc_1text_1icon, onMouseUpGendialListCb, items, SwallowType::ICON_RADIO, state,
+                          state ? "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON" : "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF",
+                          {}, checkboxCb);
 
        if (item)
                item->userdata = items;
 
        item = createGendialGroupItem(
-                       genlist, &ad->itc_multiline_sub,
-                       NULL, ad, SwallowType::INVALID, 0,
-                       {},
-                       "IDS_ACCS_ACCESSIBILITY_LAUNCHER_COMMENT",
-                       NULL);
+                          genlist, &ad->itc_multiline_sub,
+                          NULL, ad, SwallowType::INVALID, 0,
+                          {},
+                          "IDS_ACCS_ACCESSIBILITY_LAUNCHER_COMMENT",
+                          NULL);
 
        if (item) {
                elm_genlist_item_select_mode_set(item->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
@@ -85,10 +86,10 @@ AccessibilityLauncherPage::AccessibilityLauncherPage(SettingAccessibility *ad)
        }
        for (auto i = 0u; i < utils::lenOf(LAUNCHER_NAMES); i++) {
                GenGroupItemData *item = createGendialGroupItem(
-                       genlist, &itc_1text_1icon,
-                       onItemSelectedCb, ad, SwallowType::ICON_RADIO, vconf_state & (1 << i),
-                       items[i].name,
-                       {}, onCheckboxChangeCb);
+                                                                        genlist, &itc_1text_1icon,
+                                                                        onItemSelectedCb, ad, SwallowType::ICON_RADIO, vconf_state & (1 << i),
+                                                                        items[i].name,
+                                                                        {}, onCheckboxChangeCb);
 
                if (item) {
                        item->userdata = items;
@@ -110,7 +111,7 @@ AccessibilityLauncherPage::AccessibilityLauncherPage(SettingAccessibility *ad)
 Eina_Bool AccessibilityLauncherPage::onNaviframePopCb(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto items = static_cast<ItemWrapper*>(data);
+       auto items = static_cast<ItemWrapper *>(data);
        delete[] items;
 
        return EINA_TRUE;
@@ -119,7 +120,7 @@ Eina_Bool AccessibilityLauncherPage::onNaviframePopCb(void *data, Elm_Object_Ite
 void AccessibilityLauncherPage::onBackButtonCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
 
@@ -135,9 +136,9 @@ void AccessibilityLauncherPage::updateVconf(ItemWrapper *items)
 void AccessibilityLauncherPage::onCheckboxChangeCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Input parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
        list_item->chk_status = !list_item->chk_status;
-       updateVconf(static_cast<ItemWrapper*>(list_item->userdata));
+       updateVconf(static_cast<ItemWrapper *>(list_item->userdata));
 }
 
 void AccessibilityLauncherPage::onItemSelectedCb(void *data, Evas_Object *obj, void *event_info)
@@ -145,9 +146,9 @@ void AccessibilityLauncherPage::onItemSelectedCb(void *data, Evas_Object *obj, v
        retm_if(event_info == NULL, "Invalid argument: event_info is NULL");
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
        elm_genlist_item_selected_set(item, EINA_FALSE);
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
-       updateVconf(static_cast<ItemWrapper*>(list_item->userdata));
+       updateVconf(static_cast<ItemWrapper *>(list_item->userdata));
 }
 
 void AccessibilityLauncherPage::updateName(GenGroupItemData *item)
@@ -161,7 +162,7 @@ void AccessibilityLauncherPage::updateMainSwitch(GenGroupItemData *list_item)
        retm_if(list_item == NULL, "Data parameter is NULL");
        updateName(list_item);
        vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE, list_item->chk_status);
-       auto items = static_cast<ItemWrapper*>(list_item->userdata);
+       auto items = static_cast<ItemWrapper *>(list_item->userdata);
        for (auto i = 0u; i < utils::lenOf(LAUNCHER_NAMES); i++)
                elm_object_item_disabled_set(items[i].item->item, list_item->chk_status ? EINA_FALSE : EINA_TRUE);
 }
@@ -169,7 +170,7 @@ void AccessibilityLauncherPage::updateMainSwitch(GenGroupItemData *list_item)
 void AccessibilityLauncherPage::checkboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
        list_item->chk_status = !list_item->chk_status;
        updateMainSwitch(list_item);
 }
@@ -179,7 +180,7 @@ void AccessibilityLauncherPage::onMouseUpGendialListCb(void *data, Evas_Object *
        retm_if(data == NULL, "Invalid argument: data is NULL");
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
        elm_genlist_item_selected_set(item, EINA_FALSE);
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
        updateMainSwitch(list_item);
 }
index 2647eed..98a1501 100644 (file)
@@ -20,7 +20,7 @@
 #include <Elementary.h>
 #include "GenGroupItemData.hpp"
 
-struct ItemWrapper{
+struct ItemWrapper {
        std::string name;
        GenGroupItemData *item;
 };
@@ -39,7 +39,7 @@ class SettingAccessibility;
 class AccessibilityLauncherPage
 {
 public:
-    AccessibilityLauncherPage(SettingAccessibility *ad);
+       AccessibilityLauncherPage(SettingAccessibility *ad);
 
 private:
        static Eina_Bool onNaviframePopCb(void *data, Elm_Object_Item *it);
index 17328c1..8a48f24 100644 (file)
@@ -53,7 +53,7 @@ void AccessoriesSwitchesPage::attachActionCallback(SettingAccessibility *ad, Uni
        ad->us_configuration.accessories_switch_added_cb = cb;
 }
 
-Evas_ObjectAccessoriesSwitchesPage::createEntry(Evas_Object *parent, const char *part_name)
+Evas_Object *AccessoriesSwitchesPage::createEntry(Evas_Object *parent, const char *part_name)
 {
        Evas_Object *entry = elm_entry_add(parent);
        evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -89,7 +89,7 @@ void AccessoriesSwitchesPage::captureSwitchCb(void *user_data, const char *switc
 {
        retm_if(user_data == NULL, "Input argument is NULL");
        retm_if(switch_id == NULL, "switch_id is NULL");
-       auto ad = static_cast<SettingAccessibility*>(user_data);
+       auto ad = static_cast<SettingAccessibility *>(user_data);
 
        for (auto &it : ad->config.configuration_items) {
                if (strlen(switch_id) == it->switch_id.size() && strncmp(switch_id, it->switch_id.c_str(), strlen(switch_id)) == 0) {
@@ -100,11 +100,11 @@ void AccessoriesSwitchesPage::captureSwitchCb(void *user_data, const char *switc
 
        ad->us_configuration.switch_id = switch_id;
        ad->settingPopup_ = std::make_unique<SettingPopup>(ad, ad->md.getNaviframe(),
-                                                       "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH", std::string{},
-                                                       popupResponseCb, 0,
-                                                       true,
-                                                       true,
-                                                       std::vector<std::string>{"IDS_ACCS_UNIVERSAL_SWITCH_CANCEL", "IDS_ACCS_UNIVERSAL_SWITCH_SAVE"});
+                                               "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH", std::string{},
+                                               popupResponseCb, 0,
+                                               true,
+                                               true,
+                                               std::vector<std::string> {"IDS_ACCS_UNIVERSAL_SWITCH_CANCEL", "IDS_ACCS_UNIVERSAL_SWITCH_SAVE"});
 
        Evas_Object *layout = createLayout(ad->settingPopup_->getObject(), EDJ_ACCESSORY_POPUP, GRP_ACCESSORY_POPUP);
 
@@ -117,11 +117,11 @@ void AccessoriesSwitchesPage::captureSwitchCb(void *user_data, const char *switc
 void AccessoriesSwitchesPage::alreadyMappedSwitchPopup(SettingAccessibility *ad)
 {
        ad->settingPopup_ = std::make_unique<SettingPopup>(ad, ad->md.getNaviframe(),
-                                                       "IDS_ACCS_UNIVERSAL_SWITCH_UNABLE_TO_ADD", std::string{},
-                                                       okResponseCb, 0,
-                                                       true,
-                                                       true,
-                                                       std::vector<std::string>{"IDS_ACCS_UNIVERSAL_SWITCH_OK"});
+                                               "IDS_ACCS_UNIVERSAL_SWITCH_UNABLE_TO_ADD", std::string{},
+                                               okResponseCb, 0,
+                                               true,
+                                               true,
+                                               std::vector<std::string> {"IDS_ACCS_UNIVERSAL_SWITCH_OK"});
 
        Evas_Object *layout = createLayout(ad->popup, EDJ_ACCESSORY_POPUP, GRP_ACCESSORY_POPUP);
 
@@ -132,7 +132,7 @@ void AccessoriesSwitchesPage::alreadyMappedSwitchPopup(SettingAccessibility *ad)
 void AccessoriesSwitchesPage::okResponseCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        renewCaptureSwitchCb(ad, NULL);
 
@@ -142,7 +142,7 @@ void AccessoriesSwitchesPage::okResponseCb(void *data, Evas_Object *obj, void *e
 void AccessoriesSwitchesPage::popupResponseCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        auto response_type = get_popup_btn_response_type(obj);
 
        if (response_type == PopupBtnResponse::OK) {
@@ -163,7 +163,7 @@ void AccessoriesSwitchesPage::popupResponseCb(void *data, Evas_Object *obj, void
        ad->entry = NULL;
 }
 
-void AccessoriesSwitchesPage::accessorySwitchActionCb(SettingAccessibility *ad, const std::stringaction, void *user_data)
+void AccessoriesSwitchesPage::accessorySwitchActionCb(SettingAccessibility *ad, const std::string &action, void *user_data)
 {
        retm_if(user_data == NULL, "User data parameter is NULL");
 
@@ -177,7 +177,7 @@ void AccessoriesSwitchesPage::accessorySwitchActionCb(SettingAccessibility *ad,
 Eina_Bool AccessoriesSwitchesPage::renewCaptureSwitchCb(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        setting_accessibility_universal_switch_dbus_config_captureSwitch(&ad->config, ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER, -1, captureSwitchCb, ad);
 
@@ -188,7 +188,7 @@ Eina_Bool AccessoriesSwitchesPage::renewCaptureSwitchCb(void *data, Elm_Object_I
 Eina_Bool AccessoriesSwitchesPage::naviframPopCb(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        setting_accessibility_universal_switch_dbus_config_cancelCaptureSwitch(&ad->config);
        ad->us_configuration.switch_id = {};
@@ -199,6 +199,6 @@ Eina_Bool AccessoriesSwitchesPage::naviframPopCb(void *data, Elm_Object_Item *it
 void AccessoriesSwitchesPage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
index b883f66..7c9a905 100644 (file)
@@ -37,13 +37,13 @@ public:
        static void attachActionCallback(SettingAccessibility *ad, UniversalSwitchUpdateCb cb);
 
 private:
-       static Evas_ObjectcreateEntry(Evas_Object *parent, const char *part_name);
+       static Evas_Object *createEntry(Evas_Object *parent, const char *part_name);
        static Evas_Object *createLayout(Evas_Object *parent, const char *edj_file, const char *group);
        static void captureSwitchCb(void *user_data, const char *switch_id);
        static void alreadyMappedSwitchPopup(SettingAccessibility *ad);
        static void okResponseCb(void *data, Evas_Object *obj, void *event_info);
        static void popupResponseCb(void *data, Evas_Object *obj, void *event_info);
-       static void accessorySwitchActionCb(SettingAccessibility *ad, const std::stringaction, void *user_data);
+       static void accessorySwitchActionCb(SettingAccessibility *ad, const std::string &action, void *user_data);
        static Eina_Bool renewCaptureSwitchCb(void *data, Elm_Object_Item *it);
        static Eina_Bool naviframPopCb(void *data, Elm_Object_Item *it);
        static void backCb(void *data, Evas_Object *obj, void *event_info);
index 8c40ebc..c073935 100644 (file)
@@ -31,7 +31,7 @@
 class ActionPage
 {
 public:
-       using switch_action_cb = void (*)(SettingAccessibility *ad, const std::stringaction, void *user_data); //TODO probably to remove
+       using switch_action_cb = void (*)(SettingAccessibility *ad, const std::string &action, void *user_data); //TODO probably to remove
        ActionPage(SettingAccessibility *ad);
        static void attachCallback(SettingAccessibility *ad, switch_action_cb cb, void *user_data);
 
index b1ba2e4..c9ca9f3 100644 (file)
@@ -32,12 +32,12 @@ AddSwitchPage::AddSwitchPage(SettingAccessibility *ad)
 
        for (auto &it : ad->config.switch_providers) {
                auto item = createGendialGroupItem(
-                               genlist, &ad->itc_multiline_sub,
-                               onSwitchAddition, &it->info->id,
-                               SwallowType::INVALID, 0,
-                               it->info->name,
-                               it->info->description,
-                               NULL);
+                                               genlist, &ad->itc_multiline_sub,
+                                               onSwitchAddition, &it->info->id,
+                                               SwallowType::INVALID, 0,
+                                               it->info->name,
+                                               it->info->description,
+                                               NULL);
 
                if (item) {
                        item->userdata = ad;
@@ -60,7 +60,7 @@ void AddSwitchPage::attachCallbackOnSwitchAttach(SettingAccessibility *ad, Unive
        CameraSwitchesPage::attachActionCallback(ad, cb);
 }
 
-void AddSwitchPage::disableScreenSwitchProviderIfSwitchMapped(const std::vector<UniversalSwitchConfigurationItem*>& configuration_items, UniversalSwitchSwitchProvider *switch_provider, Elm_Object_Item *item)
+void AddSwitchPage::disableScreenSwitchProviderIfSwitchMapped(const std::vector<UniversalSwitchConfigurationItem *> &configuration_items, UniversalSwitchSwitchProvider *switch_provider, Elm_Object_Item *item)
 {
        retm_if(switch_provider == NULL, "Input parameter is NULL");
        retm_if(item == NULL, "Input parameter is NULL");
@@ -71,7 +71,7 @@ void AddSwitchPage::disableScreenSwitchProviderIfSwitchMapped(const std::vector<
                disableAlreadyMappedSwitch(configuration_items, ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_ID, item);
 }
 
-void AddSwitchPage::disableAlreadyMappedSwitch(const std::vector<UniversalSwitchConfigurationItem*> &configuration_items, const std::string& switch_id, Elm_Object_Item *item)
+void AddSwitchPage::disableAlreadyMappedSwitch(const std::vector<UniversalSwitchConfigurationItem *> &configuration_items, const std::string &switch_id, Elm_Object_Item *item)
 {
        retm_if(item == NULL, "Input parameter is NULL");
 
@@ -85,15 +85,15 @@ void AddSwitchPage::onSwitchAddition(void *data, Evas_Object *obj, void *event_i
 {
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
        elm_genlist_item_selected_set(item, EINA_FALSE);
-       auto settings_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
-       auto ad = static_cast<SettingAccessibility*>(settings_item->userdata);
+       auto settings_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
+       auto ad = static_cast<SettingAccessibility *>(settings_item->userdata);
        retm_if(ad == NULL, "Input argument is NULL");
-       auto providerId = *static_cast<std::string*>(data);
+       auto providerId = *static_cast<std::string *>(data);
 
        showSwitchesPage(ad, providerId.c_str());
 }
 
-void AddSwitchPage::showSwitchesPage(SettingAccessibility *ad, const char * providerId)
+void AddSwitchPage::showSwitchesPage(SettingAccessibility *ad, const char *providerId)
 {
        SETTING_TRACE_DEBUG("Create add switch page for %s", providerId);
 
@@ -110,7 +110,7 @@ void AddSwitchPage::showSwitchesPage(SettingAccessibility *ad, const char * prov
 void AddSwitchPage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
@@ -118,7 +118,7 @@ void AddSwitchPage::backCb(void *data, Evas_Object *obj, void *event_info)
 Eina_Bool AddSwitchPage::onNaviframePopCb(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        ad->us_configuration.screen_switch_added_cb = NULL;
        ad->us_configuration.camera_switch_added_cb = NULL;
index 9efb13e..6c17d98 100644 (file)
@@ -35,13 +35,13 @@ class AddSwitchPage
 public:
        AddSwitchPage(SettingAccessibility *ad);
        static void attachCallbackOnSwitchAttach(SettingAccessibility *ad, UniversalSwitchUpdateCb cb); //TODO: rename
-       static void disableAlreadyMappedSwitch(const std::vector<UniversalSwitchConfigurationItem*> &configuration_items, const std::string& switch_id, Elm_Object_Item *item);
+       static void disableAlreadyMappedSwitch(const std::vector<UniversalSwitchConfigurationItem *> &configuration_items, const std::string &switch_id, Elm_Object_Item *item);
 
 
 private:
-       static void disableScreenSwitchProviderIfSwitchMapped(const std::vector<UniversalSwitchConfigurationItem*>& configuration_items, UniversalSwitchSwitchProvider *switch_provider, Elm_Object_Item *item);
+       static void disableScreenSwitchProviderIfSwitchMapped(const std::vector<UniversalSwitchConfigurationItem *> &configuration_items, UniversalSwitchSwitchProvider *switch_provider, Elm_Object_Item *item);
        static void onSwitchAddition(void *data, Evas_Object *obj, void *event_info);
-       static void showSwitchesPage(SettingAccessibility *ad, const char * providerId);
+       static void showSwitchesPage(SettingAccessibility *ad, const char *providerId);
        static void backCb(void *data, Evas_Object *obj, void *event_info);
        static Eina_Bool onNaviframePopCb(void *data, Elm_Object_Item *it);
 };
index 3065164..47bc471 100644 (file)
@@ -31,11 +31,11 @@ CameraSwitchesPage::CameraSwitchesPage(SettingAccessibility *ad)
        elm_genlist_clear(genlist);
 
        universal_switch_camera_comment = createGendialGroupItem(
-                       genlist, &ad->itc_multiline_sub,
-                       NULL, ad, SwallowType::INVALID, 0,
-                       {},
-                       "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_COMMENT",
-                       NULL);
+                                                                                 genlist, &ad->itc_multiline_sub,
+                                                                                 NULL, ad, SwallowType::INVALID, 0,
+                                                                                 {},
+                                                                                 "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_COMMENT",
+                                                                                 NULL);
 
        if (!universal_switch_camera_comment)
                return;
@@ -47,10 +47,10 @@ CameraSwitchesPage::CameraSwitchesPage(SettingAccessibility *ad)
        auto switches = setting_accessibility_universal_switch_dbus_config_get_switches(&ad->config, ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER);
        for (auto &it : switches) {
                auto item = createGendialGroupItem(genlist, &ad->itc_multiline_sub, addSwitchCb, it,
-                               SwallowType::INVALID, 0,
-                               it->name,
-                               it->description,
-                               NULL);
+                                                                                  SwallowType::INVALID, 0,
+                                                                                  it->name,
+                                                                                  it->description,
+                                                                                  NULL);
 
                if (item) {
                        item->userdata = ad;
@@ -76,15 +76,15 @@ void CameraSwitchesPage::addSwitchCb(void *data, Evas_Object *obj, void *event_i
 {
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
        elm_genlist_item_selected_set(item, EINA_FALSE);
-       auto settings_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
-       auto ad = static_cast<SettingAccessibility*>(settings_item->userdata);
+       auto settings_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
+       auto ad = static_cast<SettingAccessibility *>(settings_item->userdata);
        retm_if(ad == NULL, "Input argument is NULL");
-       auto camera_switch = static_cast<UniversalSwitchInfoType*>(data);
+       auto camera_switch = static_cast<UniversalSwitchInfoType *>(data);
 
        createActionPage(ad, camera_switch);
 }
 
-void CameraSwitchesPage::createActionPage(SettingAccessibility *ad, UniversalSwitchInfoType * camera_switch)
+void CameraSwitchesPage::createActionPage(SettingAccessibility *ad, UniversalSwitchInfoType *camera_switch)
 {
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -94,10 +94,10 @@ void CameraSwitchesPage::createActionPage(SettingAccessibility *ad, UniversalSwi
        ActionPage::attachCallback(ad, switchActionCb, camera_switch);
 }
 
-void CameraSwitchesPage::switchActionCb(SettingAccessibility *ad, const std::stringaction, void *user_data)
+void CameraSwitchesPage::switchActionCb(SettingAccessibility *ad, const std::string &action, void *user_data)
 {
        retm_if(user_data == NULL, "User data parameter is NULL");
-       auto camera_switch = static_cast<UniversalSwitchInfoType*>(user_data);
+       auto camera_switch = static_cast<UniversalSwitchInfoType *>(user_data);
 
        if (ad->us_configuration.camera_switch_added_cb)
                ad->us_configuration.camera_switch_added_cb(ad, camera_switch->id, action, camera_switch->name);
@@ -106,7 +106,7 @@ void CameraSwitchesPage::switchActionCb(SettingAccessibility *ad, const std::str
 void CameraSwitchesPage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
index cea0a4f..4a92389 100644 (file)
@@ -36,8 +36,8 @@ public:
 
 private:
        static void addSwitchCb(void *data, Evas_Object *obj, void *event_info);
-       static void createActionPage(SettingAccessibility *ad, UniversalSwitchInfoType * camera_switch);
-       static void switchActionCb(SettingAccessibility *ad, const std::stringaction, void *user_data);
+       static void createActionPage(SettingAccessibility *ad, UniversalSwitchInfoType *camera_switch);
+       static void switchActionCb(SettingAccessibility *ad, const std::string &action, void *user_data);
        static void backCb(void *data, Evas_Object *obj, void *event_info);
 
        GenGroupItemData *universal_switch_camera_comment = nullptr;
index 921d794..99c3958 100644 (file)
@@ -38,7 +38,8 @@ enum class SwallowType : int {
  *  1. split into smaller, more specialized classes
  *  2. maybe add methods
  */
-class GenGroupItemData {
+class GenGroupItemData
+{
 public:
        void **pBack = nullptr;
        Evas_Object *window = nullptr;
@@ -76,8 +77,8 @@ public:
 
        void *userdata = nullptr;       /**< just a reference, do not need release. */
 
-    /* popup */
-    Evas_Object *notify = nullptr; /**< act as any popup to show user any message */
+       /* popup */
+       Evas_Object *notify = nullptr; /**< act as any popup to show user any message */
 
        /*record itc style for all genlist item with check/radio/toggle */
        std::string itc;
index cc682ac..0ba5709 100644 (file)
@@ -55,19 +55,19 @@ void MainData::initView(const std::string &name)
        evas_object_show(genlist);
 }
 
-Evas_ObjectMainData::getWindow() const
+Evas_Object *MainData::getWindow() const
 {
-    return window;
+       return window;
 }
 
-Evas_ObjectMainData::getNaviframe() const
+Evas_Object *MainData::getNaviframe() const
 {
-    return naviframe;
+       return naviframe;
 }
 
-Evas_ObjectMainData::getGenlist() const
+Evas_Object *MainData::getGenlist() const
 {
-    return genlist;
+       return genlist;
 }
 
 int MainData::initViewWithoutGenlist(const std::string &name)
@@ -158,7 +158,7 @@ void MainData::onAllGenlistRealizedCb(void *data, Evas_Object *obj, void *event_
        __gl_realized_cb(data, obj, event_info);
        setting_retm_if(event_info == NULL, "invalid parameter: event_info is NULL");
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto item_data = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto item_data = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        ret_if(!item_data);
 }
 
@@ -171,7 +171,7 @@ void MainData::addBackButton(Elm_Naviframe_Item_Pop_Cb view_pop_cb, void *ad) co
 
 void MainData::softkeyBackClickCb(void *data, Evas_Object *obj, void *event_inf)
 {
-       auto naviframe = static_cast<Evas_Object*>(data);
+       auto naviframe = static_cast<Evas_Object *>(data);
        ret_if(!naviframe);
        elm_naviframe_item_pop(naviframe);
 }
index 032020d..5cf0945 100644 (file)
@@ -30,26 +30,26 @@ public:
        MainData() = default;
        int initApp(const std::string &name);
        void initView(const std::string &name);
-    Evas_Object* getWindow() const;
-    Evas_Object* getNaviframe() const;
-    Evas_Object* getGenlist() const;
+       Evas_Object *getWindow() const;
+       Evas_Object *getNaviframe() const;
+       Evas_Object *getGenlist() const;
        void addBackButton(Elm_Naviframe_Item_Pop_Cb view_pop_cb, void *ad) const;
-    Elm_Object_Item *naviframe_it;
+       Elm_Object_Item *naviframe_it;
 
 private:
        int initViewWithoutGenlist(const std::string &name);
        void addRotateSupport();
-    void prepareViewList();
+       void prepareViewList();
        void createMainWindow(const std::string &name);
        static void onAllGenlistRealizedCb(void *data, Evas_Object *obj, void *event_info);
        static void softkeyBackClickCb(void *data, Evas_Object *obj, void *event_inf);
 
-    Evas *evas;
-    Evas_Object *window;
-    Evas_Object *conform;
-    Evas_Object *naviframe;
-    Evas_Object *layout;
-    Evas_Object *genlist;
+       Evas *evas;
+       Evas_Object *window;
+       Evas_Object *conform;
+       Evas_Object *naviframe;
+       Evas_Object *layout;
+       Evas_Object *genlist;
 };
 
 #endif
index 13187cb..87f955f 100644 (file)
@@ -50,12 +50,12 @@ void RemoveSwitchPage::attachCallback(SettingAccessibility *ad, UniversalSwitchU
 {
        retm_if(ad == NULL, "Input parameter is NULL");
 
-       ad->us_configuration.switch_removed_cb = cb;
+       ad->us_configuration.switch_removed_cb = cb;
 }
 
 void RemoveSwitchPage::onDeleteButtonClicked(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retm_if(ad == NULL, "Input parameter is NULL");
        retm_if(ad->set_value_layout.getGenlist() == NULL, "No genlist provided");
 
@@ -64,7 +64,7 @@ void RemoveSwitchPage::onDeleteButtonClicked(void *data, Evas_Object *obj, void
 
 void RemoveSwitchPage::onAllButtonsClicked(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retm_if(ad == NULL, "Input parameter is NULL");
        retm_if(ad->set_value_layout.getGenlist() == NULL, "No genlist provided");
 
@@ -73,7 +73,7 @@ void RemoveSwitchPage::onAllButtonsClicked(void *data, Evas_Object *obj, void *e
 
        Elm_Object_Item *item = elm_genlist_first_item_get(ad->set_value_layout.getGenlist());
        while (item != NULL) {
-               auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+               auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
                setting_update_gl_item_chk_status(list_item, !all_selected);
                item = elm_genlist_item_next_get(item);
        }
@@ -94,7 +94,7 @@ void RemoveSwitchPage::useNaviframeTitleAsCounter(SettingAccessibility *ad)
        } else if (ad->switches_to_remove_counter > 0) {
                title = std::to_string(ad->switches_to_remove_counter);
        } else {
-               title = TranslatedString{"IDS_ACCS_SELECT_ITEMS"}.str();
+               title = TranslatedString{"IDS_ACCS_SELECT_ITEMS"} .str();
        }
        elm_object_disabled_set(ad->remove_switches_popup_button, ad->switches_to_remove_counter ? EINA_FALSE : EINA_TRUE);
        elm_layout_text_set(ad->md.getNaviframe(), "default", title.c_str());
@@ -109,14 +109,14 @@ void RemoveSwitchPage::createPopupForSwitchesRemoving(SettingAccessibility *ad)
        int vconf_val;
        int vconf_ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, &vconf_val);
        retm_if(vconf_ret != 0,
-               "Failed to get vconf bool value VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE. Error: %d", vconf_ret);
+                       "Failed to get vconf bool value VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE. Error: %d", vconf_ret);
 
        elm_object_part_text_set(ad->popup, "title,text", _("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES"));
 
-       if (vconf_val && ad->switches_to_remove_counter ==  (int)elm_genlist_items_count(ad->set_value_layout.getGenlist())) {
+       if (vconf_val && ad->switches_to_remove_counter == (int)elm_genlist_items_count(ad->set_value_layout.getGenlist())) {
                elm_object_text_set(ad->popup, _("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_ALL_SWITCHES_DESC"));
        } else {
-               auto s = std::to_string(ad->switches_to_remove_counter) + " " + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"}.str();
+               auto s = std::to_string(ad->switches_to_remove_counter) + " " + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"} .str();
                elm_object_text_set(ad->popup, s.c_str());
        }
 
@@ -145,12 +145,12 @@ void RemoveSwitchPage::createPopupForSwitchesRemoving(SettingAccessibility *ad)
 
 void RemoveSwitchPage::onRemoveSelectedSwitches(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        bool disable_universal_switch = (ad->switches_to_remove_counter == (int)elm_genlist_items_count(ad->set_value_layout.getGenlist()));
 
        Elm_Object_Item *item = elm_genlist_last_item_get(ad->set_value_layout.getGenlist());
        while (item != NULL) {
-               auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+               auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
                item = elm_genlist_item_prev_get(item);
                if (list_item->chk_status)
                        removeSwitch(ad, list_item->chk_id);
index 945aa97..50b1d14 100644 (file)
@@ -22,7 +22,7 @@
 
 ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe());
        retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
        elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
@@ -30,11 +30,11 @@ ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
        elm_genlist_clear(genlist);
 
        screenreader_checkbox = createGendialGroupItem(
-                       genlist, &itc_1text_1icon,
-                       listCb,
-                       ad, SwallowType::ICON_RADIO, 1,
-                       "IDS_ST_MBODY_SCREEN_READER_HTTS",
-                       {}, screenReaderCheckCb);
+                                                               genlist, &itc_1text_1icon,
+                                                               listCb,
+                                                               ad, SwallowType::ICON_RADIO, 1,
+                                                               "IDS_ST_MBODY_SCREEN_READER_HTTS",
+                                                               {}, screenReaderCheckCb);
        if (screenreader_checkbox) {
                screenreader_checkbox->userdata = ad;
                __BACK_POINTER_SET(screenreader_checkbox);
@@ -48,20 +48,20 @@ ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
                screenreader_checkbox->chk_status = screen_reader ? 1 : 0;
        /*---------------------------------------------------------------------------------------------- */
        int vconf_ret = vconf_notify_key_changed(
-                       VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
-                       onVconfChangedCb,
-                       screenreader_checkbox);
+                                               VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
+                                               onVconfChangedCb,
+                                               screenreader_checkbox);
        if (vconf_ret != 0) {
                SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS)");
                return;
        }
 
        multiline_screen_reader_comment = createGendialGroupItem(
-                       genlist, &ad->itc_multiline_sub,
-                       NULL, ad, SwallowType::INVALID, 0,
-                       {},
-                       "IDS_ACCS_BODY_WHILE_SCREEN_READER_IS_ENABLED_YOUR_PHONE_WILL_PROVIDE_VOICE_FEEDBACK_FOR_EXAMPLE_SCREEN_READER_WILL_MSG",
-                       NULL);
+                                                                                 genlist, &ad->itc_multiline_sub,
+                                                                                 NULL, ad, SwallowType::INVALID, 0,
+                                                                                 {},
+                                                                                 "IDS_ACCS_BODY_WHILE_SCREEN_READER_IS_ENABLED_YOUR_PHONE_WILL_PROVIDE_VOICE_FEEDBACK_FOR_EXAMPLE_SCREEN_READER_WILL_MSG",
+                                                                                 NULL);
        if (multiline_screen_reader_comment) {
                multiline_screen_reader_comment->userdata = ad;
                __BACK_POINTER_SET(multiline_screen_reader_comment);
@@ -70,11 +70,11 @@ ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
        }
 
        screen_reader_settings = createGendialGroupItem(
-                       genlist, &itc_1text,
-                       settingsListCb,
-                       ad, SwallowType::INVALID, 0,
-                       "IDS_ST_OPT_SETTINGS",
-                       {}, NULL);
+                                                                genlist, &itc_1text,
+                                                                settingsListCb,
+                                                                ad, SwallowType::INVALID, 0,
+                                                                "IDS_ST_OPT_SETTINGS",
+                                                                {}, NULL);
        if (screen_reader_settings) {
                screen_reader_settings->userdata = ad;
                __BACK_POINTER_SET(screen_reader_settings);
@@ -95,7 +95,7 @@ void ScreenReaderPage::listCb(void *data, Evas_Object *obj, void *event_info)
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_retm_if(data == NULL, "Data parameter is NULL");
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
        updateScreenReaderVconfCheck((list_item->chk_status ? 1 : 0), list_item->userdata);
@@ -106,7 +106,7 @@ void ScreenReaderPage::settingsListCb(void *data, Evas_Object *obj, void *event_
        retm_if(data == NULL, "Invalid argument: data is NULL");
        retm_if(event_info == NULL, "Invalid argument: event_info is NULL");
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
@@ -116,7 +116,7 @@ void ScreenReaderPage::settingsListCb(void *data, Evas_Object *obj, void *event_
 void ScreenReaderPage::screenReaderCheckCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
 
        /* for genlist update status */
        list_item->chk_status = elm_check_state_get(obj);
@@ -125,13 +125,13 @@ void ScreenReaderPage::screenReaderCheckCb(void *data, Evas_Object *obj, void *e
        updateScreenReaderVconfCheck(list_item->chk_status, list_item->userdata);
 }
 
-void ScreenReaderPage::updateScreenReaderVconfCheck(int state, voiddata)
+void ScreenReaderPage::updateScreenReaderVconfCheck(int state, void *data)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, state);
        if (!state) {
-               auto buf = TranslatedString{"IDS_ST_MBODY_SCREEN_READER_HTTS"}.str() + " " + TranslatedString{"IDS_ST_BODY_OFF"}.str();
+               auto buf = TranslatedString{"IDS_ST_MBODY_SCREEN_READER_HTTS"} .str() + " " + TranslatedString{"IDS_ST_BODY_OFF"} .str();
                int utterance_id;
                int ret = tts_add_text(ad->tts, buf.c_str(), NULL, TTS_VOICE_TYPE_AUTO,  TTS_SPEED_AUTO, &utterance_id);
                SETTING_TRACE_DEBUG("tts_add_text %d", ret);
@@ -143,7 +143,7 @@ void ScreenReaderPage::updateScreenReaderVconfCheck(int state, void* data)
 Eina_Bool ScreenReaderPage::hideScreenReaderPage(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, onVconfChangedCb);
        elm_naviframe_item_pop(ad->md.getNaviframe());
 
@@ -152,7 +152,7 @@ Eina_Bool ScreenReaderPage::hideScreenReaderPage(void *data, Elm_Object_Item *it
 
 void ScreenReaderPage::onVconfChangedCb(keynode_t *node, void *user_data)
 {
-       auto screenReaderItem = static_cast<GenGroupItemData*>(user_data);
+       auto screenReaderItem = static_cast<GenGroupItemData *>(user_data);
        /*SETTING_TRACE_DEBUG("check_status: %i, node->value.i: %i",
         *  screenReaderItem->chk_status, node->value.i); */
        /* I don't know why following code does not update check box to
index 8c6637f..32ee666 100644 (file)
@@ -40,7 +40,7 @@ private:
        static void listCb(void *data, Evas_Object *obj, void *event_info);
        static void settingsListCb(void *data, Evas_Object *obj, void *event_info);
        static void screenReaderCheckCb(void *data, Evas_Object *obj, void *event_info);
-       static void updateScreenReaderVconfCheck(int state, voiddata);
+       static void updateScreenReaderVconfCheck(int state, void *data);
        static Eina_Bool hideScreenReaderPage(void *data, Elm_Object_Item *it);
        static void onVconfChangedCb(keynode_t *node, void *user_data);
 
index 6ee0e03..af3e8d5 100644 (file)
@@ -24,8 +24,9 @@
 #include <app.h>
 #include <efl_extension.h>
 
-namespace {
-       struct VConfCheckData{
+namespace
+{
+       struct VConfCheckData {
                std::string label;
                std::string vconf_key;
                int *status = nullptr;
@@ -42,13 +43,13 @@ namespace {
 
        static const size_t POPUP_CONTENT_BASE_SIZE = 120;
 
-       std::vector<GenGroupItemData*> items;
+       std::vector<GenGroupItemData *> items;
        GenGroupItemData *speech_rate_list_item = nullptr;
 }
 
 ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
 {
-       SettingAccessibility *ad = static_cast<SettingAccessibility*>(data);
+       SettingAccessibility *ad = static_cast<SettingAccessibility *>(data);
 
        int s_speed = -1;
        int s_speed_normal = -1;
@@ -77,18 +78,18 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
        auto denominator = s_speed_max - s_speed_min;
        double s_speed_percent = 0.0;
        if (denominator != 0)
-               s_speed_percent = (((double)s_speed - (double)s_speed_min)/((double)denominator)) * 100;
+               s_speed_percent = (((double)s_speed - (double)s_speed_min) / ((double)denominator)) * 100;
        std::string buf = std::to_string(std::lround(s_speed_percent));
        SETTING_TRACE("TTS rate is %.0f", s_speed_percent);
 
        /* Item 1 : Speech Rate */
        speech_rate_item = createGendialGroupItem(
-                       genlist, &itc_2text,
-                       speechRateCb,
-                       ad, SwallowType::INVALID, 1,
-                       "IDS_ST_BODY_SPEECH_RATE",
-                       buf,
-                       NULL);
+                                                  genlist, &itc_2text,
+                                                  speechRateCb,
+                                                  ad, SwallowType::INVALID, 1,
+                                                  "IDS_ST_BODY_SPEECH_RATE",
+                                                  buf,
+                                                  NULL);
        tts_setting_set_speed_changed_cb(ttsSpeedChangedCb, speech_rate_item);
        if (speech_rate_item) {
                speech_rate_item->userdata = ad;
@@ -99,20 +100,20 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
 
        /* Item 2 : Keyboard feedback */
        vconf_ret = vconf_get_bool(
-                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_KEYBOARD_FEEDBACK,
-                       &vconf_val);
+                                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_KEYBOARD_FEEDBACK,
+                                       &vconf_val);
        if (vconf_ret != 0) {
                LOGE("Failed to get vconf bool value VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_KEYBOARD_FEEDBACK. Error: %d",
-                               vconf_ret);
+                        vconf_ret);
        }
 
        keyboard_feedback_item = createGendialGroupItem(
-                               genlist, &itc_multiline_2text,
-                               keyboardFeedbackCb,
-                               ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
-                               "IDS_ACCS_OPT_KEYBOARD_FEEDBACK_TTS",
-                               "IDS_ACCS_OPT_ALWAYS_READ_OUT_KEYBOARD_INPUT_TTS",
-                               updateKeyboardFeedbackCheck);
+                                                                genlist, &itc_multiline_2text,
+                                                                keyboardFeedbackCb,
+                                                                ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
+                                                                "IDS_ACCS_OPT_KEYBOARD_FEEDBACK_TTS",
+                                                                "IDS_ACCS_OPT_ALWAYS_READ_OUT_KEYBOARD_INPUT_TTS",
+                                                                updateKeyboardFeedbackCheck);
 
        if (keyboard_feedback_item) {
                keyboard_feedback_item->userdata = ad;
@@ -122,20 +123,20 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
 
        /* Item 3 : Hints */
        vconf_ret = vconf_get_bool(
-                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_DESCRIPTION,
-                       &vconf_val);
+                                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_DESCRIPTION,
+                                       &vconf_val);
        if (vconf_ret != 0) {
                LOGE("Failed to get vconf bool value VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_DESCRIPTION. Error: %d",
-                               vconf_ret);
+                        vconf_ret);
        }
 
        hints_item = createGendialGroupItem(
-                               genlist, &itc_1text_1icon,
-                               hintsCb,
-                               ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
-                               "IDS_ACCS_MBODY_READ_OUT_USAGE_HINTS_ABB",
-                               {},
-                               updateHintsCheck);
+                                        genlist, &itc_1text_1icon,
+                                        hintsCb,
+                                        ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
+                                        "IDS_ACCS_MBODY_READ_OUT_USAGE_HINTS_ABB",
+                                        {},
+                                        updateHintsCheck);
 
        if (hints_item) {
                hints_item->userdata = ad;
@@ -145,20 +146,20 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
 
        /* Item 4 : Vibration Feedback */
        vconf_ret = vconf_get_bool(
-                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_HAPTIC,
-                       &vconf_val);
+                                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_HAPTIC,
+                                       &vconf_val);
        if (vconf_ret != 0) {
                LOGE("Failed to get vconf bool value VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_HAPTIC. Error: %d",
-                               vconf_ret);
+                        vconf_ret);
        }
 
        vibration_feedback_item = createGendialGroupItem(
-                               genlist, &itc_1text_1icon,
-                               vibrationFeedbackCb,
-                               ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
-                               "IDS_ACCS_MBODY_VIBRATION_FEEDBACK",
-                               {},
-                               updateVibrationFeedbackCheck);
+                                                                 genlist, &itc_1text_1icon,
+                                                                 vibrationFeedbackCb,
+                                                                 ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
+                                                                 "IDS_ACCS_MBODY_VIBRATION_FEEDBACK",
+                                                                 {},
+                                                                 updateVibrationFeedbackCheck);
 
        if (vibration_feedback_item) {
                vibration_feedback_item->userdata = ad;
@@ -168,20 +169,20 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
 
        /* Item 5 : Sound Feedback */
        vconf_ret = vconf_get_bool(
-                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_SOUND_FEEDBACK,
-                       &vconf_val);
+                                       VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_SOUND_FEEDBACK,
+                                       &vconf_val);
        if (vconf_ret != 0) {
                LOGE("Failed to get vconf bool value VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_READER_SOUND_FEEDBACK. Error: %d",
-                               vconf_ret);
+                        vconf_ret);
        }
 
        sound_feedback_item = createGendialGroupItem(
-                       genlist, &itc_1text_1icon,
-                       soundFeedbackCb,
-                       ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
-                       "IDS_ACCS_MBODY_SOUND_FEEDBACK",
-                       {},
-                       updateSoundFeedbackCheck);
+                                                         genlist, &itc_1text_1icon,
+                                                         soundFeedbackCb,
+                                                         ad, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
+                                                         "IDS_ACCS_MBODY_SOUND_FEEDBACK",
+                                                         {},
+                                                         updateSoundFeedbackCheck);
 
        if (sound_feedback_item) {
                sound_feedback_item->userdata = ad;
@@ -190,12 +191,12 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
        }
 
        status_bar_information_item = createGendialGroupItem(
-                       genlist, &itc_1text,
-                       mouseUpGendialListCb,
-                       ad, SwallowType::INVALID, 1,
-                       "IDS_ACCS_TMBODY_STATUS_BAR_INFORMATION",
-                       {},
-                       NULL);
+                                                                         genlist, &itc_1text,
+                                                                         mouseUpGendialListCb,
+                                                                         ad, SwallowType::INVALID, 1,
+                                                                         "IDS_ACCS_TMBODY_STATUS_BAR_INFORMATION",
+                                                                         {},
+                                                                         NULL);
 
        if (status_bar_information_item) {
                status_bar_information_item->userdata = ad;
@@ -203,19 +204,19 @@ ScreenReaderSettingsPage::ScreenReaderSettingsPage(SettingAccessibility *data)
        }
 
        multiline_status_bar_information_description = createGendialGroupItem(
-                       genlist, &ad->itc_multiline_sub,
-                       NULL, ad, SwallowType::INVALID, 0,
-                       {},
-                       "IDS_ACCS_SBODY_SELECT_WHICH_INFORMATION_FROM_INDICATORS_SHOWN_ON_THE_STATUS_BAR_WILL_BE_READ_OUT_WHEN_YOU_TRIPLE_TAP_THE_SCREEN_WITH_TWO_FINGERS_MSG",
-                       NULL);
+                               genlist, &ad->itc_multiline_sub,
+                               NULL, ad, SwallowType::INVALID, 0,
+                               {},
+                               "IDS_ACCS_SBODY_SELECT_WHICH_INFORMATION_FROM_INDICATORS_SHOWN_ON_THE_STATUS_BAR_WILL_BE_READ_OUT_WHEN_YOU_TRIPLE_TAP_THE_SCREEN_WITH_TWO_FINGERS_MSG",
+                               NULL);
 
        if (multiline_status_bar_information_description) {
                multiline_status_bar_information_description->userdata = ad;
                __BACK_POINTER_SET(multiline_status_bar_information_description);
 
                elm_genlist_item_select_mode_set(
-                               multiline_status_bar_information_description->item,
-                               ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+                       multiline_status_bar_information_description->item,
+                       ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        }
 
        Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe(), _("IDS_ST_OPT_SETTINGS"), NULL, NULL, genlist, NULL);
@@ -229,7 +230,7 @@ void ScreenReaderSettingsPage::mouseUpGendialListCb(void *data, Evas_Object *obj
        retm_if(data == NULL, "Invalid argument: data is NULL");
        retm_if(event_info == NULL, "Invalid argument: event_info is NULL");
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        Evas_Object *popup;
        Evas_Object *box;
        Evas_Object *genlist;
@@ -244,47 +245,47 @@ void ScreenReaderSettingsPage::mouseUpGendialListCb(void *data, Evas_Object *obj
        /* eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK,
         *  eext_popup_back_cb, NULL); */
        elm_object_part_text_set(popup, "title,text",
-                       _("IDS_ACCS_TMBODY_STATUS_BAR_INFORMATION"));
+                                                        _("IDS_ACCS_TMBODY_STATUS_BAR_INFORMATION"));
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
 
        /* box */
        box = elm_box_add(popup);
        evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
 
        /* genlist */
        genlist = elm_genlist_add(box);
        evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL,
-                       EVAS_HINT_FILL);
+                                                                       EVAS_HINT_FILL);
 
        for (i = 0; i < size; ++i) {
                auto status = vconfValueGet(vConfCheckData[i].vconf_key.c_str());
 
                screenreader_checkbox = createGendialGroupItem(
-                               genlist, &itc_1text_1icon,
-                               onListItemClicked, ad,
-                               SwallowType::ICON_RADIO, status,
-                               vConfCheckData[i].label,
-                               {}, onCheckStateChanged);
+                                                                       genlist, &itc_1text_1icon,
+                                                                       onListItemClicked, ad,
+                                                                       SwallowType::ICON_RADIO, status,
+                                                                       vConfCheckData[i].label,
+                                                                       {}, onCheckStateChanged);
 
                vConfCheckData[i].status = &screenreader_checkbox->chk_status;
                items.push_back(screenreader_checkbox);
        }
 
        elm_scroller_movement_block_set(genlist,
-                       Elm_Scroller_Movement_Block(ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL | ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL));
+                                                                       Elm_Scroller_Movement_Block(ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL | ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL));
        elm_scroller_policy_set(genlist, ELM_SCROLLER_POLICY_OFF,
-                       ELM_SCROLLER_POLICY_OFF);
+                                                       ELM_SCROLLER_POLICY_OFF);
 
        evas_object_show(genlist);
        elm_box_pack_end(box, genlist);
        evas_object_size_hint_min_set(box, -1,
-                       ELM_SCALE_SIZE(POPUP_CONTENT_BASE_SIZE) * size);
+                                                                 ELM_SCALE_SIZE(POPUP_CONTENT_BASE_SIZE) * size);
        evas_object_size_hint_max_set(box, -1,
-                       ELM_SCALE_SIZE(POPUP_CONTENT_BASE_SIZE) * size);
+                                                                 ELM_SCALE_SIZE(POPUP_CONTENT_BASE_SIZE) * size);
        elm_object_content_set(popup, box);
 
        Evas_Object *btnCancel = setting_create_button(popup, "IDS_MSG_ACBUTTON_CANCEL_ABB", {}, onCancelButtonClicked, popup);
@@ -305,18 +306,18 @@ void ScreenReaderSettingsPage::mouseUpGendialListCb(void *data, Evas_Object *obj
 void ScreenReaderSettingsPage::vibrationFeedbackCb(void *data, Evas_Object *obj, void *event_info)
 {
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
        setting_update_gl_item_chk_status(list_item,
-                       list_item->chk_status ? 0 : 1);
+                                                                         list_item->chk_status ? 0 : 1);
        updateVibrationFeedbackVconf(list_item->chk_status ? 1 : 0);
 }
 
 void ScreenReaderSettingsPage::updateVibrationFeedbackCheck(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
 
        /* for genlist update status */
        list_item->chk_status = elm_check_state_get(obj);
@@ -333,7 +334,7 @@ void ScreenReaderSettingsPage::updateVibrationFeedbackVconf(int state)
 void ScreenReaderSettingsPage::soundFeedbackCb(void *data, Evas_Object *obj, void *event_info)
 {
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
@@ -343,7 +344,7 @@ void ScreenReaderSettingsPage::soundFeedbackCb(void *data, Evas_Object *obj, voi
 void ScreenReaderSettingsPage::updateSoundFeedbackCheck(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
 
        /* for genlist update status */
        list_item->chk_status = elm_check_state_get(obj);
@@ -361,18 +362,18 @@ void ScreenReaderSettingsPage::hintsCb(void *data, Evas_Object *obj, void *event
 {
 
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
        setting_update_gl_item_chk_status(list_item,
-                       list_item->chk_status ? 0 : 1);
+                                                                         list_item->chk_status ? 0 : 1);
        updateHintsVconf(list_item->chk_status ? 1 : 0);
 }
 
 void ScreenReaderSettingsPage::updateHintsCheck(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
 
        /* for genlist update status */
        list_item->chk_status = elm_check_state_get(obj);
@@ -389,7 +390,7 @@ void ScreenReaderSettingsPage::updateHintsVconf(int state)
 void ScreenReaderSettingsPage::keyboardFeedbackCb(void *data, Evas_Object *obj, void *event_info)
 {
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
@@ -399,7 +400,7 @@ void ScreenReaderSettingsPage::keyboardFeedbackCb(void *data, Evas_Object *obj,
 void ScreenReaderSettingsPage::updateKeyboardFeedbackCheck(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
 
        /* for genlist update status */
        list_item->chk_status = elm_check_state_get(obj);
@@ -416,7 +417,7 @@ void ScreenReaderSettingsPage::updateKeyboardFeedbackVconf(int state)
 void ScreenReaderSettingsPage::speechRateCb(void *data, Evas_Object *obj, void *event_info)
 {
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
        createSpeechRatePopup(ad, item);
@@ -425,13 +426,13 @@ void ScreenReaderSettingsPage::speechRateCb(void *data, Evas_Object *obj, void *
 void ScreenReaderSettingsPage::ttsSpeedChangedCb(int speed, void *user_data)
 {
        SETTING_TRACE("=== Speed changed to (%d)", speed);
-       auto speech_rate_item = static_cast<GenGroupItemData*>(user_data);
+       auto speech_rate_item = static_cast<GenGroupItemData *>(user_data);
        elm_object_item_part_text_set(speech_rate_item->item, "elm.text.2",     std::to_string(speed).c_str());
 }
 
 void ScreenReaderSettingsPage::createSpeechRatePopup(void *data, void *item)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        Evas_Object *popup;
        Evas_Object *layout;
        Evas_Object *slider;
@@ -442,25 +443,25 @@ void ScreenReaderSettingsPage::createSpeechRatePopup(void *data, void *item)
        /* eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK,
         *  eext_popup_back_cb, NULL); */
        elm_object_part_text_set(popup, "title,text",
-                       _("IDS_ST_BODY_SPEECH_RATE"));
+                                                        _("IDS_ST_BODY_SPEECH_RATE"));
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
 
        /* layout */
        layout = elm_layout_add(popup);
        elm_layout_file_set(layout, SETTINGS_EDJ,
-                       "popup_text_slider_view_layout");
+                                               "popup_text_slider_view_layout");
        elm_object_part_text_set(layout, "elm.text.description",
-                       _("IDS_SCR_POP_DRAG_THE_SLIDER_TO_SET_THE_SPEECH_RATE"));
+                                                        _("IDS_SCR_POP_DRAG_THE_SLIDER_TO_SET_THE_SPEECH_RATE"));
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
        elm_object_content_set(popup, layout);
 
        /* slider */
        slider = elm_slider_add(layout);
        elm_slider_indicator_show_set(slider, EINA_TRUE);
        evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
        elm_slider_indicator_format_set(slider, "%1.0f");
@@ -502,7 +503,7 @@ void ScreenReaderSettingsPage::onPopupDel(void *data, Evas *e, Evas_Object *obj,
        auto denominator = s_speed_max - s_speed_min;
        double s_speed_percent = 0.0;
        if (denominator != 0)
-               s_speed_percent = (((double)speed_val - (double)s_speed_min)/((double)denominator)) * 100;
+               s_speed_percent = (((double)speed_val - (double)s_speed_min) / ((double)denominator)) * 100;
 
        std::string buf = std::to_string(std::lround(s_speed_percent));
        SETTING_TRACE("Updating speed to %s", buf.c_str());
@@ -517,7 +518,7 @@ void ScreenReaderSettingsPage::onListItemClicked(void *data, Evas_Object *obj, v
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        retm_if(!list_item, "list_item == NULL");
 
        LOGI("ITEM SELECTED: %s", list_item->keyStr.c_str());
@@ -548,7 +549,7 @@ void ScreenReaderSettingsPage::onCheckStateChanged(void *data, Evas_Object *obj,
                return;
        }
 
-       auto item_data = static_cast<GenGroupItemData*>(data);
+       auto item_data = static_cast<GenGroupItemData *>(data);
        item_data->chk_status = elm_check_state_get(obj);
        LOGE("Check changed: %s; status: %d, %p", item_data->keyStr.c_str(), item_data->chk_status, &item_data->chk_status);
 }
@@ -604,7 +605,7 @@ Eina_Bool ScreenReaderSettingsPage::vconfValueGet(const char *key)
 Eina_Bool ScreenReaderSettingsPage::hidePage(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        if (0 != tts_setting_unset_speed_changed_cb())
                SETTING_TRACE("Fail to unset speed changed cb");
index 2ec9863..defe3b4 100644 (file)
@@ -33,7 +33,7 @@ void ScreenSwitchPage::attachActionCallback(SettingAccessibility *ad, UniversalS
        ad->us_configuration.screen_switch_added_cb = cb;
 }
 
-void ScreenSwitchPage::actionCb(SettingAccessibility *ad, const std::stringaction, void *user_data)
+void ScreenSwitchPage::actionCb(SettingAccessibility *ad, const std::string &action, void *user_data)
 {
        if (ad->us_configuration.screen_switch_added_cb) {
                auto switches = setting_accessibility_universal_switch_dbus_config_get_switches(&ad->config, ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_PROVIDER);
index ce86b83..b780d86 100644 (file)
@@ -38,7 +38,7 @@ public:
        static void attachActionCallback(SettingAccessibility *ad, UniversalSwitchUpdateCb cb);
 
 private:
-       static void actionCb(SettingAccessibility *ad, const std::stringaction, void *user_data);
+       static void actionCb(SettingAccessibility *ad, const std::string &action, void *user_data);
 };
 
 #endif
index c1cd617..a744ab1 100644 (file)
 
 #include "SetValueLayout.hpp"
 
-Evas_ObjectSetValueLayout::getLayout() const
+Evas_Object *SetValueLayout::getLayout() const
 {
-    return layout;
+       return layout;
 }
 
-void SetValueLayout::setLayout(Evas_Objectlayout)
+void SetValueLayout::setLayout(Evas_Object *layout)
 {
-    this->layout = layout;
+       this->layout = layout;
 }
 
-Evas_ObjectSetValueLayout::getScroller() const
+Evas_Object *SetValueLayout::getScroller() const
 {
-    return scroller;
+       return scroller;
 }
 
-void SetValueLayout::setScroller(Evas_Objectscroller)
+void SetValueLayout::setScroller(Evas_Object *scroller)
 {
-    this->scroller = scroller;
+       this->scroller = scroller;
 }
 
-Evas_ObjectSetValueLayout::getBox() const
+Evas_Object *SetValueLayout::getBox() const
 {
-    return box;
+       return box;
 }
 
-void SetValueLayout::setBox(Evas_Objectbox)
+void SetValueLayout::setBox(Evas_Object *box)
 {
-    this->box = box;
+       this->box = box;
 }
 
-Evas_ObjectSetValueLayout::getCheck() const
+Evas_Object *SetValueLayout::getCheck() const
 {
-    return check;
+       return check;
 }
 
-void SetValueLayout::setCheck(Evas_Objectcheck)
+void SetValueLayout::setCheck(Evas_Object *check)
 {
-    this->check = check;
+       this->check = check;
 }
 
-Evas_ObjectSetValueLayout::getGenlist() const
+Evas_Object *SetValueLayout::getGenlist() const
 {
-    return genlist;
+       return genlist;
 }
 
-void SetValueLayout::setGenlist(Evas_Objectgenlist)
+void SetValueLayout::setGenlist(Evas_Object *genlist)
 {
-    this->genlist = genlist;
+       this->genlist = genlist;
 }
 
-std::vector<OptionsItem*>& SetValueLayout::getOptionsData()
+std::vector<OptionsItem *> &SetValueLayout::getOptionsData()
 {
-    return options_data;
+       return options_data;
 }
 
 double SetValueLayout::getMinVal() const
 {
-    return min_val;
+       return min_val;
 }
 
 void SetValueLayout::setMinVal(double val)
 {
-    min_val = val;
+       min_val = val;
 }
 
 double SetValueLayout::getMaxVal() const
 {
-    return max_val;
+       return max_val;
 }
 
 void SetValueLayout::setMaxVal(double val)
 {
-    max_val = val;
+       max_val = val;
 }
 
 double SetValueLayout::getStep() const
 {
-    return step;
+       return step;
 }
 
 void SetValueLayout::setStep(double val)
 {
-    step = val;
+       step = val;
 }
 
 std::string SetValueLayout::getUnits() const
 {
-    return units;
+       return units;
 }
 
 void SetValueLayout::setUnits(const std::string &units)
 {
-    this->units = units;
+       this->units = units;
 }
index e273a16..8a8ffbc 100644 (file)
 
 struct SettingAccessibility;
 
-using changeValueCb = std::function<void(SettingAccessibility*, double)>;
-using changeSwitchCb = std::function<void(SettingAccessibility*, bool)>;
-using changeRadioItemCb = std::function<void(SettingAccessibility*, size_t)>;
-using changeSwitchItemCb = std::function<void(SettingAccessibility*, int, bool)>;
-using requestListItemOptionsCb = std::function<void(SettingAccessibility*, int)>;
+using changeValueCb = std::function<void(SettingAccessibility *, double)>;
+using changeSwitchCb = std::function<void(SettingAccessibility *, bool)>;
+using changeRadioItemCb = std::function<void(SettingAccessibility *, size_t)>;
+using changeSwitchItemCb = std::function<void(SettingAccessibility *, int, bool)>;
+using requestListItemOptionsCb = std::function<void(SettingAccessibility *, int)>;
 
 struct OptionsItem {
        SettingAccessibility *ad;
        int option_id;
 };
 
-class SetValueLayout {
+class SetValueLayout
+{
 public:
        SetValueLayout() = default;
-       Evas_ObjectgetLayout() const;
-       void setLayout(Evas_Objectlayout);
-       Evas_ObjectgetScroller() const;
-       void setScroller(Evas_Objectscroller);
-       Evas_ObjectgetBox() const;
-       void setBox(Evas_Objectbox);
-       Evas_ObjectgetCheck() const;
-       void setCheck(Evas_Objectcheck);
-       Evas_ObjectgetGenlist() const;
-       void setGenlist(Evas_Objectgenlist);
-       std::vector<OptionsItem*>& getOptionsData();
+       Evas_Object *getLayout() const;
+       void setLayout(Evas_Object *layout);
+       Evas_Object *getScroller() const;
+       void setScroller(Evas_Object *scroller);
+       Evas_Object *getBox() const;
+       void setBox(Evas_Object *box);
+       Evas_Object *getCheck() const;
+       void setCheck(Evas_Object *check);
+       Evas_Object *getGenlist() const;
+       void setGenlist(Evas_Object *genlist);
+       std::vector<OptionsItem *> &getOptionsData();
        double getMinVal() const;
        void setMinVal(double val);
        double getMaxVal() const;
@@ -71,7 +72,7 @@ private:
        Evas_Object *box = nullptr;
        Evas_Object *check = nullptr;
        Evas_Object *genlist = nullptr;
-       std::vector<OptionsItem*> options_data;
+       std::vector<OptionsItem *> options_data;
        double min_val = 0.0;
        double max_val = 0.0;
        double step = 0.0;
index a8d5d52..1cdb407 100644 (file)
@@ -46,11 +46,19 @@ SetValuePage::SetValuePage(SettingAccessibility *ad, ValueEditorType type, const
        retm_if(title == NULL, "Title parameter is NULL");
 
        switch (type) {
-       case ValueEditorType::NUMERIC: layout_grp = GRP_SET_VALUE_NUMERIC; break;
-       case ValueEditorType::NUMERIC_SWITCH: layout_grp = GRP_SET_VALUE_NUMERIC_SWITCH; break;
+       case ValueEditorType::NUMERIC:
+               layout_grp = GRP_SET_VALUE_NUMERIC;
+               break;
+       case ValueEditorType::NUMERIC_SWITCH:
+               layout_grp = GRP_SET_VALUE_NUMERIC_SWITCH;
+               break;
        case ValueEditorType::RADIOS:
-       case ValueEditorType::SWITCHES: layout_grp = GRP_SET_VALUE_SWITCHES; break;
-       case ValueEditorType::LIST_SWITCH: layout_grp = GRP_SET_VALUE_LIST_SWITCH; break;
+       case ValueEditorType::SWITCHES:
+               layout_grp = GRP_SET_VALUE_SWITCHES;
+               break;
+       case ValueEditorType::LIST_SWITCH:
+               layout_grp = GRP_SET_VALUE_LIST_SWITCH;
+               break;
        default:
                layout_grp = GRP_SET_VALUE_NUMERIC;
                SETTING_TRACE_DEBUG("Unrecognized layout type!");
@@ -166,16 +174,16 @@ void SetValuePage::setSwitch(SettingAccessibility *ad, bool state)
                elm_object_part_text_set(ad->set_value_layout.getLayout(), PRT_SET_VALUE_SWITCH_LABEL, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
 }
 
-void SetValuePage::addRadioItem(SettingAccessibility *ad, const std::stringcaption, int id, bool selected)
+void SetValuePage::addRadioItem(SettingAccessibility *ad, const std::string &caption, int id, bool selected)
 {
        retm_if(ad == NULL, "Input parameter is NULL");
 
        GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &itc_1text_1icon_3,
-                       gendialRadioItemSelectedCb, NULL,
-                       SwallowType::RADIO_1TEXT, selected ? 0 : -1,
-                       caption,
-                       {},
-                       gendialRadioChangeCb);
+                                                        gendialRadioItemSelectedCb, NULL,
+                                                        SwallowType::RADIO_1TEXT, selected ? 0 : -1,
+                                                        caption,
+                                                        {},
+                                                        gendialRadioChangeCb);
 
        if (item) {
                item->userdata = ad;
@@ -188,11 +196,11 @@ void SetValuePage::addSwitchItem(SettingAccessibility *ad, const char *caption,
        retm_if(ad == NULL, "Input parameter is NULL");
 
        GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &ad->itc_multiline_sub,
-                       gl_sel, NULL,
-                       SwallowType::ICON_RADIO, (int)state,
-                       caption ? caption : std::string{},
-                       sub_desc ? sub_desc : std::string{},
-                       switchItemCheckboxCb);
+                                                        gl_sel, NULL,
+                                                        SwallowType::ICON_RADIO, (int)state,
+                                                        caption ? caption : std::string{},
+                                                        sub_desc ? sub_desc : std::string{},
+                                                        switchItemCheckboxCb);
 
        if (item) {
                item->userdata = (void *)ad;
@@ -200,16 +208,16 @@ void SetValuePage::addSwitchItem(SettingAccessibility *ad, const char *caption,
        }
 }
 
-void SetValuePage::addRemoveSwitchItem(SettingAccessibility *ad, const std::string& caption, const std::string& subtext, int id, bool state)
+void SetValuePage::addRemoveSwitchItem(SettingAccessibility *ad, const std::string &caption, const std::string &subtext, int id, bool state)
 {
        retm_if(ad == NULL, "Input parameter is NULL");
 
        GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &itc_1text_1icon_3,
-                       gendialRemoveSelectedItemCb, NULL,
-                       SwallowType::CHECK, (int)state,
-                       caption,
-                       subtext,
-                       gendialRemoveCheckboxItemCb);
+                                                        gendialRemoveSelectedItemCb, NULL,
+                                                        SwallowType::CHECK, (int)state,
+                                                        caption,
+                                                        subtext,
+                                                        gendialRemoveCheckboxItemCb);
 
        if (item) {
                item->userdata = (void *)ad;
@@ -217,7 +225,7 @@ void SetValuePage::addRemoveSwitchItem(SettingAccessibility *ad, const std::stri
        }
 }
 
-GenGroupItemDataSetValuePage::addRadioListItem(SettingAccessibility *ad, const char *main_text, const char *sub_text, int option_id)
+GenGroupItemData *SetValuePage::addRadioListItem(SettingAccessibility *ad, const char *main_text, const char *sub_text, int option_id)
 {
        retvm_if(ad == NULL, NULL, "Input parameter is NULL");
 
@@ -230,11 +238,11 @@ GenGroupItemData* SetValuePage::addRadioListItem(SettingAccessibility *ad, const
        ad->set_value_layout.getOptionsData().push_back(opt_item);
 
        GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &itc_2text,
-                       listItemClickCb, opt_item,
-                       SwallowType::INVALID, 0,
-                       main_text ? main_text : std::string{},
-                       sub_text ? sub_text : std::string{},
-                       NULL);
+                                                        listItemClickCb, opt_item,
+                                                        SwallowType::INVALID, 0,
+                                                        main_text ? main_text : std::string{},
+                                                        sub_text ? sub_text : std::string{},
+                                                        NULL);
        if (item)
                elm_object_item_disabled_set(item->item, !elm_check_state_get(ad->set_value_layout.getCheck()));
 
@@ -313,7 +321,7 @@ void SetValuePage::syncPageWithVconf(keynode_t *node, void *user_data)
 {
        retm_if(user_data == NULL, "Data parameter is NULL");
        retm_if(node == NULL, "Data parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(user_data);
+       auto ad = static_cast<SettingAccessibility *>(user_data);
        int ret = vconf_keynode_get_bool(node);
        retm_if(ret < 0, "FAIL: vconf_keynode_get_bool");
        if (elm_check_state_get(ad->set_value_layout.getCheck()) != ret) {
@@ -325,24 +333,24 @@ void SetValuePage::syncPageWithVconf(keynode_t *node, void *user_data)
 void SetValuePage::addActionGendialField(SettingAccessibility *ad)
 {
        createGendialGroupItem(ad->update_accessories_action_genlist, &itc_1text,
-               updateSwitchAction, ad,
-               SwallowType::INVALID, 0,
-               "IDS_ACCS_UNIVERSAL_SWITCH_ACTION",
-               setting_accessibility_universal_switch_dbus_config_get_activity_name(&ad->config, ad->config_item_to_update.activity_type),
-               NULL);
+                                                  updateSwitchAction, ad,
+                                                  SwallowType::INVALID, 0,
+                                                  "IDS_ACCS_UNIVERSAL_SWITCH_ACTION",
+                                                  setting_accessibility_universal_switch_dbus_config_get_activity_name(&ad->config, ad->config_item_to_update.activity_type),
+                                                  NULL);
 }
 
 void SetValuePage::updateSwitchAction(void *data, Evas_Object *obj, void *event_info)
 {
        elm_genlist_item_selected_set((Elm_Genlist_Item *)event_info, 0);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retm_if(ad == NULL, "Data argument is NULL");
 
        ad->actionPage_ = std::make_unique<ActionPage>(ad);
        ActionPage::attachCallback(ad, updateSwitchChooseAction, NULL);
 }
 
-void SetValuePage::updateSwitchChooseAction(SettingAccessibility *ad, const std::stringaction, void *user_data)
+void SetValuePage::updateSwitchChooseAction(SettingAccessibility *ad, const std::string &action, void *user_data)
 {
        ad->config_item_to_update.activity_type = action;
        updateGendialActionField(ad);
@@ -359,7 +367,7 @@ void SetValuePage::updateGendialActionField(SettingAccessibility *ad)
 
 void SetValuePage::closeUpdateAccessoriesSwitchPage(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retm_if(ad == NULL, "Data argument is NULL");
 
        if (event_info == ad->save_object_item)
@@ -382,7 +390,7 @@ void SetValuePage::gendialRadioItemSelectedCb(void *data, Evas_Object *obj, void
 
        elm_genlist_item_selected_set(item, 0);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        if (list_item->chk_status)
                setting_update_gl_item_chk_status(list_item, 0);
 
@@ -392,14 +400,14 @@ void SetValuePage::gendialRadioItemSelectedCb(void *data, Evas_Object *obj, void
 void SetValuePage::gendialRadioChangeCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Input parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
        callRadioItemChangeCbAndPopNaviframe(list_item);
 }
 
 void SetValuePage::callRadioItemChangeCbAndPopNaviframe(GenGroupItemData *list_item)
 {
        retm_if(list_item == NULL, "Input parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "Application data is NULL");
        if (ad->set_value_layout.radio_item_change_cb)
                ad->set_value_layout.radio_item_change_cb(ad, list_item->chk_id);
@@ -419,11 +427,11 @@ void SetValuePage::gendialRemoveSelectedItemCb(void *data, Evas_Object *obj, voi
 
        elm_genlist_item_selected_set(item, 0);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_update_gl_item_chk_status(list_item,
-                       list_item->chk_status ? 0 : 1);
+                                                                         list_item->chk_status ? 0 : 1);
 
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
 
        if (elm_check_state_get(list_item->eo_check))
                ad->switches_to_remove_counter++;
@@ -436,8 +444,8 @@ void SetValuePage::gendialRemoveSelectedItemCb(void *data, Evas_Object *obj, voi
 void SetValuePage::gendialRemoveCheckboxItemCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Input parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        if (elm_check_state_get(list_item->eo_check))
                ad->switches_to_remove_counter++;
        else
@@ -449,8 +457,8 @@ void SetValuePage::gendialRemoveCheckboxItemCb(void *data, Evas_Object *obj, voi
 void SetValuePage::switchItemCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Input parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
 
        if (ad->set_value_layout.switch_item_change_cb) {
                bool state = elm_check_state_get(list_item->eo_check);
@@ -458,7 +466,7 @@ void SetValuePage::switchItemCheckboxCb(void *data, Evas_Object *obj, void *even
        }
 }
 
-Evas_ObjectSetValuePage::createGenlist(Evas_Object *parent, const char *title)
+Evas_Object *SetValuePage::createGenlist(Evas_Object *parent, const char *title)
 {
        retvm_if(parent == NULL, NULL, "Input parameter is NULL");
 
@@ -476,7 +484,7 @@ Evas_Object* SetValuePage::createGenlist(Evas_Object *parent, const char *title)
        return genlist;
 }
 
-Evas_ObjectSetValuePage::createCheck(Evas_Object *parent, bool state)
+Evas_Object *SetValuePage::createCheck(Evas_Object *parent, bool state)
 {
        retvm_if(parent == NULL, NULL, "Input parameter is NULL");
 
@@ -491,7 +499,7 @@ Evas_Object* SetValuePage::createCheck(Evas_Object *parent, bool state)
        return check;
 }
 
-Evas_ObjectSetValuePage::createLabel(Evas_Object *parent, const char *caption)
+Evas_Object *SetValuePage::createLabel(Evas_Object *parent, const char *caption)
 {
        retvm_if(parent == NULL || caption == NULL, NULL, "Input parameter is NULL");
 
@@ -503,7 +511,7 @@ Evas_Object* SetValuePage::createLabel(Evas_Object *parent, const char *caption)
        return label;
 }
 
-Evas_ObjectSetValuePage::createBox(Evas_Object *parent)
+Evas_Object *SetValuePage::createBox(Evas_Object *parent)
 {
        Evas_Object *box;
        retvm_if(parent == NULL, NULL, "Input parameter is NULL");
@@ -520,7 +528,7 @@ Evas_Object* SetValuePage::createBox(Evas_Object *parent)
        return box;
 }
 
-Evas_ObjectSetValuePage::createScroller(Evas_Object *parent)
+Evas_Object *SetValuePage::createScroller(Evas_Object *parent)
 {
        Evas_Object *scroller;
        retvm_if(parent == NULL, NULL, "Input parameter is NULL");
@@ -539,12 +547,12 @@ Evas_Object* SetValuePage::createScroller(Evas_Object *parent)
        return scroller;
 }
 
-Evas_ObjectSetValuePage::createLayout(Evas_Object *parent, const char *layout_grp)
+Evas_Object *SetValuePage::createLayout(Evas_Object *parent, const char *layout_grp)
 {
        Evas_Object *layout;
        retvm_if(parent == NULL || layout_grp == NULL, NULL, "Input parameter is NULL");
 
-       charres_path = app_get_resource_path();
+       char *res_path = app_get_resource_path();
        std::string edj_path;
        if (res_path) {
                edj_path = std::string{res_path} + std::string{EDJ_SET_VALUE};
@@ -579,7 +587,7 @@ void SetValuePage::listItemClickCb(void *data, Evas_Object *obj, void *event_inf
 {
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(data == NULL, "Input parameter is NULL");
-       auto opt_item = static_cast<OptionsItem*>(data);
+       auto opt_item = static_cast<OptionsItem *>(data);
        retm_if(opt_item->ad->set_value_layout.list_item_options_request_cb == NULL, "Function not provided");
 
        opt_item->ad->set_value_layout.list_item_options_request_cb(opt_item->ad, opt_item->option_id);
@@ -589,7 +597,7 @@ void SetValuePage::scrollerScrollCb(void *data, Evas_Object *obj, void *event_in
 {
        int page_num = 0;
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_scroller_current_page_get(ad->set_value_layout.getScroller(), NULL, &page_num);
 
@@ -600,7 +608,7 @@ void SetValuePage::checkStateChangedCb(void *data, Evas_Object *obj, void *event
 {
        bool state;
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        state = elm_check_state_get(obj);
 
@@ -624,7 +632,7 @@ void SetValuePage::checkStateChangedCb(void *data, Evas_Object *obj, void *event
 Eina_Bool SetValuePage::naviframePopCb(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, SetValuePage::syncPageWithVconf);
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, SetValuePage::syncPageWithVconf);
@@ -647,7 +655,7 @@ Eina_Bool SetValuePage::naviframePopCb(void *data, Elm_Object_Item *it)
 void SetValuePage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
index 67565e9..017fee1 100644 (file)
@@ -35,10 +35,10 @@ public:
        static void setRange(SettingAccessibility *ad, double min, double max, double step);
        static void setValue(SettingAccessibility *ad, double value, const char *units);
        static void setSwitch(SettingAccessibility *ad, bool state);
-       static void addRadioItem(SettingAccessibility *ad, const std::stringcaption, int id, bool selected);
+       static void addRadioItem(SettingAccessibility *ad, const std::string &caption, int id, bool selected);
        static void addSwitchItem(SettingAccessibility *ad, const char *caption, const char *sub_desc, int id, bool state, SettingCallback gl_sel);
-       static void addRemoveSwitchItem(SettingAccessibility *ad, const std::string& caption, const std::string& subtext, int id, bool state);
-       static GenGroupItemDataaddRadioListItem(SettingAccessibility *ad, const char *main_text, const char *sub_text, int option_id);
+       static void addRemoveSwitchItem(SettingAccessibility *ad, const std::string &caption, const std::string &subtext, int id, bool state);
+       static GenGroupItemData *addRadioListItem(SettingAccessibility *ad, const char *main_text, const char *sub_text, int option_id);
        static void addValueChangedCb(SettingAccessibility *ad, changeValueCb cb);
        static void addSwitchChangedCb(SettingAccessibility *ad, changeSwitchCb cb);
        static void addRadioItemChangedCb(SettingAccessibility *ad, changeRadioItemCb cb);
@@ -50,7 +50,7 @@ public:
 private:
        static void addActionGendialField(SettingAccessibility *ad);
        static void updateSwitchAction(void *data, Evas_Object *obj, void *event_info);
-       static void updateSwitchChooseAction(SettingAccessibility *ad, const std::stringaction, void *user_data); //TODO rename
+       static void updateSwitchChooseAction(SettingAccessibility *ad, const std::string &action, void *user_data); //TODO rename
        static void updateGendialActionField(SettingAccessibility *ad);
        static void closeUpdateAccessoriesSwitchPage(void *data, Evas_Object *obj, void *event_info);
        static void saveAccessoriesSwitchUpdateChanges(SettingAccessibility *ad); //TODO rename
@@ -60,10 +60,10 @@ private:
        static void gendialRemoveSelectedItemCb(void *data, Evas_Object *obj, void *event_info);
        static void gendialRemoveCheckboxItemCb(void *data, Evas_Object *obj, void *event_info);
        static void switchItemCheckboxCb(void *data, Evas_Object *obj, void *event_info);
-       static Evas_ObjectcreateGenlist(Evas_Object *parent, const char *title);
-       static Evas_ObjectcreateCheck(Evas_Object *parent, bool state);
-       static Evas_ObjectcreateLabel(Evas_Object *parent, const char *caption);
-       static Evas_ObjectcreateBox(Evas_Object *parent);
+       static Evas_Object *createGenlist(Evas_Object *parent, const char *title);
+       static Evas_Object *createCheck(Evas_Object *parent, bool state);
+       static Evas_Object *createLabel(Evas_Object *parent, const char *caption);
+       static Evas_Object *createBox(Evas_Object *parent);
        static Evas_Object *createScroller(Evas_Object *parent);
        static Evas_Object *createLayout(Evas_Object *parent, const char *layout_grp);
        static void displayValue(SettingAccessibility *ad, double value);
index 49ce4d3..850148d 100644 (file)
@@ -55,7 +55,7 @@ class UniversalSwitchPage;
 class UniversalSwitchSettingsPage;
 class SetValuePage;
 
-typedef void (*switch_action_cb)(SettingAccessibility *ad, const std::stringaction, void *user_data);
+typedef void (*switch_action_cb)(SettingAccessibility *ad, const std::string &action, void *user_data);
 
 typedef void (*back_cb)(SettingAccessibility *ad);
 
index ff44214..ea2ed57 100644 (file)
 #include "setting-common-draw-widget.h"
 
 SettingPopup::SettingPopup(void *data, Evas_Object *parent,
-               const std::string& title, const std::string& text,
-               SettingCallback response_cb, int timeout,
-               bool blocked_flag,
-               bool keygrab_flag, std::vector<std::string> buttons)
+                                                  const std::string &title, const std::string &text,
+                                                  SettingCallback response_cb, int timeout,
+                                                  bool blocked_flag,
+                                                  bool keygrab_flag, std::vector<std::string> buttons)
 {
        Evas_Object *popup = elm_popup_add(parent);
        elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
-       elm_object_text_set(popup, TranslatedString{text}.c_str());
+       elm_object_text_set(popup, TranslatedString{text} .c_str());
 
-       elm_object_part_text_set(popup, "title,text", TranslatedString{title}.c_str());
+       elm_object_part_text_set(popup, "title,text", TranslatedString{title} .c_str());
 
        if (timeout > 0)
                elm_popup_timeout_set(popup, timeout);
 
        setEvent(popup, data, response_cb, onTimeout, timeout, blocked_flag, keygrab_flag);
 
-       evas_object_data_set(popup, "title", TranslatedString{title}.c_str());
-       evas_object_data_set(popup, "text", TranslatedString{text}.c_str());
+       evas_object_data_set(popup, "title", TranslatedString{title} .c_str());
+       evas_object_data_set(popup, "text", TranslatedString{text} .c_str());
        auto r = vconf_notify_key_changed(VCONFKEY_LANGSET, onLanguageChange, popup);
        if (!r)
                SETTING_TRACE_ERROR("Could not get value for key: %s", VCONFKEY_SETAPPL_ACCESSIBILITY_TTS);
@@ -54,7 +54,7 @@ SettingPopup::SettingPopup(void *data, Evas_Object *parent,
                        Evas_Object *btn = setting_create_button(popup, buttons[i], {}, response_cb, data);
                        elm_object_style_set(btn, "popup");
                        elm_object_part_content_set(popup, buttons_parts[i].c_str(), btn);
-                       evas_object_data_set(popup, buttons_parts[i].c_str(), TranslatedString{buttons[i]}.c_str());
+                       evas_object_data_set(popup, buttons_parts[i].c_str(), TranslatedString{buttons[i]} .c_str());
                }
        } else {
                SETTING_TRACE_ERROR("incorrect button number for popup");
@@ -75,10 +75,10 @@ SettingPopup::~SettingPopup()
 }
 
 void SettingPopup::setEvent(Evas_Object *popup, void *data,
-               SettingCallback response_cb,
-               SettingCallback back_cb, int timeout,
-               bool blocked_flag,
-               bool keygrab_flag)
+                                                       SettingCallback response_cb,
+                                                       SettingCallback back_cb, int timeout,
+                                                       bool blocked_flag,
+                                                       bool keygrab_flag)
 {
        if (timeout > 0) {
                if (response_cb)
@@ -139,31 +139,31 @@ void SettingPopup::onPopupDel(void *data, Evas *e, Evas_Object *obj, void *event
 
 void SettingPopup::onPopupKeygrabDel(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-       #ifdef ECORE_X
-               Ecore_X_Window xwin = elm_win_xwindow_get(obj);
+#ifdef ECORE_X
+       Ecore_X_Window xwin = elm_win_xwindow_get(obj);
 
-               int ret = eext_win_keygrab_unset(xwin, "XF86Home");
-               if (ret)
-                       SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret);
+       int ret = eext_win_keygrab_unset(xwin, "XF86Home");
+       if (ret)
+               SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret);
 
-               ret = eext_win_keygrab_unset(xwin, "XF86Back");
-               if (ret)
-                       SETTING_TRACE_ERROR("KEY_BACK ungrab error ret[%d]", ret);
-       #endif
+       ret = eext_win_keygrab_unset(xwin, "XF86Back");
+       if (ret)
+               SETTING_TRACE_ERROR("KEY_BACK ungrab error ret[%d]", ret);
+#endif
 }
 
 void SettingPopup::updateLanguage(Evas_Object *popup)
 {
        setting_retm_if(NULL == popup, "data is NULL");
-       auto title = static_cast<char*>(evas_object_data_get(popup, "title"));
-       auto text1 = static_cast<char*>(evas_object_data_get(popup, "text"));
-       auto text0 = static_cast<char*>(evas_object_data_get(popup, "text0"));
+       auto title = static_cast<char *>(evas_object_data_get(popup, "title"));
+       auto text1 = static_cast<char *>(evas_object_data_get(popup, "text"));
+       auto text0 = static_cast<char *>(evas_object_data_get(popup, "text0"));
        std::string text; // TODO change this variable into TranslatedString
 
        if (text0) {
-               text = TranslatedString{text0}.str() + "<br>" + TranslatedString{text1}.str();
+               text = TranslatedString{text0} .str() + "<br>" + TranslatedString{text1} .str();
        } else {
-               text = TranslatedString{text1}.str();
+               text = TranslatedString{text1} .str();
        }
 
        if (title)
index 0832a1f..220f54e 100644 (file)
@@ -49,19 +49,19 @@ public:
        * @param buttons                buttons to show in the popup
        **********************************************************/
        SettingPopup(void *data, Evas_Object *parent,
-                       const std::string& title, const std::string& text,
-                       SettingCallback response_cb, int timeout,
-                       bool blocked_flag,
-                       bool keygrab_flag, std::vector<std::string> buttons);
+                                const std::string &title, const std::string &text,
+                                SettingCallback response_cb, int timeout,
+                                bool blocked_flag,
+                                bool keygrab_flag, std::vector<std::string> buttons);
        Evas_Object *getObject() const;
        ~SettingPopup();
 
 private:
        void setEvent(Evas_Object *popup, void *data,
-                       SettingCallback response_cb,
-                       SettingCallback back_cb, int timeout,
-                       bool blocked_flag,
-                       bool keygrab_flag);
+                                 SettingCallback response_cb,
+                                 SettingCallback back_cb, int timeout,
+                                 bool blocked_flag,
+                                 bool keygrab_flag);
        static void onTimeout(void *data, Evas_Object *obj, void *event_info);
        static void onLanguageChange(keynode_t *key, void *data);
        static void onPopupDel(void *data, Evas *e, Evas_Object *obj, void *event_info);
index 11ba4b2..f273245 100644 (file)
@@ -66,11 +66,11 @@ void SwitchesPage::createAddButton(SettingAccessibility *ad, Evas_Object *genlis
        retm_if(ad == NULL, "Input argument is NULL");
 
        GenGroupItemData *item = createGendialGroupItem(genlist, &itc_1text_1icon_3,
-                       addSwitchClickedCb, ad,
-                       SwallowType::ICON_IMAGE, 0,
-                       "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_ADD_SWITCH",
-                       {},
-                       NULL);
+                                                        addSwitchClickedCb, ad,
+                                                        SwallowType::ICON_IMAGE, 0,
+                                                        "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_ADD_SWITCH",
+                                                        {},
+                                                        NULL);
 
        if (item) {
                item->l_swallow_path = ACCESSIBILITY_UNIVERSAL_SWITCH_PLUS_ICON;
@@ -91,7 +91,7 @@ void SwitchesPage::createSwitchesGroup(SettingAccessibility *ad, Evas_Object *ge
 void SwitchesPage::createRemovePageCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        ad->removeSwitchPage_ = std::make_unique<RemoveSwitchPage>(ad);
        RemoveSwitchPage::attachCallback(ad, switchRemovedCb);
@@ -101,7 +101,7 @@ void SwitchesPage::addSwitchClickedCb(void *data, Evas_Object *obj, void *event_
 {
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        AddSwitchPage::attachCallbackOnSwitchAttach(ad, addSwitchCb);
        ad->addSwitchPage_ = std::make_unique<AddSwitchPage>(ad);
@@ -114,15 +114,15 @@ void SwitchesPage::switchClickCb(void *data, Evas_Object *obj, void *event_info)
        elm_genlist_item_selected_set(item, EINA_FALSE);
        retm_if(data == NULL, "Data argument is NULL");
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
-       auto config_item = static_cast<UniversalSwitchConfigurationItem*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
+       auto config_item = static_cast<UniversalSwitchConfigurationItem *>(list_item->userdata);
 
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        UpdateSwitchPage::attachActionCallback(ad, switchUpdatedCb);
        ad->updateSwitchPage_ = std::make_unique<UpdateSwitchPage>(ad, config_item);
 }
 
-void SwitchesPage::switchUpdatedCb(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name)
+void SwitchesPage::switchUpdatedCb(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name)
 {
        retm_if(ad == NULL, "Input parameter is NULL");
 
@@ -131,7 +131,7 @@ void SwitchesPage::switchUpdatedCb(SettingAccessibility *ad, const std::string&
        updateSwitchesList(ad, ad->universal_switch_switches);
 }
 
-void SwitchesPage::switchRemovedCb(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name)
+void SwitchesPage::switchRemovedCb(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name)
 {
        retm_if(ad == NULL, "Input parameter is NULL");
 
@@ -140,7 +140,7 @@ void SwitchesPage::switchRemovedCb(SettingAccessibility *ad, const std::string&
        updateSwitchesList(ad, ad->universal_switch_switches);
 }
 
-void SwitchesPage::addSwitchCb(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name)
+void SwitchesPage::addSwitchCb(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name)
 {
        retm_if(ad == NULL, "Input parameter is NULL");
 
@@ -149,18 +149,18 @@ void SwitchesPage::addSwitchCb(SettingAccessibility *ad, const std::string& swit
        updateSwitchesList(ad, ad->universal_switch_switches);
 }
 
-GenGroupItemData* SwitchesPage::addMappedSwitchMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const std::string& main_text,
-                                                                       const std::string& sub_text, SettingCallback item_cb, void *user_data)
+GenGroupItemData *SwitchesPage::addMappedSwitchMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const std::string &main_text,
+               const std::string &sub_text, SettingCallback item_cb, void *user_data)
 {
        retvm_if(ad == NULL, NULL, "Input argument is NULL");
        retvm_if(genlist == NULL, NULL, "Input genlist argument is NULL");
 
        auto item = createGendialGroupItem(genlist, &itc_2text_1icon_3,
-                       item_cb, ad,
-                       SwallowType::INVALID, 0,
-                       main_text,
-                       sub_text,
-                       NULL);
+                                                                          item_cb, ad,
+                                                                          SwallowType::INVALID, 0,
+                                                                          main_text,
+                                                                          sub_text,
+                                                                          NULL);
 
        if (item)
                item->userdata = user_data;
@@ -171,7 +171,7 @@ GenGroupItemData* SwitchesPage::addMappedSwitchMenuItem(SettingAccessibility *ad
 Eina_Bool SwitchesPage::naviframePopCb(void *data, Elm_Object_Item *it)
 {
        retv_if(data == NULL, EINA_TRUE);
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        if (ad->universal_switch_switches_back)
                ad->universal_switch_switches_back(ad);
@@ -187,7 +187,7 @@ Eina_Bool SwitchesPage::naviframePopCb(void *data, Elm_Object_Item *it)
 void SwitchesPage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
index f6c32fe..ae546b4 100644 (file)
@@ -35,7 +35,7 @@ public:
        using back_cb = void(*)(SettingAccessibility *ad); //TODO: probably remove
        SwitchesPage(SettingAccessibility *ad);
        static void attachCallback(SettingAccessibility *ad, back_cb callback);
-       static void addSwitchCb(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name);
+       static void addSwitchCb(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
 
 private:
        static void updateSwitchesList(SettingAccessibility *ad, Evas_Object *genlist);
@@ -44,10 +44,10 @@ private:
        static void createRemovePageCb(void *data, Evas_Object *obj, void *event_info);
        static void addSwitchClickedCb(void *data, Evas_Object *obj, void *event_info);
        static void switchClickCb(void *data, Evas_Object *obj, void *event_info);
-       static void switchUpdatedCb(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name);
-       static void switchRemovedCb(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name);
-       static GenGroupItemData * addMappedSwitchMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const std::string& main_text,
-                                                                               const std::string& sub_text, SettingCallback item_cb, void *user_data);
+       static void switchUpdatedCb(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
+       static void switchRemovedCb(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
+       static GenGroupItemData *addMappedSwitchMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const std::string &main_text,
+                       const std::string &sub_text, SettingCallback item_cb, void *user_data);
        static Eina_Bool  naviframePopCb(void *data, Elm_Object_Item *it);
        static void backCb(void *data, Evas_Object *obj, void *event_info);
 
index e0dde95..ccc2dc4 100644 (file)
 #include <cstring>
 #include <appcore-common.h>
 
-TranslatedString::TranslatedString(const std::stringstr)
+TranslatedString::TranslatedString(const std::string &str)
        : value(std::string{gettext(str.c_str())})
 {}
 
-TranslatedString::TranslatedString(const charstr)
+TranslatedString::TranslatedString(const char *str)
        : value(std::string{gettext(str), strlen(gettext(str))})
 {}
 
@@ -37,7 +37,7 @@ std::string TranslatedString::str() const
        return value;
 }
 
-const charTranslatedString::c_str() const
+const char *TranslatedString::c_str() const
 {
        return value.c_str();
 }
index 4a50d45..c4c7bde 100644 (file)
@@ -28,13 +28,13 @@ class TranslatedString
 {
 public:
        TranslatedString() = default;
-       TranslatedString(const std::stringstr);
-       TranslatedString(const charstr);
+       TranslatedString(const std::string &str);
+       TranslatedString(const char *str);
 
        bool empty() const;
 
        std::string str() const;
-       const charc_str() const;
+       const char *c_str() const;
 
 private:
        std::string value;
index 125c215..1815d35 100644 (file)
 #include <string>
 #include <functional>
 
-enum class ScanMethod
-{
-    POINT = 1,
-    ROW
+enum class ScanMethod {
+       POINT = 1,
+       ROW
 };
 
-enum class ScanDirection
-{
-    TO_BOTTOM = 1,
-    TO_TOP
+enum class ScanDirection {
+       TO_BOTTOM = 1,
+       TO_TOP
 };
 
 class SettingAccessibility;
-using UniversalSwitchUpdateCb = std::function<void(SettingAccessibility*, const std::string&, const std::string&, const std::string&)>;
+using UniversalSwitchUpdateCb = std::function<void(SettingAccessibility *, const std::string &, const std::string &, const std::string &)>;
 
 /**
  * Class containing cached parameteres required by Universal Switch
index 11847ce..dd33e3f 100644 (file)
@@ -46,11 +46,11 @@ UniversalSwitchPage::UniversalSwitchPage(SettingAccessibility *ad)
        }
 
        ad->universal_switch_off_checkbox = createGendialGroupItem(
-                       genlist, &itc_1text_1icon,
-                       listCb,
-                       ad, SwallowType::ICON_RADIO, state,
-                       "IDS_ACCS_UNIVERSAL_SWITCH_OFF",
-                       {}, checkboxCb);
+                                                                                       genlist, &itc_1text_1icon,
+                                                                                       listCb,
+                                                                                       ad, SwallowType::ICON_RADIO, state,
+                                                                                       "IDS_ACCS_UNIVERSAL_SWITCH_OFF",
+                                                                                       {}, checkboxCb);
 
        if (ad->universal_switch_off_checkbox) {
                ad->universal_switch_off_checkbox->userdata = ad;
@@ -60,11 +60,11 @@ UniversalSwitchPage::UniversalSwitchPage(SettingAccessibility *ad)
        }
 
        ad->universal_switch_comment = createGendialGroupItem(
-                       genlist, &ad->itc_multiline_sub,
-                       NULL, ad, SwallowType::INVALID, 0,
-                       {},
-                       "IDS_ACCS_UNIVERSAL_SWITCH_COMMENT",
-                       NULL);
+                                                                          genlist, &ad->itc_multiline_sub,
+                                                                          NULL, ad, SwallowType::INVALID, 0,
+                                                                          {},
+                                                                          "IDS_ACCS_UNIVERSAL_SWITCH_COMMENT",
+                                                                          NULL);
 
        if (ad->universal_switch_comment) {
                ad->universal_switch_comment->userdata = ad;
@@ -77,7 +77,7 @@ UniversalSwitchPage::UniversalSwitchPage(SettingAccessibility *ad)
        elm_naviframe_item_pop_cb_set(ad->md.naviframe_it, naviframePopCb, ad);
        ad->universal_switch_main_item = ad->md.naviframe_it;
 
-       std::string title_str = "<font_size=30>" + TranslatedString{"IDS_ACCS_SETTINGS_CAPS"}.str() + "</font_size>";
+       std::string title_str = "<font_size=30>" + TranslatedString{"IDS_ACCS_SETTINGS_CAPS"} .str() + "</font_size>";
 
        ad->universal_switch_settings_btn = setting_create_button(ad->md.getNaviframe(), title_str, "naviframe/title_right", createSettingsPage, ad);
        if (ad->universal_switch_settings_btn)
@@ -92,7 +92,7 @@ UniversalSwitchPage::UniversalSwitchPage(SettingAccessibility *ad)
 
 void UniversalSwitchPage::createSettingsPage(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retm_if(ad == NULL, "Input parameter is NULL");
 
        ad->universalSwitchSettingsPage_ = std::make_unique<UniversalSwitchSettingsPage>(ad);
@@ -133,24 +133,24 @@ bool UniversalSwitchPage::setState(bool state)
 void UniversalSwitchPage::updateVconfKey(int state, void *data)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        int switch_count = setting_accessibility_universal_switch_dbus_config_get_switch_count(&ad->config);
 
        if (state && switch_count == 0) {
                elm_check_state_set(ad->universal_switch_off_checkbox->eo_check, EINA_FALSE);
                ad->md.naviframe_it = elm_naviframe_top_item_get(ad->md.getNaviframe());
                ad->settingPopup_ = std::make_unique<SettingPopup>(data, ad->md.getWindow(),
-                                                               std::string{}, "To turn on Universal switch, tap ADD SWITCH and add at least one switch",
-                                                               popupResponseCb, 0,
-                                                               true,
-                                                               true,
-                                                               std::vector<std::string>{"IDS_ACCS_UNIVERSAL_SWITCH_POPUP_ADD", "IDS_ACCS_UNIVERSAL_SWITCH_CANCEL"});
+                                                       std::string{}, "To turn on Universal switch, tap ADD SWITCH and add at least one switch",
+                                                       popupResponseCb, 0,
+                                                       true,
+                                                       true,
+                                                       std::vector<std::string> {"IDS_ACCS_UNIVERSAL_SWITCH_POPUP_ADD", "IDS_ACCS_UNIVERSAL_SWITCH_CANCEL"});
        } else {
                setState(state);
        }
 }
 
-void UniversalSwitchPage::onNewSwitchAddition(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name)
+void UniversalSwitchPage::onNewSwitchAddition(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name)
 {
        retm_if(ad == NULL, "Input parameter is NULL");
        SwitchesPage::addSwitchCb(ad, switch_id, switch_action, switch_name);
@@ -165,7 +165,7 @@ void UniversalSwitchPage::onNewSwitchAddition(SettingAccessibility *ad, const st
 void UniversalSwitchPage::popupResponseCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        auto response_type = get_popup_btn_response_type(obj);
 
        SETTING_TRACE_DEBUG("popup response_type: %i", static_cast<int>(response_type));
@@ -189,14 +189,14 @@ void UniversalSwitchPage::popupResponseCb(void *data, Evas_Object *obj, void *ev
 void UniversalSwitchPage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
 
 Eina_Bool UniversalSwitchPage::naviframePopCb(void *data, Elm_Object_Item *it)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, onVconfKeyChange);
        stopUniversalSwitch(ad);
@@ -232,11 +232,11 @@ void UniversalSwitchPage::startUniversalSwitch(SettingAccessibility *ad)
        setting_accessibility_universal_switch_dbus_config_init(&ad->config, onUniversalSwitchStarting, ad);
 }
 
-void UniversalSwitchPage::onUniversalSwitchStarting(void * data)
+void UniversalSwitchPage::onUniversalSwitchStarting(void *data)
 {
        SETTING_TRACE_DEBUG("universal-switch started");
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        if (ad->universal_switch_off_checkbox)
                elm_object_item_disabled_set(ad->universal_switch_off_checkbox->item, EINA_FALSE);
@@ -256,7 +256,7 @@ void UniversalSwitchPage::listCb(void *data, Evas_Object *obj, void *event_info)
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_retm_if(data == NULL, "Data parameter is NULL");
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
        updateVconfKey(list_item->chk_status ? 1 : 0, list_item->userdata);
@@ -265,7 +265,7 @@ void UniversalSwitchPage::listCb(void *data, Evas_Object *obj, void *event_info)
 void UniversalSwitchPage::checkboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
 
        list_item->chk_status = elm_check_state_get(obj);
 
@@ -276,7 +276,7 @@ void UniversalSwitchPage::checkboxCb(void *data, Evas_Object *obj, void *event_i
 void UniversalSwitchPage::onVconfKeyChange(keynode_t *node, void *user_data)
 {
        int state;
-       auto ad = static_cast<SettingAccessibility*>(user_data);
+       auto ad = static_cast<SettingAccessibility *>(user_data);
 
        state = vconf_keynode_get_bool(node);
        if (state >= 0)
index 20a06b2..99ea418 100644 (file)
@@ -41,13 +41,13 @@ private:
        static void displayState(SettingAccessibility *ad, bool state);
        static bool setState(bool state);
        static void updateVconfKey(int state, void *data); //TODO rename
-       static void onNewSwitchAddition(SettingAccessibility *ad, const std::string& switch_id, const std::string& switch_action, const std::string& switch_name);
+       static void onNewSwitchAddition(SettingAccessibility *ad, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
        static void popupResponseCb(void *data, Evas_Object *obj, void *event_info);
        static void backCb(void *data, Evas_Object *obj, void *event_info);
        static Eina_Bool naviframePopCb(void *data, Elm_Object_Item *it);
        static void stopUniversalSwitch(SettingAccessibility *ad);
        static void startUniversalSwitch(SettingAccessibility *ad);
-       static void onUniversalSwitchStarting(void * data);
+       static void onUniversalSwitchStarting(void *data);
        static void listCb(void *data, Evas_Object *obj, void *event_info); //TODO rename
        static void checkboxCb(void *data, Evas_Object *obj, void *event_info);
        static void onVconfKeyChange(keynode_t *node, void *user_data);
index 6b4eb03..519dafd 100644 (file)
@@ -79,8 +79,7 @@
 #define DEFAULT_FEEDBACK_VOICE_SPEECH_VOLUME 50
 #define DEFAULT_MANAGE_OPTIONS_VALUE true
 
-enum class VoiceFeedbackAttribute : int
-{
+enum class VoiceFeedbackAttribute : int {
        SPEECH_RATE,
        VOLUME
 };
@@ -124,14 +123,14 @@ std::pair<std::string, ManageMenuOption> _manage_options[] = {
 };
 
 const char *_manage_options_key_array[] = {
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_GESTURES,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_ACTIONS,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_SETTINGS,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_RECENT_APPS,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_HOMESCREEN,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_BACK,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_KEYS,
-               VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_CONTEXTUAL_MENU
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_GESTURES,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_ACTIONS,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_SETTINGS,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_RECENT_APPS,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_HOMESCREEN,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_BACK,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_KEYS,
+       VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_MANAGE_CONTEXTUAL_MENU
 };
 
 UniversalSwitchSettingsPage::UniversalSwitchSettingsPage(SettingAccessibility *ad)
@@ -164,7 +163,7 @@ UniversalSwitchSettingsPage::UniversalSwitchSettingsPage(SettingAccessibility *a
 void UniversalSwitchSettingsPage::createManageGroup(SettingAccessibility *ad, Evas_Object *genlist)
 {
        addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE"),
-                       _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_SUB"), manageOptionsCb, false, false, NULL);
+                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_SUB"), manageOptionsCb, false, false, NULL);
 }
 
 void UniversalSwitchSettingsPage::createFeedbackGroup(SettingAccessibility *ad, Evas_Object *genlist)
@@ -182,17 +181,17 @@ void UniversalSwitchSettingsPage::createFeedbackGroup(SettingAccessibility *ad,
                        str, cursorColorCb, false, false, NULL);
 
        str = getBoleanText(ad->us_configuration.feedback_sound_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"),
-                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_feedback_sound = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND"),
-                       str, feedbackSoundCb, true, ad->us_configuration.feedback_sound_state, feedbackSoundCheckboxCb);
+                                                                                 str, feedbackSoundCb, true, ad->us_configuration.feedback_sound_state, feedbackSoundCheckboxCb);
        int vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, syncSoundFeedbackWithVconf, ad->universal_switch_feedback_sound);
        if (vconf_ret)
                SETTING_TRACE_ERROR("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE)");
 
        str = getBoleanText(ad->us_configuration.feedback_voice_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"),
-                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_feedback_voice = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE"),
-                       str, feedbackVoiceCb, true, ad->us_configuration.feedback_voice_state, feedbackVoiceCheckboxCb);
+                                                                                 str, feedbackVoiceCb, true, ad->us_configuration.feedback_voice_state, feedbackVoiceCheckboxCb);
        vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE, syncVoiceFeedbackWithVconf, ad->universal_switch_feedback_voice);
        if (vconf_ret)
                SETTING_TRACE_ERROR("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_VOICE_STATE)");
@@ -204,38 +203,38 @@ void UniversalSwitchSettingsPage::createAdditionalSettingsGroup(SettingAccessibi
        createGendialTitleItem(genlist, &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS");
 
        str = getValueUnitText(NULL, &ad->us_configuration.pause_on_first_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                       !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                  !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_pause_on_first = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_PAUSE_ON_FIRST"),
-                       str.c_str(), pauseOnFirstCb, true, ad->us_configuration.pause_on_first_state, pauseOnFirstCheckboxCb);
+                                                                                 str.c_str(), pauseOnFirstCb, true, ad->us_configuration.pause_on_first_state, pauseOnFirstCheckboxCb);
 
        if (ad->universal_switch_pause_on_first)
                elm_object_item_disabled_set(ad->universal_switch_pause_on_first->item, (Eina_Bool)!ad->us_configuration.auto_scan);
 
        str = getValueUnitText(NULL, &ad->us_configuration.tap_duration_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                       !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                  !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_tap_duration = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_TAP_DURATION"),
-                       str.c_str(), tapDurationCb, true, ad->us_configuration.tap_duration_state, tapDurationCheckboxCb);
+                                                                               str.c_str(), tapDurationCb, true, ad->us_configuration.tap_duration_state, tapDurationCheckboxCb);
 
        str = getValueUnitText(NULL, &ad->us_configuration.sgl_iaction_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                       !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                  !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_sgl_iaction_int = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_SGL_IACTION_INT"),
-                       str.c_str(), sglInactionIntervalCb, true, ad->us_configuration.sgl_iaction_int_state, sglInactionIntervalCheckboxCb);
+                                                                                  str.c_str(), sglInactionIntervalCb, true, ad->us_configuration.sgl_iaction_int_state, sglInactionIntervalCheckboxCb);
 
        str = getValueUnitText(NULL, &ad->us_configuration.auto_tap_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                       !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                  !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_auto_tap = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP"),
-                       str.c_str(), autoTapCb, true, ad->us_configuration.auto_tap_state, autoTapCheckboxCb);
+                                                                       str.c_str(), autoTapCb, true, ad->us_configuration.auto_tap_state, autoTapCheckboxCb);
 
        str = getValueUnitText(NULL, &ad->us_configuration.auto_move_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                       !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                  !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        ad->universal_switch_auto_move_int = addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_MOVE_INT"),
-                       str.c_str(), autoMoveIntervalCb, true, ad->us_configuration.auto_move_int_state, autoMoveIntervalCheckboxCb);
+                                                                                str.c_str(), autoMoveIntervalCb, true, ad->us_configuration.auto_move_int_state, autoMoveIntervalCheckboxCb);
 
        if (ad->universal_switch_auto_move_int)
                elm_object_item_disabled_set(ad->universal_switch_auto_move_int->item, (Eina_Bool)ad->us_configuration.auto_scan);
 
        addMenuItem(ad, genlist, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD"),
-                       _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD_SUB"), autoTapKBDMenuItemSelected, true, ad->us_configuration.auto_tap_kbd_state, autoTapKbdCheckboxCb);
+                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS_AUTO_TAP_KBD_SUB"), autoTapKBDMenuItemSelected, true, ad->us_configuration.auto_tap_kbd_state, autoTapKbdCheckboxCb);
 }
 
 void UniversalSwitchSettingsPage::autoTapKBDMenuItemSelected(void *data, Evas_Object *obj, void *event_info)
@@ -245,11 +244,11 @@ void UniversalSwitchSettingsPage::autoTapKBDMenuItemSelected(void *data, Evas_Ob
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_retm_if(list_item == NULL, "Data parameter is NULL");
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
 
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        ad->us_configuration.auto_tap_kbd_state = list_item->chk_status;
 
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_KBD_STATE, (bool *)&list_item->chk_status, NULL, NULL);
@@ -308,7 +307,7 @@ void UniversalSwitchSettingsPage::setCtxPopupPosition(SettingAccessibility *ad,
        evas_object_move(ctxpopup, -1, y + h);
 }
 
-Evas_ObjectUniversalSwitchSettingsPage::createCtxPopup(SettingAccessibility *ad)
+Evas_Object *UniversalSwitchSettingsPage::createCtxPopup(SettingAccessibility *ad)
 {
        Evas_Object *ctxpopup = NULL;
        retvm_if(ad == NULL, NULL, "Input parameter is NULL");
@@ -322,25 +321,31 @@ Evas_Object* UniversalSwitchSettingsPage::createCtxPopup(SettingAccessibility *a
        return ctxpopup;
 }
 
-const charUniversalSwitchSettingsPage::getScanDirectionText(ScanDirection direction)
+const char *UniversalSwitchSettingsPage::getScanDirectionText(ScanDirection direction)
 {
        switch (direction) {
-       case ScanDirection::TO_BOTTOM: return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_TB");
-       case ScanDirection::TO_TOP: return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_BT");
-       default: return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED");
+       case ScanDirection::TO_BOTTOM:
+               return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_TB");
+       case ScanDirection::TO_TOP:
+               return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_DIR_BT");
+       default:
+               return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED");
        }
 }
 
-const charUniversalSwitchSettingsPage::getScanMethodText(ScanMethod method)
+const char *UniversalSwitchSettingsPage::getScanMethodText(ScanMethod method)
 {
        switch (method) {
-       case ScanMethod::POINT: return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_POINT");
-       case ScanMethod::ROW: return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_ROW");
-       default: return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED");
+       case ScanMethod::POINT:
+               return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_POINT");
+       case ScanMethod::ROW:
+               return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_SCAN_METHOD_ROW");
+       default:
+               return _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_UNDEFINED");
        }
 }
 
-const charUniversalSwitchSettingsPage::getBoleanText(bool bvalue, const char *t_str, const char *f_str)
+const char *UniversalSwitchSettingsPage::getBoleanText(bool bvalue, const char *t_str, const char *f_str)
 {
        if (bvalue)
                return t_str;
@@ -368,7 +373,7 @@ std::string UniversalSwitchSettingsPage::getValueUnitText(int *ivalue, double *d
        return ss.str();
 }
 
-GenGroupItemDataUniversalSwitchSettingsPage::addMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const char *main_text, const char *sub_text,
+GenGroupItemData *UniversalSwitchSettingsPage::addMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const char *main_text, const char *sub_text,
                SettingCallback item_cb, bool chk, bool chk_state, SettingCallback chk_cb)
 {
        retvm_if(ad == NULL, NULL, "Input argument is NULL");
@@ -380,11 +385,11 @@ GenGroupItemData* UniversalSwitchSettingsPage::addMenuItem(SettingAccessibility
                item_type = SwallowType::ICON_RADIO;
 
        item =  createGendialGroupItem(genlist, &ad->itc_multiline_sub,
-                       item_cb, ad,
-                       item_type, (int)chk_state,
-                       main_text,
-                       sub_text ? sub_text : std::string{},
-                       chk_cb);
+                                                                  item_cb, ad,
+                                                                  item_type, (int)chk_state,
+                                                                  main_text,
+                                                                  sub_text ? sub_text : std::string{},
+                                                                  chk_cb);
 
        if (item)
                item->userdata = ad;
@@ -527,7 +532,7 @@ void UniversalSwitchSettingsPage::updateSwitchesCount(SettingAccessibility *ad)
 
 void UniversalSwitchSettingsPage::manageOptionsCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -535,10 +540,10 @@ void UniversalSwitchSettingsPage::manageOptionsCb(void *data, Evas_Object *obj,
 
        for (auto i = 0u; i < utils::lenOf(_manage_options); ++i)
                SetValuePage::addSwitchItem(ad, _manage_options[i].first.c_str(),
-                       (i == UniversalSwitchConfiguration::MANAGE_OPTIONS_COUNT - 1) ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU_DESC" : NULL,
-                       static_cast<int>(_manage_options[i].second),
-                       ad->us_configuration.manage_options_state[i],
-                       manageOptionsItemSelected);
+                                                                       (i == UniversalSwitchConfiguration::MANAGE_OPTIONS_COUNT - 1) ? "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_MANAGE_CONTEXTUAL_MENU_DESC" : NULL,
+                                                                       static_cast<int>(_manage_options[i].second),
+                                                                       ad->us_configuration.manage_options_state[i],
+                                                                       manageOptionsItemSelected);
 
        SetValuePage::addSwitchItemChangedCb(ad, manageOptionsCheckboxCb);
 }
@@ -550,10 +555,10 @@ void UniversalSwitchSettingsPage::manageOptionsItemSelected(void *data, Evas_Obj
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_retm_if(list_item == NULL, "Data parameter is NULL");
 
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        list_item->chk_status = ad->us_configuration.manage_options_state[list_item->chk_id] ? 1 : 0;
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
 
@@ -570,7 +575,7 @@ void UniversalSwitchSettingsPage::manageOptionsCheckboxCb(SettingAccessibility *
 
 void UniversalSwitchSettingsPage::feedbackVoiceCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -584,11 +589,11 @@ void UniversalSwitchSettingsPage::feedbackVoiceCb(void *data, Evas_Object *obj,
 
        std::string str = std::to_string(ad->us_configuration.feedback_voice_speech_rate) + "%";
        ad->universal_switch_feedback_voice_speech_rate = SetValuePage::addRadioListItem(ad,
-               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_RATE"), str.c_str(), static_cast<int>(VoiceFeedbackAttribute::SPEECH_RATE));
+                       _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_RATE"), str.c_str(), static_cast<int>(VoiceFeedbackAttribute::SPEECH_RATE));
 
        str = std::to_string(ad->us_configuration.feedback_voice_speech_volume) + "%";
        ad->universal_switch_feedback_voice_speech_volume = SetValuePage::addRadioListItem(ad,
-               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_VOLUME"), str.c_str(), static_cast<int>(VoiceFeedbackAttribute::VOLUME));
+                       _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_VOICE_SPEECH_VOLUME"), str.c_str(), static_cast<int>(VoiceFeedbackAttribute::VOLUME));
 
        SetValuePage::addListItemOptionsRequestCb(ad, feedbackVoiceItemOptionsRequestCb);
 }
@@ -669,8 +674,8 @@ void UniversalSwitchSettingsPage::feedbackVoiceSwitchChangedCb(SettingAccessibil
 void UniversalSwitchSettingsPage::feedbackVoiceCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
 
        list_item->chk_status = elm_check_state_get(obj);
 
@@ -678,7 +683,7 @@ void UniversalSwitchSettingsPage::feedbackVoiceCheckboxCb(void *data, Evas_Objec
                ad->us_configuration.feedback_voice_state = list_item->chk_status;
 
                const char *str = getBoleanText(ad->us_configuration.feedback_voice_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"),
-                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
                ad->universal_switch_feedback_voice->sub_desc = str ? str : std::string{};
                elm_genlist_item_update(ad->universal_switch_feedback_voice->item);
        }
@@ -688,7 +693,7 @@ void UniversalSwitchSettingsPage::feedbackVoiceCheckboxCb(void *data, Evas_Objec
 
 void UniversalSwitchSettingsPage::feedbackSoundCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -699,7 +704,7 @@ void UniversalSwitchSettingsPage::feedbackSoundCb(void *data, Evas_Object *obj,
        SetValuePage::setDescription(ad, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SET_VALUE_DESC_FEEDBACK_SOUND"));
        SetValuePage::addSwitchChangedCb(ad, feedbackSoundSwitchChangedCb);
        ad->universal_switch_feedback_sound_volume = SetValuePage::addRadioListItem(ad,
-               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME"), str.c_str(), 0);
+                       _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_SOUND_VOLUME"), str.c_str(), 0);
        SetValuePage::addListItemOptionsRequestCb(ad, feedbackSoundItemOptionsRequestCb);
        int vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_FEEDBACK_SOUND_STATE, SetValuePage::syncPageWithVconf, ad);
        if (vconf_ret)
@@ -752,8 +757,8 @@ void UniversalSwitchSettingsPage::feedbackSoundSwitchChangedCb(SettingAccessibil
 void UniversalSwitchSettingsPage::feedbackSoundCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
 
        list_item->chk_status = elm_check_state_get(obj);
 
@@ -761,7 +766,7 @@ void UniversalSwitchSettingsPage::feedbackSoundCheckboxCb(void *data, Evas_Objec
                ad->us_configuration.feedback_sound_state = list_item->chk_status;
 
                const char *str = getBoleanText(ad->us_configuration.feedback_sound_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_ON"),
-                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                                                                               _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
                ad->universal_switch_feedback_sound->sub_desc = str ? str : std::string{};
                elm_genlist_item_update(ad->universal_switch_feedback_sound->item);
        }
@@ -772,7 +777,7 @@ void UniversalSwitchSettingsPage::feedbackSoundCheckboxCb(void *data, Evas_Objec
 void UniversalSwitchSettingsPage::cursorColorCb(void *data, Evas_Object *obj, void *event_info)
 {
        int i;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -799,8 +804,8 @@ void UniversalSwitchSettingsPage::cursorColorListItemChangedCb(SettingAccessibil
 void UniversalSwitchSettingsPage::autoTapKbdCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
@@ -811,7 +816,7 @@ void UniversalSwitchSettingsPage::autoTapKbdCheckboxCb(void *data, Evas_Object *
 
 void UniversalSwitchSettingsPage::autoMoveIntervalCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -834,13 +839,13 @@ void UniversalSwitchSettingsPage::autoMoveIntervalSwitchChangedCb(SettingAccessi
        ad->universal_switch_auto_move_int->chk_status = state;
        elm_check_state_set(ad->universal_switch_auto_move_int->eo_check, state);
        ad->universal_switch_auto_move_int->sub_desc = getValueUnitText(NULL, &ad->us_configuration.auto_move_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_auto_move_int->item);
 }
 
 void UniversalSwitchSettingsPage::autoTapCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -863,7 +868,7 @@ void UniversalSwitchSettingsPage::autoTapSwitchChangedCb(SettingAccessibility *a
        ad->universal_switch_auto_tap->chk_status = state;
        elm_check_state_set(ad->universal_switch_auto_tap->eo_check, state);
        ad->universal_switch_auto_tap->sub_desc = getValueUnitText(NULL, &ad->us_configuration.auto_tap_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_auto_tap->item);
 }
 
@@ -875,22 +880,22 @@ void UniversalSwitchSettingsPage::autoTapValueChangedCb(SettingAccessibility *ad
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_VALUE, NULL, NULL, &value);
 
        ad->universal_switch_auto_tap->sub_desc = getValueUnitText(NULL, &ad->us_configuration.auto_tap_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_auto_tap->item);
 }
 
 void UniversalSwitchSettingsPage::autoTapCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
        ad->us_configuration.auto_tap_state = list_item->chk_status;
 
        ad->universal_switch_auto_tap->sub_desc = getValueUnitText(NULL, &ad->us_configuration.auto_tap_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-               !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.auto_tap_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_auto_tap->item);
 
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_TAP_STATE, (bool *)&list_item->chk_status, NULL, NULL);
@@ -898,7 +903,7 @@ void UniversalSwitchSettingsPage::autoTapCheckboxCb(void *data, Evas_Object *obj
 
 void UniversalSwitchSettingsPage::sglInactionIntervalCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -921,7 +926,7 @@ void UniversalSwitchSettingsPage::sglInactionIntervalSwitchChangedCb(SettingAcce
        ad->universal_switch_sgl_iaction_int->chk_status = state;
        elm_check_state_set(ad->universal_switch_sgl_iaction_int->eo_check, state);
        ad->universal_switch_sgl_iaction_int->sub_desc = getValueUnitText(NULL, &ad->us_configuration.sgl_iaction_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_sgl_iaction_int->item);
 }
 
@@ -933,22 +938,22 @@ void UniversalSwitchSettingsPage::sglInactionIntervalValueChangedCb(SettingAcces
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_VALUE, NULL, NULL, &value);
 
        ad->universal_switch_sgl_iaction_int->sub_desc = getValueUnitText(NULL, &ad->us_configuration.sgl_iaction_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_sgl_iaction_int->item);
 }
 
 void UniversalSwitchSettingsPage::sglInactionIntervalCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
        ad->us_configuration.sgl_iaction_int_state = list_item->chk_status;
 
        ad->universal_switch_sgl_iaction_int->sub_desc = getValueUnitText(NULL, &ad->us_configuration.sgl_iaction_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-               !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.sgl_iaction_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_sgl_iaction_int->item);
 
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SGL_IACTION_INT_STATE, (bool *)&list_item->chk_status, NULL, NULL);
@@ -956,7 +961,7 @@ void UniversalSwitchSettingsPage::sglInactionIntervalCheckboxCb(void *data, Evas
 
 void UniversalSwitchSettingsPage::tapDurationCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -979,7 +984,7 @@ void UniversalSwitchSettingsPage::tapDurationSwitchChangedCb(SettingAccessibilit
        ad->universal_switch_tap_duration->chk_status = state;
        elm_check_state_set(ad->universal_switch_tap_duration->eo_check, state);
        ad->universal_switch_tap_duration->sub_desc = getValueUnitText(NULL, &ad->us_configuration.tap_duration_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_tap_duration->item);
 }
 
@@ -991,22 +996,22 @@ void UniversalSwitchSettingsPage::tapDurationValueChangedCb(SettingAccessibility
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_VALUE, NULL, NULL, &value);
 
        ad->universal_switch_tap_duration->sub_desc = getValueUnitText(NULL, &ad->us_configuration.tap_duration_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_tap_duration->item);
 }
 
 void UniversalSwitchSettingsPage::tapDurationCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
        ad->us_configuration.tap_duration_state = list_item->chk_status;
 
        ad->universal_switch_tap_duration->sub_desc = getValueUnitText(NULL, &ad->us_configuration.tap_duration_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-               !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.tap_duration_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_tap_duration->item);
 
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_TAP_DURATION_STATE, (bool *)&list_item->chk_status, NULL, NULL);
@@ -1015,7 +1020,7 @@ void UniversalSwitchSettingsPage::tapDurationCheckboxCb(void *data, Evas_Object
 void UniversalSwitchSettingsPage::pauseOnFirstCb(void *data, Evas_Object *obj, void *event_info)
 {
        char str[512] = {0,};
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -1044,7 +1049,7 @@ void UniversalSwitchSettingsPage::pauseOnFirstSwitchChangedCb(SettingAccessibili
        ad->universal_switch_pause_on_first->chk_status = state;
        elm_check_state_set(ad->universal_switch_pause_on_first->eo_check, state);
        ad->universal_switch_pause_on_first->sub_desc = getValueUnitText(NULL, &ad->us_configuration.pause_on_first_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_pause_on_first->item);
 }
 
@@ -1056,22 +1061,22 @@ void UniversalSwitchSettingsPage::pauseOnFirstValueChangedCb(SettingAccessibilit
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_VALUE, NULL, NULL, &value);
 
        ad->universal_switch_pause_on_first->sub_desc = getValueUnitText(NULL, &ad->us_configuration.pause_on_first_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_pause_on_first->item);
 }
 
 void UniversalSwitchSettingsPage::pauseOnFirstCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
        ad->us_configuration.pause_on_first_state = list_item->chk_status;
 
        ad->universal_switch_pause_on_first->sub_desc = getValueUnitText(NULL, &ad->us_configuration.pause_on_first_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-               !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_pause_on_first->item);
 
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_PAUSE_ON_FIRST_STATE, (bool *)&list_item->chk_status, NULL, NULL);
@@ -1079,7 +1084,7 @@ void UniversalSwitchSettingsPage::pauseOnFirstCheckboxCb(void *data, Evas_Object
 
 void UniversalSwitchSettingsPage::scanSpeedCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -1105,7 +1110,7 @@ void UniversalSwitchSettingsPage::scanSpeedChangedCb(SettingAccessibility *ad, d
 void UniversalSwitchSettingsPage::scanDirectionCb(void *data, Evas_Object *obj, void *event_info)
 {
        Evas_Object *ctxpopup;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -1122,7 +1127,7 @@ void UniversalSwitchSettingsPage::scanDirectionCb(void *data, Evas_Object *obj,
 void UniversalSwitchSettingsPage::scanMethodCb(void *data, Evas_Object *obj, void *event_info)
 {
        Evas_Object *ctxpopup;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -1138,7 +1143,7 @@ void UniversalSwitchSettingsPage::scanMethodCb(void *data, Evas_Object *obj, voi
 
 void UniversalSwitchSettingsPage::scanNumberCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -1163,7 +1168,7 @@ void UniversalSwitchSettingsPage::scanNumberChangedCb(SettingAccessibility *ad,
 
 void UniversalSwitchSettingsPage::autoScanIntervalCb(void *data, Evas_Object *obj, void *event_info)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(ad == NULL, "Data argument is NULL");
 
@@ -1188,7 +1193,7 @@ void UniversalSwitchSettingsPage::autoScanIntervalChangedCb(SettingAccessibility
 void UniversalSwitchSettingsPage::ScanDirectionCtxPopupCb(void *data, Evas_Object *obj, void *event_info)
 {
        ScanDirection scan_dir = (ScanDirection)reinterpret_cast<long>(data); //TODO change way the argument is being passed
-       auto ad = static_cast<SettingAccessibility*>(evas_object_data_get(obj, CTXPOPUP_DATA_AD));
+       auto ad = static_cast<SettingAccessibility *>(evas_object_data_get(obj, CTXPOPUP_DATA_AD));
        retm_if(ad == NULL, "ctxpopup data is NULL");
 
        if (updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL, NULL, (int *)&scan_dir, NULL)) {
@@ -1205,7 +1210,7 @@ void UniversalSwitchSettingsPage::ScanDirectionCtxPopupCb(void *data, Evas_Objec
 void UniversalSwitchSettingsPage::ScanMethodCtxPopupCb(void *data, Evas_Object *obj, void *event_info)
 {
        ScanMethod scan_method = (ScanMethod)reinterpret_cast<long>(data);//TODO change way the argument is being passed
-       auto ad = static_cast<SettingAccessibility*>(evas_object_data_get(obj, CTXPOPUP_DATA_AD));
+       auto ad = static_cast<SettingAccessibility *>(evas_object_data_get(obj, CTXPOPUP_DATA_AD));
        retm_if(ad == NULL, "ctxpopup data is NULL");
 
        if (updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD, NULL, (int *)&scan_method, NULL)) {
@@ -1220,8 +1225,8 @@ void UniversalSwitchSettingsPage::ScanMethodCtxPopupCb(void *data, Evas_Object *
 void UniversalSwitchSettingsPage::autoScanCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
@@ -1239,7 +1244,7 @@ void UniversalSwitchSettingsPage::switchesClickCb(void *data, Evas_Object *obj,
 {
        elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        ad->switchesPage_ = std::make_unique<SwitchesPage>(ad);
        SwitchesPage::attachCallback(ad, updateSwitchesCount);
@@ -1254,7 +1259,7 @@ void UniversalSwitchSettingsPage::ctxPopupDelCb(void *data, Evas_Object *obj, vo
 
 Eina_Bool UniversalSwitchSettingsPage::naviframPopCb(void *data, Elm_Object_Item *it)
 {
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retv_if(ad == NULL, EINA_TRUE);
        ad->universal_switch_settings_item = NULL;
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_SCAN_ENABLED, syncAutoScanWithVconf);
@@ -1268,7 +1273,7 @@ Eina_Bool UniversalSwitchSettingsPage::naviframPopCb(void *data, Elm_Object_Item
 void UniversalSwitchSettingsPage::backCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data argument is NULL");
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
 
        elm_naviframe_item_pop(ad->md.getNaviframe());
 }
@@ -1292,7 +1297,7 @@ void UniversalSwitchSettingsPage::syncCheckboxWithVconf(keynode_t *node, void *u
 {
        retm_if(user_data == NULL, "Data parameter is NULL");
        retm_if(node == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(user_data);
+       auto list_item = static_cast<GenGroupItemData *>(user_data);
        int ret = vconf_keynode_get_bool(node);
        retm_if(ret < 0, "FAIL: vconf_keynode_get_bool");
        if (list_item->chk_status != ret) {
@@ -1304,15 +1309,15 @@ void UniversalSwitchSettingsPage::syncCheckboxWithVconf(keynode_t *node, void *u
 void UniversalSwitchSettingsPage::autoMoveIntervalCheckboxCb(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto list_item = static_cast<GenGroupItemData *>(data);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        retm_if(ad == NULL, "View data parameter is NULL");
 
        list_item->chk_status = elm_check_state_get(obj);
        ad->us_configuration.auto_move_int_state = list_item->chk_status;
 
        ad->universal_switch_auto_move_int->sub_desc = getValueUnitText(NULL, &ad->us_configuration.auto_move_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-               !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_auto_move_int->item);
 
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_STATE, (bool *)&list_item->chk_status, NULL, NULL);
@@ -1326,7 +1331,7 @@ void UniversalSwitchSettingsPage::autoMoveIntervalValueChangedCb(SettingAccessib
        updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_AUTO_MOVE_INT_VALUE, NULL, NULL, &value);
 
        ad->universal_switch_auto_move_int->sub_desc = getValueUnitText(NULL, &ad->us_configuration.auto_move_int_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
-                               !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
+                       !ad->us_configuration.auto_move_int_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
        elm_genlist_item_update(ad->universal_switch_auto_move_int->item);
 }
 
@@ -1337,11 +1342,11 @@ void UniversalSwitchSettingsPage::onAutoScanItemSelection(void *data, Evas_Objec
 
        elm_genlist_item_selected_set(item, EINA_FALSE);
 
-       auto list_item = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
+       auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
        setting_retm_if(list_item == NULL, "Data parameter is NULL");
        setting_update_gl_item_chk_status(list_item, list_item->chk_status ? 0 : 1);
 
-       auto ad = static_cast<SettingAccessibility*>(list_item->userdata);
+       auto ad = static_cast<SettingAccessibility *>(list_item->userdata);
        ad->us_configuration.auto_scan = list_item->chk_status;
        elm_object_item_disabled_set(ad->universal_switch_auto_scan_int->item, (Eina_Bool)!ad->us_configuration.auto_scan);
        elm_object_item_disabled_set(ad->universal_switch_scans_num->item, (Eina_Bool)!ad->us_configuration.auto_scan);
index 97dbd60..962622b 100644 (file)
@@ -44,13 +44,13 @@ private:
        static void onAutoScanItemSelection(void *data, Evas_Object *obj, void *event_info);
        static void createSwitchesGroup(SettingAccessibility *ad, Evas_Object *genlist);
        static void setCtxPopupPosition(SettingAccessibility *ad, Evas_Object *ctxpopup);
-       static Evas_ObjectcreateCtxPopup(SettingAccessibility *ad);
-       static const chargetScanDirectionText(ScanDirection direction);
-       static const chargetScanMethodText(ScanMethod method);
-       static const chargetBoleanText(bool bvalue, const char *t_str, const char *f_str);
+       static Evas_Object *createCtxPopup(SettingAccessibility *ad);
+       static const char *getScanDirectionText(ScanDirection direction);
+       static const char *getScanMethodText(ScanMethod method);
+       static const char *getBoleanText(bool bvalue, const char *t_str, const char *f_str);
        static std::string getValueUnitText(int *ivalue, double *dvalue, const char *units, bool def_trigger, const char *def);
-       static GenGroupItemDataaddMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const char *main_text, const char *sub_text,
-                       SettingCallback item_cb, bool chk, bool chk_state, SettingCallback chk_cb);
+       static GenGroupItemData *addMenuItem(SettingAccessibility *ad, Evas_Object *genlist, const char *main_text, const char *sub_text,
+                                                                                SettingCallback item_cb, bool chk, bool chk_state, SettingCallback chk_cb);
        static void getVconfSettings(SettingAccessibility *ad);
        static int getAndConvertVconfValue(const char *key);
        static bool updateVconfValue(const char *key, bool *bvalue, int *ivalue, double *dvalue);
index d317fe3..db9402c 100644 (file)
@@ -23,7 +23,7 @@ UpdateSwitchPage::UpdateSwitchPage(SettingAccessibility *ad, UniversalSwitchConf
        retm_if(ad == NULL, "Input parameter is NULL");
 
        if (strlen(config_item->provider_id.c_str()) == strlen(ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER)
-               && !strncmp(config_item->provider_id.c_str(), ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER, strlen(ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER)) != 0) {
+                       && !strncmp(config_item->provider_id.c_str(), ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER, strlen(ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER)) != 0) {
 
                ad->config_item_to_update.activity_type = config_item->activity_type;
                ad->config_item_to_update.switch_id = config_item->switch_id;
@@ -42,10 +42,10 @@ void UpdateSwitchPage::attachActionCallback(SettingAccessibility *ad, UniversalS
        ad->us_configuration.switch_updated_cb = cb;
 }
 
-void UpdateSwitchPage::onActionUpdate(SettingAccessibility *ad, const std::stringaction, void *user_data)
+void UpdateSwitchPage::onActionUpdate(SettingAccessibility *ad, const std::string &action, void *user_data)
 {
        if (ad->us_configuration.switch_updated_cb) {
-               auto config_item = static_cast<UniversalSwitchConfigurationItem*>(user_data);
+               auto config_item = static_cast<UniversalSwitchConfigurationItem *>(user_data);
                ad->us_configuration.switch_updated_cb(ad, config_item->switch_id, action, config_item->user_name);
        }
 }
index 240387a..6d20745 100644 (file)
@@ -36,7 +36,7 @@ public:
        static void attachActionCallback(SettingAccessibility *ad, UniversalSwitchUpdateCb cb);
 
 private:
-       static void onActionUpdate(SettingAccessibility *ad, const std::stringaction, void *user_data);
+       static void onActionUpdate(SettingAccessibility *ad, const std::string &action, void *user_data);
 };
 
 #endif
index 3b3edd8..8d3c82a 100644 (file)
@@ -25,16 +25,17 @@ static int setting_accessibility_main_update(void *cb);
 static int setting_accessibility_main_cleanup(void *cb);
 
 setting_view setting_view_accessibility_main = {
-               .create = setting_accessibility_main_create,
-               .destroy = setting_accessibility_main_destroy,
-               .update = setting_accessibility_main_update,
-               .cleanup = setting_accessibility_main_cleanup, };
+       .create = setting_accessibility_main_create,
+       .destroy = setting_accessibility_main_destroy,
+       .update = setting_accessibility_main_update,
+       .cleanup = setting_accessibility_main_cleanup,
+};
 
 static void setting_accessibility_screen_reader_key_change_vconf_cb(
-               keynode_t *key, void *user_data)
+       keynode_t *key, void *user_data)
 {
 
-       auto screen_reader_item = static_cast<GenGroupItemData*>(user_data);
+       auto screen_reader_item = static_cast<GenGroupItemData *>(user_data);
        screen_reader_item->sub_desc = vconf_keynode_get_bool(key) ? _("IDS_ST_BODY_ON") : _("IDS_ST_BODY_OFF");
 
        elm_genlist_item_update(screen_reader_item->item);
@@ -49,21 +50,21 @@ static void setting_accessibility_screen_reader_key_change_vconf_cb(
 static Eina_Bool _cancel_cb(void *data, Elm_Object_Item *it)
 {
 
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        retv_if(!ad, EINA_FALSE);
 
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
-                       setting_accessibility_screen_reader_key_change_vconf_cb);
+                                                        setting_accessibility_screen_reader_key_change_vconf_cb);
        ui_app_exit();
        return EINA_TRUE;
 }
 
 static void setting_accessibility_vision_screen_reader_mouse_up_Gendial_list_cb(
-               void *data, Evas_Object *obj, void *event_info)
+       void *data, Evas_Object *obj, void *event_info)
 {
 
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set(item, EINA_FALSE);
        ad->screenReaderPage_ = std::make_unique<ScreenReaderPage>(ad);
 
@@ -73,7 +74,7 @@ static void setting_accessibility_universal_switch_mouse_up_Gendial_list_cb(void
 {
 
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set(item, EINA_FALSE);
        ad->universalSwitchPage_ = std::make_unique<UniversalSwitchPage>(ad);
 
@@ -83,7 +84,7 @@ static void setting_accessibility_accessibility_launcher_mouse_up_Gendial_list_c
 {
 
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        elm_genlist_item_selected_set(item, EINA_FALSE);
        ad->accessibilityLauncherPage_ = std::make_unique<AccessibilityLauncherPage>(ad);
 
@@ -103,7 +104,7 @@ int setting_accessibility_main_generate_genlist(void *data)
        /* error check */
        retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
 
-       auto ad = static_cast<SettingAccessibility*>(data);
+       auto ad = static_cast<SettingAccessibility *>(data);
        Evas_Object *scroller = ad->md.getGenlist();
        createGendialTitleItem(scroller, &(itc_group_item), "IDS_ST_HEADER_VISION");
 
@@ -113,45 +114,45 @@ int setting_accessibility_main_generate_genlist(void *data)
                SETTING_TRACE_ERROR("Could not get value for key: %s", VCONFKEY_SETAPPL_ACCESSIBILITY_TTS);
 
        ad->screen_reader_item = createGendialGroupItem(
-                       scroller, &itc_2text,
-                       setting_accessibility_vision_screen_reader_mouse_up_Gendial_list_cb,
-                       ad, SwallowType::INVALID, 1,
-                       "IDS_ST_MBODY_SCREEN_READER_HTTS",
-                       screen_reader ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF",
-                       NULL);
+                                                                scroller, &itc_2text,
+                                                                setting_accessibility_vision_screen_reader_mouse_up_Gendial_list_cb,
+                                                                ad, SwallowType::INVALID, 1,
+                                                                "IDS_ST_MBODY_SCREEN_READER_HTTS",
+                                                                screen_reader ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF",
+                                                                NULL);
        if (ad->screen_reader_item) {
                ad->screen_reader_item->userdata = ad;
                __BACK_POINTER_SET(ad->screen_reader_item);
        }
 
        ad->universal_switch_item = createGendialGroupItem(
-                       scroller, &ad->itc_multiline_sub,
-                       setting_accessibility_universal_switch_mouse_up_Gendial_list_cb,
-                       ad, SwallowType::INVALID, 1,
-                       "IDS_ACCS_UNIVERSAL_SWITCH",
-                       "IDS_ACCS_UNIVERSAL_SWITCH_HINT",
-                       NULL);
+                                                                       scroller, &ad->itc_multiline_sub,
+                                                                       setting_accessibility_universal_switch_mouse_up_Gendial_list_cb,
+                                                                       ad, SwallowType::INVALID, 1,
+                                                                       "IDS_ACCS_UNIVERSAL_SWITCH",
+                                                                       "IDS_ACCS_UNIVERSAL_SWITCH_HINT",
+                                                                       NULL);
        if (ad->universal_switch_item) {
                ad->universal_switch_item->userdata = ad;
                __BACK_POINTER_SET(ad->universal_switch_item);
        }
 
        GenGroupItemData *item = createGendialGroupItem(
-               scroller, &ad->itc_multiline_sub,
-               setting_accessibility_accessibility_launcher_mouse_up_Gendial_list_cb,
-               ad, SwallowType::INVALID, 1,
-               "IDS_ACCS_ACCESSIBILITY_LAUNCHER",
-               "IDS_ACCS_ACCESSIBILITY_LAUNCHER_HINT",
-               NULL);
+                                                                scroller, &ad->itc_multiline_sub,
+                                                                setting_accessibility_accessibility_launcher_mouse_up_Gendial_list_cb,
+                                                                ad, SwallowType::INVALID, 1,
+                                                                "IDS_ACCS_ACCESSIBILITY_LAUNCHER",
+                                                                "IDS_ACCS_ACCESSIBILITY_LAUNCHER_HINT",
+                                                                NULL);
        if (item) {
                item->userdata = ad;
                __BACK_POINTER_SET(item);
        }
 
        int vconf_ret = vconf_notify_key_changed(
-                       VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
-                       setting_accessibility_screen_reader_key_change_vconf_cb,
-                       ad->screen_reader_item);
+                                               VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
+                                               setting_accessibility_screen_reader_key_change_vconf_cb,
+                                               ad->screen_reader_item);
        if (vconf_ret != 0) {
                SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS)");
                return SETTING_RETURN_FAIL;
@@ -164,7 +165,7 @@ int setting_accessibility_main_generate_genlist(void *data)
 static int setting_accessibility_main_create(void *cb)
 {
 
-       auto ad = static_cast<SettingAccessibility*>(cb);
+       auto ad = static_cast<SettingAccessibility *>(cb);
        retv_if(ad == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
 
        ad->md.initView(_("IDS_ST_BODY_ACCESSIBILITY"));
index 4904826..0757b61 100755 (executable)
@@ -79,7 +79,7 @@ static void __eldbus_shutdown(UniversalSwitchDbusConfig *config)
        eldbus_shutdown();
 }
 
-static void __eldbus_getInfoArray(std::vector<UniversalSwitchInfoType*>& infoTypes, Eldbus_Message *reply)
+static void __eldbus_getInfoArray(std::vector<UniversalSwitchInfoType *> &infoTypes, Eldbus_Message *reply)
 {
        Eldbus_Message_Iter *array;
        Eldbus_Message_Iter *struct_sss;
@@ -104,7 +104,7 @@ static void __eldbus_getInfoArray(std::vector<UniversalSwitchInfoType*>& infoTyp
        }
 }
 
-static std::vector<UniversalSwitchInfoType*> __eldbus_getAllSwitchesByProviderId(UniversalSwitchEldbus *eldbus, const char * provider_id)
+static std::vector<UniversalSwitchInfoType *> __eldbus_getAllSwitchesByProviderId(UniversalSwitchEldbus *eldbus, const char *provider_id)
 {
        Eldbus_Message *req = NULL;
        Eldbus_Message *reply = NULL;
@@ -119,7 +119,7 @@ static std::vector<UniversalSwitchInfoType*> __eldbus_getAllSwitchesByProviderId
        iter = eldbus_message_iter_get(req);
        eldbus_message_iter_arguments_append(iter, "s", provider_id);
 
-       std::vector<UniversalSwitchInfoType*> switches;
+       std::vector<UniversalSwitchInfoType *> switches;
        reply = eldbus_proxy_send_and_block(eldbus->proxy, req, ELDBUS_TIMEOUT);
        if (!reply || eldbus_message_error_get(reply, &errname, &errmsg))
                SETTING_TRACE_ERROR("Unable to call method " IFACE ".getAllSwitchesByProviderId: %s %s", errname, errmsg);
@@ -132,7 +132,7 @@ static std::vector<UniversalSwitchInfoType*> __eldbus_getAllSwitchesByProviderId
        return switches;
 }
 
-static std::vector<UniversalSwitchSwitchProvider*> __eldbus_getAllSwitchProviders(UniversalSwitchEldbus *eldbus)
+static std::vector<UniversalSwitchSwitchProvider *> __eldbus_getAllSwitchProviders(UniversalSwitchEldbus *eldbus)
 {
        Eldbus_Message *req = NULL;
        Eldbus_Message *reply = NULL;
@@ -144,13 +144,13 @@ static std::vector<UniversalSwitchSwitchProvider*> __eldbus_getAllSwitchProvider
                return {};
        }
 
-       std::vector<UniversalSwitchSwitchProvider*> switch_providers;
+       std::vector<UniversalSwitchSwitchProvider *> switch_providers;
        reply = eldbus_proxy_send_and_block(eldbus->proxy, req, ELDBUS_TIMEOUT);
        if (!reply || eldbus_message_error_get(reply, &errname, &errmsg)) {
                SETTING_TRACE_ERROR("Unable to call method " IFACE ".getAllSwitchProviders: %s %s", errname, errmsg);
 
        } else {
-               std::vector<UniversalSwitchInfoType*> switch_providers_info;
+               std::vector<UniversalSwitchInfoType *> switch_providers_info;
                if (true) {
                        __eldbus_getInfoArray(switch_providers_info, reply);
 
@@ -171,7 +171,7 @@ static std::vector<UniversalSwitchSwitchProvider*> __eldbus_getAllSwitchProvider
 }
 
 
-static std::vector<UniversalSwitchInfoType*> __eldbus_getBindableActivityTypes(UniversalSwitchEldbus *eldbus)
+static std::vector<UniversalSwitchInfoType *> __eldbus_getBindableActivityTypes(UniversalSwitchEldbus *eldbus)
 {
        Eldbus_Message *req = NULL;
        Eldbus_Message *reply = NULL;
@@ -183,7 +183,7 @@ static std::vector<UniversalSwitchInfoType*> __eldbus_getBindableActivityTypes(U
                return {};
        }
 
-       std::vector<UniversalSwitchInfoType*> activity_types;
+       std::vector<UniversalSwitchInfoType *> activity_types;
        reply = eldbus_proxy_send_and_block(eldbus->proxy, req, ELDBUS_TIMEOUT);
        if (!reply || eldbus_message_error_get(reply, &errname, &errmsg)) {
                SETTING_TRACE_ERROR("Unable to call method " IFACE ".getBindableActivityTypes: %s %s", errname, errmsg);
@@ -197,7 +197,7 @@ static std::vector<UniversalSwitchInfoType*> __eldbus_getBindableActivityTypes(U
        return activity_types;
 }
 
-static void __eldbus_getAllSwitchConfigurationItemsArray(std::vector<UniversalSwitchConfigurationItem*>& infoTypes, Eldbus_Message *reply)
+static void __eldbus_getAllSwitchConfigurationItemsArray(std::vector<UniversalSwitchConfigurationItem *> &infoTypes, Eldbus_Message *reply)
 {
 
        Eldbus_Message_Iter *array;
@@ -233,7 +233,7 @@ static void __eldbus_getAllSwitchConfigurationItemsArray(std::vector<UniversalSw
 
 }
 
-static std::vector<UniversalSwitchConfigurationItem*> __eldbus_getAllSwitchConfigurationItems(UniversalSwitchEldbus *eldbus)
+static std::vector<UniversalSwitchConfigurationItem *> __eldbus_getAllSwitchConfigurationItems(UniversalSwitchEldbus *eldbus)
 {
        Eldbus_Message *req = NULL;
        Eldbus_Message *reply = NULL;
@@ -245,7 +245,7 @@ static std::vector<UniversalSwitchConfigurationItem*> __eldbus_getAllSwitchConfi
                return {};
        }
 
-       std::vector<UniversalSwitchConfigurationItem*> configurationItems;
+       std::vector<UniversalSwitchConfigurationItem *> configurationItems;
        reply = eldbus_proxy_send_and_block(eldbus->proxy, req, ELDBUS_TIMEOUT);
        if (!reply || eldbus_message_error_get(reply, &errname, &errmsg)) {
                SETTING_TRACE_ERROR("Unable to call method " IFACE ".getAllSwitchConfigurationItems: %s %s", errname, errmsg);
@@ -276,7 +276,7 @@ static void __relese_info_type(UniversalSwitchInfoType *info)
        delete info;
 }
 
-static void __relese_info_type_array(std::vector<UniversalSwitchInfoType*>& infoArray)
+static void __relese_info_type_array(std::vector<UniversalSwitchInfoType *> &infoArray)
 {
        for (auto &it : infoArray)
                delete it;
@@ -320,7 +320,7 @@ static void __bus_name_acquired(void *data, const char *bus, const char *old_id,
        if (!new_id || strlen(new_id) == 0)
                return;
 
-       auto config = static_cast<UniversalSwitchDbusConfig*>(data);
+       auto config = static_cast<UniversalSwitchDbusConfig *>(data);
        UniversalSwitchEldbus *eldbus = &config->eldbus;
 
        if (!eldbus->dobj && !(eldbus->dobj = eldbus_object_get(eldbus->conn, BUS, PATH))) {
@@ -388,7 +388,7 @@ void setting_accessibility_universal_switch_dbus_config_shutdown(UniversalSwitch
        __eldbus_shutdown(config);
 }
 
-std::string setting_accessibility_universal_switch_dbus_config_get_activity_name(UniversalSwitchDbusConfig *config, const std::stringactivity_id)
+std::string setting_accessibility_universal_switch_dbus_config_get_activity_name(UniversalSwitchDbusConfig *config, const std::string &activity_id)
 {
        for (auto &it : config->activity_types)
                if (it->id == activity_id)
@@ -396,7 +396,7 @@ std::string setting_accessibility_universal_switch_dbus_config_get_activity_name
 
        return {};
 }
-std::vector<UniversalSwitchInfoType*> setting_accessibility_universal_switch_dbus_config_get_switches(UniversalSwitchDbusConfig *config, const char * provider_id)
+std::vector<UniversalSwitchInfoType *> setting_accessibility_universal_switch_dbus_config_get_switches(UniversalSwitchDbusConfig *config, const char *provider_id)
 {
        for (auto &it : config->switch_providers)
                if (strcmp(it->info->id.c_str(), provider_id) == 0)
@@ -406,7 +406,7 @@ std::vector<UniversalSwitchInfoType*> setting_accessibility_universal_switch_dbu
 
 static void __eldbus_on_capture_switch(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
 {
-       auto eldbus = static_cast<UniversalSwitchEldbus*>(data);
+       auto eldbus = static_cast<UniversalSwitchEldbus *>(data);
        const char *errname, *errmsg;
        const char *switch_id = NULL;
 
@@ -428,7 +428,7 @@ static void __eldbus_on_capture_switch(void *data EINA_UNUSED, const Eldbus_Mess
 
 void setting_accessibility_universal_switch_dbus_config_captureSwitch(UniversalSwitchDbusConfig *config, const char *provider_id, double timeout, capture_switch_cb callback, void *calback_data)
 {
-       UniversalSwitchEldbus * eldbus = &config->eldbus;
+       UniversalSwitchEldbus *eldbus = &config->eldbus;
        SETTING_TRACE_DEBUG("DBus call captureSwitch for %s", provider_id);
        eldbus->capture_switch_request = eldbus_proxy_call(eldbus->proxy, "captureSwitch", __eldbus_on_capture_switch, eldbus, timeout, "s", provider_id);
        if (eldbus->capture_switch_request) {
@@ -441,7 +441,7 @@ void setting_accessibility_universal_switch_dbus_config_captureSwitch(UniversalS
 
 void setting_accessibility_universal_switch_dbus_config_cancelCaptureSwitch(UniversalSwitchDbusConfig *config)
 {
-       UniversalSwitchEldbus * eldbus = &config->eldbus;
+       UniversalSwitchEldbus *eldbus = &config->eldbus;
 
        SETTING_TRACE_DEBUG("Running " IFACE ".cancelCaptureSwitch");
        eldbus_proxy_call(config->eldbus.proxy, "cancelCaptureSwitch", NULL, NULL, ELDBUS_TIMEOUT, "");
index b4278ae..45ba17e 100644 (file)
@@ -57,20 +57,20 @@ struct UniversalSwitchConfigurationItem {
 
 struct UniversalSwitchSwitchProvider {
        UniversalSwitchInfoType *info;
-       std::vector<UniversalSwitchInfoType*> switches;
+       std::vector<UniversalSwitchInfoType *> switches;
 };
 
 struct UniversalSwitchDbusConfig {
        UniversalSwitchEldbus eldbus;
-       std::vector<UniversalSwitchInfoType*> activity_types;
-       std::vector<UniversalSwitchConfigurationItem*> configuration_items;
-       std::vector<UniversalSwitchSwitchProvider*> switch_providers;
+       std::vector<UniversalSwitchInfoType *> activity_types;
+       std::vector<UniversalSwitchConfigurationItem *> configuration_items;
+       std::vector<UniversalSwitchSwitchProvider *> switch_providers;
 };
 
 Eina_Bool setting_accessibility_universal_switch_dbus_config_init(UniversalSwitchDbusConfig *config, init_done_cb callback, void *callback_data);
 int setting_accessibility_universal_switch_dbus_config_get_switch_count(UniversalSwitchDbusConfig *config);
-std::string setting_accessibility_universal_switch_dbus_config_get_activity_name(UniversalSwitchDbusConfig *config, const std::stringactivity_id);
-std::vector<UniversalSwitchInfoType*> setting_accessibility_universal_switch_dbus_config_get_switches(UniversalSwitchDbusConfig *config, const char * provider_id);
+std::string setting_accessibility_universal_switch_dbus_config_get_activity_name(UniversalSwitchDbusConfig *config, const std::string &activity_id);
+std::vector<UniversalSwitchInfoType *> setting_accessibility_universal_switch_dbus_config_get_switches(UniversalSwitchDbusConfig *config, const char *provider_id);
 void setting_accessibility_universal_switch_dbus_config_shutdown(UniversalSwitchDbusConfig *config);
 void setting_accessibility_universal_switch_dbus_config_addSwitchConfigurationItem(UniversalSwitchDbusConfig *config, const char *switch_id, const char *user_name, const char *activity_type);
 void setting_accessibility_universal_switch_dbus_config_updateSwitchConfigurationItem(UniversalSwitchDbusConfig *config, const char *switch_id, const char *user_name, const char *activity_type);
index 0c0930e..b753c4d 100644 (file)
 static const char *get_tts_error(int r)
 {
        switch (r) {
-               case TTS_ERROR_NONE: {
-                       return "no error";
-               }
-               case TTS_ERROR_INVALID_PARAMETER: {
-                       return "inv param";
-               }
-               case TTS_ERROR_OUT_OF_MEMORY: {
-                       return "out of memory";
-               }
-               case TTS_ERROR_OPERATION_FAILED: {
-                       return "oper failed";
-               }
-               case TTS_ERROR_INVALID_STATE: {
-                       return "inv state";
-               }
-               default: {
-                       return "uknown error";
-               }
+       case TTS_ERROR_NONE: {
+               return "no error";
+       }
+       case TTS_ERROR_INVALID_PARAMETER: {
+               return "inv param";
+       }
+       case TTS_ERROR_OUT_OF_MEMORY: {
+               return "out of memory";
+       }
+       case TTS_ERROR_OPERATION_FAILED: {
+               return "oper failed";
+       }
+       case TTS_ERROR_INVALID_STATE: {
+               return "inv state";
+       }
+       default: {
+               return "uknown error";
+       }
        }
 }
 
 void
-state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current, voiduser_data)
+state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current, void *user_data)
 {
        SETTING_TRACE_DEBUG(" previous = %d current = %d", previous, current);
 }
@@ -88,7 +88,7 @@ destroy_tts_handle(SettingAccessibility *ad)
 
 static char *_universal_switch_gendial_new_text_get(void *data, Evas_Object *obj, const char *part)
 {
-       auto item_data = static_cast<GenGroupItemData*>(data);
+       auto item_data = static_cast<GenGroupItemData *>(data);
        if (!safeStrCmp(item_data->itc.c_str(), "multiline")) {
                if (!safeStrCmp(part, "elm.text")) {
                        if (!item_data->keyStr.empty()) {
@@ -117,7 +117,7 @@ static bool on_app_create(void *priv)
 {
 
        setting_retvm_if((NULL == priv), NULL, "NULL == priv");
-       auto ad = static_cast<SettingAccessibility*>(priv);
+       auto ad = static_cast<SettingAccessibility *>(priv);
        ad->launched_by_app_control = false;
        ad->universal_switch_main_item = NULL;
        ad->universal_switch_settings_item = NULL;
@@ -133,7 +133,7 @@ static bool on_app_create(void *priv)
        /* register view node table */
        setting_view_node_table_intialize();
        setting_view_node_table_register(&setting_view_accessibility_main,
-                       NULL);
+                                                                        NULL);
 
        setting_view_node_set_cur_view(&setting_view_accessibility_main);
 
@@ -162,7 +162,7 @@ static void on_app_resume(void *priv)
 static void on_app_terminate(void *priv)
 {
 
-       auto ad = static_cast<SettingAccessibility*>(priv);
+       auto ad = static_cast<SettingAccessibility *>(priv);
        destroy_tts_handle(ad);
        setting_view_destroy(&setting_view_accessibility_main, ad);
 
@@ -171,7 +171,7 @@ static void on_app_terminate(void *priv)
 static void on_app_control(app_control_h service, void *priv)
 {
 
-       auto ad = static_cast<SettingAccessibility*>(priv);
+       auto ad = static_cast<SettingAccessibility *>(priv);
        retm_if(!ad, "Data parameter is NULL");
        char *value = NULL;
        if (!app_control_get_extra_data(service, "SHOW_US_SETTINGS", &value) && value != NULL && !strcmp(value, "1")) {
@@ -215,16 +215,16 @@ int main(int argc, char *argv[])
        SettingAccessibility app_data;
 
        ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY],
-                       APP_EVENT_LOW_MEMORY, NULL, NULL);
+                                                        APP_EVENT_LOW_MEMORY, NULL, NULL);
        ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY],
-                       APP_EVENT_LOW_BATTERY, NULL, NULL);
+                                                        APP_EVENT_LOW_BATTERY, NULL, NULL);
        ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED],
-                       APP_EVENT_LANGUAGE_CHANGED, _lang_changed, NULL);
+                                                        APP_EVENT_LANGUAGE_CHANGED, _lang_changed, NULL);
        ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED],
-                       APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL);
+                                                        APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL);
        ui_app_add_event_handler(
-                       &handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED],
-                       APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
+               &handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED],
+               APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
 
        return ui_app_main(argc, argv, &ops, &app_data);
 }
index 4ff5640..b9a71a8 100755 (executable)
@@ -40,8 +40,7 @@
 
 #define ACCESSIBILITY_UNIVERSAL_SWITCH_PLUS_ICON SETTING_ICON_PATH "/plus.png"
 
-enum class ManageMenuOption : int
-{
+enum class ManageMenuOption : int {
        GESTURES,
        ACTIONS,
        SETTINGS,
index d796839..765bbde 100644 (file)
@@ -27,15 +27,15 @@ static void _gl_Gendial_del(void *data, Evas_Object *obj);
 
 #define DEFINE_ITC1(style, name) \
        const Elm_Genlist_Item_Class name = { \
-               .version = 0, \
-               .refcount = 0, \
-               .delete_me = EINA_FALSE, \
-               .homogeneous = EINA_FALSE, \
-               .item_style = style, \
-               .decorate_item_style = NULL, \
-               .decorate_all_item_style = NULL, \
-               .func = {gendialNewTextGetCb, _gl_Gendial_content_get, NULL, _gl_Gendial_del, NULL, NULL} \
-       };
+                                                                                 .version = 0, \
+                                                                                 .refcount = 0, \
+                                                                                 .delete_me = EINA_FALSE, \
+                                                                                 .homogeneous = EINA_FALSE, \
+                                                                                 .item_style = style, \
+                                                                                 .decorate_item_style = NULL, \
+                                                                                 .decorate_all_item_style = NULL, \
+                                                                                 .func = {gendialNewTextGetCb, _gl_Gendial_content_get, NULL, _gl_Gendial_del, NULL, NULL} \
+                                                                               };
 
 DEFINE_ITC1(SETTING_GENLIST_ICON_1LINE_STYLE, itc_1text);
 DEFINE_ITC1(SETTING_GENLIST_ICON_1LINE_STYLE, itc_1text_1icon);
@@ -55,14 +55,14 @@ DEFINE_ITC1(SETTING_GENLIST_GROUP_INDEX_STYLE, itc_group_item);
 static void __radio_changed(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
        list_item->chk_status = elm_radio_value_get(obj); /* for update */
 }
 
 static void __chk_changed(void *data, Evas_Object *obj, void *event_info)
 {
        retm_if(data == NULL, "Data parameter is NULL");
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
        list_item->chk_status = elm_check_state_get(obj); /* for update */
 }
 
@@ -77,7 +77,7 @@ static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info)
 
 static char *gendialNewTextGetCb(void *data, Evas_Object *obj, const char *part)
 {
-       GenGroupItemData *item_data = static_cast<GenGroupItemData*>(data);
+       GenGroupItemData *item_data = static_cast<GenGroupItemData *>(data);
        std::string ret;
        std::string part_str = part ? part : std::string{};
 
@@ -88,10 +88,10 @@ static char *gendialNewTextGetCb(void *data, Evas_Object *obj, const char *part)
        /*                                               "elm.text.sub" */
        /*------------------------------------------------------------- */
        if (item_data->itc == "multiline" && part_str == "elm.text.multiline") {
-                       ret = item_data->keyStr.str();
+               ret = item_data->keyStr.str();
        } else {
                if (part_str == "elm.text" || part_str == "elm.text.main" || part_str == "elm.text.main.left"
-                       || part_str == "elm.text.main.left.top" || part_str == "elm.text.multiline") {
+                               || part_str == "elm.text.main.left.top" || part_str == "elm.text.multiline") {
                        ret = item_data->keyStr.str();
                } else if (part_str == "elm.text.sub" || part_str == "elm.text.2" || part_str == "elm.text.sub.left.bottom") {
                        ret = item_data->sub_desc.str();
@@ -101,7 +101,7 @@ static char *gendialNewTextGetCb(void *data, Evas_Object *obj, const char *part)
 }
 
 static Evas_Object *__add_check(GenGroupItemData *item_data,
-               Evas_Object *parent)
+                                                               Evas_Object *parent)
 {
        retv_if(!item_data || !parent, NULL);
 
@@ -111,11 +111,11 @@ static Evas_Object *__add_check(GenGroupItemData *item_data,
        evas_object_propagate_events_set(check, 0);
        evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
 
        if (SwallowType::CHECK == item_data->swallow_type) {
                elm_check_state_pointer_set(check,
-                               (Eina_Bool *)(&(item_data->chk_status)));
+                                                                       (Eina_Bool *)(&(item_data->chk_status)));
                evas_object_pass_events_set(check, 1);
        } else {
                evas_object_pass_events_set(check, 1);
@@ -125,10 +125,10 @@ static Evas_Object *__add_check(GenGroupItemData *item_data,
 
        if (item_data->chk_change_cb) {
                evas_object_smart_callback_add(check, "changed",
-                               item_data->chk_change_cb, item_data);
+                                                                          item_data->chk_change_cb, item_data);
        } else {
                evas_object_smart_callback_add(check, "changed", __chk_changed,
-                               item_data);
+                                                                          item_data);
        }
        evas_object_show(check);
 
@@ -136,7 +136,7 @@ static Evas_Object *__add_check(GenGroupItemData *item_data,
 }
 
 static Evas_Object *__add_toggle(GenGroupItemData *item_data,
-               Evas_Object *parent)
+                                                                Evas_Object *parent)
 {
        retv_if(!item_data || !parent, NULL);
        Evas_Object *check = elm_check_add(parent);
@@ -145,11 +145,11 @@ static Evas_Object *__add_toggle(GenGroupItemData *item_data,
        evas_object_propagate_events_set(check, 0);
        evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
 
        if (SwallowType::CHECK == item_data->swallow_type) {
                elm_check_state_pointer_set(check,
-                               (Eina_Bool *)(&(item_data->chk_status)));
+                                                                       (Eina_Bool *)(&(item_data->chk_status)));
                evas_object_pass_events_set(check, 1);
        } else {
                evas_object_pass_events_set(check, 1);
@@ -159,10 +159,10 @@ static Evas_Object *__add_toggle(GenGroupItemData *item_data,
 
        if (item_data->chk_change_cb) {
                evas_object_smart_callback_add(check, "changed",
-                               item_data->chk_change_cb, item_data);
+                                                                          item_data->chk_change_cb, item_data);
        } else {
                evas_object_smart_callback_add(check, "changed", __chk_changed,
-                               item_data);
+                                                                          item_data);
        }
        evas_object_show(check);
 
@@ -177,7 +177,7 @@ static Evas_Object *__add_toggle(GenGroupItemData *item_data,
 }
 
 static Evas_Object *__add_radio_text(GenGroupItemData *item_data,
-               Evas_Object *parent)
+                                                                        Evas_Object *parent)
 {
        retv_if(!item_data || !parent, NULL);
        if (!item_data->rgd) { /* exceptional handling */
@@ -193,16 +193,16 @@ static Evas_Object *__add_radio_text(GenGroupItemData *item_data,
        item_data->eo_check = radio;
        if (item_data->chk_change_cb) {
                evas_object_smart_callback_add(radio, "changed",
-                               item_data->chk_change_cb, item_data);
+                                                                          item_data->chk_change_cb, item_data);
        } else {
                evas_object_smart_callback_add(radio, "changed",
-                               __radio_changed, item_data);
+                                                                          __radio_changed, item_data);
        }
        return radio;
 }
 
 static Evas_Object *__add_left_default(GenGroupItemData *item_data,
-               Evas_Object *parent)
+                                                                          Evas_Object *parent)
 {
        retv_if(!item_data || !parent, NULL);
 
@@ -214,24 +214,24 @@ static Evas_Object *__add_left_default(GenGroupItemData *item_data,
                setting_decorate_image_RGBA(icon, 15, 41, 73, 255);
                elm_image_file_set(icon, item_data->l_swallow_path.c_str(), NULL);
                evas_object_size_hint_aspect_set(icon,
-                               EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+                                                                                EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
                return icon;
        } else {
-               Evas_Object * c = elm_image_add(parent);
+               Evas_Object *c = elm_image_add(parent);
 
                elm_image_file_set(c, item_data->l_swallow_path.c_str(), NULL);
                setting_decorate_image_RGBA(c, 14, 41, 73, 255);
                evas_object_size_hint_align_set(c, EVAS_HINT_FILL,
-                               EVAS_HINT_FILL);
+                                                                               EVAS_HINT_FILL);
                evas_object_size_hint_weight_set(c, EVAS_HINT_EXPAND,
-                               EVAS_HINT_EXPAND);
+                                                                                EVAS_HINT_EXPAND);
                return c;
        }
 
 }
 
 static Evas_Object *__add_right_default(GenGroupItemData *item_data,
-               Evas_Object *parent)
+                                                                               Evas_Object *parent)
 {
        retv_if(!item_data || !parent, NULL);
 
@@ -243,42 +243,41 @@ static Evas_Object *__add_right_default(GenGroupItemData *item_data,
        elm_image_file_set(icon, item_data->r_swallow_path.c_str(), NULL);
        evas_object_size_hint_align_set(icon, 0.0, EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND,
-                       EVAS_HINT_EXPAND);
+                                                                        EVAS_HINT_EXPAND);
 
        return icon;
 }
 
 /* draw handler */
-using drawer_fp = Evas_Object*(*)(GenGroupItemData *item_data, Evas_Object *parent);
+using drawer_fp = Evas_Object * (*)(GenGroupItemData *item_data, Evas_Object *parent);
 
-struct ContentDrawer
-{
+struct ContentDrawer {
        SwallowType type; /* ui type */
        drawer_fp draw;
 };
 
 static ContentDrawer cd_left[static_cast<int>(SwallowType::MAX)] = {
-               /*base objects */
-               { SwallowType::CHECK, __add_check },
+       /*base objects */
+       { SwallowType::CHECK, __add_check },
 
-               /*other compelx objects */
-               /* setting-network */
-               { SwallowType::RADIO_1TEXT, __add_radio_text },
+       /*other compelx objects */
+       /* setting-network */
+       { SwallowType::RADIO_1TEXT, __add_radio_text },
 };
 
 static ContentDrawer cd_right[static_cast<int>(SwallowType::MAX)] = {
-               /*right part object of the type */
-               { SwallowType::ICON_RADIO, __add_toggle },
+       /*right part object of the type */
+       { SwallowType::ICON_RADIO, __add_toggle },
 };
 
 
 /* When X marked button clicked, make string as empty. */
 static void __multiline_eraser_clicked(void *data, Evas_Object *obj,
-               void *event_info)
+                                                                          void *event_info)
 {
-       auto list_item = static_cast<GenGroupItemData*>(data);
+       auto list_item = static_cast<GenGroupItemData *>(data);
        Evas_Object *entry = (Evas_Object *)elm_object_item_part_content_get(list_item->item,
-                       "elm.icon.entry");
+                                                "elm.icon.entry");
        /* After button is clicked, entry should get focus again. */
        elm_object_focus_set(entry, EINA_TRUE);
        elm_entry_entry_set(entry, "");
@@ -286,7 +285,7 @@ static void __multiline_eraser_clicked(void *data, Evas_Object *obj,
 
 static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, const char *part)
 {
-       auto item_data = static_cast<GenGroupItemData*>(data);
+       auto item_data = static_cast<GenGroupItemData *>(data);
        ContentDrawer *cd_list = NULL;
        drawer_fp fp = NULL;
        retv_if(!item_data, NULL);
@@ -336,7 +335,7 @@ static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, const
 
 static void _gl_Gendial_del(void *data, Evas_Object *obj)
 {
-       auto item_data = static_cast<GenGroupItemData*>(data);
+       auto item_data = static_cast<GenGroupItemData *>(data);
        if (item_data) {
                item_data->eo_check = NULL;/*set to NULL at once */
                item_data->itc = {};
@@ -357,8 +356,8 @@ static void _gl_Gendial_del(void *data, Evas_Object *obj)
  * @return a pointer to GenGroupItemData
  */
 GenGroupItemData *createGendialTitleItem(
-               Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
-               const std::string& keyStr)
+       Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
+       const std::string &keyStr)
 {
        auto item_data = new GenGroupItemData;
        setting_retvm_if(!item_data, NULL, "new failed");
@@ -379,10 +378,10 @@ GenGroupItemData *createGendialTitleItem(
  * @return a pointer to GenGroupItemData
  */
 GenGroupItemData *createGendialGroupItem(
-               Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
-               SettingCallback gl_sel,
-               void *sel_data, SwallowType swallow_type, int chk_status, const std::string& keyStr,
-               const std::string& sub_desc, SettingCallback chk_change_cb)
+       Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
+       SettingCallback gl_sel,
+       void *sel_data, SwallowType swallow_type, int chk_status, const std::string &keyStr,
+       const std::string &sub_desc, SettingCallback chk_change_cb)
 {
        auto item_data = new GenGroupItemData;
        setting_retvm_if(!item_data, NULL, "new failed");
@@ -421,7 +420,7 @@ GenGroupItemData *createGendialGroupItem(
 void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
 {
        setting_retm_if(event_info == NULL,
-                       "invalid parameter: event_info is NULL");
+                                       "invalid parameter: event_info is NULL");
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
 
        elm_object_item_data_get(item);
@@ -429,13 +428,13 @@ void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
 
 /*for check,radio,slider etc.. */
 void setting_update_gl_item_chk_status(GenGroupItemData *item_data,
-               int status)
+                                                                          int status)
 {
        if (item_data && item_data->chk_status != status) {
                item_data->chk_status = status;
                if (item_data->item) {
                        elm_genlist_item_fields_update(item_data->item, "*",
-                                       ELM_GENLIST_ITEM_FIELD_CONTENT);
+                                                                                  ELM_GENLIST_ITEM_FIELD_CONTENT);
                }
        }
 }
index 5e2fb65..c333d33 100644 (file)
 #include <app.h>
 
 Evas_Object *setting_create_button(
-               Evas_Object *parent,
-               const std::string& btn_str,
-               const std::string& btn_style,
-               Evas_Smart_Cb btn_click_cb,
-               void *cb_data)
+       Evas_Object *parent,
+       const std::string &btn_str,
+       const std::string &btn_style,
+       Evas_Smart_Cb btn_click_cb,
+       void *cb_data)
 {
        retv_if(!parent, NULL);
 
@@ -35,7 +35,7 @@ Evas_Object *setting_create_button(
 
        /* not '<-' button */
        if (btn_style != NAVI_BACK_ARROW_BUTTON_STYLE) {
-               elm_object_text_set(button, TranslatedString{btn_str}.c_str());
+               elm_object_text_set(button, TranslatedString{btn_str} .c_str());
                evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
                evas_object_size_hint_align_set(button, EVAS_HINT_FILL, 0.5);
        }
@@ -54,21 +54,21 @@ typedef struct _setting_gif_data {
 } setting_gif_data;
 
 void setting_conformant_keypad_state(
-               Evas_Object *window, bool enable)
+       Evas_Object *window, bool enable)
 {
        Evas_Object *conform = (Evas_Object *)evas_object_data_get(window, "conformant");
        if (conform) {
                SETTING_TRACE("conformant keypad %d", enable);
                if (enable) {
                        elm_object_signal_emit(conform,
-                                       "elm,state,virtualkeypad,enable", "");
+                                                                  "elm,state,virtualkeypad,enable", "");
                        elm_object_signal_emit(conform,
-                                       "elm,state,clipboard,enable", "");
+                                                                  "elm,state,clipboard,enable", "");
                } else {
                        elm_object_signal_emit(conform,
-                                       "elm,state,virtualkeypad,disable", "");
+                                                                  "elm,state,virtualkeypad,disable", "");
                        elm_object_signal_emit(conform,
-                                       "elm,state,clipboard,disable", "");
+                                                                  "elm,state,clipboard,disable", "");
                }
        }
 }
index 7dac3ff..60a23a2 100755 (executable)
@@ -44,35 +44,35 @@ extern const Elm_Genlist_Item_Class itc_multiline_2text;
  * @return a pointer to GenGroupItemData
  */
 extern GenGroupItemData *createGendialTitleItem(
-               Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
-               const std::string& keyStr);
+       Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
+       const std::string &keyStr);
 
 /**
  * Common function to create a genlist item
  * @return a pointer to GenGroupItemData
  */
 GenGroupItemData *createGendialGroupItem(
-               Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
-               SettingCallback gl_sel,
-               void *sel_data, SwallowType swallow_type, int chk_status, const std::string& keyStr,
-               const std::string& sub_desc, SettingCallback chk_change_cb);
+       Evas_Object *genlist, const Elm_Genlist_Item_Class *itc,
+       SettingCallback gl_sel,
+       void *sel_data, SwallowType swallow_type, int chk_status, const std::string &keyStr,
+       const std::string &sub_desc, SettingCallback chk_change_cb);
 
 /**
  * The API to Create a button
  * @return a button
  */
 Evas_Object *setting_create_button(Evas_Object *parent,
-               const std::string& btn_str, const std::string& btn_style,
-               Evas_Smart_Cb btn_click_cb, void *cb_data);
+                                                                  const std::string &btn_str, const std::string &btn_style,
+                                                                  Evas_Smart_Cb btn_click_cb, void *cb_data);
 
 extern void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info);
 
 extern void setting_update_gl_item_chk_status(
-               GenGroupItemData *item_data, int status);
+       GenGroupItemData *item_data, int status);
 
 extern void setting_conformant_keypad_state(Evas_Object *conform, bool enable);
 
 extern void setting_decorate_image_RGBA(Evas_Object *obj, int r, int g, int b,
-               int a);
+                                                                               int a);
 
 #endif         /* __SETTING_COMMON_DRAW_WIDGET_H__ */
index 86d209e..ed6b596 100755 (executable)
@@ -49,34 +49,34 @@ PopupBtnResponse get_popup_btn_response_type(Evas_Object *obj)
        char *btn_str = elm_entry_markup_to_utf8(elm_object_text_get(obj));
        if (btn_str) {
                if (0 == safeStrCmp(btn_str, _("IDS_CST_BUTTON_CLOSE"))
-                       /*KeyStr_Try */
-                       || 0 == safeStrCmp(btn_str, _("IDS_SAPPS_SK_TRY_ABB"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_OK"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_SK_YES"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_STOP"))
-                       || 0 == safeStrCmp(btn_str,
-                                       _("IDS_ST_BUTTON_DISCONNECT"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_USE_MOTION"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_TPOP_TRY_AGAIN"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_DELETE"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_HEADER_RESET"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_SK_FORMAT_ABB"))
-                       || 0 == safeStrCmp(btn_str,
-                                       _("IDS_ST_HEADER_FORMAT_MVERB_ABB"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_CONTINUE"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_SAVE"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_ENABLE"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_DISABLE"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_SA_BUTTON_DONE_ABB"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_TURN_OFF"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_CLD_BUTTON_EXPORT"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_UNINSTALL"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_SMEMO_BUTTON_IMPORT"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_ST_HEADER_CLEAR_CACHE_ABB"))
-                       || 0 == safeStrCmp(btn_str, _("IDS_MTTRL_BUTTON_ENABLE_MOTION"))
-                       /* The below 'Add switch' label must be substituted with valid localization tag
-                        * once it is defined */
-                       || 0 == safeStrCmp(btn_str, _("Add switch"))) {
+                               /*KeyStr_Try */
+                               || 0 == safeStrCmp(btn_str, _("IDS_SAPPS_SK_TRY_ABB"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_OK"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_SK_YES"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_STOP"))
+                               || 0 == safeStrCmp(btn_str,
+                                                                  _("IDS_ST_BUTTON_DISCONNECT"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_USE_MOTION"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_TPOP_TRY_AGAIN"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_DELETE"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_HEADER_RESET"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_SK_FORMAT_ABB"))
+                               || 0 == safeStrCmp(btn_str,
+                                                                  _("IDS_ST_HEADER_FORMAT_MVERB_ABB"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_CONTINUE"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_SAVE"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_ENABLE"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_DISABLE"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_SA_BUTTON_DONE_ABB"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_TURN_OFF"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_CLD_BUTTON_EXPORT"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_BUTTON_UNINSTALL"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_SMEMO_BUTTON_IMPORT"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_ST_HEADER_CLEAR_CACHE_ABB"))
+                               || 0 == safeStrCmp(btn_str, _("IDS_MTTRL_BUTTON_ENABLE_MOTION"))
+                               /* The below 'Add switch' label must be substituted with valid localization tag
+                                * once it is defined */
+                               || 0 == safeStrCmp(btn_str, _("Add switch"))) {
                        rsp_type = PopupBtnResponse::OK;
                } else { /*for others, */
                        rsp_type = PopupBtnResponse::CANCEL;
index e19edff..009fcd1 100755 (executable)
@@ -62,7 +62,7 @@ int setting_view_node_table_intialize()
  * @return #0 on success, else on failed
  */
 int setting_view_node_table_register(setting_view *view,
-               setting_view *topview)
+                                                                        setting_view *topview)
 {
        /*SETTING_TRACE_BEGIN; */
        if (g_view_node_table_cur_size >= MAX_VIEWNODE_NUM)
@@ -121,7 +121,7 @@ int setting_view_destroy(setting_view *view, void *cb)
 {
        /* error check */
        setting_retvm_if(!view || !cb, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER,
-                       "Invalid arguement");
+                                        "Invalid arguement");
 
        int ret = SETTING_RETURN_FAIL;
 
index 01463d4..9747d88 100644 (file)
@@ -53,7 +53,7 @@ int setting_view_node_table_intialize();
  * @return #0 on success, else on failed
  */
 int setting_view_node_table_register(setting_view *view,
-               setting_view *topview);
+                                                                        setting_view *topview);
 
 /**
  * @brief Callback of view creating
index f3a8133..2e2fe58 100755 (executable)
 #ifdef SETTING_USING_PLATFORM_DBG
 #define SETTING_TRACE_SECURE_DEBUG(fmt, arg...) do {\
                SECURE_LOGD("\033[0;32mDEBUG: " fmt "\033[0m\n", ##arg);\
-} while (0)
+       } while (0)
 
 #define SETTING_TRACE_DEBUG(fmt, arg...) do {\
                SECURE_LOGD("\033[0;32mDEBUG: " fmt "\033[0m\n", ##arg);\
-} while (0)
+       } while (0)
 
 #define SETTING_TRACE(fmt, arg...) do {\
                SECURE_LOGI("\033[0;36m" fmt "\033[0m\n", ##arg);\
-} while (0)
+       } while (0)
 
 #define SETTING_TRACE_WARNING(fmt, arg...) do {\
                SECURE_LOGI("\033[0;33mWARRING: " fmt "\033[0m\n", ##arg);\
-} while (0)
+       } while (0)
 
 #define SETTING_TRACE_ERROR(fmt, arg...) do {\
                SECURE_LOGE("\033[0;31mERROR: " fmt "\033[0m\n", ##arg);\
-} while (0)
+       } while (0)
 
 #define SETTING_TRACE_BEGIN do {\
-       SECURE_LOGD("\033[0;35mENTER FUNCTION: %s. \033[0m\n", \
-                       __FUNCTION__);\
-} while (0)
+               SECURE_LOGD("\033[0;35mENTER FUNCTION: %s. \033[0m\n", \
+                                       __FUNCTION__);\
+       } while (0)
 
 #define SETTING_TRACE_END  do {\
                SECURE_LOGD("\033[0;35mEXIT FUNCTION: %s. \033[0m\n", \
-                       __FUNCTION__);\
-} while (0)
+                                       __FUNCTION__);\
+       } while (0)
 
 #else
 
 #define SETTING_TRACE(fmt, arg...) do {\
-       printf("\n[SETTING]\033[0;36m" fmt "\033[0m\t%s:%d\n", \
-                       ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               printf("\n[SETTING]\033[0;36m" fmt "\033[0m\t%s:%d\n", \
+                          ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 #define SETTING_TRACE_SECURE_DEBUG(fmt, arg...) do {\
-       printf("\n[SETTING]\033[0;32mDEBUG: " fmt "\033[0m\t%s:%d\n", \
-                       ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               printf("\n[SETTING]\033[0;32mDEBUG: " fmt "\033[0m\t%s:%d\n", \
+                          ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 
 #define SETTING_TRACE_DEBUG(fmt, arg...) do {\
-       printf("\n[SETTING]\033[0;32mDEBUG: " fmt "\033[0m\t%s:%d\n", \
-                       ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               printf("\n[SETTING]\033[0;32mDEBUG: " fmt "\033[0m\t%s:%d\n", \
+                          ##arg, (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 #define SETTING_TRACE_WARNING(fmt, arg...) do {\
-       printf("[SETTING]\033[0;33mWARRING: " fmt \
-                       "\033[0m\t%s:%d\n", ##arg, \
-                       (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               printf("[SETTING]\033[0;33mWARRING: " fmt \
+                          "\033[0m\t%s:%d\n", ##arg, \
+                          (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 #define SETTING_TRACE_ERROR(fmt, arg...) do {\
-       fprintf(stderr, "[SETTING]\033[0;31mERROR: " fmt \
-                       "\033[0m\t%s:%d\n", ##arg, \
-                       (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               fprintf(stderr, "[SETTING]\033[0;31mERROR: " fmt \
+                               "\033[0m\t%s:%d\n", ##arg, \
+                               (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 #define SETTING_TRACE_BEGIN do {\
-       printf("\n[SETTING]\033[0;35mENTER FUNCTION: %s. \033[0m\t%s:%d\n", \
-                               __FUNCTION__, \
-                               (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               printf("\n[SETTING]\033[0;35mENTER FUNCTION: %s. \033[0m\t%s:%d\n", \
+                          __FUNCTION__, \
+                          (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 #define SETTING_TRACE_END  do {\
-       printf("\n[SETTING]\033[0;35mEXIT FUNCTION: %s. \033[0m\t%s:%d\n", \
-                               __FUNCTION__, \
-                               (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
-} while (0)
+               printf("\n[SETTING]\033[0;35mEXIT FUNCTION: %s. \033[0m\t%s:%d\n", \
+                          __FUNCTION__, \
+                          (char*)(strrchr(__FILE__, '/')+1), __LINE__);\
+       } while (0)
 
 #endif
 
 #endif
 
 #define setting_retvm_if(expr, val, fmt, arg...) do { \
-       if (expr) { \
-               SETTING_TRACE_ERROR(fmt, ##arg); \
-               return (val); \
-       } \
-} while (0)
+               if (expr) { \
+                       SETTING_TRACE_ERROR(fmt, ##arg); \
+                       return (val); \
+               } \
+       } while (0)
 
 #define setting_retm_if(expr, fmt, arg...) do { \
-       if (expr) { \
-               SETTING_TRACE_ERROR(fmt, ##arg); \
-               return; \
-       } \
-} while (0)
+               if (expr) { \
+                       SETTING_TRACE_ERROR(fmt, ##arg); \
+                       return; \
+               } \
+       } while (0)
 
 #ifndef retm_if
 #define retm_if setting_retm_if
 
 #ifndef retv_if
 #define retv_if(expr, val) do { \
-       if (expr) { \
-               SETTING_TRACE_ERROR("(%s)", #expr); \
-               return (val); \
-       } \
-} while (0)
+               if (expr) { \
+                       SETTING_TRACE_ERROR("(%s)", #expr); \
+                       return (val); \
+               } \
+       } while (0)
 #endif
 
 #ifndef ret_if
 #define ret_if(expr) do { \
-       if (expr) { \
-               SETTING_TRACE_ERROR("(%s)", #expr); \
-               return ; \
-       } \
-} while (0)
+               if (expr) { \
+                       SETTING_TRACE_ERROR("(%s)", #expr); \
+                       return ; \
+               } \
+       } while (0)
 #endif
 
 #ifndef warn_if
 #define warn_if(expr, fmt, arg...) do { \
-       if (expr) { \
-               SETTING_TRACE_ERROR(fmt, ##arg); \
-       } \
-} while (0)
+               if (expr) { \
+                       SETTING_TRACE_ERROR(fmt, ##arg); \
+               } \
+       } while (0)
 #endif
 
 
 #define __FREE(del, arg) do { \
-       if (arg) { \
-               /*cast any argument to (void*) to avoid build warring*/\
-               del((void *)(arg)); \
-               arg = NULL; \
-       } \
-} while (0)
+               if (arg) { \
+                       /*cast any argument to (void*) to avoid build warring*/\
+                       del((void *)(arg)); \
+                       arg = NULL; \
+               } \
+       } while (0)
 #define FREE(arg) __FREE(free, arg)
 #define G_FREE(arg) __FREE(g_free, arg)
 
  * use __BACK_POINTER_SET to bind the Setting side point into the Genlist side
  * pointer */
 #define __BACK_POINTER_SET(pData) do { \
-       if (pData) {\
-               pData->pBack = (void **)(&(pData));\
-       } \
-} while (0)
+               if (pData) {\
+                       pData->pBack = (void **)(&(pData));\
+               } \
+       } while (0)
 
 #define __BACK_POINTER_UNSET(pData) do { \
-       /*release Setting side poniter handlers*/\
-       if (pData && pData->pBack) {\
-               *(pData->pBack) = NULL;\
-       } \
-} while (0)
+               /*release Setting side poniter handlers*/\
+               if (pData && pData->pBack) {\
+                       *(pData->pBack) = NULL;\
+               } \
+       } while (0)
 
 #endif /* _SETTING_DEBUG_H_ */
index b1a60ae..66b8eb9 100644 (file)
 
 #include "Elementary.h"
 
-using SettingCallback = void (*)(void*, Evas_Object*, void*);
+using SettingCallback = void (*)(void *, Evas_Object *, void *);
 
 namespace utils
 {
-    template <typename T, size_t len>
-    size_t lenOf(const T(&)[len]) { return len; }
+       template <typename T, size_t len>
+       size_t lenOf(const T(&)[len])
+       {
+               return len;
+       }
 }