def play(args):
window = main_window(args.get('window-type', 'toplevel'), args['title'], args['width']/2, args['height']/2)
window.resize(args['width'], args['height'])
webview = create_webview()
webview.load_string(args['html'], 'text/html', 'UTF-8', args['base'])
if 'x' in args and 'y' in args:
window.move(args['x'], args['y'])
window.add(webview)
window.show_all()
if 'screenshot-file' in args:
import gobject
gobject.timeout_add(1500, save_screenshot, window, args['screenshot-file'])
评论列表
文章目录