Files
FreeJ/scripts/python/test.py
Jaromil b409820950 Factory is now used also for Screens
Screen API changed a bit: now size args are taken from init(w,h)
screen implementations should provide an _init(w,h) as well
constructors are without arguments (as in the rest of freej)
2009-08-29 11:53:48 +02:00

32 lines
531 B
Python

import threading
import freej
import time
import sys
#freej.set_debug(3)
# init context
cx = freej.Context()
cx.init()
#cx.init(400,300,0,0)
scr = freej.SdlScreen()
scr.init( 400, 300 );
cx.add_screen(scr)
cx.config_check("keyboard.js")
cx.plugger.refresh(cx)
# add a layer
# lay = freej.create_layer(cx,sys.argv[1])
lay = cx.open(sys.argv[1])
filt = cx.filters["vertigo"]
lay.add_filter(filt)
lay.start()
lay.active = True
cx.add_layer(lay)
th = threading.Thread(target = cx.start , name = "freej")
th.start();
# th.join();