char *guide_text = NULL;
char *return_key_type = "SEND";
char *max_text_length = NULL;
+ char *cursor_position_set = "0";
input_keyboard_deinit();
if (ret == APP_CONTROL_ERROR_NONE) {
g_input_keyboard_data.max_text_length = atoi(max_text_length);
}
+ ret = app_control_get_extra_data(app_control, "cursor_position_set", &cursor_position_set);
+ if (ret == APP_CONTROL_ERROR_NONE) {
+ g_input_keyboard_data.cursor_position_set = atoi(cursor_position_set);
+ }
return true;
}
g_input_keyboard_data.guide_text = NULL;
g_input_keyboard_data.return_key_type = "SEND";
g_input_keyboard_data.max_text_length = KEYBOARD_EDITOR_CHAR_COUNT_MAX;
+ g_input_keyboard_data.cursor_position_set = 0;
return;
}
const char *getText = elm_entry_entry_get(entry);
LOGD("button key clicked!! : getText = %s", getText);
+ char cursorPosition[512];
+ snprintf(cursorPosition, sizeof(cursorPosition), "%d", elm_entry_cursor_pos_get(entry));
+
char *app_id = NULL;
app_control_get_caller(app_data->source_app_control, &app_id);
if (app_id != NULL)
app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
set_source_caller_app_id(app_control);
free(app_id);
- reply_to_sender_by_callback(getText, "keyboard", NULL);
+ reply_to_sender_by_callback(getText, "keyboard", NULL, cursorPosition);
ui_app_exit();
-
}
void btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
elm_entry_input_panel_return_key_type_set(entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
evas_object_smart_callback_add(entry, "activated", enter_keydown_cb, ad);
}
+ if (g_input_keyboard_data.cursor_position_set != 0) {
+ elm_entry_cursor_pos_set(entry, g_input_keyboard_data.cursor_position_set);
+ }
evas_object_show(entry);
elm_box_pack_end(box, entry);
elm_entry_input_panel_return_key_type_set(entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
evas_object_smart_callback_add(entry, "activated", enter_keydown_cb, ad);
}
+ if (g_input_keyboard_data.cursor_position_set != 0) {
+ elm_entry_cursor_pos_set(entry, g_input_keyboard_data.cursor_position_set);
+ }
evas_object_show(entry);
elm_object_part_content_set(editfield, "elm.swallow.content", entry);