extern "C" {
#endif
+/**
+* @brief Set auto command-register mode and click method for recognized object.
+* @since_tizen 3.0
+* @privilege %http://tizen.org/privilege/recorder
+*
+* @param[in] mode The mode of auto register
+* @param[in] click_method The click method for recognized object
+*
+* @return 0 on success, otherwise a negative error value
+* @retval #VC_ELM_ERROR_NONE Successful
+* @retval #VC_ELM_ERROR_OPERATION_FAILED Operation failed
+* @retval #VC_ELM_ERROR_INVALID_STATE Invalid state
+* @retval #VC_ELM_ERROR_PERMISSION_DENIED Permission denied
+* @retval #VC_ELM_ERROR_NOT_SUPPORTED Not supported
+*
+* @pre vc_elm_initialize() should be successful.
+*
+* @see vc_elm_get_auto_register_mode()
+*/
int vc_elm_set_auto_register_mode(int mode, int click_method);
+/**
+* @brief Get auto command-register mode and click method for recognized object.
+* @since_tizen 3.0
+* @privilege %http://tizen.org/privilege/recorder
+*
+* @param[out] mode The mode of auto register
+* @param[out] click_method The click method for recognized object
+*
+* @return 0 on success, otherwise a negative error value
+* @retval #VC_ELM_ERROR_NONE Successful
+* @retval #VC_ELM_ERROR_OPERATION_FAILED Operation failed
+* @retval #VC_ELM_ERROR_INVALID_STATE Invalid state
+* @retval #VC_ELM_ERROR_PERMISSION_DENIED Permission denied
+* @retval #VC_ELM_ERROR_NOT_SUPPORTED Not supported
+*
+* @pre vc_elm_initialize() should be successful.
+*
+* @see vc_elm_set_auto_register_mode()
+*/
int vc_elm_get_auto_register_mode(int* mode, int* click_method);
+/**
+* @brief Add allowed text part for auto command register.
+* @since_tizen 3.0
+* @privilege %http://tizen.org/privilege/recorder
+*
+* @param[in] text_part The text part of elemenatry widget
+*
+* @return 0 on success, otherwise a negative error value
+* @retval #VC_ELM_ERROR_NONE Successful
+* @retval #VC_ELM_ERROR_OPERATION_FAILED Operation failed
+* @retval #VC_ELM_ERROR_INVALID_STATE Invalid state
+* @retval #VC_ELM_ERROR_PERMISSION_DENIED Permission denied
+* @retval #VC_ELM_ERROR_NOT_SUPPORTED Not supported
+*
+* @pre vc_elm_initialize() should be successful.
+*
+* @see vc_elm_remove_allowed_text_part()
+*/
int vc_elm_add_allowed_text_part(const char* text_part);
+/**
+* @brief Remove the list of additional allowed text part for auto command register.
+* @since_tizen 3.0
+* @privilege %http://tizen.org/privilege/recorder
+*
+*
+* @return 0 on success, otherwise a negative error value
+* @retval #VC_ELM_ERROR_NONE Successful
+* @retval #VC_ELM_ERROR_OPERATION_FAILED Operation failed
+* @retval #VC_ELM_ERROR_INVALID_STATE Invalid state
+* @retval #VC_ELM_ERROR_PERMISSION_DENIED Permission denied
+* @retval #VC_ELM_ERROR_NOT_SUPPORTED Not supported
+*
+* @pre vc_elm_initialize() should be successful.
+*
+* @see vc_elm_add_allowed_text_part()
+*/
int vc_elm_remove_allowed_text_part(void);
#ifdef __cplusplus
} else if (1 == click_method) {
VC_ELM_LOG_DBG("click method - focus/key");
Object_Info* parent_info = ea_object_dump_parent_widget_data_get(info);
-
- if (NULL != parent_info && EINA_TRUE == parent_info->focusable) {
- VC_ELM_LOG_DBG("Focusable Parent");
- VC_ELM_LOG_DBG("Click event");
- evas_object_smart_callback_add((Evas_Object*)(parent_info->address), "focused", __focused_cb, "focused");
- elm_object_focus_set((Evas_Object*)(parent_info->address), EINA_TRUE);
- } else {
- Object_Info* grand_info = ea_object_dump_parent_widget_data_get(parent_info);
- while (NULL != grand_info) {
- if (EINA_TRUE == grand_info->focusable) {
- VC_ELM_LOG_DBG("Focusable Grand parent");
- Elm_Object_Item* item = elm_genlist_at_xy_item_get((Evas_Object*)(grand_info->address), x + w/2, y + h/2, NULL);
- if (NULL != item && EINA_FALSE == elm_object_item_disabled_get(item)) {
- VC_ELM_LOG_DBG("Click event");
- evas_object_smart_callback_add((Evas_Object*)(grand_info->address), "item,focused", __focused_cb, "item,focused");
- elm_object_item_focus_set(item, EINA_TRUE);
- elm_object_focus_set((Evas_Object*)(grand_info->address), EINA_TRUE);
- } else {
- item = elm_genlist_at_xy_item_get((Evas_Object*)(grand_info->address), x + w + w/2, y + h/2, NULL);
+ if (NULL != parent_info) {
+ if (EINA_TRUE == parent_info->focusable) {
+ VC_ELM_LOG_DBG("Focusable Parent");
+ VC_ELM_LOG_DBG("Click event");
+ evas_object_smart_callback_add((Evas_Object*)(parent_info->address), "focused", __focused_cb, "focused");
+ elm_object_focus_set((Evas_Object*)(parent_info->address), EINA_TRUE);
+ } else {
+ Object_Info* grand_info = ea_object_dump_parent_widget_data_get(parent_info);
+ while (NULL != grand_info) {
+ if (EINA_TRUE == grand_info->focusable) {
+ VC_ELM_LOG_DBG("Focusable Grand parent");
+ Elm_Object_Item* item = elm_genlist_at_xy_item_get((Evas_Object*)(grand_info->address), x + w/2, y + h/2, NULL);
if (NULL != item && EINA_FALSE == elm_object_item_disabled_get(item)) {
- VC_ELM_LOG_DBG("Click event 2");
+ VC_ELM_LOG_DBG("Click event");
evas_object_smart_callback_add((Evas_Object*)(grand_info->address), "item,focused", __focused_cb, "item,focused");
elm_object_item_focus_set(item, EINA_TRUE);
elm_object_focus_set((Evas_Object*)(grand_info->address), EINA_TRUE);
+ } else {
+ item = elm_genlist_at_xy_item_get((Evas_Object*)(grand_info->address), x + w + w/2, y + h/2, NULL);
+ if (NULL != item && EINA_FALSE == elm_object_item_disabled_get(item)) {
+ VC_ELM_LOG_DBG("Click event 2");
+ evas_object_smart_callback_add((Evas_Object*)(grand_info->address), "item,focused", __focused_cb, "item,focused");
+ elm_object_item_focus_set(item, EINA_TRUE);
+ elm_object_focus_set((Evas_Object*)(grand_info->address), EINA_TRUE);
+ }
}
+ break;
+ } else {
+ grand_info = ea_object_dump_parent_widget_data_get(grand_info);
}
- break;
- } else {
- grand_info = ea_object_dump_parent_widget_data_get(grand_info);
}
}
+ } else {
+ VC_ELM_LOG_DBG("No parent info");
}
- VC_ELM_LOG_DBG("Nothing");
} else {
VC_ELM_LOG_DBG("Invalid click method");
}
if (NULL == g_allowed_text_part_list) {
- g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, "elm.text");
+ g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, strdup("elm.text"));
}
ret = _vc_elm_core_read_xml_data();
data = NULL;
}
- g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, "elm.text");
+ g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, strdup("elm.text"));
VC_ELM_LOG_DBG("Remove Allowed text part");
return 0;
}