diff options
Diffstat (limited to 'src/YalpClients/EflClient/main.py')
| -rwxr-xr-x | src/YalpClients/EflClient/main.py | 86 |
1 files changed, 66 insertions, 20 deletions
diff --git a/src/YalpClients/EflClient/main.py b/src/YalpClients/EflClient/main.py index bd293b1..de731e9 100755 --- a/src/YalpClients/EflClient/main.py +++ b/src/YalpClients/EflClient/main.py @@ -7,11 +7,12 @@ import os import ecore import emotion import evas +import elementary # Parse command line -from optparse import OptionParser +#from optparse import OptionParser -usage = "usage: %prog [options]" +"""usage = "usage: %prog [options]" op = OptionParser(usage=usage) op.add_option("-e", "--engine", type="choice", choices=("x11", "x11-16"), default="x11-16", @@ -21,9 +22,9 @@ op.add_option("-n", "--no-fullscreen", action="store_true", op.add_option("-f", "--fps", type="int", default=20, help="frames per second to use, default=%default") - +""" # Handle options and create output window -options, args = op.parse_args() +"""options, args = op.parse_args() if options.engine == "x11": f = ecore.evas.SoftwareX11 elif options.engine == "x11-16": @@ -32,26 +33,71 @@ elif options.engine == "x11-16": else: print "warning: x11-16 is not supported, fallback to x11" f = ecore.evas.SoftwareX11 +""" -ee = ecore.evas.SoftwareX11(w=800, h=600) -edje.frametime_set(1.0 / options.fps) +def huhu(obj, it, xy): + print "guck guck" -edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj") +def button_clicked(obj, signal,source): + print "Huhu"; + c.signal_callback_add("mouse,clicked,1","findbutton",button_clicked) -c = edje.Edje(ee.evas,file=edje_file,group="yalp") -c.size = ee.evas.size +def gui(): + elementary.init() + win = elementary.Window("Yalp", elementary.ELM_WIN_BASIC) + + edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj") + #c = edje.Edje(ee.evas,file=edje_file,group="yalp") + c = edje.Edje(win.canvas, file=edje_file, group = "yalp") + #c.size = ee.evas.size + #c.size = win.canvas.size -vid = emotion.Emotion(ee.evas,module_filename="xine"); -vid.file_set("Lordi.mpg"); -c.part_swallow("video", vid) + items = [("huhu",huhu), + ("haha", huhu), + ("hoho", huhu), + ("hehe", huhu), + ("hihi", huhu), + ("12345", huhu), + ("abcde", huhu), + ("fghij", huhu), + ("klmno", huhu), + ("pqrst", huhu), + ("uvwxyz", huhu)] -vid.show() -vid.play = True + #ee = ecore.evas.SoftwareX11(w=800, h=600) + win.title_set("YALP") + #edje.frametime_set(1.0 / options.fps) -def button_clicked(obj, signal,source): - print "Huhu"; -c.signal_callback_add("mouse,clicked,1","findbutton",button_clicked) + 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) + win.resize_object_add(box0) + c.part_swallow("medialist", medialist) + + box0.pack_end(medialist) + medialist.show(); + + for item in items: + print item[0] + medialist.item_append(item[0], None, None, item[1]); + + medialist.go(); + + vid = emotion.Emotion(win.canvas,module_filename="xine"); + vid.file_set("/home/manut/Videos/2009-2.avi"); + + c.part_swallow("video", vid) + + vid.show() + vid.play = True + + c.show() + win.resize(800,600) + box0.show() + win.show() + #ecore.main_loop_begin(); + elementary.run(); -c.show() -ee.show() -ecore.main_loop_begin(); +gui() |
