home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / HISOFTPASCAL2,0-2.DMS / in.adf / Units / Intuition.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-05-20  |  31.3 KB  |  1,861 lines

  1. unit Intuition;
  2.  
  3. INTERFACE
  4. uses Exec, Graphics, Input, Keymap, Timer;
  5.  
  6.  
  7. type
  8.     pBorder = ^tBorder;
  9.     tBorder = record
  10.         LeftEdge: integer;
  11.         TopEdge: integer;
  12.         FrontPen: byte;
  13.         BackPen: byte;
  14.         DrawMode: byte;
  15.         Count: shortint;
  16.         XY: pinteger;
  17.         NextBorder: pBorder;
  18.         end;
  19.  
  20.     pMenu = ^tMenu;
  21.     pMenuItem = ^tMenuItem;
  22.     tMenu = record
  23.         NextMenu: pMenu;
  24.         LeftEdge: integer;
  25.         TopEdge: integer;
  26.         Width: integer;
  27.         Height: integer;
  28.         Flags: word;
  29.         MenuName: pshortint;
  30.         FirstItem: pMenuItem;
  31.         JazzX: integer;
  32.         JazzY: integer;
  33.         BeatX: integer;
  34.         BeatY: integer;
  35.         end;
  36.  
  37.     pScreen = ^tScreen;
  38.     pWindow = ^tWindow;
  39.     pGadget = ^tGadget;
  40.     tScreen = record
  41.         NextScreen: pScreen;
  42.         FirstWindow: pWindow;
  43.         LeftEdge: integer;
  44.         TopEdge: integer;
  45.         Width: integer;
  46.         Height: integer;
  47.         MouseY: integer;
  48.         MouseX: integer;
  49.         Flags: word;
  50.         Title: pbyte;
  51.         DefaultTitle: pbyte;
  52.         BarHeight: shortint;
  53.         BarVBorder: shortint;
  54.         BarHBorder: shortint;
  55.         MenuVBorder: shortint;
  56.         MenuHBorder: shortint;
  57.         WBorTop: shortint;
  58.         WBorLeft: shortint;
  59.         WBorRight: shortint;
  60.         WBorBottom: shortint;
  61.         Font: pTextAttr;
  62.         ViewPort: tViewPort;
  63.         RastPort: tRastPort;
  64.         BitMap: tBitMap;
  65.         LayerInfo: tLayer_Info;
  66.         FirstGadget: pGadget;
  67.         DetailPen: byte;
  68.         BlockPen: byte;
  69.         SaveColor0: word;
  70.         BarLayer: pLayer;
  71.         ExtData: pbyte;
  72.         UserData: pbyte;
  73.         end;
  74.  
  75.     pPropInfo = ^tPropInfo;
  76.     tPropInfo = record
  77.         Flags: word;
  78.         HorizPot: word;
  79.         VertPot: word;
  80.         HorizBody: word;
  81.         VertBody: word;
  82.         CWidth: word;
  83.         CHeight: word;
  84.         HPotRes: word;
  85.         VPotRes: word;
  86.         LeftBorder: word;
  87.         TopBorder: word;
  88.         end;
  89.  
  90.     pRemember = ^tRemember;
  91.     tRemember = record
  92.         NextRemember: pRemember;
  93.         RememberSize: long;
  94.         Memory: pbyte;
  95.         end;
  96.  
  97.     pStringInfo = ^tStringInfo;
  98.     tStringInfo = record
  99.         Buffer: pbyte;
  100.         UndoBuffer: pbyte;
  101.         BufferPos: integer;
  102.         MaxChars: integer;
  103.         DispPos: integer;
  104.         UndoPos: integer;
  105.         NumChars: integer;
  106.         DispCount: integer;
  107.         CLeft: integer;
  108.         CTop: integer;
  109.         LayerPtr: pLayer;
  110.         LongInt_: longint;
  111.         AltKeyMap: pKeyMap;
  112.         end;
  113.  
  114.     pIntuiMessage = ^tIntuiMessage;
  115.     tIntuiMessage = record
  116.         ExecMessage: tMessage;
  117.         Class: long;
  118.         Code: word;
  119.         Qualifier: word;
  120.         IAddress: pointer;
  121.         MouseX: integer;
  122.         MouseY: integer;
  123.         Seconds: long;
  124.         Micros: long;
  125.         IDCMPWindow: pWindow;
  126.         SpecialLink: pIntuiMessage;
  127.         end;
  128.  
  129.     pImage = ^tImage;
  130.     pNewWindow = ^tNewWindow;
  131.     tNewWindow = record
  132.         LeftEdge: integer;
  133.         TopEdge: integer;
  134.         Width: integer;
  135.         Height: integer;
  136.         DetailPen: shortint;
  137.         BlockPen: shortint;
  138.         IDCMPFlags: long;
  139.         Flags: long;
  140.         FirstGadget: pGadget;
  141.         CheckMark: pImage;
  142.         Title: pbyte;
  143.         Screen: pScreen;
  144.         BitMap: pBitMap;
  145.         MinWidth: integer;
  146.         MinHeight: integer;
  147.         MaxWidth: word;
  148.         MaxHeight: word;
  149.         Type_: word;
  150.         end;
  151.  
  152.     pRequester = ^tRequester;
  153.     tWindow = record
  154.         NextWindow: pWindow;
  155.         LeftEdge: integer;
  156.         TopEdge: integer;
  157.         Width: integer;
  158.         Height: integer;
  159.         MouseY: integer;
  160.         MouseX: integer;
  161.         MinWidth: integer;
  162.         MinHeight: integer;
  163.         MaxWidth: word;
  164.         MaxHeight: word;
  165.         Flags: long;
  166.         MenuStrip: pMenu;
  167.         Title: pbyte;
  168.         FirstRequest: pRequester;
  169.         DMRequest: pRequester;
  170.         ReqCount: integer;
  171.         WScreen: pScreen;
  172.         RPort: pRastPort;
  173.         BorderLeft: shortint;
  174.         BorderTop: shortint;
  175.         BorderRight: shortint;
  176.         BorderBottom: shortint;
  177.         BorderRPort: pRastPort;
  178.         FirstGadget: pGadget;
  179.         Parent: pWindow;
  180.         Descendant: pWindow;
  181.         Pointer: pword;
  182.         PtrHeight: shortint;
  183.         PtrWidth: shortint;
  184.         XOffset: shortint;
  185.         YOffset: shortint;
  186.         IDCMPFlags: long;
  187.         UserPort: pMsgPort;
  188.         WindowPort: pMsgPort;
  189.         MessageKey: pIntuiMessage;
  190.         DetailPen: byte;
  191.         BlockPen: byte;
  192.         CheckMark: pImage;
  193.         ScreenTitle: pbyte;
  194.         GZZMouseX: integer;
  195.         GZZMouseY: integer;
  196.         GZZWidth: integer;
  197.         GZZHeight: integer;
  198.         ExtData: pbyte;
  199.         UserData: pshortint;
  200.         WLayer: pLayer;
  201.         IFont: pTextFont;
  202.         end;
  203.  
  204.     pPreferences = ^tPreferences;
  205.     tPreferences = record
  206.         FontHeight: shortint;
  207.         PrinterPort: byte;
  208.         BaudRate: word;
  209.         KeyRptSpeed: ttimeval;
  210.         KeyRptDelay: ttimeval;
  211.         DoubleClick: ttimeval;
  212.         PointerMatrix: array [0..35] of word;
  213.         XOffset: shortint;
  214.         YOffset: shortint;
  215.         color17: word;
  216.         color18: word;
  217.         color19: word;
  218.         PointerTicks: word;
  219.         color0: word;
  220.         color1: word;
  221.         color2: word;
  222.         color3: word;
  223.         ViewXOffset: shortint;
  224.         ViewYOffset: shortint;
  225.         ViewInitX: integer;
  226.         ViewInitY: integer;
  227.         EnableCLI: integer;
  228.         PrinterType: word;
  229.         PrinterFilename: array [0..29] of byte;
  230.         PrintPitch: word;
  231.         PrintQuality: word;
  232.         PrintSpacing: word;
  233.         PrintLeftMargin: word;
  234.         PrintRightMargin: word;
  235.         PrintImage: word;
  236.         PrintAspect: word;
  237.         PrintShade: word;
  238.         PrintThreshold: integer;
  239.         PaperSize: word;
  240.         PaperLength: word;
  241.         PaperType: word;
  242.         SerRWBits: byte;
  243.         SerStopBuf: byte;
  244.         SerParShk: byte;
  245.         LaceWB: byte;
  246.         WorkName: array [0..29] of byte;
  247.         RowSizeChange: shortint;
  248.         ColumnSizeChange: shortint;
  249.         PrintFlags: word;
  250.         PrintMaxWidth: word;
  251.         PrintMaxHeight: word;
  252.         PrintDensity: byte;
  253.         PrintXOffset: byte;
  254.         wb_Width: word;
  255.         wb_Height: word;
  256.         wb_Depth: byte;
  257.         ext_size: byte;
  258.         end;
  259.  
  260.     pIntuitionBase = ^tIntuitionBase;
  261.     tIntuitionBase = record
  262.         LibNode: tLibrary;
  263.         ViewLord: tView;
  264.         ActiveWindow: pWindow;
  265.         ActiveScreen: pScreen;
  266.         FirstScreen: pScreen;
  267.         Flags: long;
  268.         MouseY: integer;
  269.         MouseX: integer;
  270.         Seconds: long;
  271.         Micros: long;
  272.         end;
  273.  
  274.     pIntuiText = ^tIntuiText;
  275.     tIntuiText = record
  276.         FrontPen: byte;
  277.         BackPen: byte;
  278.         DrawMode: byte;
  279.         LeftEdge: integer;
  280.         TopEdge: integer;
  281.         ITextFont: pTextAttr;
  282.         IText: pbyte;
  283.         NextText: pIntuiText;
  284.         end;
  285.  
  286.     tRequester = record
  287.         OlderRequest: pRequester;
  288.         LeftEdge: integer;
  289.         TopEdge: integer;
  290.         Width: integer;
  291.         Height: integer;
  292.         RelLeft: integer;
  293.         RelTop: integer;
  294.         ReqGadget: pGadget;
  295.         ReqBorder: pBorder;
  296.         ReqText: pIntuiText;
  297.         Flags: word;
  298.         BackFill: byte;
  299.         ReqLayer: pLayer;
  300.         ReqPad1: array [0..31] of byte;
  301.         ImageBMap: pBitMap;
  302.         RWindow: pWindow;
  303.         ReqPad2: array [0..35] of byte;
  304.         end;
  305.  
  306.     tImage = record
  307.         LeftEdge: integer;
  308.         TopEdge: integer;
  309.         Width: integer;
  310.         Height: integer;
  311.         Depth: integer;
  312.         ImageData: pword;
  313.         PlanePick: byte;
  314.         PlaneOnOff: byte;
  315.         NextImage: pImage;
  316.         end;
  317.  
  318.     tGadget = record
  319.         NextGadget: pGadget;
  320.         LeftEdge: integer;
  321.         TopEdge: integer;
  322.         Width: integer;
  323.         Height: integer;
  324.         Flags: word;
  325.         Activation: word;
  326.         GadgetType: word;
  327.         GadgetRender: pointer;
  328.         SelectRender: pointer;
  329.         GadgetText: pIntuiText;
  330.         MutualExclude: longint;
  331.         SpecialInfo: pointer;
  332.         GadgetID: word;
  333.         UserData: pointer;
  334.         end;
  335.  
  336.     pBoolInfo = ^tBoolInfo;
  337.     tBoolInfo = record
  338.         Flags: word;
  339.         Mask: pword;
  340.         Reserved: long;
  341.         end;
  342.  
  343.     tMenuItem = record
  344.         NextItem: pMenuItem;
  345.         LeftEdge: integer;
  346.         TopEdge: integer;
  347.         Width: integer;
  348.         Height: integer;
  349.         Flags: word;
  350.         MutualExclude: longint;
  351.         ItemFill: pointer;
  352.         SelectFill: pointer;
  353.         Command: shortint;
  354.         SubItem: pMenuItem;
  355.         NextSelect: word;
  356.         end;
  357.  
  358.     pNewScreen = ^tNewScreen;
  359.     tNewScreen = record
  360.         LeftEdge: integer;
  361.         TopEdge: integer;
  362.         Width: integer;
  363.         Height: integer;
  364.         Depth: integer;
  365.         DetailPen: byte;
  366.         BlockPen: byte;
  367.         ViewModes: word;
  368.         Type_: word;
  369.         Font: pTextAttr;
  370.         DefaultTitle: pbyte;
  371.         Gadgets: pGadget;
  372.         CustomBitMap: pBitMap;
  373.         end;
  374.  
  375.     ppRemember = ^pRemember;
  376.  
  377.  
  378. var
  379.     IntuitionBase: pIntuitionBase;
  380.  
  381.  
  382. const
  383.     SYSREQUEST = $4000;
  384.     BEEPING = $20;
  385.     TOPAZ_SIXTY = 9;
  386.     FANFOLD = 0;
  387.     ALTRIGHT = $20;
  388.     CHECKIT = 1;
  389.     WBENCHWINDOW = $2000000;
  390.     SSTOP_BITS = $F0;
  391.     SMART_REFRESH = 0;
  392.     SBUF_4096 = 3;
  393.     PREDRAWN = 2;
  394.     AUTOKNOB = 1;
  395.     FREEVERT = 4;
  396.     OKOK = 1;
  397.     WBENCHCLOSE = 2;
  398.     AUTOBACKPEN = 1;
  399.     BOTTOMBORDER = $80;
  400.     KNOBVMIN = 4;
  401.     ACTIVEWINDOW = $40000;
  402.     WINDOWACTIVE = $2000;
  403.     SELECTUP = $E8;
  404.     OKIMATE_20 = 9;
  405.     GREY_SCALE2 = $1000;
  406.     N_TRACTOR = $20;
  407.     SHSHAKE_NONE = 2;
  408.     SBUFSIZE_BITS = $F;
  409.     STRINGCENTER = $200;
  410.     CUSTOMBITMAP = $40;
  411.     SHSHAKE_BITS = $F;
  412.     NEWPREFS = $4000;
  413.     SHADE_GREYSCALE = 1;
  414.     CORRECT_BLUE = 4;
  415.     AUTOITEXTFONT = 0;
  416.     STDSCREENHEIGHT = $FFFFFFFF;
  417.     REQOFFWINDOW = $1000;
  418.     CUSTOMSCREEN = $F;
  419.     US_LEGAL = $10;
  420.     POINTREL = 1;
  421.     DIAB_630 = 4;
  422.     MENUDOWN = $69;
  423.     HIGHBOX = $80;
  424.     GADGET0002 = 2;
  425.     LOWCOMMWIDTH = $10;
  426.     W_TRACTOR = $30;
  427.     MENUNULL = $FFFF;
  428.     MENUTOGGLED = $4000;
  429.     ALTLEFT = $10;
  430.     RIGHTBORDER = $10;
  431.     PARALLEL_PRINTER = 0;
  432.     BAUD_110 = 0;
  433.     US_LETTER = 0;
  434.     GADGIMMEDIATE = 2;
  435.     BOOLGADGET = 1;
  436.     DISKREMOVED = $10000;
  437.     BAUD_300 = 1;
  438.     ITEMTEXT = 2;
  439.     KNOBHIT = $100;
  440.     INTEGER_SCALING = $100;
  441.     GADGIMAGE = 4;
  442.     MENUCANCEL = 2;
  443.     AUTOFRONTPEN = 0;
  444.     MIDRAWN = $100;
  445.     OKABORT = 4;
  446.     REFRESHBITS = $C0;
  447.     BAUD_19200 = 6;
  448.     AUTOTOPEDGE = 3;
  449.     LACEWB = 1;
  450.     AMIGARIGHT = $80;
  451.     MAXBODY = $FFFF;
  452.     SHADE_COLOR = 2;
  453.     CORRECT_RGB_MASK = 7;
  454.     CHECKWIDTH = $13;
  455.     COMMSEQ = 4;
  456.     NOISYREQ = 4;
  457.     SUPER_BITMAP = $80;
  458.     ASPECT_HORIZ = 0;
  459.     PIXEL_DIMENSIONS = $40;
  460.     ISDRAWN = $1000;
  461.     WINDOWSIZING = 1;
  462.     RMBTRAP = $10000;
  463.     CBM_MPS1000 = 3;
  464.     GRELHEIGHT = $40;
  465.     MENUWAITING = 3;
  466.     SCREENQUIET = $100;
  467.     CLOSEWINDOW_ = $200;
  468.     GADGETDOWN = $20;
  469.     LONGINT_ = $800;
  470.     GADGDISABLED = $100;
  471.     SUPFRONT = $50;
  472.     IMAGE_NEGATIVE = 1;
  473.     CORRECT_RED = 1;
  474.     FLOYD_DITHERING = $400;
  475.     HIGHIMAGE = 0;
  476.     ENDGADGET = 4;
  477.     WINDOWDEPTH = 4;
  478.     EPSON_JX_80 = 8;
  479.     CURSORUP = $4C;
  480.     LEFTBORDER = $20;
  481.     WBENCHOPEN = 1;
  482.     WINDOWCLOSE = 8;
  483.     WUPFRONT = $40;
  484.     MENUHOT = 1;
  485.     SBUF_16000 = 5;
  486.     HP_LASERJET = $B;
  487.     PROPGADGET = 3;
  488.     SIZEBBOTTOM = $20;
  489.     TOPAZ_EIGHTY = 8;
  490.     GADGETTYPE = $FC00;
  491.     MOUSEBUTTONS = 8;
  492.     GADGHCOMP = 0;
  493.     NEWSIZE = 2;
  494.     DIAB_ADV_D25 = 5;
  495.     SPARITY_EVEN = 1;
  496.     AMIGALEFT = $40;
  497.     GADGHNONE = 3;
  498.     STRINGRIGHT = $400;
  499.     VANILLAKEY = $200000;
  500.     HALFTONE_DITHERING = $200;
  501.     DIMENSIONS_MASK = $F0;
  502.     SINGLE = $80;
  503.     SBUF_512 = 0;
  504.     SPARITY_NONE = 0;
  505.     HIGHFLAGS = $C0;
  506.     WBENCHMESSAGE = $20000;
  507.     DEADEND_ALERT = $80000000;
  508.     SPARITY_BITS = $F0;
  509.     AUTONEXTTEXT = 0;
  510.     BOOLEXTEND = $2000;
  511.     QUME_LP_20 = $A;
  512.     ABSOLUTE_DIMENSIONS = $20;
  513.     BORDERLESS = $800;
  514.     ANTI_ALIAS = $800;
  515.     WINDOWDRAG = 2;
  516.     CUSTOM_NAME = 0;
  517.     SHSHAKE_XON = 0;
  518.     MENUTOGGLE = 8;
  519.     FOLLOWMOUSE = 8;
  520.     POINTERSIZE = $24;
  521.     CURSORRIGHT = $4E;
  522.     SUPER_UNUSED = $FCFC0000;
  523.     SELECTDOWN = $68;
  524.     SCRGADGET = $4000;
  525.     REQGADGET = $1000;
  526.     REPORTMOUSE_ = $200;
  527.     SHSHAKE_RTS = 1;
  528.     DITHERING_MASK = $600;
  529.     SDRAGGING = $30;
  530.     SIZEBRIGHT = $10;
  531.     ASPECT_VERT = 1;
  532.     HP_LASERJET_PLUS = $C;
  533.     BOUNDED_DIMENSIONS = $10;
  534.     NOITEM = $3F;
  535.     INACTIVEWINDOW = $80000;
  536.     NOCAREREFRESH = $20000;
  537.     LW_RESERVED = 1;
  538.     SPARITY_ODD = 2;
  539.     GRELBOTTOM = 8;
  540.     WDRAGGING = $20;
  541.     LETTER = $100;
  542.     GADGHIGHBITS = 3;
  543.     SREAD_BITS = $F0;
  544.     AMIGAKEYS = $C0;
  545.     SDOWNBACK = $70;
  546.     NOMENU = $1F;
  547.     RAWKEY = $400;
  548.     SCREENTYPE = $F;
  549.     SIX_LPI = 0;
  550.     SIZING = $10;
  551.     REQSET = $80;
  552.     BAUD_MIDI = 7;
  553.     WDOWNBACK = $60;
  554.     SCREENBEHIND = $80;
  555.     DRAFT = 0;
  556.     DELTAMOVE = $100000;
  557.     IMAGE_POSITIVE = 0;
  558.     ALPHA_P_101 = 1;
  559.     LOWCHECKWIDTH = $D;
  560.     PROPBORDERLESS = 8;
  561.     INTUITICKS = $400000;
  562.     ELITE = $400;
  563.     MAXPOT = $FFFF;
  564.     BAUD_1200 = 2;
  565.     REQACTIVE = $2000;
  566.     SIMPLE_REFRESH = $40;
  567.     ORDERED_DITHERING = 0;
  568.     MENUUP = $E9;
  569.     CURSORLEFT = $4F;
  570.     CLOSE_ = $80;
  571.     STRGADGET = 4;
  572.     MENUVERIFY = $2000;
  573.     OKCANCEL = 2;
  574.     CUSTOM = $40;
  575.     SWRITE_BITS = $F;
  576.     KEYCODE_B = $35;
  577.     BAUD_2400 = 3;
  578.     GZZGADGET = $2000;
  579.     DIAB_C_150 = 6;
  580.     GRELRIGHT = $10;
  581.     ALTKEYMAP = $1000;
  582.     GADGHBOX = 1;
  583.     LONELYMESSAGE = $80000000;
  584.     GRELWIDTH = $20;
  585.     DEFERREFRESH = $8000;
  586.     SYSGADGET = $8000;
  587.     SIZEVERIFY = 1;
  588.     BACKDROP = $100;
  589.     FILENAME_SIZE = $1E;
  590.     BAUD_4800 = 4;
  591.     COMMWIDTH = $1B;
  592.     WBENCHSCREEN = 1;
  593.     SELECTED = $80;
  594.     FREEHORIZ = 2;
  595.     SERIAL_PRINTER = 1;
  596.     BAUD_9600 = 5;
  597.     AUTOLEFTEDGE = 6;
  598.     MULTIPLY_DIMENSIONS = $80;
  599.     KEYCODE_M = $37;
  600.     CHECKED = $100;
  601.     TOPBORDER = $40;
  602.     PICA = 0;
  603.     CURSORDOWN = $4D;
  604.     KEYCODE_N = $36;
  605.     RECOVERY_ALERT = 0;
  606.     CORRECT_GREEN = 2;
  607.     HIGHCOMP = $40;
  608.     HIGHITEM = $2000;
  609.     REQCLEAR = $1000;
  610.     EPSON = 7;
  611.     ALERT_TYPE = $80000000;
  612.     KEYCODE_Q = $10;
  613.     ITEMENABLED = $10;
  614.     HIGHNONE = $C0;
  615.     EIGHT_LPI = $200;
  616.     BROTHER_15XL = 2;
  617.     GADGETUP = $40;
  618.     ACTIVATE = $1000;
  619.     MENUSTATE = $8000;
  620.     FINE = $800;
  621.     NOSUB = $1F;
  622.     RELVERIFY = 1;
  623.     TOGGLESELECT = $100;
  624.     REFRESHWINDOW = 4;
  625.     WINDOWREFRESH = $1000000;
  626.     CENTER_IMAGE = 8;
  627.     KEYCODE_V = $34;
  628.     MENUENABLED = 1;
  629.     KNOBHMIN = 6;
  630.     SBUF_1024 = 1;
  631.     KEYCODE_X = $32;
  632.     SBUF_8000 = 4;
  633.     BOOLMASK = 1;
  634.     REQVERIFY = $800;
  635.     SHOWTITLE_ = $10;
  636.     GADGHIMAGE = 2;
  637.     IGNORE_DIMENSIONS = 0;
  638.     DISKINSERTED = $8000;
  639.     MOUSEMOVE = $10;
  640.     GIMMEZEROZERO = $400;
  641.     INREQUEST = $4000;
  642.     MENUPICK = $100;
  643.     OTHER_REFRESH = $C0;
  644.     WINDOWTICKED = $4000000;
  645.     SHADE_BW = 0;
  646.     SBUF_2048 = 2;
  647.     AUTODRAWMODE = 1;
  648.  
  649.  
  650. procedure OpenIntuition;
  651. procedure Intuition_ (ievent: pInputEvent);
  652. function AddGadget
  653.         (AddPtr: pWindow;
  654.         Gadget: pGadget;
  655.         Position: word): word;
  656.  
  657. function ClearDMRequest (Window: pWindow): boolean;
  658. procedure ClearMenuStrip (Window: pWindow);
  659. procedure ClearPointer (Window: pWindow);
  660. procedure CloseScreen (Screen: pScreen);
  661. procedure CloseWindow (Window: pWindow);
  662. function CloseWorkBench: boolean;
  663. procedure CurrentTime
  664.         (Seconds: plong;
  665.         Micros: plong);
  666.  
  667. function DisplayAlert
  668.         (AlertNumber: long;
  669.         String_: pbyte;
  670.         Height: integer): boolean;
  671.  
  672. procedure DisplayBeep (Screen: pScreen);
  673. function DoubleClick
  674.         (sseconds: long;
  675.         smicros: long;
  676.         cseconds: long;
  677.         cmicros: long): boolean;
  678.  
  679. procedure DrawBorder
  680.         (RPort: pRastPort;
  681.         Border: pBorder;
  682.         LeftOffset: integer;
  683.         TopOffset: integer);
  684.  
  685. procedure DrawImage
  686.         (RPort: pRastPort;
  687.         Image: pImage;
  688.         LeftOffset: integer;
  689.         TopOffset: integer);
  690.  
  691. procedure EndRequest
  692.         (requester: pRequester;
  693.         window: pWindow);
  694.  
  695. function GetDefPrefs
  696.         (preferences: pPreferences;
  697.         size: integer): pPreferences;
  698.  
  699. function GetPrefs
  700.         (preferences: pPreferences;
  701.         size: integer): pPreferences;
  702.  
  703. procedure InitRequester (req: pRequester);
  704. function ItemAddress
  705.         (MenuStrip: pMenu;
  706.         MenuNumber: word): pMenuItem;
  707.  
  708. procedure ModifyIDCMP
  709.         (Window: pWindow;
  710.         Flags: long);
  711.  
  712. procedure ModifyProp
  713.         (Gadget: pGadget;
  714.         Ptr: pWindow;
  715.         Req: pRequester;
  716.         Flags: word;
  717.         HPos: word;
  718.         VPos: word;
  719.         HBody: word;
  720.         VBody: word);
  721.  
  722. procedure MoveScreen
  723.         (Screen: pScreen;
  724.         dx: integer;
  725.         dy: integer);
  726.  
  727. procedure MoveWindow
  728.         (window: pWindow;
  729.         dx: integer;
  730.         dy: integer);
  731.  
  732. procedure OffGadget
  733.         (Gadget: pGadget;
  734.         Ptr: pWindow;
  735.         Req: pRequester);
  736.  
  737. procedure OffMenu
  738.         (Window: pWindow;
  739.         MenuNumber: word);
  740.  
  741. procedure OnGadget
  742.         (Gadget: pGadget;
  743.         Ptr: pWindow;
  744.         Req: pRequester);
  745.  
  746. procedure OnMenu
  747.         (Window: pWindow;
  748.         MenuNumber: word);
  749.  
  750. function OpenScreen (OSargs: pNewScreen): pScreen;
  751. function OpenWindow (OWargs: pNewWindow): pWindow;
  752. function OpenWorkBench: boolean;
  753. procedure PrintIText
  754.         (rp: pRastPort;
  755.         itext: pIntuiText;
  756.         left: integer;
  757.         top: integer);
  758.  
  759. procedure RefreshGadgets
  760.         (Gadgets: pGadget;
  761.         Ptr: pWindow;
  762.         Req: pRequester);
  763.  
  764. function RemoveGadget
  765.         (RemPtr: pWindow;
  766.         Gadget: pGadget): word;
  767.  
  768. procedure ReportMouse
  769.         (Boolean: boolean;
  770.         Window: pWindow);
  771.  
  772. function Request
  773.         (Requester: pRequester;
  774.         Window: pWindow): boolean;
  775.  
  776. procedure ScreenToBack (Screen: pScreen);
  777. procedure ScreenToFront (Screen: pScreen);
  778. function SetDMRequest
  779.         (Window: pWindow;
  780.         req: pRequester): boolean;
  781.  
  782. function SetMenuStrip
  783.         (Window: pWindow;
  784.         Menu: pMenu): boolean;
  785.  
  786. procedure SetPointer
  787.         (Window: pWindow;
  788.         Pointer: pword;
  789.         Height: integer;
  790.         Width: integer;
  791.         Xoffset: integer;
  792.         Yoffset: integer);
  793.  
  794. procedure SetWindowTitles
  795.         (window: pWindow;
  796.         windowtitle: STRPTR;
  797.         screentitle: STRPTR);
  798.  
  799. procedure ShowTitle
  800.         (Screen: pScreen;
  801.         ShowIt: boolean);
  802.  
  803. procedure SizeWindow
  804.         (window: pWindow;
  805.         dx: integer;
  806.         dy: integer);
  807.  
  808. function ViewAddress: pView;
  809. function ViewPortAddress (window: pWindow): pViewPort;
  810. procedure WindowToBack (window: pWindow);
  811. procedure WindowToFront (window: pWindow);
  812. function WindowLimits
  813.         (window: pWindow;
  814.         minwidth: integer;
  815.         minheight: integer;
  816.         maxwidth: word;
  817.         maxheight: word): boolean;
  818.  
  819. function SetPrefs
  820.         (preferences: pPreferences;
  821.         size: longint;
  822.         flag: boolean): pPreferences;
  823.  
  824. function IntuiTextLength (itext: pIntuiText): longint;
  825. function WBenchToBack: boolean;
  826. function WBenchToFront: boolean;
  827. function AutoRequest
  828.         (Window: pWindow;
  829.         Body: pIntuiText;
  830.         PText: pIntuiText;
  831.         NText: pIntuiText;
  832.         PFlag: long;
  833.         NFlag: long;
  834.         W: integer;
  835.         H: integer): boolean;
  836.  
  837. procedure BeginRefresh (Window: pWindow);
  838. function BuildSysRequest
  839.         (Window: pWindow;
  840.         Body: pIntuiText;
  841.         PosText: pIntuiText;
  842.         NegText: pIntuiText;
  843.         Flags: long;
  844.         W: integer;
  845.         H: integer): pWindow;
  846.  
  847. procedure EndRefresh
  848.         (Window: pWindow;
  849.         Complete: boolean);
  850.  
  851. procedure FreeSysRequest (Window: pWindow);
  852. procedure MakeScreen (Screen: pScreen);
  853. procedure RemakeDisplay;
  854. procedure RethinkDisplay;
  855. function AllocRemember
  856.         (RememberKey: ppRemember;
  857.         Size: long;
  858.         Flags: long): pointer;
  859.  
  860. procedure AlohaWorkbench (wbport: longint);
  861. procedure FreeRemember
  862.         (RememberKey: ppRemember;
  863.         ReallyForget: boolean);
  864.  
  865. function LockIBase (dontknow: long): long;
  866. procedure UnlockIBase (IBLock: long);
  867. function GetScreenData
  868.         (buffer: pointer;
  869.         size: word;
  870.         type_: word;
  871.         screen: pScreen): boolean;
  872.  
  873. procedure RefreshGList
  874.         (Gadgets: pGadget;
  875.         Ptr: pWindow;
  876.         Req: pRequester;
  877.         NumGad: integer);
  878.  
  879. function AddGList
  880.         (AddPtr: pWindow;
  881.         Gadget: pGadget;
  882.         Position: word;
  883.         NumGad: integer;
  884.         Requester: pRequester): word;
  885.  
  886. function RemoveGList
  887.         (RemPtr: pWindow;
  888.         Gadget: pGadget;
  889.         NumGad: integer): word;
  890.  
  891. procedure ActivateWindow (Window: pWindow);
  892. procedure RefreshWindowFrame (Window: pWindow);
  893. function ActivateGadget
  894.         (Gadgets: pGadget;
  895.         Window: pWindow;
  896.         Req: pRequester): boolean;
  897.  
  898. procedure NewModifyProp
  899.         (Gadget: pGadget;
  900.         Ptr: pWindow;
  901.         Req: pRequester;
  902.         Flags: word;
  903.         HPos: word;
  904.         VPos: word;
  905.         HBody: word;
  906.         VBody: word;
  907.         NumGad: integer);
  908.  
  909.  
  910.  
  911. function MENUNUM (n: word): integer;
  912. function ITEMNUM (n: word): integer;
  913. function SUBNUM (n: word): integer;
  914. function SHIFTMENU (n: integer): word;
  915. function SHIFTITEM (n: integer): word;
  916. function SHIFTSUB (n: integer): word;
  917. function FULLMENUNUM (menu, item, sub: integer): word;
  918.  
  919. function SHAKNUM (n: byte): integer;
  920. function SPARNUM (n: byte): integer;
  921. function SRBNUM (n: byte): integer;
  922. function SSBNUM (n: byte): integer;
  923. function SWBNUM (n: byte): integer;
  924.  
  925.  
  926. IMPLEMENTATION
  927. function ITEMNUM;
  928. begin
  929.     ITEMNUM := (n shr 5) and $3F
  930. end;
  931.  
  932. function MENUNUM;
  933. begin
  934.     MENUNUM := n and $1f
  935. end;
  936.  
  937. function SUBNUM;
  938. begin
  939.     SUBNUM := (n shr 11) and $1f
  940. end;
  941.  
  942. function SHIFTITEM;
  943. begin
  944.     SHIFTITEM := (n and $3f) shl 5
  945. end;
  946.  
  947. function SHIFTMENU;
  948. begin
  949.     SHIFTMENU := n and $1f
  950. end;
  951.  
  952. function SHIFTSUB;
  953. begin
  954.     SHIFTSUB := (n and $1f) shl 11
  955. end;
  956.  
  957. function FULLMENUNUM;
  958. begin
  959.     FULLMENUNUM := ((sub and $1f) shl 11) or
  960.                     ((item and $3f) shl 5) or
  961.                       (menu and $1f)
  962. end;
  963.  
  964. function SPARNUM;
  965. begin
  966.     SPARNUM := n shr 4
  967. end;
  968.  
  969. function SHAKNUM;
  970. begin
  971.     SHAKNUM := n and $f
  972. end;
  973.  
  974. function SRBNUM;
  975. begin
  976.     SRBNUM := $8 - (n shr 4)
  977. end;
  978.  
  979. function SSBNUM;
  980. begin
  981.     SSBNUM := $1 + (n shr 4)
  982. end;
  983.  
  984. function SWBNUM;
  985. begin
  986.     SWBNUM := $8 - (n and $f)
  987. end;
  988.  
  989. procedure OpenIntuition; xassembler;
  990. asm
  991.     movem.l    d3-d5/a2/a6,-(sp)
  992.     move.l    IntuitionBase,a6
  993.     jsr        -$1E(a6)
  994.     movem.l    (sp)+,d3-d5/a2/a6
  995. end;
  996.  
  997. procedure Intuition_; xassembler;
  998. asm
  999.     move.l    a6,-(sp)
  1000.     move.l    8(sp),a0
  1001.     move.l    IntuitionBase,a6
  1002.     jsr        -$24(a6)
  1003.     move.l    (sp)+,a6
  1004. end;
  1005.  
  1006. function AddGadget; xassembler;
  1007. asm
  1008.     move.l    a6,-(sp)
  1009.     lea        8(sp),a6
  1010.     move.w    (a6)+,d0
  1011.     move.l    (a6)+,a1
  1012.     move.l    (a6)+,a0
  1013.     move.l    IntuitionBase,a6
  1014.     jsr        -$2A(a6)
  1015.     move.w    d0,$12(sp)
  1016.     move.l    (sp)+,a6
  1017. end;
  1018.  
  1019. function ClearDMRequest; xassembler;
  1020. asm
  1021.     move.l    a6,-(sp)
  1022.     move.l    8(sp),a0
  1023.     move.l    IntuitionBase,a6
  1024.     jsr        -$30(a6)
  1025.     tst.l    d0
  1026.     sne        d0
  1027.     neg.b    d0
  1028.     move.b    d0,$C(sp)
  1029.     move.l    (sp)+,a6
  1030. end;
  1031.  
  1032. procedure ClearMenuStrip; xassembler;
  1033. asm
  1034.     move.l    a6,-(sp)
  1035.     move.l    8(sp),a0
  1036.     move.l    IntuitionBase,a6
  1037.     jsr        -$36(a6)
  1038.     move.l    (sp)+,a6
  1039. end;
  1040.  
  1041. procedure ClearPointer; xassembler;
  1042. asm
  1043.     move.l    a6,-(sp)
  1044.     move.l    8(sp),a0
  1045.     move.l    IntuitionBase,a6
  1046.     jsr        -$3C(a6)
  1047.     move.l    (sp)+,a6
  1048. end;
  1049.  
  1050. procedure CloseScreen; xassembler;
  1051. asm
  1052.     move.l    a6,-(sp)
  1053.     move.l    8(sp),a0
  1054.     move.l    IntuitionBase,a6
  1055.     jsr        -$42(a6)
  1056.     move.l    (sp)+,a6
  1057. end;
  1058.  
  1059. procedure CloseWindow; xassembler;
  1060. asm
  1061.     move.l    a6,-(sp)
  1062.     move.l    8(sp),a0
  1063.     move.l    IntuitionBase,a6
  1064.     jsr        -$48(a6)
  1065.     move.l    (sp)+,a6
  1066. end;
  1067.  
  1068. function CloseWorkBench; xassembler;
  1069. asm
  1070.     move.l    a6,-(sp)
  1071.     move.l    IntuitionBase,a6
  1072.     jsr        -$4E(a6)
  1073.     tst.l    d0
  1074.     sne        d0
  1075.     neg.b    d0
  1076.     move.b    d0,8(sp)
  1077.     move.l    (sp)+,a6
  1078. end;
  1079.  
  1080. procedure CurrentTime; xassembler;
  1081. asm
  1082.     move.l    a6,-(sp)
  1083.     lea        8(sp),a6
  1084.     move.l    (a6)+,a1
  1085.     move.l    (a6)+,a0
  1086.     move.l    IntuitionBase,a6
  1087.     jsr        -$54(a6)
  1088.     move.l    (sp)+,a6
  1089. end;
  1090.  
  1091. function DisplayAlert; xassembler;
  1092. asm
  1093.     move.l    a6,-(sp)
  1094.     lea        8(sp),a6
  1095.     move.w    (a6)+,d1
  1096.     move.l    (a6)+,a0
  1097.     move.l    (a6)+,d0
  1098.     move.l    IntuitionBase,a6
  1099.     jsr        -$5A(a6)
  1100.     tst.l    d0
  1101.     sne        d0
  1102.     neg.b    d0
  1103.     move.b    d0,$12(sp)
  1104.     move.l    (sp)+,a6
  1105. end;
  1106.  
  1107. procedure DisplayBeep; xassembler;
  1108. asm
  1109.     move.l    a6,-(sp)
  1110.     move.l    8(sp),a0
  1111.     move.l    IntuitionBase,a6
  1112.     jsr        -$60(a6)
  1113.     move.l    (sp)+,a6
  1114. end;
  1115.  
  1116. function DoubleClick; xassembler;
  1117. asm
  1118.     movem.l    d3/a6,-(sp)
  1119.     lea        $C(sp),a6
  1120.     move.l    (a6)+,d3
  1121.     move.l    (a6)+,d2
  1122.     move.l    (a6)+,d1
  1123.     move.l    (a6)+,d0
  1124.     move.l    IntuitionBase,a6
  1125.     jsr        -$66(a6)
  1126.     tst.l    d0
  1127.     sne        d0
  1128.     neg.b    d0
  1129.     move.b    d0,$1C(sp)
  1130.     movem.l    (sp)+,d3/a6
  1131. end;
  1132.  
  1133. procedure DrawBorder; xassembler;
  1134. asm
  1135.     move.l    a6,-(sp)
  1136.     lea        8(sp),a6
  1137.     move.w    (a6)+,d1
  1138.     move.w    (a6)+,d0
  1139.     move.l    (a6)+,a1
  1140.     move.l    (a6)+,a0
  1141.     move.l    IntuitionBase,a6
  1142.     jsr        -$6C(a6)
  1143.     move.l    (sp)+,a6
  1144. end;
  1145.  
  1146. procedure DrawImage; xassembler;
  1147. asm
  1148.     move.l    a6,-(sp)
  1149.     lea        8(sp),a6
  1150.     move.w    (a6)+,d1
  1151.     move.w    (a6)+,d0
  1152.     move.l    (a6)+,a1
  1153.     move.l    (a6)+,a0
  1154.     move.l    IntuitionBase,a6
  1155.     jsr        -$72(a6)
  1156.     move.l    (sp)+,a6
  1157. end;
  1158.  
  1159. procedure EndRequest; xassembler;
  1160. asm
  1161.     move.l    a6,-(sp)
  1162.     lea        8(sp),a6
  1163.     move.l    (a6)+,a1
  1164.     move.l    (a6)+,a0
  1165.     move.l    IntuitionBase,a6
  1166.     jsr        -$78(a6)
  1167.     move.l    (sp)+,a6
  1168. end;
  1169.  
  1170. function GetDefPrefs; xassembler;
  1171. asm
  1172.     move.l    a6,-(sp)
  1173.     lea        8(sp),a6
  1174.     move.w    (a6)+,d0
  1175.     move.l    (a6)+,a0
  1176.     move.l    IntuitionBase,a6
  1177.     jsr        -$7E(a6)
  1178.     move.l    d0,$E(sp)
  1179.     move.l    (sp)+,a6
  1180. end;
  1181.  
  1182. function GetPrefs; xassembler;
  1183. asm
  1184.     move.l    a6,-(sp)
  1185.     lea        8(sp),a6
  1186.     move.w    (a6)+,d0
  1187.     move.l    (a6)+,a0
  1188.     move.l    IntuitionBase,a6
  1189.     jsr        -$84(a6)
  1190.     move.l    d0,$E(sp)
  1191.     move.l    (sp)+,a6
  1192. end;
  1193.  
  1194. procedure InitRequester; xassembler;
  1195. asm
  1196.     move.l    a6,-(sp)
  1197.     move.l    8(sp),a0
  1198.     move.l    IntuitionBase,a6
  1199.     jsr        -$8A(a6)
  1200.     move.l    (sp)+,a6
  1201. end;
  1202.  
  1203. function ItemAddress; xassembler;
  1204. asm
  1205.     move.l    a6,-(sp)
  1206.     lea        8(sp),a6
  1207.     move.w    (a6)+,d0
  1208.     move.l    (a6)+,a0
  1209.     move.l    IntuitionBase,a6
  1210.     jsr        -$90(a6)
  1211.     move.l    d0,$E(sp)
  1212.     move.l    (sp)+,a6
  1213. end;
  1214.  
  1215. procedure ModifyIDCMP; xassembler;
  1216. asm
  1217.     move.l    a6,-(sp)
  1218.     movem.l    8(sp),d0/a0
  1219.     move.l    IntuitionBase,a6
  1220.     jsr        -$96(a6)
  1221.     move.l    (sp)+,a6
  1222. end;
  1223.  
  1224. procedure ModifyProp; xassembler;
  1225. asm
  1226.     movem.l    d3-d4/a2/a6,-(sp)
  1227.     lea        $14(sp),a6
  1228.     move.w    (a6)+,d4
  1229.     move.w    (a6)+,d3
  1230.     move.w    (a6)+,d2
  1231.     move.w    (a6)+,d1
  1232.     move.w    (a6)+,d0
  1233.     move.l    (a6)+,a2
  1234.     move.l    (a6)+,a1
  1235.     move.l    (a6)+,a0
  1236.     move.l    IntuitionBase,a6
  1237.     jsr        -$9C(a6)
  1238.     movem.l    (sp)+,d3-d4/a2/a6
  1239. end;
  1240.  
  1241. procedure MoveScreen; xassembler;
  1242. asm
  1243.     move.l    a6,-(sp)
  1244.     lea        8(sp),a6
  1245.     move.w    (a6)+,d1
  1246.     move.w    (a6)+,d0
  1247.     move.l    (a6)+,a0
  1248.     move.l    IntuitionBase,a6
  1249.     jsr        -$A2(a6)
  1250.     move.l    (sp)+,a6
  1251. end;
  1252.  
  1253. procedure MoveWindow; xassembler;
  1254. asm
  1255.     move.l    a6,-(sp)
  1256.     lea        8(sp),a6
  1257.     move.w    (a6)+,d1
  1258.     move.w    (a6)+,d0
  1259.     move.l    (a6)+,a0
  1260.     move.l    IntuitionBase,a6
  1261.     jsr        -$A8(a6)
  1262.     move.l    (sp)+,a6
  1263. end;
  1264.  
  1265. procedure OffGadget; xassembler;
  1266. asm
  1267.     movem.l    a2/a6,-(sp)
  1268.     lea        $C(sp),a6
  1269.     move.l    (a6)+,a2
  1270.     move.l    (a6)+,a1
  1271.     move.l    (a6)+,a0
  1272.     move.l    IntuitionBase,a6
  1273.     jsr        -$AE(a6)
  1274.     movem.l    (sp)+,a2/a6
  1275. end;
  1276.  
  1277. procedure OffMenu; xassembler;
  1278. asm
  1279.     move.l    a6,-(sp)
  1280.     lea        8(sp),a6
  1281.     move.w    (a6)+,d0
  1282.     move.l    (a6)+,a0
  1283.     move.l    IntuitionBase,a6
  1284.     jsr        -$B4(a6)
  1285.     move.l    (sp)+,a6
  1286. end;
  1287.  
  1288. procedure OnGadget; xassembler;
  1289. asm
  1290.     movem.l    a2/a6,-(sp)
  1291.     lea        $C(sp),a6
  1292.     move.l    (a6)+,a2
  1293.     move.l    (a6)+,a1
  1294.     move.l    (a6)+,a0
  1295.     move.l    IntuitionBase,a6
  1296.     jsr        -$BA(a6)
  1297.     movem.l    (sp)+,a2/a6
  1298. end;
  1299.  
  1300. procedure OnMenu; xassembler;
  1301. asm
  1302.     move.l    a6,-(sp)
  1303.     lea        8(sp),a6
  1304.     move.w    (a6)+,d0
  1305.     move.l    (a6)+,a0
  1306.     move.l    IntuitionBase,a6
  1307.     jsr        -$C0(a6)
  1308.     move.l    (sp)+,a6
  1309. end;
  1310.  
  1311. function OpenScreen; xassembler;
  1312. asm
  1313.     move.l    a6,-(sp)
  1314.     move.l    8(sp),a0
  1315.     move.l    IntuitionBase,a6
  1316.     jsr        -$C6(a6)
  1317.     move.l    d0,$C(sp)
  1318.     move.l    (sp)+,a6
  1319. end;
  1320.  
  1321. function OpenWindow; xassembler;
  1322. asm
  1323.     move.l    a6,-(sp)
  1324.     move.l    8(sp),a0
  1325.     move.l    IntuitionBase,a6
  1326.     jsr        -$CC(a6)
  1327.     move.l    d0,$C(sp)
  1328.     move.l    (sp)+,a6
  1329. end;
  1330.  
  1331. function OpenWorkBench; xassembler;
  1332. asm
  1333.     move.l    a6,-(sp)
  1334.     move.l    IntuitionBase,a6
  1335.     jsr        -$D2(a6)
  1336.     tst.l    d0
  1337.     sne        d0
  1338.     neg.b    d0
  1339.     move.b    d0,8(sp)
  1340.     move.l    (sp)+,a6
  1341. end;
  1342.  
  1343. procedure PrintIText; xassembler;
  1344. asm
  1345.     move.l    a6,-(sp)
  1346.     lea        8(sp),a6
  1347.     move.w    (a6)+,d1
  1348.     move.w    (a6)+,d0
  1349.     move.l    (a6)+,a1
  1350.     move.l    (a6)+,a0
  1351.     move.l    IntuitionBase,a6
  1352.     jsr        -$D8(a6)
  1353.     move.l    (sp)+,a6
  1354. end;
  1355.  
  1356. procedure RefreshGadgets; xassembler;
  1357. asm
  1358.     movem.l    a2/a6,-(sp)
  1359.     lea        $C(sp),a6
  1360.     move.l    (a6)+,a2
  1361.     move.l    (a6)+,a1
  1362.     move.l    (a6)+,a0
  1363.     move.l    IntuitionBase,a6
  1364.     jsr        -$DE(a6)
  1365.     movem.l    (sp)+,a2/a6
  1366. end;
  1367.  
  1368. function RemoveGadget; xassembler;
  1369. asm
  1370.     move.l    a6,-(sp)
  1371.     lea        8(sp),a6
  1372.     move.l    (a6)+,a1
  1373.     move.l    (a6)+,a0
  1374.     move.l    IntuitionBase,a6
  1375.     jsr        -$E4(a6)
  1376.     move.w    d0,$10(sp)
  1377.     move.l    (sp)+,a6
  1378. end;
  1379.  
  1380. procedure ReportMouse; xassembler;
  1381. asm
  1382.     move.l    a6,-(sp)
  1383.     moveq    #0,d0
  1384.     lea        8(sp),a6
  1385.     move.l    (a6)+,a0
  1386.     move.b    (a6)+,d0
  1387.     move.l    IntuitionBase,a6
  1388.     jsr        -$EA(a6)
  1389.     move.l    (sp)+,a6
  1390. end;
  1391.  
  1392. function Request; xassembler;
  1393. asm
  1394.     move.l    a6,-(sp)
  1395.     lea        8(sp),a6
  1396.     move.l    (a6)+,a1
  1397.     move.l    (a6)+,a0
  1398.     move.l    IntuitionBase,a6
  1399.     jsr        -$F0(a6)
  1400.     tst.l    d0
  1401.     sne        d0
  1402.     neg.b    d0
  1403.     move.b    d0,$10(sp)
  1404.     move.l    (sp)+,a6
  1405. end;
  1406.  
  1407. procedure ScreenToBack; xassembler;
  1408. asm
  1409.     move.l    a6,-(sp)
  1410.     move.l    8(sp),a0
  1411.     move.l    IntuitionBase,a6
  1412.     jsr        -$F6(a6)
  1413.     move.l    (sp)+,a6
  1414. end;
  1415.  
  1416. procedure ScreenToFront; xassembler;
  1417. asm
  1418.     move.l    a6,-(sp)
  1419.     move.l    8(sp),a0
  1420.     move.l    IntuitionBase,a6
  1421.     jsr        -$FC(a6)
  1422.     move.l    (sp)+,a6
  1423. end;
  1424.  
  1425. function SetDMRequest; xassembler;
  1426. asm
  1427.     move.l    a6,-(sp)
  1428.     lea        8(sp),a6
  1429.     move.l    (a6)+,a1
  1430.     move.l    (a6)+,a0
  1431.     move.l    IntuitionBase,a6
  1432.     jsr        -$102(a6)
  1433.     tst.l    d0
  1434.     sne        d0
  1435.     neg.b    d0
  1436.     move.b    d0,$10(sp)
  1437.     move.l    (sp)+,a6
  1438. end;
  1439.  
  1440. function SetMenuStrip; xassembler;
  1441. asm
  1442.     move.l    a6,-(sp)
  1443.     lea        8(sp),a6
  1444.     move.l    (a6)+,a1
  1445.     move.l    (a6)+,a0
  1446.     move.l    IntuitionBase,a6
  1447.     jsr        -$108(a6)
  1448.     tst.l    d0
  1449.     sne        d0
  1450.     neg.b    d0
  1451.     move.b    d0,$10(sp)
  1452.     move.l    (sp)+,a6
  1453. end;
  1454.  
  1455. procedure SetPointer; xassembler;
  1456. asm
  1457.     movem.l    d3/a6,-(sp)
  1458.     lea        $C(sp),a6
  1459.     move.w    (a6)+,d3
  1460.     move.w    (a6)+,d2
  1461.     move.w    (a6)+,d1
  1462.     move.w    (a6)+,d0
  1463.     move.l    (a6)+,a1
  1464.     move.l    (a6)+,a0
  1465.     move.l    IntuitionBase,a6
  1466.     jsr        -$10E(a6)
  1467.     movem.l    (sp)+,d3/a6
  1468. end;
  1469.  
  1470. procedure SetWindowTitles; xassembler;
  1471. asm
  1472.     movem.l    a2/a6,-(sp)
  1473.     lea        $C(sp),a6
  1474.     move.l    (a6)+,a2
  1475.     move.l    (a6)+,a1
  1476.     move.l    (a6)+,a0
  1477.     move.l    IntuitionBase,a6
  1478.     jsr        -$114(a6)
  1479.     movem.l    (sp)+,a2/a6
  1480. end;
  1481.  
  1482. procedure ShowTitle; xassembler;
  1483. asm
  1484.     move.l    a6,-(sp)
  1485.     moveq    #0,d0
  1486.     move.b    8(sp),d0
  1487.     move.l    $A(sp),a0
  1488.     move.l    IntuitionBase,a6
  1489.     jsr        -$11A(a6)
  1490.     move.l    (sp)+,a6
  1491. end;
  1492.  
  1493. procedure SizeWindow; xassembler;
  1494. asm
  1495.     move.l    a6,-(sp)
  1496.     lea        8(sp),a6
  1497.     move.w    (a6)+,d1
  1498.     move.w    (a6)+,d0
  1499.     move.l    (a6)+,a0
  1500.     move.l    IntuitionBase,a6
  1501.     jsr        -$120(a6)
  1502.     move.l    (sp)+,a6
  1503. end;
  1504.  
  1505. function ViewAddress; xassembler;
  1506. asm
  1507.     move.l    a6,-(sp)
  1508.     move.l    IntuitionBase,a6
  1509.     jsr        -$126(a6)
  1510.     move.l    d0,8(sp)
  1511.     move.l    (sp)+,a6
  1512. end;
  1513.  
  1514. function ViewPortAddress; xassembler;
  1515. asm
  1516.     move.l    a6,-(sp)
  1517.     move.l    8(sp),a0
  1518.     move.l    IntuitionBase,a6
  1519.     jsr        -$12C(a6)
  1520.     move.l    d0,$C(sp)
  1521.     move.l    (sp)+,a6
  1522. end;
  1523.  
  1524. procedure WindowToBack; xassembler;
  1525. asm
  1526.     move.l    a6,-(sp)
  1527.     move.l    8(sp),a0
  1528.     move.l    IntuitionBase,a6
  1529.     jsr        -$132(a6)
  1530.     move.l    (sp)+,a6
  1531. end;
  1532.  
  1533. procedure WindowToFront; xassembler;
  1534. asm
  1535.     move.l    a6,-(sp)
  1536.     move.l    8(sp),a0
  1537.     move.l    IntuitionBase,a6
  1538.     jsr        -$138(a6)
  1539.     move.l    (sp)+,a6
  1540. end;
  1541.  
  1542. function WindowLimits; xassembler;
  1543. asm
  1544.     movem.l    d3/a6,-(sp)
  1545.     lea        $C(sp),a6
  1546.     move.w    (a6)+,d3
  1547.     move.w    (a6)+,d2
  1548.     move.w    (a6)+,d1
  1549.     move.w    (a6)+,d0
  1550.     move.l    (a6)+,a0
  1551.     move.l    IntuitionBase,a6
  1552.     jsr        -$13E(a6)
  1553.     tst.l    d0
  1554.     sne        d0
  1555.     neg.b    d0
  1556.     move.b    d0,$18(sp)
  1557.     movem.l    (sp)+,d3/a6
  1558. end;
  1559.  
  1560. function SetPrefs; xassembler;
  1561. asm
  1562.     move.l    a6,-(sp)
  1563.     moveq    #0,d1
  1564.     move.b    8(sp),d1
  1565.     movem.l    $A(sp),d0/a0
  1566.     move.l    IntuitionBase,a6
  1567.     jsr        -$144(a6)
  1568.     move.l    d0,$12(sp)
  1569.     move.l    (sp)+,a6
  1570. end;
  1571.  
  1572. function IntuiTextLength; xassembler;
  1573. asm
  1574.     move.l    a6,-(sp)
  1575.     move.l    8(sp),a0
  1576.     move.l    IntuitionBase,a6
  1577.     jsr        -$14A(a6)
  1578.     move.l    d0,$C(sp)
  1579.     move.l    (sp)+,a6
  1580. end;
  1581.  
  1582. function WBenchToBack; xassembler;
  1583. asm
  1584.     move.l    a6,-(sp)
  1585.     move.l    IntuitionBase,a6
  1586.     jsr        -$150(a6)
  1587.     tst.l    d0
  1588.     sne        d0
  1589.     neg.b    d0
  1590.     move.b    d0,8(sp)
  1591.     move.l    (sp)+,a6
  1592. end;
  1593.  
  1594. function WBenchToFront; xassembler;
  1595. asm
  1596.     move.l    a6,-(sp)
  1597.     move.l    IntuitionBase,a6
  1598.     jsr        -$156(a6)
  1599.     tst.l    d0
  1600.     sne        d0
  1601.     neg.b    d0
  1602.     move.b    d0,8(sp)
  1603.     move.l    (sp)+,a6
  1604. end;
  1605.  
  1606. function AutoRequest; xassembler;
  1607. asm
  1608.     movem.l    d3/a2-a3/a6,-(sp)
  1609.     lea        $14(sp),a6
  1610.     move.w    (a6)+,d3
  1611.     move.w    (a6)+,d2
  1612.     move.l    (a6)+,d1
  1613.     move.l    (a6)+,d0
  1614.     move.l    (a6)+,a3
  1615.     move.l    (a6)+,a2
  1616.     move.l    (a6)+,a1
  1617.     move.l    (a6)+,a0
  1618.     move.l    IntuitionBase,a6
  1619.     jsr        -$15C(a6)
  1620.     tst.l    d0
  1621.     sne        d0
  1622.     neg.b    d0
  1623.     move.b    d0,$30(sp)
  1624.     movem.l    (sp)+,d3/a2-a3/a6
  1625. end;
  1626.  
  1627. procedure BeginRefresh; xassembler;
  1628. asm
  1629.     move.l    a6,-(sp)
  1630.     move.l    8(sp),a0
  1631.     move.l    IntuitionBase,a6
  1632.     jsr        -$162(a6)
  1633.     move.l    (sp)+,a6
  1634. end;
  1635.  
  1636. function BuildSysRequest; xassembler;
  1637. asm
  1638.     movem.l    a2-a3/a6,-(sp)
  1639.     lea        $10(sp),a6
  1640.     move.w    (a6)+,d2
  1641.     move.w    (a6)+,d1
  1642.     move.l    (a6)+,d0
  1643.     move.l    (a6)+,a3
  1644.     move.l    (a6)+,a2
  1645.     move.l    (a6)+,a1
  1646.     move.l    (a6)+,a0
  1647.     move.l    IntuitionBase,a6
  1648.     jsr        -$168(a6)
  1649.     move.l    d0,$28(sp)
  1650.     movem.l    (sp)+,a2-a3/a6
  1651. end;
  1652.  
  1653. procedure EndRefresh; xassembler;
  1654. asm
  1655.     move.l    a6,-(sp)
  1656.     moveq    #0,d0
  1657.     move.b    8(sp),d0
  1658.     move.l    $A(sp),a0
  1659.     move.l    IntuitionBase,a6
  1660.     jsr        -$16E(a6)
  1661.     move.l    (sp)+,a6
  1662. end;
  1663.  
  1664. procedure FreeSysRequest; xassembler;
  1665. asm
  1666.     move.l    a6,-(sp)
  1667.     move.l    8(sp),a0
  1668.     move.l    IntuitionBase,a6
  1669.     jsr        -$174(a6)
  1670.     move.l    (sp)+,a6
  1671. end;
  1672.  
  1673. procedure MakeScreen; xassembler;
  1674. asm
  1675.     move.l    a6,-(sp)
  1676.     move.l    8(sp),a0
  1677.     move.l    IntuitionBase,a6
  1678.     jsr        -$17A(a6)
  1679.     move.l    (sp)+,a6
  1680. end;
  1681.  
  1682. procedure RemakeDisplay; xassembler;
  1683. asm
  1684.     move.l    a6,-(sp)
  1685.     move.l    IntuitionBase,a6
  1686.     jsr        -$180(a6)
  1687.     move.l    (sp)+,a6
  1688. end;
  1689.  
  1690. procedure RethinkDisplay; xassembler;
  1691. asm
  1692.     move.l    a6,-(sp)
  1693.     move.l    IntuitionBase,a6
  1694.     jsr        -$186(a6)
  1695.     move.l    (sp)+,a6
  1696. end;
  1697.  
  1698. function AllocRemember; xassembler;
  1699. asm
  1700.     move.l    a6,-(sp)
  1701.     lea        8(sp),a6
  1702.     move.l    (a6)+,d1
  1703.     move.l    (a6)+,d0
  1704.     move.l    (a6)+,a0
  1705.     move.l    IntuitionBase,a6
  1706.     jsr        -$18C(a6)
  1707.     move.l    d0,$14(sp)
  1708.     move.l    (sp)+,a6
  1709. end;
  1710.  
  1711. procedure AlohaWorkbench; xassembler;
  1712. asm
  1713.     move.l    a6,-(sp)
  1714.     move.l    8(sp),a0
  1715.     move.l    IntuitionBase,a6
  1716.     jsr        -$192(a6)
  1717.     move.l    (sp)+,a6
  1718. end;
  1719.  
  1720. procedure FreeRemember; xassembler;
  1721. asm
  1722.     move.l    a6,-(sp)
  1723.     moveq    #0,d0
  1724.     move.b    8(sp),d0
  1725.     move.l    $A(sp),a0
  1726.     move.l    IntuitionBase,a6
  1727.     jsr        -$198(a6)
  1728.     move.l    (sp)+,a6
  1729. end;
  1730.  
  1731. function LockIBase; xassembler;
  1732. asm
  1733.     move.l    a6,-(sp)
  1734.     move.l    8(sp),d0
  1735.     move.l    IntuitionBase,a6
  1736.     jsr        -$19E(a6)
  1737.     move.l    d0,$C(sp)
  1738.     move.l    (sp)+,a6
  1739. end;
  1740.  
  1741. procedure UnlockIBase; xassembler;
  1742. asm
  1743.     move.l    a6,-(sp)
  1744.     move.l    8(sp),a0
  1745.     move.l    IntuitionBase,a6
  1746.     jsr        -$1A4(a6)
  1747.     move.l    (sp)+,a6
  1748. end;
  1749.  
  1750. function GetScreenData; xassembler;
  1751. asm
  1752.     move.l    a6,-(sp)
  1753.     lea        8(sp),a6
  1754.     move.l    (a6)+,a1
  1755.     move.w    (a6)+,d1
  1756.     move.w    (a6)+,d0
  1757.     move.l    (a6)+,a0
  1758.     move.l    IntuitionBase,a6
  1759.     jsr        -$1AA(a6)
  1760.     tst.l    d0
  1761.     sne        d0
  1762.     neg.b    d0
  1763.     move.b    d0,$14(sp)
  1764.     move.l    (sp)+,a6
  1765. end;
  1766.  
  1767. procedure RefreshGList; xassembler;
  1768. asm
  1769.     movem.l    a2/a6,-(sp)
  1770.     lea        $C(sp),a6
  1771.     move.w    (a6)+,d0
  1772.     move.l    (a6)+,a2
  1773.     move.l    (a6)+,a1
  1774.     move.l    (a6)+,a0
  1775.     move.l    IntuitionBase,a6
  1776.     jsr        -$1B0(a6)
  1777.     movem.l    (sp)+,a2/a6
  1778. end;
  1779.  
  1780. function AddGList; xassembler;
  1781. asm
  1782.     movem.l    a2/a6,-(sp)
  1783.     lea        $C(sp),a6
  1784.     move.l    (a6)+,a2
  1785.     move.w    (a6)+,d1
  1786.     move.w    (a6)+,d0
  1787.     move.l    (a6)+,a1
  1788.     move.l    (a6)+,a0
  1789.     move.l    IntuitionBase,a6
  1790.     jsr        -$1B6(a6)
  1791.     move.w    d0,$1C(sp)
  1792.     movem.l    (sp)+,a2/a6
  1793. end;
  1794.  
  1795. function RemoveGList; xassembler;
  1796. asm
  1797.     move.l    a6,-(sp)
  1798.     lea        8(sp),a6
  1799.     move.w    (a6)+,d0
  1800.     move.l    (a6)+,a1
  1801.     move.l    (a6)+,a0
  1802.     move.l    IntuitionBase,a6
  1803.     jsr        -$1BC(a6)
  1804.     move.w    d0,$12(sp)
  1805.     move.l    (sp)+,a6
  1806. end;
  1807.  
  1808. procedure ActivateWindow; xassembler;
  1809. asm
  1810.     move.l    a6,-(sp)
  1811.     move.l    8(sp),a0
  1812.     move.l    IntuitionBase,a6
  1813.     jsr        -$1C2(a6)
  1814.     move.l    (sp)+,a6
  1815. end;
  1816.  
  1817. procedure RefreshWindowFrame; xassembler;
  1818. asm
  1819.     move.l    a6,-(sp)
  1820.     move.l    8(sp),a0
  1821.     move.l    IntuitionBase,a6
  1822.     jsr        -$1C8(a6)
  1823.     move.l    (sp)+,a6
  1824. end;
  1825.  
  1826. function ActivateGadget; xassembler;
  1827. asm
  1828.     movem.l    a2/a6,-(sp)
  1829.     lea        $C(sp),a6
  1830.     move.l    (a6)+,a2
  1831.     move.l    (a6)+,a1
  1832.     move.l    (a6)+,a0
  1833.     move.l    IntuitionBase,a6
  1834.     jsr        -$1CE(a6)
  1835.     tst.l    d0
  1836.     sne        d0
  1837.     neg.b    d0
  1838.     move.b    d0,$18(sp)
  1839.     movem.l    (sp)+,a2/a6
  1840. end;
  1841.  
  1842. procedure NewModifyProp; xassembler;
  1843. asm
  1844.     movem.l    d3-d5/a2/a6,-(sp)
  1845.     lea        $18(sp),a6
  1846.     move.w    (a6)+,d5
  1847.     move.w    (a6)+,d4
  1848.     move.w    (a6)+,d3
  1849.     move.w    (a6)+,d2
  1850.     move.w    (a6)+,d1
  1851.     move.w    (a6)+,d0
  1852.     move.l    (a6)+,a2
  1853.     move.l    (a6)+,a1
  1854.     move.l    (a6)+,a0
  1855.     move.l    IntuitionBase,a6
  1856.     jsr        -$1D4(a6)
  1857.     movem.l    (sp)+,d3-d5/a2/a6
  1858. end;
  1859.  
  1860. end.
  1861.