aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_test.c
blob: 2138e893e8570e24e7865d20b207d5143f142c80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
/*
 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
 */
#include "e.h"

static void _e_test_internal(E_Container *con);

EAPI void
e_test(void)
{
   Eina_List *managers, *l, *ll;
   
   managers = e_manager_list();
   for (l = managers; l; l = l->next)
     {
	E_Manager *man;
	
	man = l->data;
	for (ll = man->containers; ll; ll = ll->next)
	  {
	     E_Container *con;
	     
	     con = ll->data;
	     _e_test_internal(con);
	  }
     }
}

#if 0
static int
_e_test_timer(void *data)
{
   E_Menu *m;
   Eina_List *managers, *l;
   
   m = data;
   if (m)
     {
	e_menu_deactivate(m);
	e_object_del(E_OBJECT(m));
	ecore_timer_add(0.05, _e_test_timer, NULL);
	return 0;
     }
   managers = e_manager_list();
   for (l = managers; l; l = l->next)
     {
	E_Manager *man;
	
	man = l->data;
	m = e_int_menus_main_new();
	e_menu_activate_mouse(m,
			      e_container_zone_number_get(e_container_current_get(man), 0),
			      0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
	ecore_timer_add(0.05, _e_test_timer, m);
	return 0;
     }
   return 0;
}

static void
_e_test_internal(E_Container *con)
{
   _e_test_timer(NULL);
}
#elif 0
static void
_e_test_resize(E_Win *win)
{
   Evas_Object *o;
   
   o = win->data;
   printf("RESIZE %i %i\n", win->w, win->h);
   evas_object_resize(o, win->w, win->h);
   evas_object_color_set(o, rand() & 0xff, rand() & 0xff, rand() & 0xff, 255);
}

static void
_e_test_delete(E_Win *win)
{
   printf("DEL!\n");
   e_object_del(E_OBJECT(win));
}

static void
_e_test_internal(E_Container *con)
{
   E_Win *win;
   Evas_Object *o;
   
   win = e_win_new(con);
   e_win_resize_callback_set(win, _e_test_resize);
   e_win_delete_callback_set(win, _e_test_delete);
   e_win_placed_set(win, 0);
   e_win_move_resize(win, 10, 80, 400, 200);
   e_win_name_class_set(win, "E", "_test_window");
   e_win_title_set(win, "A test window");
   e_win_raise(win);
   e_win_show(win);
   
   o = evas_object_rectangle_add(e_win_evas_get(win));
   evas_object_color_set(o, 255, 200, 100, 255);
   evas_object_resize(o, 400, 200);
   evas_object_show(o);
   
   win->data = o;
}
#elif 0
static int
_e_test_timer(void *data)
{
   E_Menu *m;
   static int y = 0;
   
   m = data;
   ecore_x_pointer_warp(m->evas_win, 20, y);
   y += 10;
   if (y > m->cur.h) y = 0;
   return 1;
}

static void
_e_test_internal(E_Container *con)
{
   E_Menu *m;
   Eina_List *managers, *l;
   
   managers = e_manager_list();
   for (l = managers; l; l = l->next)
     {
	E_Manager *man;
	
	man = l->data;
	m = e_int_menus_main_new();
	e_menu_activate_mouse(m,
			      e_container_zone_number_get(e_container_current_get(man), 0),
			      0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
	ecore_timer_add(0.02, _e_test_timer, m);
     }
}
#elif 0
static void
_e_test_dialog_del(void *obj)
{
   E_Dialog *dia;
   
   dia = obj;
   printf("dialog delete hook!\n");
}

static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   
   dia = e_dialog_new(con, "E", "_test");
   e_object_del_attach_func_set(E_OBJECT(dia), _e_test_dialog_del);
   e_dialog_title_set(dia, "A Test Dialog");
   e_dialog_text_set(dia, "A Test Dialog<br>And another line<br><hilight>Hilighted Text</hilight>");
   e_dialog_icon_set(dia, "enlightenment/modules", 64);
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_dialog_button_add(dia, "Apply", "enlightenment/reset", NULL, NULL);
   e_dialog_button_add(dia, "Cancel", "enlightenment/exit", NULL, NULL);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
}
#elif 0
static void
_e_test_click(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
#if 1
   double size;
   
   size = (double)(rand() % 1000) / 999;
   evas_object_resize(obj, size * 1024, size * 768);
#else
   e_scrollframe_child_region_show(data, 1024, 768, 100, 100);
#endif
}

static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Object *o, *o2, *o3;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");
   
   o = e_icon_add(dia->win->evas);
   e_icon_file_set(o, "/home/raster/scroll.png");
   evas_object_resize(o, 1024, 768);
   evas_object_focus_set(o, 1);
   evas_object_show(o);
      
   o2 = e_scrollframe_add(dia->win->evas);
   evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_test_click, o2);
//   e_scrollframe_custom_theme_set(o2, "base/theme/widgets", "e/widgets/scrollframe");
   evas_object_show(o2);
#if 0   
   o3 = e_pan_add(dia->win->evas);
   e_pan_child_set(o3, o);
   e_scrollframe_extern_pan_set(o2, o3, e_pan_set, e_pan_get, e_pan_max_get, e_pan_child_size_get);
#else
   e_scrollframe_child_set(o2, o);
#endif
   
   e_dialog_content_set(dia, o2, 500, 300);
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   
   evas_object_focus_set(o, 1);
}
#elif 0
static E_Dialog *
_e_test_dia(E_Container *con)
{
   E_Config_Dialog *dia;
   
   dia = e_int_config_modules(con);
   return dia;
}

static E_Container *tcon = NULL;

static int
_e_test_timer(void *data)
{
   E_Config_Dialog *dia;
	
   if (data == NULL)
     {
	dia = _e_test_dia(tcon);
	ecore_timer_add(0.2, _e_test_timer, dia);
     }
   else
     {
	dia = data;
	e_object_del(E_OBJECT(dia));
	ecore_timer_add(0.2, _e_test_timer, NULL);
     }
   return 0;
}

static void
_e_test_internal(E_Container *con)
{
   tcon = con;
   _e_test_timer(NULL);
}
#elif 0

struct _tmp
{
   Evas_Object *ilist, *scrollframe;
};

static struct _tmp tmp = {NULL, NULL};

static void
_e_test_sel(void *data, void *data2)
{
   Evas_Coord x, y, w, h;
   
   e_ilist_selected_geometry_get(tmp.ilist, &x, &y, &w, &h);
   e_scrollframe_child_region_show(tmp.scrollframe, x, y, w, h);
}

static void
_e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   Evas_Coord mw, mh, vw, vh, w, h;
   
   e_scrollframe_child_viewport_size_get(obj, &vw, &vh);
   e_ilist_min_size_get(data, &mw, &mh);
   evas_object_geometry_get(data, NULL, NULL, &w, &h);
   if (vw >= mw)
     {
	if (w != vw) evas_object_resize(data, vw, h);
     }
}

static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Coord mw, mh, vw, vh;
   Evas_Object *o, *o2, *o3, *o4;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");
   
   o = e_ilist_add(dia->win->evas);
   e_ilist_icon_size_set(o, 80, 48);
   
   o3 = e_livethumb_add(dia->win->evas);
   e_livethumb_vsize_set(o3, 160, 96);
   o4 = edje_object_add(e_livethumb_evas_get(o3));
   e_theme_edje_object_set(o4, "base/theme/borders",
			   "e/widgets/border/default/border");
   e_livethumb_thumb_set(o3, o4);
   e_ilist_append(o, o3, "Item 1", 0, _e_test_sel, NULL, NULL, NULL);
   
   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/palette.png");
   e_ilist_append(o, o3, "Item 2 (Some really long text goes here for testing)", 0, _e_test_sel, NULL, NULL, NULL);
   
   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/mozilla.png");
   e_ilist_append(o, o3, "Item 3 (Medium length)", 0, _e_test_sel, NULL, NULL, NULL);
   
   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/trash_open.png");
   e_ilist_append(o, o3, "Item POOP", 0, _e_test_sel, NULL, NULL, NULL);

   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/watch.png");
   e_ilist_append(o, o3, "Item BLING BLING", 0, _e_test_sel, NULL, NULL, NULL);

   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/quake3.png");
   e_ilist_append(o, o3, "Sukebelinth", 0, _e_test_sel, NULL, NULL, NULL);

   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
   e_ilist_append(o, o3, "A header", 1, NULL, NULL, NULL, NULL);
   
   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/opera6.png");
   e_ilist_append(o, o3, "Panties", 0, _e_test_sel, NULL, NULL, NULL);

   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/drawer_open.png");
   e_ilist_append(o, o3, "Flimbert the cagey", 0, _e_test_sel, NULL, NULL, NULL);

   o3 = e_icon_add(dia->win->evas);
   e_icon_file_set(o3, "/home/raster/C/stuff/icons/cd.png");
   e_ilist_append(o, o3, "Norbert", 0, _e_test_sel, NULL, NULL, NULL);
   
   e_ilist_min_size_get(o, &mw, &mh);
   evas_object_resize(o, mw, mh);
   evas_object_focus_set(o, 1);
   evas_object_show(o);
      
   o2 = e_scrollframe_add(dia->win->evas);
   evas_object_event_callback_add(o2, EVAS_CALLBACK_RESIZE, _e_test_resize, o);
   evas_object_resize(o2, mw, 150);
   evas_object_show(o2);
   e_scrollframe_child_set(o2, o);

   e_scrollframe_child_viewport_size_get(o2, &vw, &vh);
   e_dialog_content_set(dia, o2, 200, 150);
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_win_centered_set(dia->win, 1);
   e_dialog_resizable_set(dia, 1);
   e_dialog_show(dia);
   
   tmp.ilist = o;
   tmp.scrollframe = o2;
   
   evas_object_focus_set(o, 1);
}
#elif 0
static void
_e_test_cb_e_smart_pan_changed_hook(void *data, Evas_Object *obj, void *event_info)
{
   printf("VAL: %3.3f\n", e_slider_value_get(obj));
}

static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Object *o;
   Evas_Coord mw, mh;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");
   
   o = e_slider_add(dia->win->evas);
   e_slider_orientation_set(o, 1);
   e_slider_value_set(o, 0.5);
   e_slider_value_step_count_set(o, 4);
   e_slider_value_format_display_set(o, "%1.2f V");
   e_slider_min_size_get(o, &mw, &mh);
   evas_object_smart_callback_add(o, "changed", _e_test_cb_e_smart_pan_changed_hook, NULL);
   evas_object_show(o);
   
   e_dialog_content_set(dia, o, 240 + mw, mh);
   
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   
   evas_object_focus_set(o, 1);
}
#elif 0
static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Object *o;
   Evas_Coord mw, mh;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");
   
   o = e_widget_textblock_add(dia->win->evas);
#if 0
   e_widget_textblock_markup_set(o,
				 "<title>A title</title>"
				 "This is some text<br>"
				 "Blah blah<br>"
				 "<hilight>hilighted text</hilight><br>"
				 "<br>"
				 "More lines of text<br>"
				 "And yet more lines of text<br>"
				 "A very very long line of text that SHOULD be getting word wrapped because it is so long.<br>"
				 "And another line<br>"
				 "Some more<br>"
				 "Smelly fish on a stick<br>"
				 "Whatever."
				 );
#else
   e_widget_textblock_plain_set(o,
				"And here is some plaintext\n"
				"with some newlines & other special characters\n"
				"that should get escaped like < and >.\n"
				"\n"
				"\tTabs should become 8 spaces too.\n"
				);
#endif   
   evas_object_show(o);
   
   e_dialog_content_set(dia, o, 160, 160);
   
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   
   evas_object_focus_set(o, 1);
}
#elif 0
static void
_e_test_cb_button(void *data1, void *data2)
{
   e_fm2_parent_go(data1);
}

static void
_e_test_cb_changed(void *data, Evas_Object *obj, void *event_info)
{
   if (!e_fm2_has_parent_get(obj)) e_widget_disabled_set(data, 1);
   else e_widget_disabled_set(data, 0);
}
    
static void
_e_test_cb_favorites_selected(void *data, Evas_Object *obj, void *event_info)
{
   Eina_List *selected;
   E_Fm2_Icon_Info *ici;
   
   printf("FAV SELECTED\n");
   selected = e_fm2_selected_list_get(obj);
   if (!selected) return;
   ici = selected->data;
   if ((ici->link) && (ici->mount))
     e_fm2_path_set(data, ici->link, "/");
   else if (ici->link)
     e_fm2_path_set(data, NULL, ici->link);
// FIXME: this should happen on the scrollframe not the fm obj   
//   e_widget_scrollframe_child_pos_set(data, 0, 0);
   eina_list_free(selected);
}
    
static void
_e_test_cb_favorites_files_changed(void *data, Evas_Object *obj, void *event_info)
{
   Eina_List *icons, *l;
   E_Fm2_Icon_Info *ici;
   const char *realpath;
   char *p1, *p2;
   
   printf("FAV LIST CHANGE!\n");
   icons = e_fm2_all_list_get(obj);
   if (!icons) return;
   realpath = e_fm2_real_path_get(data);
   p1 = ecore_file_realpath(realpath);
   if (!p1) goto done;
   for (l = icons; l; l = l->next)
     {
	ici = l->data;
	if (ici->link)
	  {
	     p2 = ecore_file_realpath(ici->link);
	     if (!strcmp(p1, p2))
	       {
		  e_fm2_select_set(obj, ici->file);
		  E_FREE(p2);
		  goto done;
	       }
	     E_FREE(p2);
	  }
     }
   done:
   E_FREE(p1);
   eina_list_free(icons);
}
    
static void
_e_test_cb_selected(void *data, Evas_Object *obj, void *event_info)
{
   printf("SELECTED!\n");
}
    
static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Object *ofm, *ofm2, *of, *ob, *ot;
   Evas_Coord mw, mh;
   E_Fm2_Config fmc;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");

   /* a table for layout */
   ot = e_widget_table_add(dia->win->evas, 0);

   /* actual files */
   ofm = e_fm2_add(dia->win->evas);
   
   memset(&fmc, 0, sizeof(E_Fm2_Config));
   fmc.view.mode = E_FM2_VIEW_MODE_LIST;
   fmc.view.open_dirs_in_place = 1;
   fmc.view.selector = 1;
   fmc.view.single_click = 0;
   fmc.view.no_subdir_jump = 0;
   fmc.icon.list.w = 24;
   fmc.icon.list.h = 24;
   fmc.icon.fixed.w = 1;
   fmc.icon.fixed.h = 1;
   fmc.icon.extension.show = 0;
   fmc.icon.key_hint = NULL;
   fmc.list.sort.no_case = 1;
   fmc.list.sort.dirs.first = 1;
   fmc.list.sort.dirs.last = 0;
   fmc.selection.single = 1;
   fmc.selection.windows_modifiers = 0;
   e_fm2_config_set(ofm, &fmc);
   
   e_fm2_path_set(ofm, "~/", "/");
   ob = e_widget_button_add(dia->win->evas, "Up a directory", NULL,
			   _e_test_cb_button, ofm, NULL);
   e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 0, 0, 1, 0);
   evas_object_show(ob);
   evas_object_smart_callback_add(ofm, "changed", _e_test_cb_changed, ob);
   evas_object_smart_callback_add(ofm, "selected", _e_test_cb_selected, NULL);
   of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
				     e_fm2_pan_set, e_fm2_pan_get,
				     e_fm2_pan_max_get, e_fm2_pan_child_size_get);
   e_widget_min_size_set(of, 128, 128);
   e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
   evas_object_show(ofm);
   evas_object_show(of);
   
   ofm2 = ofm;

   /* shortcut list */
   ofm = e_fm2_add(dia->win->evas);

   memset(&fmc, 0, sizeof(E_Fm2_Config));
   fmc.view.mode = E_FM2_VIEW_MODE_LIST;
   fmc.view.open_dirs_in_place = 1;
   fmc.view.selector = 1;
   fmc.view.single_click = 1;
   fmc.view.no_subdir_jump = 1;
   fmc.icon.list.w = 24;
   fmc.icon.list.h = 24;
   fmc.icon.fixed.w = 1;
   fmc.icon.fixed.h = 1;
   fmc.icon.extension.show = 0;
   fmc.icon.key_hint = NULL;
   fmc.list.sort.no_case = 1;
   fmc.list.sort.dirs.first = 0;
   fmc.list.sort.dirs.last = 0;
   fmc.selection.single = 1;
   fmc.selection.windows_modifiers = 0;
   e_fm2_config_set(ofm, &fmc);
   
   e_fm2_path_set(ofm, "favorites", "/");
   evas_object_smart_callback_add(ofm, "files_changed", _e_test_cb_favorites_files_changed, ofm2);
   evas_object_smart_callback_add(ofm, "selected", _e_test_cb_favorites_selected, ofm2);
   of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
				     e_fm2_pan_set, e_fm2_pan_get,
				     e_fm2_pan_max_get, e_fm2_pan_child_size_get);
   e_widget_min_size_set(of, 128, 128);
   e_widget_table_object_append(ot, of, 0, 1, 1, 1, 0, 1, 0, 1);
   evas_object_show(ofm);
   evas_object_show(of);
   
   /* show and pack table */
   evas_object_show(ot);
   e_widget_min_size_get(ot, &mw, &mh);
   e_dialog_content_set(dia, ot, mw, mh);
   
   /* buttons at the bottom */
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_dialog_resizable_set(dia, 1);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   e_win_resize(dia->win, 400, 300); 
   
}
#elif 0
static void
_e_test_cb_changed(void *data, Evas_Object *obj)
{
//   printf("CHANGED \"%s\"\n", e_widget_fsel_selection_path_get(obj));
}
    
static void
_e_test_cb_selected(void *data, Evas_Object *obj)
{
   printf("SELECTED \"%s\"\n", e_widget_fsel_selection_path_get(obj));
   e_object_del(E_OBJECT(data));
}
    
static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Object *o;
   Evas_Coord mw, mh;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");

   o = e_widget_fsel_add(dia->win->evas, "~/", "/tst", NULL, NULL, 
			 _e_test_cb_selected, dia,
			 _e_test_cb_changed, dia, 0);
   evas_object_show(o);
   e_widget_min_size_get(o, &mw, &mh);
   e_dialog_content_set(dia, o, mw, mh);
   
   /* buttons at the bottom */
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_dialog_resizable_set(dia, 1);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   e_win_resize(dia->win, 400, 300); 
   
}
#elif 0

static void
_e_test_cb_ok(E_Color_Dialog *dia, E_Color *color, void *data)
{
   printf("Current color: %d, %d, %d\n", color->r, color->g, color->b);
}

static void
_e_test_internal(E_Container *con)
{
   E_Color_Dialog *d;

   d = e_color_dialog_new(con, NULL);
   e_color_dialog_show(d);
   e_color_dialog_select_callback_set(d, _e_test_cb_ok, NULL);
}

#elif 0
static void
_e_test_internal(E_Container *con)
{
   E_Dialog *dia;
   Evas_Object *o, *ob, *of;
   Evas_Coord mw, mh;
   int i;
   
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");

   of = e_scrollframe_add(dia->win->evas);
   
   ob = e_box_add(dia->win->evas);
   e_box_orientation_set(ob, 0);

   for (i = 0; i < 8; i++)
     {
   o = e_slidesel_add(dia->win->evas);
   e_slidesel_item_distance_set(o, 64);
   e_slidesel_item_add(o, "blah / item 1", 
		       "/home/raster/pix/OLD/Download/Crystalline____a.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / smelly fish", 
		       "/home/raster/pix/OLD/Download/Reluctant_Sunrise.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / pong", 
		       "/home/raster/pix/OLD/Download/Soft_Wings.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / on a stick", 
		       "/home/raster/pix/OLD/Download/Stock_rose_1.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / oath", 
		       "/home/raster/pix/OLD/Download/The_Eyes_Of_A_Killer.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / yiiihaaaaa", 
		       "/home/raster/pix/OLD/Download/lady_bug.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / blah blah blah",
		       "/home/raster/pix/OLD/Download/ocean_rocks_covered_by_ash.jpg",
		       NULL, NULL);
   e_slidesel_item_add(o, "blah / bing bing bing", 
		       "/home/raster/pix/OLD/Download/orange_chair_heaven_falling.jpg",
		       NULL, NULL);
   
   e_box_pack_end(ob, o);
   e_box_pack_options_set(o, 1, 1, 1, 0, 0.5, 0.5, 300, 100, 300, 100);
   evas_object_show(o);
     }
   
   /* fixme... more */
   e_box_min_size_get(ob, &mw, &mh);
   evas_object_resize(ob, mw, mh);

   e_scrollframe_child_set(of, ob);
   evas_object_show(ob);
//   e_widget_min_size_get(o, &mw, &mh);
   mw = 300; mh = 300;
   e_dialog_content_set(dia, of, mw, mh);
   evas_object_show(of);
   
   /* buttons at the bottom */
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_dialog_resizable_set(dia, 1);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   e_win_resize(dia->win, 400, 400);
   
}
#elif 0
static int
_e_test_timer(void *data)
{
   E_Container *con;
   E_Dialog *dia;
   Evas_Object *o, *ic;
   Evas_Coord mw, mh;
   
   con = data;
   dia = e_dialog_new(con, "E", "_test");
   e_dialog_title_set(dia, "A Test Dialog");

   o = e_widget_toolbar_add(dia->win->evas, 48, 48);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_hdd.png");
   e_widget_toolbar_item_append(o, ic, "HDD", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_cd.png");
   e_widget_toolbar_item_append(o, ic, "CD", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_desktop.png");
   e_widget_toolbar_item_append(o, ic, "Desktop", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_home.png");
   e_widget_toolbar_item_append(o, ic, "Home", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_root.png");
   e_widget_toolbar_item_append(o, ic, "Root", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_efm_tmp.png");
   e_widget_toolbar_item_append(o, ic, "Temp", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_globe.png");
   e_widget_toolbar_item_append(o, ic, "World", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_mixer.png");
   e_widget_toolbar_item_append(o, ic, "Mixer", NULL, NULL, NULL);
   ic = e_icon_add(dia->win->evas);
   e_icon_file_set(ic, "/home/raster/C/e17/data/themes/images/icon_performance.png");
   e_widget_toolbar_item_append(o, ic, "Perform", NULL, NULL, NULL);

   e_widget_toolbar_scrollable_set(o, 1);
   e_widget_toolbar_item_select(o, 1);
   
   /* fixme... more */
   e_widget_min_size_get(o, &mw, &mh);
   e_dialog_content_set(dia, o, mw, mh);
   evas_object_show(o);
   
   /* buttons at the bottom */
   e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
   e_dialog_resizable_set(dia, 1);
   e_win_centered_set(dia->win, 1);
   e_dialog_show(dia);
   e_win_resize(dia->win, 400, 200);
   
   return 0;
}
static void
_e_test_internal(E_Container *con)
{
   ecore_timer_add(1.0, _e_test_timer, con);
}
#else
static void
_e_test_internal(E_Container *con)
{    
}
#endif