(* ------------------------------------------------------------------------
  :Program.       intuisup
  :Contents.      Interface to Torsten Jürgeleits intuisup.library
  :Author.        Johann Semsrott
  :Address.       Märkerweg 50 d
  :Address.       D-2000 Hamburg 61 (Germany)
  :History.       v4.5 14-aug-92 (translated from C)
  :Copyright.     1991 by Torsten Jürgeleit
  :Language.      Modula-2
  :Translator.    M2Amiga V4.0d
  :Remark.        Thanks to Torsten for his great library
  :Bugs.          ?
------------------------------------------------------------------------ *)

DEFINITION MODULE intuisupL {"intuisup.library",4};

FROM SYSTEM         IMPORT  ADDRESS;
FROM IntuitionD     IMPORT  WindowPtr,NewWindowPtr,ScreenPtr,
                            IDCMPFlagSet,GadgetPtr,
                            MenuItemPtr,IntuiMessagePtr;
FROM GraphicsD      IMPORT  TextFontPtr,TextAttrPtr;
FROM ExecD          IMPORT  MsgPortPtr;
FROM DiskFontD      IMPORT  AvailFontHeaderPtr;
IMPORT I: intuisupD;
(************** F U N C T I O N   D E C L A R A T I O N S ***************)

                    (********* R E N D E R **********)
                    
PROCEDURE IGetRenderInfo(screen{8}:ScreenPtr;
                         flags{0}:I.RenderInfoFlagSet):ADDRESS;     CODE - 30;
PROCEDURE IFreeRenderInfo(ri{8}:I.RenderInfoPtr);                   CODE - 36;
PROCEDURE IOpenWindow(ri{8}:I.RenderInfoPtr;
                      nw{9}:NewWindowPtr;
                      flags{0}:I.RWindowFlagSet):WindowPtr;         CODE - 42;
PROCEDURE IClearWindow(ri{8}:I.RenderInfoPtr;win{9}:WindowPtr;
                             leftEdge{0},topEdge{1},
                             width{2},height{3}:INTEGER;
                             flags{4}:I.ClrWindowFlagSet);          CODE - 48;
PROCEDURE ICloseWindow(win{8}:WindowPtr;moreWindows{0}:BOOLEAN);    CODE - 54;
PROCEDURE IAvailFonts(ri{8}:I.RenderInfoPtr):AvailFontHeaderPtr;    CODE - 60;
PROCEDURE IAskFont(ri{8}:I.RenderInfoPtr;
                   ta{9}:TextAttrPtr):TextAttrPtr;                  CODE - 66;
PROCEDURE IOpenFont(ri{8}:I.RenderInfoPtr;
                    ta{9}:TextAttrPtr):TextFontPtr;                 CODE - 72;
                    
                    (********* T E X T S **********)

PROCEDURE IDisplayTexts(ri{8}:I.RenderInfoPtr;
                        win{9}:WindowPtr;
                        td{10}:I.TextDataPtr;
                        hOffset{0},vOffset{1}:INTEGER;
                        lta{11}:ADDRESS);                           CODE - 78;
PROCEDURE IPrintText(ri{8}:I.RenderInfoPtr;
                     win{9}:WindowPtr;
                     text{10}:ADDRESS;
                     leftEdge{0},topEdge{1},type{2}:INTEGER;
                     tdflags{3}:I.TextDataFlagSet;
                     textAttr{11}:TextAttrPtr):INTEGER;             CODE - 84;
PROCEDURE IConvertUnsignedDec(num{0}:LONGCARD;
                              buffer{8}:ADDRESS;
                              cflags{1}:I.ConvertFlagSet):INTEGER;  CODE - 90;
PROCEDURE IConvertSignedDec(num{0}:LONGINT;
                            buffer{8}:ADDRESS;
                            cflags{1}:I.ConvertFlagSet):INTEGER;    CODE - 96;
PROCEDURE IConvertHex(num{0}:LONGCARD;
                      buffer{8}:ADDRESS;
                      cflags{1}:I.ConvertFlagSet):INTEGER;          CODE - 102;
PROCEDURE IConvertBin(num{0}:LONGCARD;
                      buffer{8}:ADDRESS;
                      cflags{1}:I.ConvertFlagSet):INTEGER;          CODE - 108;

                    (********* B O R D E R S **********)

PROCEDURE IDisplayBorders(ri{8}:I.RenderInfoPtr;
                          win{9}:WindowPtr;
                          bd{10}:I.BorderDataPtr;
                          hOffset{0},vOffset{1}:INTEGER);           CODE - 114;
PROCEDURE IDrawBorder(ri{8}:I.RenderInfoPtr;
                      win{9}:WindowPtr;
                      leftEdge{0},topEdge{1},
                      width{2},height{3},
                      type{4}:INTEGER);                             CODE - 120;

                    (********* G A D G E T S **********)

PROCEDURE ICreateGadgets(ri{8}:I.RenderInfoPtr;
                         gd{9}:I.GadgetDataPtr;
                         hOffset{0},vOffset{1}:INTEGER;
                         lta{10}:ADDRESS):I.GadgetListPtr;          CODE - 126;
PROCEDURE IFreeGadgets(gl{8}:I.GadgetListPtr);                      CODE - 132;
PROCEDURE IDisplayGadgets(win{8}:WindowPtr;gl{9}:I.GadgetListPtr);  CODE - 138;
PROCEDURE IRefreshGadgets(gl{8}:I.GadgetListPtr);                   CODE - 144;
PROCEDURE IModifyGadget(gl{8}:I.GadgetListPtr;  
                        dataEntry{0},
                        leftEdge{1},topEdge{2},
                        width{3},height{4}:INTEGER);                CODE - 150;
PROCEDURE ISetGadgetAttributes(gl{8}:I.GadgetListPtr;
                               dataEntry{0}:INTEGER;
                               flagMask{1},flagBits{2}:I.GadgetDataFlagSet;
                               data1{3},data2{4}:LONGINT;
                               data3{9}:ADDRESS):LONGINT;           CODE - 156;
PROCEDURE IActivateInputGadget(gl{8}:I.GadgetListPtr;
                               dataEntry{0}:INTEGER);               CODE - 162;
PROCEDURE IGadgetAddress(gl{8}:I.GadgetListPtr;
                         dataEntry{0}:INTEGER):GadgetPtr;           CODE - 168;
PROCEDURE IRemoveGadgets(gl{8}:I.GadgetListPtr);                    CODE - 174;
PROCEDURE IGetMsg(uport{8}:MsgPortPtr):IntuiMessagePtr;             CODE - 180;
PROCEDURE IReplyMsg(imsg{8}:IntuiMessagePtr);                       CODE - 186;

                    (********* R E Q U E S T E R **********)

PROCEDURE IAutoRequest (win{8}:WindowPtr;
                        title{9}:ADDRESS;
                        text{10}:ADDRESS;
                        pos{11}:ADDRESS;
                        neg{0}:ADDRESS;
                        posidcmp{1}:IDCMPFlagSet;
                        negidcmp{2}:IDCMPFlagSet;
                        flags{3}:I.AutoRequesterFlagSet;
                        lta{4}:ADDRESS):BOOLEAN;                    CODE - 192;
PROCEDURE IDisplayRequester(win{8}:WindowPtr;
                            rd{9}:I.RequesterDataPtr;
                            lta{10}:ADDRESS):I.RequesterListPtr;    CODE - 198;
PROCEDURE IRemoveRequester(rl{8}:I.RequesterListPtr);               CODE - 204;
                    
                    (********* M E N U S **********)

PROCEDURE ICreateMenu(ri{8}:I.RenderInfoPtr;
                      win{9}:WindowPtr;
                      md{10}:I.MenuDataPtr;
                      ta{11}:TextAttrPtr;
                      lta{0}:ADDRESS):I.MenuListPtr;                CODE - 210;
PROCEDURE IAttachMenu(win{8}:WindowPtr;ml{9}:I.MenuListPtr);        CODE - 216;
PROCEDURE IMenuItemAddress(ml{8}:I.MenuListPtr;
                           menuNum{0}:CARDINAL):MenuItemPtr;        CODE - 222;
PROCEDURE IRemoveMenu(ml{8}:I.MenuListPtr):WindowPtr;               CODE - 228;
PROCEDURE IFreeMenu(ml{8}:I.MenuListPtr);                           CODE - 234;

                    (********* T E X T   F I L E S **********)

PROCEDURE IOpenTextFile(name{8}:ADDRESS;
                        readbuffersize{0}:CARDINAL;
                        linebuffersize{1}:CARDINAL;
                        flags{2}:I.TextFileFlagSet):I.FileDataPtr;      CODE - 240;
PROCEDURE IReadTextLine(fd{8}:I.FileDataPtr):INTEGER;               CODE - 246;
PROCEDURE ICloseTextFile(fd{8}:I.FileDataPtr);                      CODE - 252;

                    (********* L A N G U A G E **********)

PROCEDURE IBuildLanguageTextArray(name{8}:ADDRESS;
                                  entries{0}:CARDINAL):ADDRESS;     CODE - 258;
PROCEDURE IGetLanguageText(text{8}:ADDRESS;
                           textarray{9}:ADDRESS):ADDRESS;           CODE - 264;
PROCEDURE IFreeLanguageTextArray(textarray{8}:ADDRESS);             CODE - 270;

                    (********* M O U S E   P O I N T E R **********)

PROCEDURE IChangeMousePointer(win{8}:WindowPtr;
                              pd{9}:I.PointerDataPtr);              CODE - 276;
PROCEDURE IRestoreMousePointer(win{8}:WindowPtr);                   CODE - 282;
PROCEDURE IMoveMousePointer(win{8}:WindowPtr;
                            x{0}:INTEGER;y{1}:INTEGER;
                            button{2}:BOOLEAN);                     CODE - 288;

PROCEDURE IConvertRawKeyToASCII(imsg{8}:IntuiMessagePtr);           CODE - 294;

END intuisupL.
