mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Initial revision
This commit is contained in:
parent
62f6bc8e55
commit
db96c5a7d9
5 changed files with 262 additions and 0 deletions
22
Demo/sgi/sv/simpleinput.py
Executable file
22
Demo/sgi/sv/simpleinput.py
Executable file
|
@ -0,0 +1,22 @@
|
|||
import sv, SV
|
||||
import gl, DEVICE
|
||||
|
||||
def main():
|
||||
gl.foreground()
|
||||
gl.prefsize(SV.PAL_XMAX, SV.PAL_YMAX)
|
||||
win = gl.winopen('video test')
|
||||
v = sv.OpenVideo()
|
||||
params = [SV.VIDEO_MODE, SV.COMP, SV.BROADCAST, SV.PAL]
|
||||
v.SetParam(params)
|
||||
v.BindGLWindow(win, SV.IN_REPLACE)
|
||||
gl.qdevice(DEVICE.ESCKEY)
|
||||
gl.qdevice(DEVICE.WINQUIT)
|
||||
gl.qdevice(DEVICE.WINSHUT)
|
||||
while 1:
|
||||
dev, val = gl.qread()
|
||||
if dev in (DEVICE.ESCKEY, DEVICE.WINSHUT, DEVICE.WINQUIT):
|
||||
v.CloseVideo()
|
||||
gl.winclose(win)
|
||||
return
|
||||
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue