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
|
#!/usr/bin/env python
import edje
import ecore.evas
import sys
import os
import ecore
import emotion
import evas
import elementary
def huhu(obj, it):
print "guck guck";
elementary.init()
win = elementary.Window("test", elementary.ELM_WIN_BASIC);
edje_file = os.path.join(os.path.dirname(sys.argv[0]),"list_test.edj")
c = edje.Edje(win.canvas,file=edje_file,group="list")
vid = emotion.Emotion(win.canvas,module_filename="xine");
vid.file_set("/home/manut/Videos/2009-2.avi");
c.part_swallow("video", vid)
vid.resize(80,60);
vid.show();
vid.play = True;
items = [("huhu",huhu),
("haha", huhu),
("hoho", huhu),
("hehe", huhu),
("hihi", huhu)];
medialist = elementary.List(win);
medialist.size_hint_weight_set(1.0, 1.0)
medialist.size_hint_align_set(-1.0, -1.0)
box0 = elementary.Box(win);
box0.size_hint_weight_set(1.0, 1.0)
win.resize_object_add(box0);
box0.show();
box0.pack_end(medialist);
medialist.show();
for item in items:
print item[0]
medialist.item_append(item[0], None, None, item[1]);
medialist.go();
win.resize(320,520);
box0.show();
win.show()
#ecore.main_loop_begin();
elementary.run();
|