|##########| |#MAGIC #|FDLAGMKN |#PROJECT #|"" |#PATHS #|"StdProject" |#LINK #|"" |#GUIDE #|"" |#STACK #|"4096" |#FLAGS #|xx---x-xxxx--xx----------------- |#USERSW #|--x----------------------------- |#USERMASK#|-------------------------------- |#SWITCHES#|xx---xxxxx-xx--- |##########| DEFINITION MODULE MCCTime; (* ** ** Copyright © 1997 Kai Hofmann. All rights reserved. ** Registered MUI custom class! ** ** $VER: MCCTime.def 12.5 (18.10.97) ** ** Cluster interface model by henning.thielemann@student.uni-halle.de *) FROM SYSTEM IMPORT SysStringPtr; FROM Intuition IMPORT MsgRoot; FROM Utility IMPORT HookPtr; FROM MuiO IMPORT CBOOLEAN, ObjectRec, MuiTags, MethodID; CONST cTime = "Time.mcc"; TYPE TimeRec = RECORD OF ObjectRec END; TimeObject = POINTER TO TimeRec; DayChanges = (normal, winterToSummer, summerToWinter); Compare = (less = -1, equal = 0, greater = 1); TimeTags = TAGS OF MuiTags timeSecs = $81EE0080 : LONGCARD; timeHour = $81EE0081 : SHORTCARD; timeMinute = $81EE0082 : SHORTCARD; timeSecond = $81EE0083 : SHORTCARD; timeMinHour = $81EE0084 : SHORTCARD; timeMinMinute = $81EE0085 : SHORTCARD; timeMinSecond = $81EE0086 : SHORTCARD; timeMaxHour = $81EE0087 : SHORTCARD; timeMaxMinute = $81EE0088 : SHORTCARD; timeMaxSecond = $81EE0089 : SHORTCARD; timeZoneMinute = $81EE008B : SHORTINT; timeNextDay = $81EE008C : SHORTCARD; timePrevDay = $81EE008D : SHORTCARD; timeDaylightSaving = $81EE008E : CBOOLEAN; timeChangeHour = $81EE008F : SHORTCARD; timeChangeDay = $81EE0095 : DayChanges; END; TimeTagAPtr = POINTER TO ARRAY OF TimeTags; CONST mTimeIncrease = MethodID($81EE0092); mTimeDecrease = MethodID($81EE0093); mTimeSetCurrent = MethodID($81EE0094); mTimeCompare = MethodID($81EE0096); TYPE pTimeIncrease = RECORD OF MsgRoot seconds : LONGCARD; END; pTimeDecrease = RECORD OF MsgRoot seconds : LONGCARD; END; pTimeSetCurrent = RECORD OF MsgRoot END; pTimeCompare = RECORD OF MsgRoot obj : TimeObject; END; (* In this case, there is no simplification by implementing Cluster methods as interface for MUI methods. Please use DoMethod instead, like C programmers does. METHOD Increase (o : TimeObject); METHOD Decrease (o : TimeObject); METHOD SetCurrent (o : TimeObject); METHOD Compare (o : TimeObject); *) PROCEDURE MakeTimeObjectA (tags : TimeTagAPtr) : TimeObject; PROCEDURE MakeTimeObject (tags : LIST OF TimeTags) : TimeObject; GROUP TypeGrp = DayChanges, Compare; EssentialGrp = cTime, TimeRec, TimeObject, TimeTags, TimeTagAPtr, mTimeIncrease, pTimeIncrease, mTimeDecrease, pTimeDecrease, mTimeSetCurrent, pTimeSetCurrent, mTimeCompare, pTimeCompare, MakeTimeObject, MakeTimeObjectA; All = EssentialGrp; END MCCTime.