DEFINITION MODULE OptGadToolsL{"gadtools.library",-36};
(* 29-May-1993/bp *)

FROM SYSTEM IMPORT ADDRESS;

FROM ExecD IMPORT MsgPortPtr,LibraryPtr;

FROM GraphicsD IMPORT RastPortPtr;

FROM IntuitionD IMPORT
 Gadget,GadgetPtr,IntuiMessagePtr,MenuItemPtr,MenuPtr,RequesterPtr,
 ScreenPtr,WindowPtr;

FROM UtilityD IMPORT TagItemPtr;

IMPORT
 d:GadToolsD,R;

VAR
 gadtoolsVersion:INTEGER;
 gadtoolsBase:LibraryPtr;

CONST
 gadtoolsMinVersion=36;
 gadtoolsName="gadtools.library";

PROCEDURE CreateContext(
           VAR glistptr{R.A0}:GadgetPtr):GadgetPtr; CODE -114;

PROCEDURE CreateGadgetA(
           kind{R.D0}:LONGCARD;
           VAR previous{R.A0}:Gadget;
           VAR ng{R.A1}:d.NewGadget;
           taglist{R.A2}:TagItemPtr):GadgetPtr; CODE -30;

PROCEDURE CreateMenusA(
           newmenu{R.A0}:d.NewMenuPtr;
           taglist{R.A1}:TagItemPtr):MenuPtr; CODE -48;

PROCEDURE DrawBevelBoxA(
           rport{R.A0}:RastPortPtr;
           left{R.D0}:INTEGER;
           top{R.D1}:INTEGER;
           width{R.D2}:INTEGER;
           height{R.D3}:INTEGER;
           taglist{R.A1}:TagItemPtr); CODE -120;

PROCEDURE FreeGadgets(gad{R.A0}:GadgetPtr); CODE -36;

PROCEDURE FreeMenus(menu{R.A0}:MenuPtr); CODE -54;

PROCEDURE FreeVisualInfo(vi{R.A0}:ADDRESS); CODE -132;

PROCEDURE GetVisualInfoA(
           screen{R.A0}:ScreenPtr;
           taglist{R.A1}:TagItemPtr):ADDRESS; CODE -126;

PROCEDURE GTBeginRefresh(win{R.A0}:WindowPtr); CODE -90;

PROCEDURE GTEndRefresh(
           win{R.A0}:WindowPtr;
           complete{R.D0}:BOOLEAN); CODE -96;

PROCEDURE GTFilterIMsg(
           imsg{R.A1}:IntuiMessagePtr):IntuiMessagePtr; CODE -102;

PROCEDURE(*39*) GTGetGadgetAttrsA(
           firstmenu{R.A0}:MenuPtr;
           win{R.A1}:WindowPtr;
           req{R.A2}:RequesterPtr;
           taglist{R.A3}:ADDRESS):LONGINT; CODE -174;

PROCEDURE GTGetIMsg(iport{R.A0}:MsgPortPtr):IntuiMessagePtr; CODE -72;

PROCEDURE GTPostFilterIMsg(
           imsg{R.A1}:IntuiMessagePtr):IntuiMessagePtr; CODE -108;

PROCEDURE GTRefreshWindow(
           win{R.A0}:WindowPtr;
           req{R.A1}:RequesterPtr); CODE -84;

PROCEDURE GTReplyIMsg(imsg{R.A1}:IntuiMessagePtr); CODE -78;

PROCEDURE GTSetGadgetAttrsA(
           gad{R.A0}:GadgetPtr;
           win{R.A1}:WindowPtr;
           req{R.A2}:RequesterPtr;
           taglist{R.A3}:TagItemPtr); CODE -42;

PROCEDURE LayoutMenuItemsA(
           firstitem{R.A0}:MenuItemPtr;
           vi{R.A1}:ADDRESS;
           taglist{R.A2}:TagItemPtr):BOOLEAN; CODE -60;

PROCEDURE LayoutMenusA(
           firstmenu{R.A0}:MenuPtr;
           vi{R.A1}:ADDRESS;
           taglist{R.A2}:TagItemPtr):BOOLEAN; CODE -66;


END OptGadToolsL.lib-36
