DEFINITION MODULE AmigaLib;

(*
 *	24.04.93/bp
 *	Wichtige fehlende BOOPSI-Prozeduren aus amiga.lib
 *	Alle V36!!
 *
 *)

FROM SYSTEM IMPORT ADDRESS;
FROM IntuitionD IMPORT IClassPtr;
FROM UtilityD   IMPORT HookPtr;
IMPORT R;

TYPE
  HLHookProc=PROCEDURE((*hook*) HookPtr,
                       (*obj*)  ADDRESS,
                       (*msg*)  ADDRESS):ADDRESS;

PROCEDURE(*36*) CoerceMethodA(
                 cl:IClassPtr;
                 obj:ADDRESS;
                 msg:ADDRESS):ADDRESS;

PROCEDURE(*36*) DoMethodA(
                 obj:ADDRESS;
                 msg:ADDRESS):ADDRESS;

PROCEDURE(*36*) DoSuperMethodA(
                 cl:IClassPtr;
                 obj:ADDRESS;
                 msg:ADDRESS):ADDRESS;

(* Es gibt in der amigalib kein SetSuperAttrsA,
   aber hier muss es so heissen! *)
PROCEDURE(*36*) SetSuperAttrsA(
                 cl:IClassPtr;
                 obj:ADDRESS;
                 tags:ADDRESS):ADDRESS;

(* Wie UtilityD.CallHookPkt: Stack statt Register
   Ist in M2Amiga aber Unsinn, also in Regs! *)
PROCEDURE(*36*) CallHookA(
                 hook{R.A0}:HookPtr;
                 object{R.A2}:ADDRESS;
                 paramPacket{R.A1}:ADDRESS):ADDRESS;

(* Dies ist dann die Standard-Prozedur fuer hook^.entry,
   die eine Prozedur HLHookProc in subEntry aufruft. *)
PROCEDURE(*36*) HookEntry(
                 hook{R.A0}:HookPtr;
                 obj{R.A2}:ADDRESS;
                 msg{R.A1}:ADDRESS):ADDRESS;

END AmigaLib.def
