class GenGroupItemData
{
public:
- void **pBack = nullptr;
Evas_Object *window = nullptr;
Evas *evas = nullptr;
"IDS_ST_MBODY_SCREEN_READER_HTTS",
screen_reader ? "IDS_ST_BODY_ON" : "IDS_ST_BODY_OFF",
NULL);
- if (screenReaderItem_) {
+ if (screenReaderItem_)
screenReaderItem_->userdata = ad;
- __BACK_POINTER_SET(screenReaderItem_);
- }
universalSwitchItem_ = createGendialGroupItem(
scroller, &ad->itc_multiline_sub,
"IDS_ACCS_UNIVERSAL_SWITCH",
"IDS_ACCS_UNIVERSAL_SWITCH_HINT",
NULL);
- if (universalSwitchItem_) {
+ if (universalSwitchItem_)
universalSwitchItem_->userdata = ad;
- __BACK_POINTER_SET(universalSwitchItem_);
- }
accessibilityLauncherItem_ = createGendialGroupItem(
scroller, &ad->itc_multiline_sub,
"IDS_ACCS_ACCESSIBILITY_LAUNCHER",
"IDS_ACCS_ACCESSIBILITY_LAUNCHER_HINT",
NULL);
- if (accessibilityLauncherItem_) {
+ if (accessibilityLauncherItem_)
accessibilityLauncherItem_->userdata = ad;
- __BACK_POINTER_SET(accessibilityLauncherItem_);
- }
int vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, onScreenReaderVconfKeyChanged, screenReaderItem_);
if (vconf_ret != 0) {
ad, SwallowType::ICON_RADIO, 1,
"IDS_ST_MBODY_SCREEN_READER_HTTS",
{}, screenReaderCheckCb);
- if (screenreader_checkbox) {
+ if (screenreader_checkbox)
screenreader_checkbox->userdata = ad;
- __BACK_POINTER_SET(screenreader_checkbox);
- }
+
int screen_reader = 0;
auto r = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &screen_reader);
if (!r)
NULL);
if (multiline_screen_reader_comment) {
multiline_screen_reader_comment->userdata = ad;
- __BACK_POINTER_SET(multiline_screen_reader_comment);
-
elm_genlist_item_select_mode_set(multiline_screen_reader_comment->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
ad, SwallowType::INVALID, 0,
"IDS_ST_OPT_SETTINGS",
{}, NULL);
- if (screen_reader_settings) {
+ if (screen_reader_settings)
screen_reader_settings->userdata = ad;
- __BACK_POINTER_SET(screen_reader_settings);
- }
Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ST_MBODY_SCREEN_READER_HTTS"), NULL, NULL, genlist, NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE,
tts_setting_set_speed_changed_cb(ttsSpeedChangedCb, speech_rate_item);
if (speech_rate_item) {
speech_rate_item->userdata = ad;
- __BACK_POINTER_SET(speech_rate_item);
speech_rate_list_item = speech_rate_item;
SETTING_TRACE("Speech rate Item added");
}
if (keyboard_feedback_item) {
keyboard_feedback_item->userdata = ad;
- __BACK_POINTER_SET(keyboard_feedback_item);
SETTING_TRACE("Keyboard feedback Item added");
}
if (hints_item) {
hints_item->userdata = ad;
- __BACK_POINTER_SET(hints_item);
SETTING_TRACE("Hints Item added");
}
if (vibration_feedback_item) {
vibration_feedback_item->userdata = ad;
- __BACK_POINTER_SET(vibration_feedback_item);
SETTING_TRACE("Vibration feedback Item added");
}
if (sound_feedback_item) {
sound_feedback_item->userdata = ad;
- __BACK_POINTER_SET(sound_feedback_item);
SETTING_TRACE("Sound feedback Item added");
}
{},
NULL);
- if (status_bar_information_item) {
+ if (status_bar_information_item)
status_bar_information_item->userdata = ad;
- __BACK_POINTER_SET(status_bar_information_item);
- }
multiline_status_bar_information_description = createGendialGroupItem(
genlist, &ad->itc_multiline_sub,
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,
if (ad->universal_switch_off_checkbox) {
ad->universal_switch_off_checkbox->userdata = ad;
ad->universal_switch_off_checkbox->chk_status = state;
- __BACK_POINTER_SET(ad->universal_switch_off_checkbox);
elm_object_item_disabled_set(ad->universal_switch_off_checkbox->item, EINA_TRUE);
}
if (ad->universal_switch_comment) {
ad->universal_switch_comment->userdata = ad;
- __BACK_POINTER_SET(ad->universal_switch_comment);
elm_genlist_item_select_mode_set(ad->universal_switch_comment->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
item_data->notify = NULL;
}
- __BACK_POINTER_UNSET(item_data);
delete item_data;
}
}
#define FREE(arg) __FREE(free, arg)
#define G_FREE(arg) __FREE(g_free, arg)
-
-/*a trick:To manager back pointer. eg, */
-/*For using genlist, whenever Setting side and Genlist side both keep
- * pointers to a same block memory(here is genlis item data via calloc), must
- * 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)
-
-#define __BACK_POINTER_UNSET(pData) do { \
- /*release Setting side poniter handlers*/\
- if (pData && pData->pBack) {\
- *(pData->pBack) = NULL;\
- } \
- } while (0)
-
#endif /* _SETTING_DEBUG_H_ */