Eina_Bool AccessibilityLauncherPage::onNaviframePopCb(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- ItemWrapper *items = (ItemWrapper *)data;
+ auto items = static_cast<ItemWrapper*>(data);
delete[] items;
return EINA_TRUE;
void AccessibilityLauncherPage::onBackButtonCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
void AccessibilityLauncherPage::onCheckboxChangeCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Input parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
list_item->chk_status = !list_item->chk_status;
- updateVconf((ItemWrapper*)list_item->userdata);
+ updateVconf(static_cast<ItemWrapper*>(list_item->userdata));
}
void AccessibilityLauncherPage::onItemSelectedCb(void *data, Evas_Object *obj, void *event_info)
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);
- GenGroupItemData *list_item = (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((ItemWrapper*)list_item->userdata);
+ updateVconf(static_cast<ItemWrapper*>(list_item->userdata));
}
void AccessibilityLauncherPage::updateName(GenGroupItemData *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);
- ItemWrapper *items = (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);
}
void AccessibilityLauncherPage::checkboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
list_item->chk_status = !list_item->chk_status;
updateMainSwitch(list_item);
}
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);
- GenGroupItemData *list_item = (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);
}
{
retm_if(user_data == NULL, "Input argument is NULL");
retm_if(switch_id == NULL, "switch_id is NULL");
- SettingAccessibility *ad = (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) {
void AccessoriesSwitchesPage::okResponseCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
renewCaptureSwitchCb(ad, NULL);
void AccessoriesSwitchesPage::popupResponseCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
auto response_type = get_popup_btn_response_type(obj);
if (response_type == PopupBtnResponse::OK) {
Eina_Bool AccessoriesSwitchesPage::renewCaptureSwitchCb(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (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);
Eina_Bool AccessoriesSwitchesPage::naviframPopCb(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
setting_accessibility_universal_switch_dbus_config_cancelCaptureSwitch(&ad->config);
ad->us_configuration.switch_id = {};
void AccessoriesSwitchesPage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *settings_item = (GenGroupItemData *)elm_object_item_data_get(item);
- SettingAccessibility *ad = (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);
void AddSwitchPage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
Eina_Bool AddSwitchPage::onNaviframePopCb(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
ad->us_configuration.screen_switch_added_cb = NULL;
ad->us_configuration.camera_switch_added_cb = NULL;
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *settings_item = (GenGroupItemData *)elm_object_item_data_get(item);
- SettingAccessibility *ad = (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");
- UniversalSwitchInfoType * camera_switch = (UniversalSwitchInfoType *)data;
+ auto camera_switch = static_cast<UniversalSwitchInfoType*>(data);
createActionPage(ad, camera_switch);
}
void CameraSwitchesPage::switchActionCb(SettingAccessibility *ad, const std::string& action, void *user_data)
{
retm_if(user_data == NULL, "User data parameter is NULL");
- UniversalSwitchInfoType * camera_switch = (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);
void CameraSwitchesPage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
__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;
- GenGroupItemData *item_data = (GenGroupItemData *)elm_object_item_data_get(item);
+ auto item_data = static_cast<GenGroupItemData*>(elm_object_item_data_get(item));
ret_if(!item_data);
}
void RemoveSwitchPage::onDeleteButtonClicked(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void RemoveSwitchPage::onAllButtonsClicked(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
Elm_Object_Item *item = elm_genlist_first_item_get(ad->set_value_layout.getGenlist());
while (item != NULL) {
- GenGroupItemData *list_item = (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);
}
void RemoveSwitchPage::onRemoveSelectedSwitches(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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) {
- GenGroupItemData *list_item = (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);
ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
{
- SettingAccessibility *ad = (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);
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *list_item = (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);
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;
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_genlist_item_selected_set(item, EINA_FALSE);
void ScreenReaderPage::screenReaderCheckCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
/* for genlist update status */
list_item->chk_status = elm_check_state_get(obj);
void ScreenReaderPage::updateScreenReaderVconfCheck(int state, void* data)
{
retm_if(data == NULL, "Data parameter is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, state);
if (!state) {
char buf[255] = "";
Eina_Bool ScreenReaderPage::hideScreenReaderPage(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, onVconfChangedCb);
elm_naviframe_item_pop(ad->md.getNaviframe());
void ScreenReaderPage::onVconfChangedCb(keynode_t *node, void *user_data)
{
- GenGroupItemData *screenReaderItem = (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
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;
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
Evas_Object *popup;
Evas_Object *box;
Evas_Object *genlist;
void ScreenReaderSettingsPage::vibrationFeedbackCb(void *data, Evas_Object *obj, void *event_info)
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- GenGroupItemData *list_item = (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,
void ScreenReaderSettingsPage::updateVibrationFeedbackCheck(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
/* for genlist update status */
list_item->chk_status = elm_check_state_get(obj);
void ScreenReaderSettingsPage::soundFeedbackCb(void *data, Evas_Object *obj, void *event_info)
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- GenGroupItemData *list_item = (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);
void ScreenReaderSettingsPage::updateSoundFeedbackCheck(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
/* for genlist update status */
list_item->chk_status = elm_check_state_get(obj);
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- GenGroupItemData *list_item = (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,
void ScreenReaderSettingsPage::updateHintsCheck(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
/* for genlist update status */
list_item->chk_status = elm_check_state_get(obj);
void ScreenReaderSettingsPage::keyboardFeedbackCb(void *data, Evas_Object *obj, void *event_info)
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- GenGroupItemData *list_item = (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);
void ScreenReaderSettingsPage::updateKeyboardFeedbackCheck(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
/* for genlist update status */
list_item->chk_status = elm_check_state_get(obj);
void ScreenReaderSettingsPage::speechRateCb(void *data, Evas_Object *obj, void *event_info)
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_genlist_item_selected_set(item, EINA_FALSE);
createSpeechRatePopup(ad, item);
void ScreenReaderSettingsPage::ttsSpeedChangedCb(int speed, void *user_data)
{
SETTING_TRACE("=== Speed changed to (%d)", speed);
- GenGroupItemData *speech_rate_item = (GenGroupItemData *)user_data;
+ auto speech_rate_item = static_cast<GenGroupItemData*>(user_data);
char buf[256];
snprintf(buf, utils::lenOf(buf), "%d", speed);
void ScreenReaderSettingsPage::createSpeechRatePopup(void *data, void *item)
{
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
Evas_Object *popup;
Evas_Object *layout;
Evas_Object *slider;
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *list_item = (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());
return;
}
- GenGroupItemData *item_data = (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);
}
Eina_Bool ScreenReaderSettingsPage::hidePage(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
if (0 != tts_setting_unset_speed_changed_cb())
SETTING_TRACE("Fail to unset speed changed cb");
{
retm_if(ad == NULL, "Input parameter is NULL");
- GenGroupItemData *item = (GenGroupItemData *)createGendialGroupItem(ad->set_value_layout.getGenlist(), &ad->itc_multiline_sub,
+ GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &ad->itc_multiline_sub,
gl_sel, NULL,
SwallowType::ICON_RADIO, (int)state,
caption ? caption : std::string{},
{
retvm_if(ad == NULL, NULL, "Input parameter is NULL");
- OptionsItem *opt_item = (OptionsItem *)calloc(1, sizeof(OptionsItem));
+ auto opt_item = new OptionsItem;
retvm_if(opt_item == NULL, NULL, "calloc failed");
opt_item->ad = ad;
{
retm_if(user_data == NULL, "Data parameter is NULL");
retm_if(node == NULL, "Data parameter is NULL");
- SettingAccessibility *ad = (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) {
void SetValuePage::updateSwitchAction(void *data, Evas_Object *obj, void *event_info)
{
elm_genlist_item_selected_set((Elm_Genlist_Item *)event_info, 0);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
retm_if(ad == NULL, "Data argument is NULL");
ad->actionPage_ = std::make_unique<ActionPage>(ad);
void SetValuePage::closeUpdateAccessoriesSwitchPage(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
retm_if(ad == NULL, "Data argument is NULL");
if (event_info == ad->save_object_item)
elm_genlist_item_selected_set(item, 0);
- GenGroupItemData *list_item =
- (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);
void SetValuePage::gendialRadioChangeCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Input parameter is NULL");
- GenGroupItemData *list_item = (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");
- SettingAccessibility *ad = (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);
elm_genlist_item_selected_set(item, 0);
- GenGroupItemData *list_item = (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);
- SettingAccessibility *ad = (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++;
void SetValuePage::gendialRemoveCheckboxItemCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Input parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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
void SetValuePage::switchItemCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Input parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
{
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
retm_if(data == NULL, "Input parameter is NULL");
- OptionsItem *opt_item = (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);
{
int page_num = 0;
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_scroller_current_page_get(ad->set_value_layout.getScroller(), NULL, &page_num);
{
bool state;
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
state = elm_check_state_get(obj);
Eina_Bool SetValuePage::naviframePopCb(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (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);
void SetValuePage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
{
retm_if(ad == NULL, "Input argument is NULL");
- GenGroupItemData *item = (GenGroupItemData *)createGendialGroupItem(genlist, &itc_1text_1icon_3,
+ GenGroupItemData *item = createGendialGroupItem(genlist, &itc_1text_1icon_3,
addSwitchClickedCb, ad,
SwallowType::ICON_IMAGE, 0,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_ADD_SWITCH",
void SwitchesPage::createRemovePageCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
ad->removeSwitchPage_ = std::make_unique<RemoveSwitchPage>(ad);
RemoveSwitchPage::attachCallback(ad, switchRemovedCb);
{
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
AddSwitchPage::attachCallbackOnSwitchAttach(ad, addSwitchCb);
ad->addSwitchPage_ = std::make_unique<AddSwitchPage>(ad);
elm_genlist_item_selected_set(item, EINA_FALSE);
retm_if(data == NULL, "Data argument is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)elm_object_item_data_get(item);
- UniversalSwitchConfigurationItem *config_item = (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);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
UpdateSwitchPage::attachActionCallback(ad, switchUpdatedCb);
ad->updateSwitchPage_ = std::make_unique<UpdateSwitchPage>(ad, config_item);
}
{
retvm_if(ad == NULL, NULL, "Input argument is NULL");
retvm_if(genlist == NULL, NULL, "Input genlist argument is NULL");
- GenGroupItemData *item;
- item = (GenGroupItemData *)createGendialGroupItem(genlist, &itc_2text_1icon_3,
+ auto item = createGendialGroupItem(genlist, &itc_2text_1icon_3,
item_cb, ad,
SwallowType::INVALID, 0,
main_text,
Eina_Bool SwitchesPage::naviframePopCb(void *data, Elm_Object_Item *it)
{
retv_if(data == NULL, EINA_TRUE);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
if (ad->universal_switch_switches_back)
ad->universal_switch_switches_back(ad);
void SwitchesPage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
void UniversalSwitchPage::createSettingsPage(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
retm_if(ad == NULL, "Input parameter is NULL");
ad->universalSwitchSettingsPage_ = std::make_unique<UniversalSwitchSettingsPage>(ad);
void UniversalSwitchPage::updateVconfKey(int state, void *data)
{
retm_if(data == NULL, "Data parameter is NULL");
- SettingAccessibility *ad = (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) {
void UniversalSwitchPage::popupResponseCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- SettingAccessibility *ad = (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));
void UniversalSwitchPage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (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)
{
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, onVconfKeyChange);
stopUniversalSwitch(ad);
{
SETTING_TRACE_DEBUG("universal-switch started");
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (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);
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *list_item = (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);
void UniversalSwitchPage::checkboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
list_item->chk_status = elm_check_state_get(obj);
void UniversalSwitchPage::onVconfKeyChange(keynode_t *node, void *user_data)
{
int state;
- SettingAccessibility *ad = (SettingAccessibility *)user_data;
+ auto ad = static_cast<SettingAccessibility*>(user_data);
state = vconf_keynode_get_bool(node);
if (state >= 0)
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *list_item = (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);
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::manageOptionsCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *list_item = (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");
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::feedbackVoiceCb(void *data, Evas_Object *obj, void *event_info)
{
char str[128] = {0,};
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::feedbackVoiceCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::feedbackSoundCb(void *data, Evas_Object *obj, void *event_info)
{
char str[128] = {0,};
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::feedbackSoundCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::cursorColorCb(void *data, Evas_Object *obj, void *event_info)
{
int i;
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::autoTapKbdCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::autoMoveIntervalCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::autoTapCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::autoTapCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::sglInactionIntervalCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::sglInactionIntervalCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::tapDurationCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::tapDurationCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::pauseOnFirstCb(void *data, Evas_Object *obj, void *event_info)
{
char str[512] = {0,};
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::pauseOnFirstCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::scanSpeedCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::scanDirectionCb(void *data, Evas_Object *obj, void *event_info)
{
Evas_Object *ctxpopup;
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::scanMethodCb(void *data, Evas_Object *obj, void *event_info)
{
Evas_Object *ctxpopup;
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::scanNumberCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::autoScanIntervalCb(void *data, Evas_Object *obj, void *event_info)
{
- SettingAccessibility *ad = (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");
void UniversalSwitchSettingsPage::ScanDirectionCtxPopupCb(void *data, Evas_Object *obj, void *event_info)
{
- ScanDirection scan_dir = (ScanDirection)reinterpret_cast<long>(data);
- SettingAccessibility *ad = (SettingAccessibility *)evas_object_data_get(obj, CTXPOPUP_DATA_AD);
+ 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));
retm_if(ad == NULL, "ctxpopup data is NULL");
if (updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_DIR_VERTICAL, NULL, (int *)&scan_dir, NULL)) {
void UniversalSwitchSettingsPage::ScanMethodCtxPopupCb(void *data, Evas_Object *obj, void *event_info)
{
- ScanMethod scan_method = (ScanMethod)reinterpret_cast<long>(data);
- SettingAccessibility *ad = (SettingAccessibility *)evas_object_data_get(obj, CTXPOPUP_DATA_AD);
+ 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));
retm_if(ad == NULL, "ctxpopup data is NULL");
if (updateVconfValue(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SETTINGS_SCAN_METHOD, NULL, (int *)&scan_method, NULL)) {
void UniversalSwitchSettingsPage::autoScanCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
{
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
ad->switchesPage_ = std::make_unique<SwitchesPage>(ad);
SwitchesPage::attachCallback(ad, updateSwitchesCount);
Eina_Bool UniversalSwitchSettingsPage::naviframPopCb(void *data, Elm_Object_Item *it)
{
- SettingAccessibility *ad = (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);
void UniversalSwitchSettingsPage::backCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data argument is NULL");
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_naviframe_item_pop(ad->md.getNaviframe());
}
{
retm_if(user_data == NULL, "Data parameter is NULL");
retm_if(node == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (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) {
void UniversalSwitchSettingsPage::autoMoveIntervalCheckboxCb(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item = (GenGroupItemData *)data;
- SettingAccessibility *ad = (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);
elm_genlist_item_selected_set(item, EINA_FALSE);
- GenGroupItemData *list_item = (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);
- SettingAccessibility *ad = (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);
void UpdateSwitchPage::onActionUpdate(SettingAccessibility *ad, const std::string& action, void *user_data)
{
if (ad->us_configuration.switch_updated_cb) {
- UniversalSwitchConfigurationItem *config_item = (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);
}
}
keynode_t *key, void *user_data)
{
- GenGroupItemData *screen_reader_item = (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);
static Eina_Bool _cancel_cb(void *data, Elm_Object_Item *it)
{
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
retv_if(!ad, EINA_FALSE);
vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS,
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_genlist_item_selected_set(item, EINA_FALSE);
ad->screenReaderPage_ = std::make_unique<ScreenReaderPage>(ad);
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_genlist_item_selected_set(item, EINA_FALSE);
ad->universalSwitchPage_ = std::make_unique<UniversalSwitchPage>(ad);
{
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
elm_genlist_item_selected_set(item, EINA_FALSE);
ad->accessibilityLauncherPage_ = std::make_unique<AccessibilityLauncherPage>(ad);
/* error check */
retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
- SettingAccessibility *ad = (SettingAccessibility *)data;
+ auto ad = static_cast<SettingAccessibility*>(data);
Evas_Object *scroller = ad->md.getGenlist();
createGendialTitleItem(scroller, &(itc_group_item), "IDS_ST_HEADER_VISION");
static int setting_accessibility_main_create(void *cb)
{
- SettingAccessibility *ad = (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"));
if (!new_id || strlen(new_id) == 0)
return;
- UniversalSwitchDbusConfig *config = (UniversalSwitchDbusConfig *)data;
+ auto config = static_cast<UniversalSwitchDbusConfig*>(data);
UniversalSwitchEldbus *eldbus = &config->eldbus;
if (!eldbus->dobj && !(eldbus->dobj = eldbus_object_get(eldbus->conn, BUS, PATH))) {
static void __eldbus_on_capture_switch(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
- UniversalSwitchEldbus *eldbus = (UniversalSwitchEldbus *) data;
+ auto eldbus = static_cast<UniversalSwitchEldbus*>(data);
const char *errname, *errmsg;
const char *switch_id = NULL;
static char *_universal_switch_gendial_new_text_get(void *data, Evas_Object *obj, const char *part)
{
- GenGroupItemData *item_data = (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()) {
{
setting_retvm_if((NULL == priv), NULL, "NULL == priv");
- SettingAccessibility *ad = (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;
static void on_app_terminate(void *priv)
{
- SettingAccessibility *ad = (SettingAccessibility *)priv;
+ auto ad = static_cast<SettingAccessibility*>(priv);
destroy_tts_handle(ad);
setting_view_destroy(&setting_view_accessibility_main, ad);
static void on_app_control(app_control_h service, void *priv)
{
- SettingAccessibility *ad = (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")) {
static void __radio_changed(void *data, Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
- GenGroupItemData *list_item =
- (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");
- GenGroupItemData *list_item =
- (GenGroupItemData *)data;
+ auto list_item = static_cast<GenGroupItemData*>(data);
list_item->chk_status = elm_check_state_get(obj); /* for update */
}
static void __multiline_eraser_clicked(void *data, Evas_Object *obj,
void *event_info)
{
- GenGroupItemData *list_item = (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");
/* After button is clicked, entry should get focus again. */
static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, const char *part)
{
- GenGroupItemData *item_data = (GenGroupItemData *)data;
+ auto item_data = static_cast<GenGroupItemData*>(data);
ContentDrawer *cd_list = NULL;
drawer_fp fp = NULL;
retv_if(!item_data, NULL);
static void _gl_Gendial_del(void *data, Evas_Object *obj)
{
- GenGroupItemData *item_data = (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 = {};