static void alert(const char *text) { Evas_Object *win, *bx, *lb, *bt; win = window; inwin3 = elm_win_inwin_add(win); elm_object_style_set(inwin3, "minimal_vertical"); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, 1.0, 0.0); evas_object_size_hint_align_set(bx, -1.0, -1.0); lb = elm_label_add(win); evas_object_size_hint_weight_set(lb, 1.0, 1.0); evas_object_size_hint_align_set(lb, -1.0, 0.5); elm_label_label_set(lb, text); elm_box_pack_end(bx, lb); evas_object_show(lb); bt = elm_button_add(window); elm_button_label_set(bt, "OK"); evas_object_size_hint_weight_set(bt, 1.0, 0.0); evas_object_size_hint_align_set(bt, -1.0, -1.0); elm_box_pack_end(bx, bt); evas_object_smart_callback_add(bt, "clicked", on_alert_ok, NULL); evas_object_show(bt); elm_win_inwin_content_set(inwin3, bx); evas_object_show(bx); elm_win_inwin_activate(inwin3); }
void utils_edit_object_delete(void *data, Evas_Object *obj, void *event_info) { Evas_Object *lbl, *tb, *bt; _inwin_delete_slide = elm_win_inwin_add(win); evas_object_show(_inwin_delete_slide); elm_object_style_set(_inwin_delete_slide, "minimal"); tb = elm_table_add(win); elm_win_inwin_content_set(_inwin_delete_slide, tb); lbl = elm_label_add(win); elm_object_text_set(lbl, D_("Are you sure you want to delete this object ?")); elm_table_pack(tb, lbl, 0, 2, 2, 1); evas_object_show(lbl); bt= elm_button_add(win); elm_object_text_set(bt, "Invisible button to add a vertical space"); elm_table_pack(tb, bt, 0, 3, 1, 1); bt= elm_button_add(win); elm_object_text_set(bt, D_("Yes, Delete the object")); evas_object_smart_callback_add(bt, "clicked", _utils_object_delete_cb, NULL); evas_object_color_set(bt, 255, 0, 0, 255); elm_table_pack(tb, bt, 0, 4, 1, 1); evas_object_show(bt); bt= elm_button_add(win); elm_object_text_set(bt, D_("No, do not delete the object")); evas_object_smart_callback_add(bt, "clicked", _utils_object_delete_cancel_cb, NULL); elm_table_pack(tb, bt, 1, 4, 1, 1); evas_object_show(bt); }
static void on_to_select(void *data, Evas_Object *obj, void *event_info) { Evas_Object *win, *li, *bx, *bt; Eina_List *l; win = window; inwin = elm_win_inwin_add(win); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, 1.0, 0.0); evas_object_size_hint_align_set(bx, -1.0, -1.0); li = elm_list_add(win); evas_object_size_hint_weight_set(li, 1.0, 1.0); evas_object_size_hint_align_set(li, -1.0, -1.0); elm_box_pack_end(bx, li); for (l = (Eina_List *)data_contacts_all_list(); l; l = l->next) { Data_Contact *ctc = l->data; Evas_Object *ph; char buf[1024]; char *file, *name; if (!ctc->tel.numbers) continue; name = data_contact_name_get(ctc); if (!name) continue; ph = elm_photo_add(win); elm_photo_size_set(ph, 20); file = data_contact_photo_file_get(ctc); if (file) { elm_photo_file_set(ph, file); free(file); } elm_list_item_append(li, name, ph, NULL, on_contact_select, ctc); evas_object_show(ph); free(name); } elm_list_item_append(li, "... Other", NULL, NULL, on_contact_select, NULL); elm_list_go(li); evas_object_show(li); bt = elm_button_add(window); elm_button_label_set(bt, "OK"); evas_object_size_hint_weight_set(bt, 1.0, 0.0); evas_object_size_hint_align_set(bt, -1.0, -1.0); elm_box_pack_end(bx, bt); evas_object_smart_callback_add(bt, "clicked", on_select_ok, NULL); evas_object_show(bt); elm_win_inwin_content_set(inwin, bx); evas_object_show(bx); elm_win_inwin_activate(inwin); }
void utils_edit_area_image_add(void *data, Evas_Object *obj, void *event_info) { if(eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_CUSTOM_AREA && eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_THEME_AREA) return ; Evas_Object *inwin, *fs, *fr; setlocale(LC_ALL, ""); inwin = elm_win_inwin_add(win); evas_object_show(inwin); fr = elm_frame_add(inwin); elm_win_inwin_content_set(inwin, fr); elm_object_text_set(fr, D_("Select an image")); fs = elm_fileselector_add(win); elm_fileselector_expandable_set(fs, EINA_FALSE); elm_fileselector_path_set(fs, getenv("HOME")); evas_object_size_hint_weight_set(fs, 1.0, 1.0); elm_object_content_set(fr, fs); evas_object_show(fs); evas_object_smart_callback_add(fs, "done", _utils_edit_area_image_add_cb, inwin); }
void utils_edit_image_file_change(void *data, Evas_Object *obj, void *event_info) { if(eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_IMAGE) return ; Evas_Object *inwin, *fs; setlocale(LC_ALL, ""); inwin = elm_win_inwin_add(win); evas_object_show(inwin); fs = elm_fileselector_add(win); elm_fileselector_expandable_set(fs, EINA_FALSE); /* start the fileselector in the home dir */ elm_fileselector_path_set(fs, getenv("HOME")); /* allow fs to expand in x & y */ evas_object_size_hint_weight_set(fs, 1.0, 1.0); elm_win_resize_object_add(win, fs); evas_object_show(fs); /* the 'done' cb is called when the user press ok/cancel */ evas_object_smart_callback_add(fs, "done", _utils_edit_image_file_change_cb, inwin); elm_win_inwin_content_set(inwin, fs); }
void ui_file_open_save_dialog_open(Evas_Object *parent, Evas_Smart_Cb func, Eina_Bool save) { Evas_Object *fs; inwin = elm_win_inwin_add(parent); evas_object_show(inwin); fs = elm_fileselector_add(inwin); elm_fileselector_is_save_set(fs, save); elm_fileselector_expandable_set(fs, EINA_FALSE); elm_fileselector_path_set(fs, getenv("HOME")); elm_win_inwin_content_set(inwin, fs); evas_object_show(fs); evas_object_smart_callback_add(fs, "done", _cleaning_cb, func); }
EAPI_MAIN int elm_main(int argc, char **argv) { Evas_Object *win = NULL; Evas_Object *bg = NULL; Evas_Object *inwin = NULL; Evas_Object *content = NULL; win = elm_win_add(NULL, "Main Window", ELM_WIN_BASIC); elm_win_title_set(win, "inwin"); elm_win_autodel_set(win, EINA_TRUE); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bg); inwin = elm_win_inwin_add(win); evas_object_size_hint_weight_set(inwin, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, inwin); content = elm_label_add(win); elm_object_text_set(content, "inwin content"); elm_win_inwin_content_set(inwin, content); evas_object_smart_callback_add(win, "focus,in", _register_cb, inwin); register_request_listener(EVENT_SET_ENABLED, set_enabled, inwin); register_request_listener(EVENT_SET_DISABLED, set_disabled, inwin); register_request_listener(EVENT_HIDE, hide, inwin); register_request_listener(EVENT_SHOW, show, inwin); evas_object_resize(win, 240, 120); evas_object_show(win); evas_object_show(bg); elm_win_inwin_activate(inwin); elm_run(); request_shutdown(); elm_shutdown(); return 0; }
void show_curl_error(CURLcode curl_res, MemoryStruct * chunk) { Evas_Object *box=NULL, *frame=NULL, *label=NULL, *button=NULL; int res=0; char *buf=NULL; /* Error Window */ error_win = elm_win_inwin_add(gui.win); /* Vertical Box */ box = elm_box_add(gui.win); evas_object_size_hint_weight_set(box, 1, 1); evas_object_size_hint_align_set(box, -1, -1); evas_object_show(box); /* Frame (with message) */ frame = elm_frame_add(gui.win); elm_object_text_set(frame, chunk->memory); res = asprintf(&buf, "%d: %s", curl_res, error_buf); if(res != -1) { label = elm_label_add(gui.win); elm_label_line_wrap_set(label, TRUE); elm_object_text_set(label, buf); elm_frame_content_set(frame, label); evas_object_show(label); } if(buf) free(buf); elm_box_pack_end(box, frame); evas_object_show(frame); /* close button */ button = elm_button_add(gui.win); evas_object_smart_callback_add(button, "clicked", error_win_del, NULL); elm_object_text_set(button, _("Close")); elm_box_pack_end(box, button); evas_object_show(button); evas_object_show(box); elm_win_inwin_content_set(error_win, box); evas_object_show(error_win); }
Evas_Object * flickr_sync_new(Evas_Object *win, Enlil_Album *album) { Evas_Object *inwin, *pb, *bt, *tb; Enlil_Album_Data *album_data = enlil_album_user_data_get(album); //create inwin & file selector inwin = elm_win_inwin_add(win); album_data->netsync.inwin.win = inwin; elm_object_style_set(inwin, "minimal"); evas_object_show(inwin); tb = elm_table_add(inwin); album_data->netsync.inwin.tb = tb; evas_object_size_hint_weight_set(tb, 1.0, 1.0); evas_object_size_hint_align_set(tb, 1.0, 1.0); evas_object_show(tb); elm_win_inwin_content_set(inwin, tb); bt = elm_button_add(inwin); elm_object_text_set(bt, D_("Close")); evas_object_size_hint_align_set(bt, 1.0, 0.5); evas_object_smart_callback_add(bt, "clicked", _close_cb, album); evas_object_show(bt); elm_table_pack(tb, bt, 1, 1, 1, 1); pb = elm_progressbar_add(inwin); album_data->netsync.inwin.pb = pb; evas_object_size_hint_align_set(pb, 0.5, 0.5); evas_object_size_hint_weight_set(pb, 1.0, 0.0); elm_progressbar_pulse_set(pb, EINA_TRUE); elm_object_text_set(pb, D_("Synchronising ...")); evas_object_hide(pb); elm_table_pack(tb, pb, 0, 1, 1, 1); flickr_sync_update(album); return inwin; }
void utils_edit_area_delete(void *data, Evas_Object *obj, void *event_info) { Evas_Object *lbl, *tb, *bt; if(eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_CUSTOM_AREA && eyelight_edit_name_get(_current_obj) != EYELIGHT_NAME_THEME_AREA) return ; _inwin_delete_slide = elm_win_inwin_add(win); evas_object_show(_inwin_delete_slide); elm_object_style_set(_inwin_delete_slide, "minimal"); tb = elm_table_add(win); elm_win_inwin_content_set(_inwin_delete_slide, tb); lbl = elm_label_add(win); elm_object_text_set(lbl, D_("Are you sure you want to delete this area ?")); elm_table_pack(tb, lbl, 0, 2, 2, 1); evas_object_show(lbl); bt= elm_button_add(win); elm_object_text_set(bt, "Invisible button to add a vertical space"); elm_table_pack(tb, bt, 0, 3, 1, 1); bt= elm_button_add(win); elm_object_text_set(bt, D_("Yes, Delete the area")); evas_object_smart_callback_add(bt, "clicked", _utils_area_delete_cb, NULL); evas_object_color_set(bt, 255, 0, 0, 255); elm_table_pack(tb, bt, 0, 4, 1, 1); evas_object_show(bt); bt= elm_button_add(win); elm_object_text_set(bt, D_("No, do not delete the area")); evas_object_smart_callback_add(bt, "clicked", _utils_area_delete_cancel_cb, NULL); elm_table_pack(tb, bt, 1, 4, 1, 1); evas_object_show(bt); }
static void on_contact_select(void *data, Evas_Object *obj, void *event_info) { Data_Contact *ctc = data; if (!ctc) { Evas_Object *win, *bx, *bt, *sc, *en; win = window; inwin2 = elm_win_inwin_add(win); elm_object_style_set(inwin2, "minimal_vertical"); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, 1.0, 0.0); evas_object_size_hint_align_set(bx, -1.0, -1.0); sc = elm_scroller_add(win); elm_scroller_content_min_limit(sc, 0, 1); evas_object_size_hint_weight_set(sc, 1.0, 1.0); evas_object_size_hint_align_set(sc, -1.0, 0.5); elm_box_pack_end(bx, sc); en = elm_entry_add(win); elm_entry_single_line_set(en, 1); elm_entry_entry_set(en, "Enter number..."); evas_object_size_hint_weight_set(en, 1.0, 0.0); evas_object_size_hint_align_set(en, -1.0, 0.0); elm_entry_select_all(en); elm_scroller_content_set(sc, en); evas_object_show(en); evas_object_show(sc); number_entry = en; bt = elm_button_add(window); elm_button_label_set(bt, "OK"); evas_object_size_hint_weight_set(bt, 1.0, 0.0); evas_object_size_hint_align_set(bt, -1.0, -1.0); elm_box_pack_end(bx, bt); evas_object_smart_callback_add(bt, "clicked", on_number_ok, NULL); evas_object_show(bt); elm_win_inwin_content_set(inwin2, bx); evas_object_show(bx); elm_win_inwin_activate(inwin2); elm_object_focus(en); } else if (eina_list_count(ctc->tel.numbers) > 1) { Evas_Object *win, *bx, *bx2, *bt, *li, *fr, *ph, *lb; Eina_List *l; char *name, *file; win = window; inwin2 = elm_win_inwin_add(win); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, 1.0, 0.0); evas_object_size_hint_align_set(bx, -1.0, -1.0); fr = elm_frame_add(win); name = data_contact_name_get(ctc); if (name) { elm_label_label_set(write_lb, name); elm_frame_label_set(fr, name); free(name); } evas_object_size_hint_weight_set(fr, 1.0, 0.0); evas_object_size_hint_align_set(fr, -1.0, -1.0); elm_box_pack_end(bx, fr); evas_object_show(fr); bx2 = elm_box_add(win); elm_box_horizontal_set(bx2, 1); elm_frame_content_set(fr, bx2); evas_object_show(bx2); ph = elm_photo_add(win); file = data_contact_photo_file_get(ctc); if (file) { elm_photo_file_set(write_ph, file); elm_photo_file_set(ph, file); free(file); } evas_object_size_hint_weight_set(ph, 0.0, 0.0); evas_object_size_hint_align_set(ph, -1.0, -1.0); elm_box_pack_end(bx2, ph); evas_object_show(ph); lb = elm_label_add(win); elm_label_label_set(lb, "This contact has multiple<br>" "numbers. Select one."); evas_object_size_hint_weight_set(lb, 1.0, 0.0); evas_object_size_hint_align_set(lb, -1.0, -1.0); elm_box_pack_end(bx2, lb); evas_object_show(lb); li = elm_list_add(win); evas_object_size_hint_weight_set(li, 1.0, 1.0); evas_object_size_hint_align_set(li, -1.0, -1.0); elm_box_pack_end(bx, li); for (l = (Eina_List *)(ctc->tel.numbers); l; l = l->next) { Data_Contact_Tel *tel = l->data; // FIXME: // tel->flags can be 0 or more of: // DATA_CONTACT_TEL_HOME = (1 << 0), // DATA_CONTACT_TEL_MSG = (1 << 1), // DATA_CONTACT_TEL_WORK = (1 << 2), // DATA_CONTACT_TEL_PREF = (1 << 3), // DATA_CONTACT_TEL_VOICE = (1 << 4), // DATA_CONTACT_TEL_FAX = (1 << 5), // DATA_CONTACT_TEL_CELL = (1 << 6), // DATA_CONTACT_TEL_VIDEO = (1 << 7), // DATA_CONTACT_TEL_PAGER = (1 << 8), // DATA_CONTACT_TEL_BBS = (1 << 9), // DATA_CONTACT_TEL_MODEM = (1 << 10), // DATA_CONTACT_TEL_CAR = (1 << 11), // DATA_CONTACT_TEL_ISDN = (1 << 12), // DATA_CONTACT_TEL_PCS = (1 << 13) elm_list_item_append(li, tel->number, NULL, NULL, on_number_select, tel); } elm_list_go(li); evas_object_show(li); bt = elm_button_add(window); elm_button_label_set(bt, "OK"); evas_object_size_hint_weight_set(bt, 1.0, 0.0); evas_object_size_hint_align_set(bt, -1.0, -1.0); elm_box_pack_end(bx, bt); evas_object_smart_callback_add(bt, "clicked", on_number_list_ok, NULL); evas_object_show(bt); elm_win_inwin_content_set(inwin2, bx); evas_object_show(bx); elm_win_inwin_activate(inwin2); } else { Data_Contact_Tel *tel; char *name, *file; tel = ctc->tel.numbers->data; if (number) free(number); number = strdup(tel->number); elm_label_label_set(write_lb, number); name = data_contact_name_get(ctc); if (name) { elm_label_label_set(write_lb, name); free(name); } file = data_contact_photo_file_get(ctc); if (file) { elm_photo_file_set(write_ph, file); free(file); } } }
void utils_slide_delete(List_Item *item) { int i = 0; Eina_List *l; List_Item *_item; EINA_LIST_FOREACH(l_slides, l, _item) { if(item == _item) break; else i++; } Evas_Object *lbl, *tb, *bt, *icon; char buf[PATH_MAX]; snprintf(buf, sizeof(buf), "%s/theme.edj", PACKAGE_DATA_DIR); _inwin_delete_slide = elm_win_inwin_add(win); evas_object_show(_inwin_delete_slide); elm_object_style_set(_inwin_delete_slide, "minimal"); tb = elm_table_add(win); elm_win_inwin_content_set(_inwin_delete_slide, tb); //icon icon = edje_object_add(evas_object_evas_get(win)); edje_object_file_set(icon, buf, "list/slides/icon"); evas_object_size_hint_min_set(icon,1024*0.20,768*0.20); evas_object_size_hint_max_set(icon,1024*0.20,768*0.20); if(item->thumb) { int w = item->thumb->w; int h = item->thumb->h; int *image = calloc(w*h, sizeof(int)); memcpy(image, item->thumb->thumb, sizeof(int)*w*h); const Evas_Object *o_image = edje_object_part_object_get(icon, "object.icon"); evas_object_image_filled_set((Evas_Object*)o_image,1); evas_object_color_set((Evas_Object*)o_image,255,255,255,255); evas_object_image_size_set((Evas_Object*)o_image, w, h); evas_object_image_data_set((Evas_Object*)o_image, image); edje_object_signal_emit(icon, "icon,show", "eyelight"); } evas_object_show(icon); elm_table_pack(tb, icon, 0, 0, 2, 1); // bt= elm_button_add(win); elm_object_text_set(bt, "Invisible button to add a vertical space"); elm_table_pack(tb, bt, 0, 1, 1, 1); lbl = elm_label_add(win); elm_object_text_set(lbl, D_("Are you sure you want to delete this slide ?")); elm_table_pack(tb, lbl, 0, 2, 2, 1); evas_object_show(lbl); bt= elm_button_add(win); elm_object_text_set(bt, "Invisible button to add a vertical space"); elm_table_pack(tb, bt, 0, 3, 1, 1); bt= elm_button_add(win); elm_object_text_set(bt, D_("Yes, Delete the slide")); evas_object_smart_callback_add(bt, "clicked", _utils_slide_delete_cb, item); evas_object_color_set(bt, 255, 0, 0, 255); elm_table_pack(tb, bt, 0, 4, 1, 1); evas_object_show(bt); bt= elm_button_add(win); elm_object_text_set(bt, D_("No, do not delete the slide")); evas_object_smart_callback_add(bt, "clicked", _utils_slide_delete_cancel_cb, item); elm_table_pack(tb, bt, 1, 4, 1, 1); evas_object_show(bt); }
void create_cat_dialog(void *data, Evas_Object *obj, void *event_info) { Evas_Object *bg, *inwin, *lb, *bt, *bt1, *entry, *vbox, *hbox, *hbox1; cat_dialog = elm_win_add(NULL, "inwin", ELM_WIN_DIALOG_BASIC); elm_win_title_set(cat_dialog, "Add Category"); elm_win_autodel_set(cat_dialog, 1); bg = elm_bg_add(cat_dialog); elm_win_resize_object_add(cat_dialog, bg); evas_object_size_hint_weight_set(bg, 1.0, 1.0); evas_object_show(bg); inwin = elm_win_inwin_add(cat_dialog); elm_object_style_set(inwin, "minimal_vertical"); //add vbox vbox = elm_box_add(cat_dialog); elm_win_resize_object_add(cat_dialog, vbox); evas_object_size_hint_weight_set(vbox, 1.0, 1.0); elm_object_content_set(inwin, vbox); evas_object_show(vbox); //add hbox to vbox hbox = elm_box_add(cat_dialog); elm_box_horizontal_set(hbox, 1); evas_object_size_hint_weight_set(hbox, 1.0, 0.0); evas_object_size_hint_align_set(hbox, -1.0, 0.0); elm_box_pack_end(vbox, hbox); evas_object_show(hbox); //add a label to hbox lb = elm_label_add(cat_dialog); elm_object_text_set(lb,"Category:"); elm_box_pack_end(hbox, lb); evas_object_show(lb); //add an entry to hbox entry = elm_entry_add(cat_dialog); //evas_object_size_hint_weight_set(entry, 1.0, 0.0); //evas_object_size_hint_align_set(entry, -1.0, 0.0); elm_entry_entry_set(entry, "New Cat"); elm_entry_single_line_set(entry, 1); elm_entry_editable_set(entry, 1); elm_entry_line_wrap_set(entry, 0); elm_box_pack_end(hbox, entry); evas_object_show(entry); //add another hbox hbox1 = elm_box_add(cat_dialog); elm_box_horizontal_set(hbox1, 1); elm_box_homogeneous_set(hbox1, 1); elm_box_pack_end(vbox, hbox1); evas_object_show(hbox1); //add yes button bt = elm_button_add(cat_dialog); elm_object_text_set(bt, "Add"); evas_object_size_hint_align_set(bt, -1.0, -1.0); elm_box_pack_end(hbox1, bt); evas_object_show(bt); evas_object_smart_callback_add(bt, "clicked", cat_dialog_add, entry); //add close button bt1 = elm_button_add(cat_dialog); elm_object_text_set(bt1, "Cancel"); elm_box_pack_end(hbox1, bt1); evas_object_show(bt1); evas_object_smart_callback_add(bt1, "clicked", cat_win_del, cat_dialog); evas_object_show(inwin); evas_object_resize(cat_dialog, 480, 640); evas_object_show(cat_dialog); }
static void _account_set_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *fr, *tb, *inwin, *lbl, *sc, *text, *bt, *hbox, *img, *entry; char buf[PATH_MAX]; inwin = elm_win_inwin_add(enlil_data->win->win); set_account.inwin = inwin; evas_object_show(inwin); fr = elm_frame_add(enlil_data->win->win); elm_frame_label_set(fr, D_("Set the Flick account.")); evas_object_size_hint_weight_set(fr, 1.0, 1.0); evas_object_size_hint_align_set(fr, 0.0, 0.0); evas_object_show(fr); tb = elm_table_add(enlil_data->win->win); elm_table_padding_set(tb, 10, 10); evas_object_size_hint_weight_set(tb, 1.0, 1.0); evas_object_size_hint_align_set(tb, -1.0, -1.0); evas_object_show(tb); //steps lbl = elm_label_add(enlil_data->win->win); elm_label_label_set( lbl, D_("<b>STEP 1 :</b> Open the web page in your favorite web browser.")); evas_object_size_hint_weight_set(lbl, 0.0, 0.0); evas_object_size_hint_align_set(lbl, -1.0, 0.0); evas_object_show(lbl); elm_table_pack(tb, lbl, 0, 0, 2, 1); entry = elm_scrolled_entry_add(enlil_data->win->win); elm_scrolled_entry_single_line_set(entry, EINA_TRUE); elm_scrolled_entry_entry_set(entry, enlil_flickr_auth_url_get()); evas_object_size_hint_weight_set(entry, 1.0, 0.0); evas_object_size_hint_align_set(entry, -1.0, 0.0); evas_object_show(entry); elm_table_pack(tb, entry, 0, 1, 2, 1); img = elm_image_add(obj); elm_image_file_set(img, Theme, "flickr/set_account_0"); evas_object_size_hint_weight_set(img, 1.0, 1.0); evas_object_size_hint_align_set(img, -1.0, -1.0); evas_object_show(img); elm_table_pack(tb, img, 0, 2, 2, 1); snprintf( buf, PATH_MAX, D_("<b>STEP 2 :</b> Authorize Enki to access to your account.")); lbl = elm_label_add(enlil_data->win->win); elm_label_label_set(lbl, buf); evas_object_size_hint_weight_set(lbl, 0.0, 0.0); evas_object_size_hint_align_set(lbl, -1.0, 0.0); evas_object_show(lbl); elm_table_pack(tb, lbl, 0, 3, 2, 1); img = elm_image_add(obj); elm_image_file_set(img, Theme, "flickr/set_account_1"); evas_object_size_hint_weight_set(img, 0.0, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(img, -1.0, -1.0); evas_object_show(img); elm_table_pack(tb, img, 0, 4, 2, 1); snprintf( buf, PATH_MAX, D_("<b>STEP 3 :</b> Copy the code in the followed text area.")); lbl = elm_label_add(enlil_data->win->win); elm_label_label_set(lbl, buf); evas_object_size_hint_weight_set(lbl, 0.0, 0.0); evas_object_size_hint_align_set(lbl, -1.0, 0.0); evas_object_show(lbl); elm_table_pack(tb, lbl, 0, 5, 2, 1); // lbl = elm_label_add(enlil_data->win->win); elm_label_label_set(lbl, D_("The 9-digit code : ")); evas_object_size_hint_weight_set(lbl, 0.0, 0.0); evas_object_size_hint_align_set(lbl, -1.0, 0.0); evas_object_show(lbl); elm_table_pack(tb, lbl, 0, 6, 1, 1); sc = elm_scroller_add(enlil_data->win->win); evas_object_size_hint_weight_set(sc, 1.0, 0.0); evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_scroller_content_min_limit(sc, EINA_FALSE, EINA_TRUE); elm_scroller_policy_set(sc, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); elm_scroller_bounce_set(sc, 0, 0); evas_object_show(sc); elm_table_pack(tb, sc, 1, 6, 1, 1); text = elm_entry_add(enlil_data->win->win); set_account.entry = text; elm_entry_entry_set(text, ""); elm_entry_single_line_set(text, 1); evas_object_size_hint_weight_set(text, EVAS_HINT_EXPAND, 1.0); evas_object_size_hint_align_set(text, 1.0, 0.5); elm_scroller_content_set(sc, text); evas_object_show(text); hbox = elm_box_add(enlil_data->win->win); elm_box_horizontal_set(hbox, 1); evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(hbox, 1.0, 0.0); evas_object_show(hbox); elm_table_pack(tb, hbox, 1, 7, 1, 1); bt = elm_button_add(enlil_data->win->win); elm_button_label_set(bt, D_("Cancel")); evas_object_smart_callback_add(bt, "clicked", _account_set_cancel_cb, NULL); evas_object_size_hint_align_set(bt, 1.0, 0.0); evas_object_show(bt); elm_box_pack_end(hbox, bt); bt = elm_button_add(enlil_data->win->win); elm_button_label_set(bt, D_("Apply")); evas_object_smart_callback_add(bt, "clicked", _account_set_apply_cb, text); evas_object_size_hint_align_set(bt, 1.0, 0.0); evas_object_show(bt); elm_box_pack_end(hbox, bt); elm_object_disabled_set(bt, EINA_TRUE); evas_object_smart_callback_add(text, "changed", _account_set_entry_changed_cb, bt); elm_frame_content_set(fr, tb); elm_win_inwin_content_set(inwin, fr); }
PREFIX value ml_elm_win_inwin_add(value v_parent) { Evas_Object* obj = elm_win_inwin_add(Evas_Object_val(v_parent)); if(obj == NULL) caml_failwith("elm_win_inwin_add"); return copy_Evas_Object(obj); }
PREFIX value ml_elm_win_inwin_add(value v_parent) { Evas_Object* obj = elm_win_inwin_add((Evas_Object*) v_parent); if(obj == NULL) caml_failwith("elm_win_inwin_add"); return (value) obj; }