diff options
| author | Nicole Vreden <damba@slartibartfast.traut> | 2009-12-27 18:36:05 +0100 |
|---|---|---|
| committer | Nicole Vreden <damba@slartibartfast.traut> | 2009-12-27 18:36:05 +0100 |
| commit | 4a1cbbae8c3362b35ef828179b36b6bb650ae1a5 (patch) | |
| tree | 23ef7e720334cc9e5c1f4e9d2ab24eadd4ddbc71 /src/YalpClients | |
| parent | db4cc265443e2ca1f59441f4f3306690c931252f (diff) | |
Python-Elementary: List Example
- List and Video
Signed-off-by: Nicole Vreden <damba@mecka.net>
Diffstat (limited to 'src/YalpClients')
| -rw-r--r-- | src/YalpClients/EflClient/list_test.edc | 50 | ||||
| -rw-r--r-- | src/YalpClients/EflClient/list_test_elem.py | 57 |
2 files changed, 107 insertions, 0 deletions
diff --git a/src/YalpClients/EflClient/list_test.edc b/src/YalpClients/EflClient/list_test.edc new file mode 100644 index 0000000..f3b42e0 --- /dev/null +++ b/src/YalpClients/EflClient/list_test.edc @@ -0,0 +1,50 @@ +collections +{ + group + { + name: "list"; + parts + { + part + { + name: "main"; + type: RECT; + mouse_events: 0; + description + { + state:"default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: 0 0; + } + } + } + part + { + name: "video"; + type: SWALLOW; + description + { + state: "default"0.0; + aspect: 1.7 1.8; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: 0 0; + } + } + } + } + } +} diff --git a/src/YalpClients/EflClient/list_test_elem.py b/src/YalpClients/EflClient/list_test_elem.py new file mode 100644 index 0000000..a3fcc91 --- /dev/null +++ b/src/YalpClients/EflClient/list_test_elem.py @@ -0,0 +1,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(); |
