DIRECTORY MickeyMouse, JaM, JaMIPrivate, Imager, Rope; JaMMickeyMouseImpl: CEDAR MONITOR IMPORTS MickeyMouse, JaM, JaMIPrivate, Imager ~ BEGIN ApplyCreate: PROC [self: JaM.State] ~ { file: Rope.ROPE _ JaM.PopRope[self]; ref: MickeyMouse.Ref _ MickeyMouse.Create[file]; JaM.Push[self, ref]; }; ApplyDrawFrame: PROC [self: JaM.State] ~ { GetContext: PROC [self: JaM.State] RETURNS [Imager.Context] ~ { info: JaMIPrivate.Info _ JaMIPrivate.GetInfo[self]; IF info = NIL THEN ERROR; IF info.ipenabled THEN RETURN [info.ipdc]; RETURN[info.vdc]; }; Action: PROC ~ { Imager.ScaleT[context, 1.0/Imager.metersPerPoint]; MickeyMouse.DrawFrame[ref, context] }; ref: MickeyMouse.Ref _ NARROW[JaM.Pop[self]]; info: JaMIPrivate.Info _ JaMIPrivate.GetInfo[self]; context: Imager.Context ~ GetContext[self]; Imager.DoSaveAll[context, Action]; }; ApplyNextFrame: PROC [self: JaM.State] ~ { ref: MickeyMouse.Ref _ NARROW[JaM.Pop[self]]; MickeyMouse.NextFrame[ref]; }; RegisterMickeyMouse: PUBLIC PROC [self: JaM.State] ~ { JaM.Register[self, ".mickeymousemakehandle", ApplyCreate]; JaM.Register[self, ".mickeymousedrawframe", ApplyDrawFrame]; JaM.Register[self, ".mickeymousenextframe", ApplyNextFrame]; }; Init: PROC [] RETURNS [] ~ { JaM.RegisterInit["JaMMickeyMouseImpl", RegisterMickeyMouse]; }; Init[]; END. ÆJaMMickeyMouseImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by: Mik Lamming - April 25, 1986 3:51:20 pm PST -- called with (JaMMickeyMouseImpl) .callinit Êʘ™Icodešœ Ïmœ1™