#!/usr/bin/env python import edje import ecore.evas import sys import os import ecore import emotion import evas # Parse command line from optparse import OptionParser usage = "usage: %prog [options]" op = OptionParser(usage=usage) op.add_option("-e", "--engine", type="choice", choices=("x11", "x11-16"), default="x11-16", help=("which display engine to use (x11, x11-16)," "default=%default")) op.add_option("-n", "--no-fullscreen", action="store_true", help="do not launch in fullscreen") 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() if options.engine == "x11": f = ecore.evas.SoftwareX11 elif options.engine == "x11-16": if ecore.evas.engine_type_supported_get("software_x11"): f = ecore.evas.SoftwareX11_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) 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.size = ee.evas.size vid = emotion.Emotion(ee.evas,module_filename="xine"); vid.file_set("Lordi.mpg"); c.part_swallow("video", vid) vid.show() vid.play = True def button_clicked(obj, signal,source): print "Huhu"; c.signal_callback_add("mouse,clicked,1","findbutton",button_clicked) c.show() ee.show() ecore.main_loop_begin();