Popup with Entry and Button
Small form type popup having entry and button.
static void _my_entry_show_cb(void *data, Evas *e, Evas_Object *obj,
void *event_info) {
elm_object_focus_set(obj, EINA_TRUE);
}
static void _popup_text_cb(void *data, Evas_Object *obj, void *event_info) {
Evas_Object *popup;
Evas_Object *layout;
Evas_Object *btn;
Evas_Object *entry;
appdata_s *ad;
ad = (appdata_s *) data;
popup = elm_popup_add(ad->win);
elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
elm_object_style_set(popup, "circle");
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
layout = elm_layout_add(popup);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
elm_layout_theme_set(layout, "layout", "popup", "content/circle");
elm_object_content_set(popup, layout);
entry = elm_entry_add(layout);
elm_entry_single_line_set(entry, EINA_TRUE);
elm_entry_scrollable_set(entry, EINA_TRUE);
elm_object_part_text_set(entry, "elm.guide", "Guide Text");
elm_object_part_content_set(layout, "elm.swallow.content", entry);
btn = elm_button_add(popup);
elm_object_style_set(btn, "bottom");
elm_object_text_set(btn, "OK");
elm_object_part_content_set(popup, "button1", btn);
evas_object_smart_callback_add(btn, "clicked", _response_cb, popup);
evas_object_show(popup);
}