/*module quicktime v 1.0 -April 2000- by Duncan de Spens quicktimeC.pkg*/ defcom Cregister=register;; /*display bitmap params*/ typeof buf =ObjBitmap;; typeof larg =I;; typeof haut =I;; typeof X =I;; typeof Y =I;; typeof win =ObjWin;; typeof movie =QTMovie;; typeof Url =S;; typeof t=Timer;; /*timer function used to repaint the display bitmap*/ fun clock(a,url)= if url!=nil then (_QTProcessMovie movie ) else nil; _STBLTbitmap win 0 0 larg haut buf 0 0 256 256;0;; fun onconflict(a)= _fooS "conflict";_QTDestroyMovie movie; _DSbitmap buf;_DSwindow win; _DMSreleaseZone this a;0;; fun resize(x,s)= let x->[wn x y w h] in (set larg=w;set haut=h;set X=x;set Y=y; set win =_SIZEwindow win w h x y;0);; fun killzone(a)= _DSwindow win;_deltimer t;_QTDestroyMovie movie;_DSbitmap buf;0;; /*play the stream movie from the url if url!=nil else destroy movie stream*/ fun _playC(url)= set Url=url; if Url!=nil then (_DSwindow win; _deltimer t;_QTDestroyMovie movie;_DSbitmap buf; let _DMSgetZone this "interfaceC" @onconflict @resize @killzone ->[wn x y w h] in (set larg=w;set haut=h;set X=x;set Y=y; set buf=_CRbitmap _channel 256 256; set win=_CRwindow _channel wn x y w h WN_CHILDINSIDE|WN_DOWN nil; ); set movie= _QTCreateStreamMovieBmp _channel url buf 0;0) else (_deltimer t;nil); set t=_rfltimer _starttimer _channel 30 @clock Url;0;; fun __playUrl(url)= _playC url;; fun activate(from,action,param,rep)= if !strcmp action "play" then (_playC param;0) else if !strcmp action "stop" then (_playC nil;0) else nil;; fun destroy()= _QTDestroyMovie movie; 0;; fun IniDMI(file)= _DMSregisterDMI this @activate @destroy; _DMSsend this Cregister [];;