3 static void _e_test_internal(E_Container *con);
12 EINA_LIST_FOREACH(e_manager_list(), l, man)
14 EINA_LIST_FOREACH(man->containers, ll, con)
16 _e_test_internal(con);
23 _e_test_timer(void *data)
26 Eina_List *managers, *l;
33 e_object_del(E_OBJECT(m));
34 ecore_timer_add(0.05, _e_test_timer, NULL);
37 managers = e_manager_list();
38 EINA_LIST_FOREACH(managers, l, man)
40 m = e_int_menus_main_new();
41 e_menu_activate_mouse(m,
42 e_container_zone_number_get(e_container_current_get(man), 0),
43 0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
44 ecore_timer_add(0.05, _e_test_timer, m);
51 _e_test_internal(E_Container *con)
57 _e_test_resize(E_Win *win)
62 printf("RESIZE %i %i\n", win->w, win->h);
63 evas_object_resize(o, win->w, win->h);
64 evas_object_color_set(o, rand() & 0xff, rand() & 0xff, rand() & 0xff, 255);
68 _e_test_delete(E_Win *win)
71 e_object_del(E_OBJECT(win));
75 _e_test_internal(E_Container *con)
81 e_win_resize_callback_set(win, _e_test_resize);
82 e_win_delete_callback_set(win, _e_test_delete);
83 e_win_placed_set(win, 0);
84 e_win_move_resize(win, 10, 80, 400, 200);
85 e_win_name_class_set(win, "E", "_test_window");
86 e_win_title_set(win, "A test window");
90 o = evas_object_rectangle_add(e_win_evas_get(win));
91 evas_object_color_set(o, 255, 200, 100, 255);
92 evas_object_resize(o, 400, 200);
99 _e_test_timer(void *data)
105 ecore_x_pointer_warp(m->evas_win, 20, y);
107 if (y > m->cur.h) y = 0;
112 _e_test_internal(E_Container *con)
118 EINA_LIST_FOREACH(e_manager_list(), l, man)
120 m = e_int_menus_main_new();
121 e_menu_activate_mouse(m,
122 e_container_zone_number_get(e_container_current_get(man), 0),
123 0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
124 ecore_timer_add(0.02, _e_test_timer, m);
129 _e_test_dialog_del(void *obj)
134 printf("dialog delete hook!\n");
138 _e_test_internal(E_Container *con)
142 dia = e_dialog_new(con, "E", "_test");
143 e_object_del_attach_func_set(E_OBJECT(dia), _e_test_dialog_del);
144 e_dialog_title_set(dia, "A Test Dialog");
145 e_dialog_text_set(dia, "A Test Dialog<br>And another line<br><hilight>Hilighted Text</hilight>");
146 e_dialog_icon_set(dia, "preference-plugin", 64);
147 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
148 e_dialog_button_add(dia, "Apply", "system-restart", NULL, NULL);
149 e_dialog_button_add(dia, "Cancel", "application-exit", NULL, NULL);
150 e_win_centered_set(dia->win, 1);
155 _e_test_click(void *data, Evas *e, Evas_Object *obj, void *event_info)
160 size = (double)(rand() % 1000) / 999;
161 evas_object_resize(obj, size * 1024, size * 768);
163 e_scrollframe_child_region_show(data, 1024, 768, 100, 100);
168 _e_test_internal(E_Container *con)
171 Evas_Object *o, *o2, *o3;
173 dia = e_dialog_new(con, "E", "_test");
174 e_dialog_title_set(dia, "A Test Dialog");
176 o = e_icon_add(dia->win->evas);
177 e_icon_file_set(o, "/home/raster/scroll.png");
178 evas_object_resize(o, 1024, 768);
179 evas_object_focus_set(o, 1);
182 o2 = e_scrollframe_add(dia->win->evas);
183 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_test_click, o2);
184 // e_scrollframe_custom_theme_set(o2, "base/theme/widgets", "e/widgets/scrollframe");
185 evas_object_show(o2);
187 o3 = e_pan_add(dia->win->evas);
188 e_pan_child_set(o3, o);
189 e_scrollframe_extern_pan_set(o2, o3, e_pan_set, e_pan_get, e_pan_max_get, e_pan_child_size_get);
191 e_scrollframe_child_set(o2, o);
194 e_dialog_content_set(dia, o2, 500, 300);
195 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
196 e_win_centered_set(dia->win, 1);
199 evas_object_focus_set(o, 1);
203 _e_test_dia(E_Container *con)
205 E_Config_Dialog *dia;
207 dia = e_int_config_modules(con);
211 static E_Container *tcon = NULL;
214 _e_test_timer(void *data)
216 E_Config_Dialog *dia;
220 dia = _e_test_dia(tcon);
221 ecore_timer_add(0.2, _e_test_timer, dia);
226 e_object_del(E_OBJECT(dia));
227 ecore_timer_add(0.2, _e_test_timer, NULL);
233 _e_test_internal(E_Container *con)
242 Evas_Object *ilist, *scrollframe;
245 static struct _tmp tmp = {NULL, NULL};
248 _e_test_sel(void *data, void *data2)
250 Evas_Coord x, y, w, h;
252 e_ilist_selected_geometry_get(tmp.ilist, &x, &y, &w, &h);
253 e_scrollframe_child_region_show(tmp.scrollframe, x, y, w, h);
257 _e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
259 Evas_Coord mw, mh, vw, vh, w, h;
261 e_scrollframe_child_viewport_size_get(obj, &vw, &vh);
262 e_ilist_size_min_get(data, &mw, &mh);
263 evas_object_geometry_get(data, NULL, NULL, &w, &h);
266 if (w != vw) evas_object_resize(data, vw, h);
271 _e_test_internal(E_Container *con)
274 Evas_Coord mw, mh, vw, vh;
275 Evas_Object *o, *o2, *o3, *o4;
277 dia = e_dialog_new(con, "E", "_test");
278 e_dialog_title_set(dia, "A Test Dialog");
280 o = e_ilist_add(dia->win->evas);
281 e_ilist_icon_size_set(o, 80, 48);
283 o3 = e_livethumb_add(dia->win->evas);
284 e_livethumb_vsize_set(o3, 160, 96);
285 o4 = edje_object_add(e_livethumb_evas_get(o3));
286 e_theme_edje_object_set(o4, "base/theme/borders",
287 "e/widgets/border/default/border");
288 e_livethumb_thumb_set(o3, o4);
289 e_ilist_append(o, o3, "Item 1", 0, _e_test_sel, NULL, NULL, NULL);
291 o3 = e_icon_add(dia->win->evas);
292 e_icon_file_set(o3, "/home/raster/C/stuff/icons/palette.png");
293 e_ilist_append(o, o3, "Item 2 (Some really long text goes here for testing)", 0, _e_test_sel, NULL, NULL, NULL);
295 o3 = e_icon_add(dia->win->evas);
296 e_icon_file_set(o3, "/home/raster/C/stuff/icons/mozilla.png");
297 e_ilist_append(o, o3, "Item 3 (Medium length)", 0, _e_test_sel, NULL, NULL, NULL);
299 o3 = e_icon_add(dia->win->evas);
300 e_icon_file_set(o3, "/home/raster/C/stuff/icons/trash_open.png");
301 e_ilist_append(o, o3, "Item POOP", 0, _e_test_sel, NULL, NULL, NULL);
303 o3 = e_icon_add(dia->win->evas);
304 e_icon_file_set(o3, "/home/raster/C/stuff/icons/watch.png");
305 e_ilist_append(o, o3, "Item BLING BLING", 0, _e_test_sel, NULL, NULL, NULL);
307 o3 = e_icon_add(dia->win->evas);
308 e_icon_file_set(o3, "/home/raster/C/stuff/icons/quake3.png");
309 e_ilist_append(o, o3, "Sukebelinth", 0, _e_test_sel, NULL, NULL, NULL);
311 o3 = e_icon_add(dia->win->evas);
312 e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
313 e_ilist_append(o, o3, "A header", 1, NULL, NULL, NULL, NULL);
315 o3 = e_icon_add(dia->win->evas);
316 e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
317 e_ilist_append(o, o3, "Panties", 0, _e_test_sel, NULL, NULL, NULL);
319 o3 = e_icon_add(dia->win->evas);
320 e_icon_file_set(o3, "/home/raster/C/stuff/icons/drawer_open.png");
321 e_ilist_append(o, o3, "Flimbert the cagey", 0, _e_test_sel, NULL, NULL, NULL);
323 o3 = e_icon_add(dia->win->evas);
324 e_icon_file_set(o3, "/home/raster/C/stuff/icons/cd.png");
325 e_ilist_append(o, o3, "Norbert", 0, _e_test_sel, NULL, NULL, NULL);
327 e_ilist_size_min_get(o, &mw, &mh);
328 evas_object_resize(o, mw, mh);
329 evas_object_focus_set(o, 1);
332 o2 = e_scrollframe_add(dia->win->evas);
333 evas_object_event_callback_add(o2, EVAS_CALLBACK_RESIZE, _e_test_resize, o);
334 evas_object_resize(o2, mw, 150);
335 evas_object_show(o2);
336 e_scrollframe_child_set(o2, o);
338 e_scrollframe_child_viewport_size_get(o2, &vw, &vh);
339 e_dialog_content_set(dia, o2, 200, 150);
340 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
341 e_win_centered_set(dia->win, 1);
342 e_dialog_resizable_set(dia, 1);
346 tmp.scrollframe = o2;
348 evas_object_focus_set(o, 1);
352 _e_test_cb_e_smart_pan_changed_hook(void *data, Evas_Object *obj, void *event_info)
354 printf("VAL: %3.3f\n", e_slider_value_get(obj));
358 _e_test_internal(E_Container *con)
364 dia = e_dialog_new(con, "E", "_test");
365 e_dialog_title_set(dia, "A Test Dialog");
367 o = e_slider_add(dia->win->evas);
368 e_slider_orientation_set(o, 1);
369 e_slider_value_set(o, 0.5);
370 e_slider_value_step_count_set(o, 4);
371 e_slider_value_format_display_set(o, "%1.2f V");
372 e_slider_size_min_get(o, &mw, &mh);
373 evas_object_smart_callback_add(o, "changed", _e_test_cb_e_smart_pan_changed_hook, NULL);
376 e_dialog_content_set(dia, o, 240 + mw, mh);
378 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
379 e_win_centered_set(dia->win, 1);
382 evas_object_focus_set(o, 1);
386 _e_test_internal(E_Container *con)
392 dia = e_dialog_new(con, "E", "_test");
393 e_dialog_title_set(dia, "A Test Dialog");
395 o = e_widget_textblock_add(dia->win->evas);
397 e_widget_textblock_markup_set(o,
398 "<title>A title</title>"
399 "This is some text<br>"
401 "<hilight>hilighted text</hilight><br>"
403 "More lines of text<br>"
404 "And yet more lines of text<br>"
405 "A very very long line of text that SHOULD be getting word wrapped because it is so long.<br>"
406 "And another line<br>"
408 "Smelly fish on a stick<br>"
412 e_widget_textblock_plain_set(o,
413 "And here is some plaintext\n"
414 "with some newlines & other special characters\n"
415 "that should get escaped like < and >.\n"
417 "\tTabs should become 8 spaces too.\n"
422 e_dialog_content_set(dia, o, 160, 160);
424 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
425 e_win_centered_set(dia->win, 1);
428 evas_object_focus_set(o, 1);
432 _e_test_cb_button(void *data1, void *data2)
434 e_fm2_parent_go(data1);
438 _e_test_cb_changed(void *data, Evas_Object *obj, void *event_info)
440 if (!e_fm2_has_parent_get(obj)) e_widget_disabled_set(data, 1);
441 else e_widget_disabled_set(data, 0);
445 _e_test_cb_favorites_selected(void *data, Evas_Object *obj, void *event_info)
448 E_Fm2_Icon_Info *ici;
450 printf("FAV SELECTED\n");
451 selected = e_fm2_selected_list_get(obj);
452 if (!selected) return;
453 ici = eina_list_data_get(selected);
454 if ((ici->link) && (ici->mount))
455 e_fm2_path_set(data, ici->link, "/");
457 e_fm2_path_set(data, NULL, ici->link);
458 // FIXME: this should happen on the scrollframe not the fm obj
459 // e_widget_scrollframe_child_pos_set(data, 0, 0);
460 eina_list_free(selected);
464 _e_test_cb_favorites_files_changed(void *data, Evas_Object *obj, void *event_info)
466 Eina_List *icons, *l;
467 E_Fm2_Icon_Info *ici;
468 const char *realpath;
471 printf("FAV LIST CHANGE!\n");
472 icons = e_fm2_all_list_get(obj);
474 realpath = e_fm2_real_path_get(data);
475 p1 = ecore_file_realpath(realpath);
477 EINA_LIST_FOREACH(icons, l, ici)
481 p2 = ecore_file_realpath(ici->link);
484 e_fm2_select_set(obj, ici->file);
493 eina_list_free(icons);
497 _e_test_cb_selected(void *data, Evas_Object *obj, void *event_info)
499 printf("SELECTED!\n");
503 _e_test_internal(E_Container *con)
506 Evas_Object *ofm, *ofm2, *of, *ob, *ot;
510 dia = e_dialog_new(con, "E", "_test");
511 e_dialog_title_set(dia, "A Test Dialog");
513 /* a table for layout */
514 ot = e_widget_table_add(dia->win->evas, 0);
517 ofm = e_fm2_add(dia->win->evas);
519 memset(&fmc, 0, sizeof(E_Fm2_Config));
520 fmc.view.mode = E_FM2_VIEW_MODE_LIST;
521 fmc.view.open_dirs_in_place = 1;
522 fmc.view.selector = 1;
523 fmc.view.single_click = 0;
524 fmc.view.no_subdir_jump = 0;
525 fmc.icon.list.w = 24;
526 fmc.icon.list.h = 24;
527 fmc.icon.fixed.w = 1;
528 fmc.icon.fixed.h = 1;
529 fmc.icon.extension.show = 0;
530 fmc.icon.key_hint = NULL;
531 fmc.list.sort.no_case = 1;
532 fmc.list.sort.dirs.first = 1;
533 fmc.list.sort.dirs.last = 0;
534 fmc.selection.single = 1;
535 fmc.selection.windows_modifiers = 0;
536 e_fm2_config_set(ofm, &fmc);
538 e_fm2_path_set(ofm, "~/", "/");
539 ob = e_widget_button_add(dia->win->evas, "Up a directory", NULL,
540 _e_test_cb_button, ofm, NULL);
541 e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 0, 0, 1, 0);
542 evas_object_show(ob);
543 evas_object_smart_callback_add(ofm, "changed", _e_test_cb_changed, ob);
544 evas_object_smart_callback_add(ofm, "selected", _e_test_cb_selected, NULL);
545 of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
546 e_fm2_pan_set, e_fm2_pan_get,
547 e_fm2_pan_max_get, e_fm2_pan_child_size_get);
548 e_widget_size_min_set(of, 128, 128);
549 e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
550 evas_object_show(ofm);
551 evas_object_show(of);
556 ofm = e_fm2_add(dia->win->evas);
558 memset(&fmc, 0, sizeof(E_Fm2_Config));
559 fmc.view.mode = E_FM2_VIEW_MODE_LIST;
560 fmc.view.open_dirs_in_place = 1;
561 fmc.view.selector = 1;
562 fmc.view.single_click = 1;
563 fmc.view.no_subdir_jump = 1;
564 fmc.icon.list.w = 24;
565 fmc.icon.list.h = 24;
566 fmc.icon.fixed.w = 1;
567 fmc.icon.fixed.h = 1;
568 fmc.icon.extension.show = 0;
569 fmc.icon.key_hint = NULL;
570 fmc.list.sort.no_case = 1;
571 fmc.list.sort.dirs.first = 0;
572 fmc.list.sort.dirs.last = 0;
573 fmc.selection.single = 1;
574 fmc.selection.windows_modifiers = 0;
575 e_fm2_config_set(ofm, &fmc);
577 e_fm2_path_set(ofm, "favorites", "/");
578 evas_object_smart_callback_add(ofm, "files_changed", _e_test_cb_favorites_files_changed, ofm2);
579 evas_object_smart_callback_add(ofm, "selected", _e_test_cb_favorites_selected, ofm2);
580 of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
581 e_fm2_pan_set, e_fm2_pan_get,
582 e_fm2_pan_max_get, e_fm2_pan_child_size_get);
583 e_widget_size_min_set(of, 128, 128);
584 e_widget_table_object_append(ot, of, 0, 1, 1, 1, 0, 1, 0, 1);
585 evas_object_show(ofm);
586 evas_object_show(of);
588 /* show and pack table */
589 evas_object_show(ot);
590 e_widget_size_min_get(ot, &mw, &mh);
591 e_dialog_content_set(dia, ot, mw, mh);
593 /* buttons at the bottom */
594 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
595 e_dialog_resizable_set(dia, 1);
596 e_win_centered_set(dia->win, 1);
598 e_win_resize(dia->win, 400, 300);
603 _e_test_cb_changed(void *data, Evas_Object *obj)
605 // printf("CHANGED \"%s\"\n", e_widget_fsel_selection_path_get(obj));
609 _e_test_cb_selected(void *data, Evas_Object *obj)
611 printf("SELECTED \"%s\"\n", e_widget_fsel_selection_path_get(obj));
612 e_object_del(E_OBJECT(data));
616 _e_test_internal(E_Container *con)
622 dia = e_dialog_new(con, "E", "_test");
623 e_dialog_title_set(dia, "A Test Dialog");
625 o = e_widget_fsel_add(dia->win->evas, "~/", "/tst", NULL, NULL,
626 _e_test_cb_selected, dia,
627 _e_test_cb_changed, dia, 0);
629 e_widget_size_min_get(o, &mw, &mh);
630 e_dialog_content_set(dia, o, mw, mh);
632 /* buttons at the bottom */
633 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
634 e_dialog_resizable_set(dia, 1);
635 e_win_centered_set(dia->win, 1);
637 e_win_resize(dia->win, 400, 300);
643 _e_test_cb_ok(E_Color_Dialog *dia, E_Color *color, void *data)
645 printf("Current color: %d, %d, %d\n", color->r, color->g, color->b);
649 _e_test_internal(E_Container *con)
653 d = e_color_dialog_new(con, NULL, EINA_FALSE);
654 e_color_dialog_show(d);
655 e_color_dialog_select_callback_set(d, _e_test_cb_ok, NULL);
660 _e_test_internal(E_Container *con)
663 Evas_Object *o, *ob, *of;
667 dia = e_dialog_new(con, "E", "_test");
668 e_dialog_title_set(dia, "A Test Dialog");
670 of = e_scrollframe_add(dia->win->evas);
672 ob = e_box_add(dia->win->evas);
673 e_box_orientation_set(ob, 0);
675 for (i = 0; i < 8; i++)
677 o = e_slidesel_add(dia->win->evas);
678 e_slidesel_item_distance_set(o, 64);
679 e_slidesel_item_add(o, "blah / item 1",
680 "/home/raster/pix/OLD/Download/Crystalline____a.jpg",
682 e_slidesel_item_add(o, "blah / smelly fish",
683 "/home/raster/pix/OLD/Download/Reluctant_Sunrise.jpg",
685 e_slidesel_item_add(o, "blah / pong",
686 "/home/raster/pix/OLD/Download/Soft_Wings.jpg",
688 e_slidesel_item_add(o, "blah / on a stick",
689 "/home/raster/pix/OLD/Download/Stock_rose_1.jpg",
691 e_slidesel_item_add(o, "blah / oath",
692 "/home/raster/pix/OLD/Download/The_Eyes_Of_A_Killer.jpg",
694 e_slidesel_item_add(o, "blah / yiiihaaaaa",
695 "/home/raster/pix/OLD/Download/lady_bug.jpg",
697 e_slidesel_item_add(o, "blah / blah blah blah",
698 "/home/raster/pix/OLD/Download/ocean_rocks_covered_by_ash.jpg",
700 e_slidesel_item_add(o, "blah / bing bing bing",
701 "/home/raster/pix/OLD/Download/orange_chair_heaven_falling.jpg",
704 e_box_pack_end(ob, o);
705 e_box_pack_options_set(o, 1, 1, 1, 0, 0.5, 0.5, 300, 100, 300, 100);
710 e_box_size_min_get(ob, &mw, &mh);
711 evas_object_resize(ob, mw, mh);
713 e_scrollframe_child_set(of, ob);
714 evas_object_show(ob);
715 // e_widget_size_min_get(o, &mw, &mh);
717 e_dialog_content_set(dia, of, mw, mh);
718 evas_object_show(of);
720 /* buttons at the bottom */
721 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
722 e_dialog_resizable_set(dia, 1);
723 e_win_centered_set(dia->win, 1);
725 e_win_resize(dia->win, 400, 400);
730 _e_test_internal(E_Container *con)
732 ecore_timer_add(1.0, _e_test_timer, con);
738 _e_test_timer(void *data)
746 dia = e_dialog_new(con, "E", "_test");
747 e_dialog_title_set(dia, "A Test Dialog");
749 o = e_widget_toolbar_add(dia->win->evas, 48, 48);
750 ic = e_icon_add(dia->win->evas);
751 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_hdd.png");
752 e_widget_toolbar_item_append(o, ic, "HDD", NULL, NULL, NULL);
753 ic = e_icon_add(dia->win->evas);
754 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_cd.png");
755 e_widget_toolbar_item_append(o, ic, "CD", NULL, NULL, NULL);
756 ic = e_icon_add(dia->win->evas);
757 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_desktop.png");
758 e_widget_toolbar_item_append(o, ic, "Desktop", NULL, NULL, NULL);
759 ic = e_icon_add(dia->win->evas);
760 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_home.png");
761 e_widget_toolbar_item_append(o, ic, "Home", NULL, NULL, NULL);
762 ic = e_icon_add(dia->win->evas);
763 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_root.png");
764 e_widget_toolbar_item_append(o, ic, "Root", NULL, NULL, NULL);
765 ic = e_icon_add(dia->win->evas);
766 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_tmp.png");
767 e_widget_toolbar_item_append(o, ic, "Temp", NULL, NULL, NULL);
768 ic = e_icon_add(dia->win->evas);
769 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_globe.png");
770 e_widget_toolbar_item_append(o, ic, "World", NULL, NULL, NULL);
771 ic = e_icon_add(dia->win->evas);
772 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_mixer.png");
773 e_widget_toolbar_item_append(o, ic, "Mixer", NULL, NULL, NULL);
774 ic = e_icon_add(dia->win->evas);
775 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_performance.png");
776 e_widget_toolbar_item_append(o, ic, "Perform", NULL, NULL, NULL);
778 e_widget_toolbar_scrollable_set(o, 1);
779 e_widget_toolbar_item_select(o, 1);
782 e_widget_size_min_get(o, &mw, &mh);
783 e_dialog_content_set(dia, o, mw, mh);
786 /* buttons at the bottom */
787 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
788 e_dialog_resizable_set(dia, 1);
789 e_win_centered_set(dia->win, 1);
791 e_win_resize(dia->win, 400, 200);
797 _e_test_internal(E_Container *con)
799 ecore_timer_add(1.0, _e_test_timer, con);
805 _e_test_timer(void *data)
813 dia = e_dialog_new(con, "E", "_test");
814 e_dialog_title_set(dia, "A Test Dialog");
816 o = e_widget_toolbar_add(dia->win->evas, 48, 48);
817 ic = e_icon_add(dia->win->evas);
818 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_hdd.png");
819 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
820 ic = e_icon_add(dia->win->evas);
821 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_cd.png");
822 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
823 ic = e_icon_add(dia->win->evas);
824 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_desktop.png");
825 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
826 ic = e_icon_add(dia->win->evas);
827 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_home.png");
828 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
829 ic = e_icon_add(dia->win->evas);
830 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_root.png");
831 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
832 ic = e_icon_add(dia->win->evas);
833 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_tmp.png");
834 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
835 ic = e_icon_add(dia->win->evas);
836 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_globe.png");
837 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
838 ic = e_icon_add(dia->win->evas);
839 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_mixer.png");
840 e_widget_toolbar_item_append(o, ic, NULL, NULL, NULL, NULL);
841 ic = e_icon_add(dia->win->evas);
842 e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_performance.png");
843 e_widget_toolbar_item_append(o, ic, "x", NULL, NULL, NULL);
845 e_widget_toolbar_scrollable_set(o, 1);
846 e_widget_toolbar_item_select(o, 1);
849 e_widget_size_min_get(o, &mw, &mh);
850 e_dialog_content_set(dia, o, mw, mh);
853 /* buttons at the bottom */
854 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
855 e_dialog_resizable_set(dia, 1);
856 e_win_centered_set(dia->win, 1);
858 e_win_resize(dia->win, 400, 200);
864 _e_test_internal(E_Container *con)
866 ecore_timer_add(1.0, _e_test_timer, con);
871 delorig(void *data, Evas *e, Evas_Object *obj, void *event_info)
873 evas_object_del(data);
877 movorig(void *data, Evas *e, Evas_Object *obj, void *event_info)
880 evas_object_geometry_get(obj, &x, &y, NULL, NULL);
881 evas_object_move(data, x, y);
885 reszorig(void *data, Evas *e, Evas_Object *obj, void *event_info)
888 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
889 evas_object_resize(data, w / 8, h / 8);
893 newwin(Evas *e, E_Manager *man, E_Manager_Comp_Source *src)
895 Evas_Object *o, *orig;
896 Evas_Coord x, y, w, h;
898 if (!e_manager_comp_src_image_get(man, src)) return;
900 orig = e_manager_comp_src_shadow_get(man, src);
901 o = e_manager_comp_src_image_mirror_add(man, src);
902 evas_object_color_set(o, 200, 200, 200, 200);
903 evas_object_event_callback_add(orig, EVAS_CALLBACK_DEL, delorig, o);
904 evas_object_event_callback_add(orig, EVAS_CALLBACK_MOVE, movorig, o);
905 evas_object_event_callback_add(orig, EVAS_CALLBACK_RESIZE, reszorig, o);
906 evas_object_geometry_get(orig, &x, &y, &w, &h);
908 evas_object_move(o, x, y);
909 evas_object_resize(o, w / 8, h / 8);
912 e_manager_comp_evas_update(man);
916 setup(E_Manager *man)
919 E_Manager_Comp_Source *src;
922 e = e_manager_comp_evas_get(man);
923 list = (Eina_List *)e_manager_comp_src_list(man);
924 EINA_LIST_FOREACH(list, l, src)
931 handler(void *data, const char *name, const char *info, int val,
932 E_Object *obj, void *msgdata)
934 E_Manager *man = (E_Manager *)obj;
935 E_Manager_Comp_Source *src = (E_Manager_Comp_Source *)msgdata;
938 printf("handler... '%s' '%s'\n", name, info);
939 if (strcmp(name, "comp.manager")) return;
941 e = e_manager_comp_evas_get(man);
942 if (!strcmp(info, "change.comp"))
944 if (!e) printf("TTT: No comp manager\n");
945 else printf("TTT: comp canvas = %p\n", e);
948 else if (!strcmp(info, "resize.comp"))
950 printf("%s: %p | %p\n", info, man, src);
952 else if (!strcmp(info, "add.src"))
954 printf("%s: %p | %p\n", info, man, src);
957 else if (!strcmp(info, "del.src"))
959 printf("%s: %p | %p\n", info, man, src);
961 else if (!strcmp(info, "config.src"))
963 printf("%s: %p | %p\n", info, man, src);
965 else if (!strcmp(info, "visibility.src"))
967 printf("%s: %p | %p\n", info, man, src);
972 _e_test_timer(void *data)
974 Eina_List *list, *l, *wins;
978 e_msg_handler_add(handler, NULL);
979 list = e_manager_list();
980 EINA_LIST_FOREACH(list, l, man)
982 Evas *e = e_manager_comp_evas_get(man);
989 _e_test_internal(E_Container *con)
991 ecore_timer_add(3.0, _e_test_timer, con);
996 _e_test_internal(E_Container *con __UNUSED__)