File of documentation for ADoc Rough English translation by Simon HEWISON (don't blame me if it's wrong !) Revised by Denis GOUNELLE All commercial use or selling of this file is forbidden. Contents : Intuition.library, main functions and structures Dos.library, main functions and structures (sorry, I didn't have the courage to add Exec functions...) AddGadget (Intuition function) Synopsis : position = AddGadget( window , gadget, position ) Inputs : window (a0) pointer to a Window structure gadget (a1) pointer to a Gadget structure position (d0) value Outputs : position (d0) value Description : Adds a gadget into the list of gadgets of the window indicated at the position demanded, and returns the position at which the gadget has actually been inserted. A position of 0 signifies "at head of the list", a position of n signifies "after the n-th gadget". The gadget is not displayed until you call RefreshGadgets. See also : Gadget, RefreshGadgets, RemoveGadget. AllocRemember (Intuition function) Synopsis : pointer = AllocRemember( remember , size , type ) Inputs : remember (a0) address of a pointer to a Remember structure size (d0) value type (d1) value Outputs : pointer (d0) pointer to a long word Description : Like the function AllocMem, allocates an area memory of bytes of type and returns a pointer to that area, or NULL if the allocation was impossible. One good thing is the remember structures are linked together : all memory you have allocated can be freed with a single call to the function FreeRemember. Before you call AllocRemember for the first time, should be set to NULL. See also : AllocMem, FreeRemember. AutoRequest (Intuition function) Synopsis : response = AutoRequest( window, message, txt_pos, txt_neg, IDCMP_pos, IDCMP_neg, width, height ) Inputs : window (a0) pointer to a Window structure message (a1) pointer to an IntuiText structure txt_pos (a2) pointer to an IntuiText structure txt_neg (a3) pointer to an IntuiText structure IDCMP_pos (d0) IDCMP flags IDCMP_neg (d1) IDCMP flags width (d2) value height (d3) value Outputs : response (d0) boolean Description : Adds a requester box with the given message and two gadgets containing the messages and . The size of the box is fixed by and . The response is TRUE if clicked on the gadget containing txt_pos or if a message arrives which corresponds to IDCMP_pos. The response is FALSE if clicked on the gadget containing txt_neg or if a message arrives which corresponds to IDCMP_neg. See also : BuildSysRequest, IDCMP, IntuiText. BeginRefresh (Intuition function) Synopsis : BeginRefresh( window ) Inputs : window (a0) pointer to a Window structure Description : Prepare the given window for queue for refreshing by ourself (rather than by Intuition). See also : EndRefresh. BuildSysRequest (Intuition function) Synopsis : reponse = BuildSysRequest( window , message , text_pos , text_neg , IDCMP , width , height ) Inputs : window (a0) pointer to a Window structure message (a1) pointer to an IntuiText structure text_pos (a2) pointer to an IntuiText structure text_neg (a3) pointer to an IntuiText structure IDCMP (d0) IDCMP port width (d1) value height (d2) value Outputs : response (d0) boolean or pointer to a Window structure Description : Open a window on the screen which contains the given window and add the text and two gadgets containing the messages and . The size of the window is set by and , and its IDCMPFlags to the value of . If all went well, the value returned is a pointer to a structure Window, otherwise the function DisplayAlert is called, and the value returned is TRUE or FALSE. See also : AutoRequest, DisplayAlert, IDCMP, IntuiText. Border (Intuition structure) struct Border { SHORT LeftEdge , TopEdge; /* x,y of the starting point */ UBYTE FrontPen , BackPen; /* line colour, unused */ UBYTE DrawMode ; /* JAM1 or XOR */ BYTE Count ; /* number of coords into XY */ SHORT *XY ; /* address of an array of coords */ struct Border *NextBorder ; /* ptr to next structure definition */ } ; See also : DrawBorder, Gadget. ClearDMRequest (Intuition function) Synopsis : response = ClearDMRequest( window ) Inputs : window (a0) pointer to a Window structure Outputs : response (d0) boolean Description : Attempt to clear the DMRequester associated with the given window. Returns TRUE if all went well, and FALSE if not. See also : SetDMRequest. ClearMenuStrip (Intuition function) Synopsis : ClearMenuStrip( window ) Inputs : window (a0) pointer to a Window structure Description : Clear the menu bar of the given window. See also : SetMenuStrip. ClearPointer (Intuition function) Synopsis : ClearPointer( window ) Inputs : window (a0) pointer to a Window structure Description : Reset the definition of the mouse pointer to the default for the given window. See also : SetPointer. Close (Dos function) Synopsis : Close( file ) Inputs : file (d1) pointer to a FileHandle structure Description : Close the given file. See also : Open. CloseScreen (Intuition function) Synopsis : CloseScreen( screen ) Inputs : screen (a0) pointer to a Screen structure Description : Close the given screen. See also : OpenScreen. CloseWindow (Intuition function) Synopsis : CloseWindow( window ) Inputs : window (a0) pointer to a Window structure Description : Close the given window. See also : OpenWindow. CloseWorkBench (Intuition function) Synopsis : result = CloseWorkBench() Outputs : result (d0) boolean Description : Attempt to close the WorkBench screen. Returns TRUE if all went well, FALSE if not. See also : OpenWorkBench. CreateDir (Dos function) Synopsis : lock = CreateDir( name ) Inputs : name (d1) pointer to a string of characters Outputs : lock (d0) pointer to a FileLock structure Description : Create a directory of name indicated, and returns a read lock for that directory, or 0 in case of error. See also : Lock. CreateProc (Dos function) Synopsis : proc = CreateProc( name , pri , segment , size ) Inputs : name (d1) pointer to a string of characters pri (d2) value segment (d3) pointer to a list of segments size (d4) value Outputs : proc (d0) process identifier Description : Create a process of name and of priority with the given segment list, and a stack of bytes. Returns a process identifier, or 0 in case of error. See also : LoadSeg. CurrentDir (Dos function) Synopsis : lock1 = CurrentDir( lock2 ) Inputs : lock2 (d1) pointer to a FileLock structure Outputs : lock1 (d0) pointer to a FileLock structure Description : The directory designated by becomes the current directory, and a lock on the old current directory is returned in (if this returns NULL, it means it is the root of the startup volume). See also : Lock. CurrentTime (Intuition function) Synopsis : CurrentTime( seconds, micros ) Inputs : seconds (a0) - pointer to a ULONG micros (a1) - pointer to a ULONG Description : Copies the current time to the specified locations. See also : DateStamp. DateStamp (Dos function) Synopsis : DateStamp( date ) Inputs : date (d1) pointer to three consequetive longwords Description : Returns the current time to the specified area, in the form of three long words. The first indicates the number of days from the 1st January 1978, the second the number of minutes from midnight, and the third the number of 50ths of seconds into the present minute. See also : CurrentTime. Delay (Dos function) Synopsis : Delay( delay ) Inputs : delay (d1) value Description : Stop the current process for 50-ths of seconds DeleteFile (Dos function) Synopsis : result = DeleteFile( name ) Inputs : name (d1) pointer to a string of characters Outputs : result (d0) boolean Description : Delete the given file or the directory. Returns 0 in case of failure, -1 in case of success. DeviceProc (Dos function) Synopsis : proc = DeviceProc( name ) Inputs : name (d1) pointer to a string of characters Outputs : proc (d0) process identifier Description : Search the process using the given device. Returns an process identifier, or 0. If is referring to a volume, the IoErr function will give you a read lock on the root of this volume. See also : IoErr. DisplayAlert (Intuition function) Synopsis : result = DisplayAlert( flag , message , height ) Inputs : flag (d0) - value (RECOVERY_ALERT or DEADEND_ALERT) message (a0) - pointer to the text of the alert height (d1) - value Outputs : result (d0) TRUE or FALSE Description : Display an alert. The size of the Box is given by , and the text has the format : - two bytes for the x coordinate - a byte for the y coordinate - string terminated by a nul byte - a byte of continuation (if not zero, another text line follows) Returns FALSE if flag is DEADEND_ALERT. If flag is RECOVERY_ALERT, returns TRUE on a left button click, and FALSE on a right button click. DisplayBeep (Intuition function) Synopsis : DisplayBeep( screen ) Inputs : screen (a0) pointer to a structure Screen Description : "flashes" the background colour of the given screen. If screen is NULL, do a "flash" on all the screens. DoubleClick (Intuition function) Synopsis : result = DoubleClick( sec1, mic1, sec2, mic2 ) Inputs : sec1 (d0) - seconds of the first click mic1 (d1) - microseconds of the first click sec2 (d2) - seconds of the second click mic2 (d3) - microseconds of the second click Outputs : result (d0) - boolean Description : Returns FALSE if the time interval between the two clicks is greater then the interval set for a double-click, returns TRUE otherwise. See also : CurrentTime. DrawBorder (Intuition function) Synopsis : DrawBorder( raster_port , border , x , y ) Inputs : raster_port (a0) pointer to a RastPort structure border (a1) pointer to a Border structure x (d0) value y (d1) value Description : Draw the border specified by into the given Raster port, adding the x and y offsets to the coordinates in each Border structure. See also : Border. DrawImage (Intuition function) Synopsis : DrawImage( raster_port , image , x , y ) Inputs : raster_port (a0) pointer to a RastPort structure image (a1) pointer to an Image structure x (d0) value y (d1) value Description : Draw the image specified by into the given Raster port, adding the x and y offsets to the image's position See also : Image. DupLock (Dos function) Synopsis : lock1 = DupLock( lock2 ) Inputs : lock2 (d1) pointer to a FileLock structure Outputs : lock1 (d0) pointer to a FileLock structure Description : Create a read lock on the same object as . This operation is not possible unless is a read lock. See also : Lock. EndRefresh (Intuition function) Synopsis : EndRefresh( window , flag ) Inputs : window (a0) pointer to a Window structure flag (d0) boolean Description : Tells Intuition that you are finished with the redrawing of the given window. If flag is TRUE, the window go back in the normal state, otherwise it stays in special refresh state. See also : BeginRefresh. EndRequest (Intuition function) Synopsis : EndRequest( requester , window ) Inputs : requester (a0) pointer to a Requester structure window (a1) pointer to a Window structure. Description : Clear the requester box indicated. See also : BuildSysRequest. Examine (Dos function) Synopsis : result = Examine( lock , block ) Inputs : lock (d1) pointer to a FileLock structure block (d2) pointer to a FileInfoBlock structure Outputs : result (d0) boolean Description : Copies certain informations on the given file or directory, into a FileInfoBlock structure. Returns 0 in case of failure, -1 in case of success. See also : FileInfoBlock, Lock. Execute (Dos function) Synopsis : result = Execute( command , input , output ) Inputs : command (d1) pointer to a string of characters input (d2) pointer to a FileHandle structure output (d3) pointer to a FileHandle structure Outputs : result (d0) boolean Description : Execute the given CLI command with as the standard output file. If is 0, the current window is used. The standard input is indicated by . Exit (Dos function) Synopsis : Exit( code ) Inputs : code (d1) value Description : Terminate the current process, and returns the value to the calling process. ExNext (Dos function) Synopsis : result = ExNext( lock , block ) Inputs : lock (d1) pointer to a FileLock structure block (d2) pointer to a FileInfoBlock structure Outputs : result (d0) boolean Description : Copies certain information corresponding to the next entry of the directory indicated, into a structure FileInfoBlock. Returns 0 in case of failure, -1 in case of success. See also : Examine, FileInfoBlock, Lock. FileInfoBlock (Dos structure) struct FileInfoBlock { LONG fib_DiskKey ; /* Disk block number */ LONG fib_DirEntryType ; /* Object type */ char fib_FileName[108] ; /* Object name */ LONG fib_Protection ; /* Protection bits */ LONG fib_EntryType ; LONG fib_Size ; /* Size in bytes */ LONG fib_NumBlocks ; /* number of blocks used */ struct DateStamp fib_Date ; /* Date of last modification */ char fib_Comment[80] ; /* comment */ } ; fib_DirEntryType : positive for a directory, negative for a file fib_Protection : see the SetProtection function See also : Examine, ExNext. FreeRemember (Intuition function) Synopsis : FreeRemember( remember , everything ) Inputs : remember (a0) address of a pointer to a Remember structure everything (d0) boolean Description : Free the memory allocated by the AllocRemember function. If everything is TRUE the memory and the links are freed but if everything is FALSE, just the links are freed. See also : AllocRemember. FreeSysRequest (Intuition function) Synopsis : FreeSysRequest( window ) Inputs : window (a0) pointer to a Window structure Description : Free the memory allocated by the BuildSysRequest function. See also : BuildSysRequest. Gadget (Intuition structure) struct Gadget { struct Gadget *NextGadget ; /* next gadget structure */ SHORT LeftEdge , TopEdge ; /* x,y of the top left corner */ SHORT Width , Height ; /* width, height of the gadget */ USHORT Flags ; /* see GadgetFlags */ USHORT Activation ; /* see GadgetActivation */ USHORT GadgetType ; /* see footnote */ APTR GadgetRender ; /* pointer to Image or Border */ APTR SelectRender ; /* pointer to Image or Border */ struct IntuiText *GadgetText ; /* associated text */ LONG MutualExclude ; /* gadget exclusion flags */ APTR SpecialInfo ; /* PropInfo or StringInfo pointer */ USHORT GadgetID ; /* for programmer's own use */ APTR UserData ; /* for programmer's own use */ } ; GadgetType : BOOLGADGET, STRGADGET, PROPGADGET, GZZGADGET, REQGADGET See also : AddGadget, Border, GadgetActivation, GadgetFlags, Image, PropInfo, StringInfo. GadgetActivation (a field in the structure Gadget) RELVERIFY message only when mouse button was released over the gadget GADGIMMEDIATE message as soon as gadget selected ENDGADGET clear the requester box (GadgetType = REQGADGET) FOLLOWMOUSE send messages MOUSEMOVE while gadget selected RIGHTBORDER position and width relative to right border of container LEFTBORDER position and width relative to left border of container TOPBORDER height and position relative to top border of container BOTTOMBORDER height and position relative to bottom border of container TOGGLESELECT toggle gadget (select/deselect) STRINGCENTER string centred (GadgetType = STRGADGET) STRINGRIGHT string right justified (GadgetType = STRGADGET) LONGINT only allow a 32 bit signed integer (GadgetType = STRGADGET) ALTKEYMAP see StringInfo See also : Gadget, IDCMP, StringInfo. GadgetFlags (a field in the structure Gadget) GADGHIGHBITS (action when the gadget is selected) GADGHCOMP complement of the original image GADGHBOX draw a box GADGHIMAGE Display an alternative image/border GADGHNONE no highlighting GADGIMAGE GadgetRender and SelectRender are pointers to an Image structure instead of a Border structure GRELBOTTOM TopEdge relative to bottom of displaying element GRELRIGHT LeftEdge relative to the right edge of the element GRELWIDTH Width is an increment to the width of the element GRELHEIGHT Height is an increment to the height of the element SELECTED gadget selected GADGDISABLED gadget activated See also : Gadget. GetDefPrefs (Intuition function) Synopsis : prefs = GetDefPrefs( buffer , size ) Inputs : buffer (a0) pointer to a Preferences structure size (d0) value Outputs : prefs (d0) pointer to a Preferences structure Description : Copies the default preferences (those Intuition uses if none others). Only the first bytes are copied. The value returned is a copy of the parameter , or NULL in case of problems. See also : GetPrefs. GetPrefs (Intuition function) Synopsis : prefs = GetPrefs( buffer , size ) Inputs : buffer (a0) pointer to a Preferences structure size (d0) value Outputs : prefs (d0) pointer to a Preferences structure Description : Copy the preferences settings. Only the first bytes are copied. The value returned is a copy of the parameter , or NULL in case of problems. See also : GetDefPrefs. IDCMP (Port message Intuition, classes of messages) SIZEVERIFY user wants to change window size NEWSIZE used has resized the window REFRESHWINDOW window needs refreshing MOUSEBUTTONS mouse button (code SELECTUP,SELECTDOWN,MENUUP,MENUDOWN) MOUSEMOVE the mouse has moved GADGETDOWN SELECTDOWN and GadgetActivation = GADGIMMEDIATE GADGETUP SELECTUP and GadgetActivation = RELVERIFY REQSET requester box has been opened MENUPICK menu selection finished CLOSEWINDOW close gadget selected RAWKEY a key has been pressed (raw key codes) REQVERIFY a requester box is about to be activated REQCLEAR last requester box cleared MENUVERIFY a menu selection is about to take place NEWPREFS Preferences changes DISKINSERTED diskette inserted DISKREMOVED diskette removed ACTIVEWINDOW window activated INACTIVEWINDOW window deactivated VANILLAKEY key pressed (ASCII key codes) INTUITICKS time signal (usually 10 per second) See also : AutoRequest, BuildSysRequest, NewWindow, ModifyIDCMP. Image (Intuition structure) struct Image { SHORT LeftEdge ; /* x of top left corner */ SHORT TopEdge ; /* y of top left corner */ SHORT Width ; /* width */ SHORT Height , Depth ; /* height, number of plans */ USHORT *ImageData ; /* pointer to image definition */ UBYTE PlanePick , /* mask planes used */ PlaneOnOff ; /* mask planes unused */ struct Image *NextImage ; } ; See also : DrawImage, Gadget, NewWindow. Info (Dos function) Synopsis : result = Info( lock , block ) Inputs : lock (d1) pointer to a FileLock structure block (d2) pointer to an InfoData structure Outputs : result (d0) boolean Description : Copies certain information on the volume where the given file or directory designated by the lock is located, into a structure InfoData. Returns 0 in case of failure, -1 in case of success. See also : InfoData, Lock. InfoData (Dos structure) struct InfoData { LONG id_NumSoftErrors ; /* number of errors on the volume */ LONG id_UnitNumber ; /* Disk unit number of this volume */ LONG id_DiskState ; /* State of the volume */ LONG id_NumBlocks ; /* number of blocks on the volume */ LONG id_NumBlocksUsed ; /* number of blocks used */ LONG id_BytesPerBlock ; /* number of bytes per block */ LONG id_DiskType ; /* Type of the volume */ BPTR id_VolumeNode ; LONG id_InUse ; } ; id_DiskState : ID_WRITE_PROTECTED, ID_VALIDATING, ID_VALIDATED id_DiskType : ID_NO_DISK_PRESENT, ID_UNREADABLE_DISK, ID_DOS_DISK, ID_NOT_REALLY_DOS, ID_KICKSTART_DISK See also : Info. Input (Dos function) Synopsis : file = Input() Outputs : file (d0) pointer to a FileHandle structure Description : Returns the file handle of the current input file. See also : Output. IntuiText (Intuition structure) struct IntuiText { UBYTE FrontPen , BackPen ; /* text color, background color */ UBYTE DrawMode ; /* JAM1, JAM2, XOR */ SHORT LeftEdge ; /* x of first character */ SHORT TopEdge ; /* y of first character */ struct TextAttr *ITextFont ; /* font to use */ UBYTE *IText ; /* string to draw */ struct IntuiText *NextText ; /* similar structure */ } ; See also : AutoRequest, BuildSysRequest, Gadget, IntuiTextLength, PrintIText. IntuiTextLength (Intuition function) Synopsis : length = IntuiTextLength( text ) Inputs : text (a0) pointer to an IntuiText structure Outputs : length (d0) value Description : Returns the length, in number of pixels, of the string of the given IntuiText structure (this depends of the size of the font). See also : IntuiText. IoErr (Dos function) Synopsis : error = IoErr() Outputs : error (d0) value Description : Returns the code of the last error encountered, or a secondary result. See also : DeviceProc. IsInteractive (Dos function) Synopsis : result = IsInteractive( file ) Inputs : file (d1) pointer to a FileHandle structure Outputs : result (d0) boolean Description : Returns -1 if the given file corresponds to a virtual terminal, 0 if not. See also : Open. ItemAddress (Intuition function) Synopsis : adr = ItemAddress( menu , code ) Inputs : menu (a0) pointer to the first Menu structure of a menu bars code (d0) value Outputs : adr (d0) pointer to a MenuItem structure Description : Returns the address of the MenuItem structure corresponding to the given code (the code is send by Intuition in a message of MENUPICK class). Lock (Dos function) Synopsis : lock = Lock( name , access ) Inputs : name (d1) pointer to a string of characters access (d2) value (ACCESS_READ or ACCESS_WRITE) Outputs : lock (d0) pointer to a FileLock structure Description : Returns a read or write lock (depending on the the value of access) on the given file or on the directory. The lock returned is null in case of failure. See also : UnLock. LoadSeg (Dos function) Synopsis : segment = LoadSeg( name ) Inputs : name (d1) pointer to a string of characters Outputs : segment (d0) pointer to a list of segments Description : Load the given executable file in memory, and returns a pointer to the list of allocated segments (or 0 in case of error). See also : CreateProc, UnLoadSeg. ModifyIDCMP (Intuition function) Synopsis : ModifyIDCMP( window , IDCMP ) Inputs : window (a0) pointer to a Window structure IDCMP (d0) new IDCMP flags Description : Modifies the IDCMP flags of the given window. See also : IDCMP. ModifyProp (Intuition function) Synopsis : ModifyProp( gadget, window , requester , flags , horiz_pot, vert_pot, horiz_body, vert_body ) Inputs : gadget (a0) pointer to a Gadget structure window (a1) pointer to a Window or a Screen structure requester (a2) pointer to a Requester structure flags (d0) value horiz_pot (d1) value vert_pot (d2) value horiz_body (d3) value vert_body (d4) value Description : Modifies a proportional gadget. The parameters flags, , , and are copied in the fields Flags, HorizPot, VertPot, HorizBody and VertBody of the structure PropInfo corresponding to the gadget. The parameter indicates the window or the screen housing the gadget, and the parameter the requester box to which the gadget is attached (otherwise NULL). See also : PropInfo. MoveScreen (Intuition function) Synopsis : MoveScreen( screen , x , y ) Inputs : screen (a0) pointer to a Screen structure x (d0) value y (d1) value Description : Move the given screen. MoveWindow (Intuition function) Synopsis : MoveWindow( window , x , y ) Inputs : window (a0) pointer to a Window structure x (d0) value y (d1) value Description : Move the given window. NewScreen (Intuition structure) struct NewScreen { SHORT LeftEdge , TopEdge ; /* ignored, top line */ SHORT Width , Height ; /* width, height */ SHORT Depth ; /* number of planes */ UBYTE DetailPen , BlockPen ; /* details color, blocks color */ USHORT ViewModes ; /* HIRES,INTERLACE,SPRITES,DUALPF */ USHORT Type ; /* CUSTOMSCREEN,CUSTOMBITMAP */ struct TextAttr *Font ; /* font used */ UBYTE *DefaultTitle ; /* title of the screen */ struct Gadget *Gadgets ; /* gadgets attached to the screen */ struct BitMap *CustomBitMap ; } ; See also : Gadget, OpenScreen. NewWindow (Intuition structure) struct NewWindow { SHORT LeftEdge , TopEdge ; /* x,y coin top left */ SHORT Width , Height ; /* width, height */ UBYTE DetailPen , BlockPen ; /* details color, blocks color */ ULONG IDCMPFlags ; /* see IDCMP */ ULONG Flags ; /* see WindowFlags */ struct Gadget *FirstGadget ; /* gadgets attached to that window */ struct Image *CheckMark ; /* Image for ticked menus */ UBYTE *Title ; /* title of the window */ struct Screen *Screen ; /* screen on which the window is */ struct BitMap *BitMap ; SHORT MinWidth , MinHeight ; /* minimum size */ USHORT MaxWidth , MaxHeight ; /* maximum size */ USHORT Type ; /* WBENCHSCREEN, CUSTOMSCREEN */ } ; See also : Gadget, IDCMP, Image, OpenWindow, WindowFlags. OffGadget (Intuition function) Synopsis : OffGadget( gadget , window , requester ) Inputs : gadget (a0) pointer to a Gadget structure window (a1) pointer to a Window structure requester (a2) pointer to a Requester structure Description : Disable the given gadget. The argument should be NULL, when the gadget is not in a requester box The image of the gadget will not be modified until you call the function RefreshGadgets. See also : OnGadget, RefreshGadgets. OffMenu (Intuition function) Synopsis : OffMenu( window , code_menu ) Inputs : window (a0) pointer to a Window structure code_menu (d0) value Description : Disable a sub-menu, a option, or a complete menu. See also : OnMenu. OnGadget (Intuition function) Synopsis : OnGadget( gadget , window , requester ) Inputs : gadget (a0) pointer to a Gadget structure window (a1) pointer to a Window structure requester (a2) pointer to a Requester structure Description : Enable the given gadget. The argument should be NULL if the gadget is not in a requester box The image of the gadget will not be modified until you call the function RefreshGadgets. See also : OffGadget, RefreshGadgets. OnMenu (Intuition function) Synopsis : OnMenu( window , code_menu ) Inputs : window (a0) pointer to a Window structure code_menu (d0) value Description : Enable a sub-menu, a option, or an entire menu. See also : OffMenu. Open (Dos function) Synopsis : file = Open( name , access ) Inputs : name (d1) pointer to a string of characters access (d2) value (MODE_OLDFILE or MODE_NEWFILE) Outputs : file (d0) pointer to a FileHandle structure Description : Open the given file for reading or writing (defined by the value of access) and returns a pointer to a FileHandle structure, or 0 in case of failure. See also : Close. OpenScreen (Intuition function) Synopsis : screen = OpenScreen( nscreen ) Inputs : nscreen (a0) pointer to a NewScreen structure Outputs : screen (d0) pointer to a Screen structure Description : Open a custom screen as specified by the NewScreen structure, and returns a pointer to the corresponding Screen structure (NULL in case of problems). See also : CloseScreen, NewScreen. OpenWindow (Intuition function) Synopsis : window = OpenWindow( nwindow ) Inputs : nwindow (a0) pointer to a NewWindow structure Outputs : window (d0) pointer to a Window structure Description : Open a window as specified by the NewWindow structure, and returns a pointer to the corresponding Window structure (NULL in case of problems). See also : CloseWindow, NewWindow. OpenWorkBench (Intuition function) Synopsis : result = OpenWorkBench() Outputs : result (d0) boolean Description : Open the WorkBench screen. Returns TRUE if all went well and FALSE otherwise. See also : CloseWorkBench. Output (Dos function) Synopsis : file = Output() Outputs : file (d0) pointer to a FileHandle structure Description : Returns the FileHandle of the current output file. See also : Input. ParentDir (Dos function) Synopsis : lock1 = ParentDir( lock2 ) Inputs : lock2 (d1) pointer to a FileLock structure Outputs : lock1 (d0) pointer to a FileLock structure Description : Returns a read lock corresponding to parent directory of the file or directory corresponding to . This lock may be NULL (this denotes the root directory of the volume). See also : CurrentDir, Lock. PrintIText (Intuition function) Synopsis : PrintIText( raster_port, text , x , y ) Inputs : raster_port (a0) pointer to a RastPort structure text (a1) pointer to a IntuiText structure x (d0) value y (d1) value Description : Draw the text into the given Raster port, adding the x and y offsets to each coords. See also : IntuiText. PropInfo (Intuition structure) struct PropInfo { USHORT Flags ; /* see footnote */ USHORT HorizPot ; /* horizontal percentage */ USHORT VertPot ; /* vertical percentage */ USHORT HorizBody ; /* horizontal increment */ USHORT VertBody ; /* vertical increment */ USHORT CWidth ; /* width of the container */ USHORT CHeight ; /* height of the container */ USHORT HPotRes, VPotRes ; USHORT LeftBorder ; /* border left of the container */ USHORT TopBorder ; /* border top of the container */ } ; Flags : AUTOKNOB, FREEHORIZ, FREEVERT, PROPBORDERLESS, KNOBHIT See also : Gadget, ModifyProp. Read (Dos function) Synopsis : result = Read( file , buffer , length ) Inputs : file (d1) pointer to a FileHandle structure buffer (d2) pointer to a buffer length (d3) value Outputs : result (d0) value Description : Read the given number of bytes from a file, and place the data at memory pointed to by . Returns the number of bytes read, -1 in case of error, and 0 at end of file. See also : Open. RefreshGadgets (Intuition function) Synopsis : RefreshGadgets( gadget , window , requester ) Inputs : gadget (a0) pointer to a Gadget structure window (a1) pointer to a Window structure requester (a2) pointer to a Requester structure Description : Refreshes the list of gadgets in one window, starting at then given gadget. The argument must be NULL if the gadget is not in a requester box. RemoveGadget (Intuition function) Synopsis : result = RemoveGadget( window , gadget ) Inputs : window (a0) pointer to a Window structure gadget (a1) pointer to a Gadget structure Outputs : result (d0) value Description : Remove the given gadget from the window's list of gadgets. Returns the former position of the gadget, or -1 in case of problems. The gadget image will not be deleted, until you call the function RefreshGadgets. See also : AddGadget, RefreshGadgets. Rename (Dos function) Synopsis : result = Rename( name1 , name2 ) Inputs : name1 (d1) pointer to a string of characters name2 (d2) pointer to a string of characters Outputs : result (d0) boolean Description : Rename the file or directory designated by as . Returns 0 in case of failure, -1 in case of success. ReportMouse (Intuition function) Synopsis : ReportMouse( window , flag ) Inputs : window (a0) pointer to a Window structure indic (d0) boolean Description : Enable (flag = TRUE) or disable (flag = FALSE) the sending of messages reporting the position of the mouse. See also : IDCMP. Request (Intuition function) Synopsis : result = Request( requester , window ) Inputs : requester (a0) pointer to a Requester structure window (a1) pointer to a Window structure Outputs : result (d0) boolean Description : Open a requester box into the given window. Returns TRUE if all went well, FALSE in case of problems. ScreenToBack (Intuition function) Synopsis : ScreenToBack( screen ) Inputs : screen (a0) pointer to a Screen structure Description : Send the given screen to the back plan. See also : ScreenToFront. ScreenToFront (Intuition function) Synopsis : ScreenToFront( screen ) Inputs : screen (a0) pointer to a Screen structure Description : Pushes the given screen to the first plan. See also : ScreenToBack. Seek (Dos function) Synopsis : result = Seek( file , position , mode ) Inputs : file (d1) pointer to a FileHandle structure position (d2) value mode (d3) value (OFFSET_BEGINNING,OFFSET_CURRENT,OFFSET_END) Outputs : result (d0) boolean Description : Place the read/write pointer of the given file at the point designated by the position (relative to the start of the file, to the current position, or to the end of file depending on the value of mode). Returns the former position (relative to the start of file) or -1 in case of error. See also : Open. SetComment (Dos function) Synopsis : result = SetCommand( name , comment ) Inputs : name (d1) pointer to a string of characters comment (d2) pointer to a string of characters Outputs : result (d0) boolean Description : Add a file comment on the given file or directory. Returns 0 upon failure, -1 in case of success. SetDMRequest (Intuition function) Synopsis : result = SetDMRequest( window , requester ) Inputs : window (a0) pointer to a Window structure requester (a1) pointer to a Requester structure Outputs : result (d0) value Description : Attach a requester box to the given window. This requester box is activated when the double-click on the mouse MENU button. Returns TRUE if all went well, FALSE in case of problems. See also : ClearDMRequest. SetMenuStrip (Intuition function) Synopsis : SetMenuStrip( window , menu ) Inputs : window (a0) pointer to a Window structure menu (a1) pointer to a Menu structure Description : Set the menu bar of the given window. See also : ClearMenuStrip. SetPointer (Intuition function) Synopsis : SetPointer( window , def , height , width , x , y ) Inputs : window (a0) pointer to a Window structure def (a1) pointer to the pointer definition height (d0) value width (d1) value x (d2) value y (d3) value Description : Change the definition of the pointer for the given window. The size of the pointer is given by the parameters and and indicate the offset of the 'hot spot' of the pointer. See also : ClearPointer. SetProtection (Dos function) Synopsis : result = SetProtection( name , mask ) Inputs : name (d1) pointer to a string of characters mask (d2) value Outputs : result (d0) boolean Description : Change the protection bits of the file indicated to value of : bit 0 : d (delete) bit 4 : a (archived) bit 1 : e (execute) bit 5 : p (pure) bit 2 : w (write) bit 6 : s (script) bit 3 : r (read) bit 7 : h (hidden) SetWindowTitles (Intuition function) Synopsis : SetWindowTitles( window , title_f , title_e ) Inputs : window (a0) pointer to a Window structure title_f (a1) pointer to a string of characters title_e (a2) pointer to a string of characters Description : Change the title of the given window and/or of the screen that holds that window. If is -1 the old title of the window is kept, 0 the old title is cleared, otherwise the old title is replaced with the given string. If is -1 the old title of the screen is kept, 0 the old title is cleared, otherwise the old title is replaced with the given string. See also : ShowTitle. ShowTitle (Intuition function) Synopsis : ShowTitle( screen , flag ) Inputs : screen (a0) pointer to a Screen structure flag (d0) boolean Description : Show (flag = TRUE) or hide (flag = FALSE) the title of the given screen. See also : SetWindowTitles. SizeWindow (Intuition function) Synopsis : SizeWindow( window , x , y ) Inputs : window (a0) pointer to a Window structure x (d0) value y (d1) value Description : Change the size of the given window to width and height StringInfo (Intuition structure) struct StringInfo { UBYTE *Buffer ; /* buffer for the string */ UBYTE *UndoBuffer ; /* edit buffer */ SHORT BufferPos ; /* position in the buffer */ SHORT MaxChars ; /* maximum size of the string */ SHORT DispPos ; /* position of 1st character displayed */ SHORT UndoPos ; /* position in the edit buffer */ SHORT NumChars ; /* number of characters in the buffer */ SHORT DispCount ; /* number of characters visible */ SHORT CLeft , CTop ; /* x,y of the top left corner */ struct Layer *LayerPtr ; LONG LongInt ; /* value corresponding to the string */ struct KeyMap *AltKeyMap ; /* character translation table */ } ; LongInt is not used unless GadgetActivation = LONGINT AltKeyMap is not used unles GadgetActivation = ALTKEYMAP See also : GadgetActivation, Gadget. UnLoadSeg (Dos function) Synopsis : UnLoadSeg( segment ) Inputs : segment (d1) pointer to a list of segments Description : Free a list of segments. See also : LoadSeg. UnLock (Dos function) Synopsis : UnLock( lock ) Inputs : lock (d1) pointer to a FileLock structure Description : Free an access lock. See also : Lock. WaitForChar (Dos function) Synopsis : result = WaitForChar( file , delay ) Inputs : file (d1) pointer to a FileHandle structure delay (d2) value Outputs : result (d0) boolean Description : Wait for micro-seconds for data entered on the terminal corresponding to the given file. Returns -1 if the data is present, 0 if not. See also : Open, Read, IsInteractive. WBenchToBack (Intuition function) Synopsis : result = WBenchToBack() Outputs : result (d0) boolean Description : Open the WorkBench screen and place it on backmost plan. Returns TRUE if all went well, FALSE if the WorkBench screen couldn't be opened WBenchToFront (Intuition function) Synopsis : result = WBenchToFront() Outputs : result (d0) boolean Description : Open the WorkBench screen and place it on first plan. Returns TRUE if all went well, FALSE if the WorkBench screen couldn't be opened WindowFlags (field in the NewWindow structure) WINDOWSIZING Add size gadget WINDOWDRAG Add drag gadget WINDOWDEPTH Add depth gadget WINDOWCLOSE Add close gadget SMART_REFRESH refreshing handled by Intuition SIMPLE_REFRESH refreshing handled by the program NOCAREREFRESH forget refreshing BACKDROP window positioned en backmost plan REPORTMOUSE send the MOUSEMOVE messages BORDERLESS don't trace the border of the window RMBTRAP don't call a menu when MENUDOWN See also : NewWindow. WindowLimits (Intuition function) Synopsis : result = WindowLimits( window, l_min, h_min, l_max, h_max ) Inputs : window (a0) pointer to a Window structure l_min (d0) value h_min (d1) value l_max (d2) value h_max (d3) value Outputs : result (d0) boolean Description : Change the size limits of the given window, and copies the values , , and into the fields MinWidth, MinHeight, MaxWidth and MaxHeight of the Window structure. Returns TRUE if all went well, FALSE in the case of problems. WindowToBack (Intuition function) Synopsis : WindowToBack( window ) Inputs : window (a0) pointer to a Window structure Description : Place the given window in the back plan. See also : WindowToFront. WindowToFront (Intuition function) Synopsis : WindowToFront( window ) Inputs : window (a0) pointer to a Window structure Description : Place the given window to the first plan. See also : WindowToBack. Write (Dos function) Synopsis : result = Write( file , buffer , length ) Inputs : file (d1) pointer to a FileHandle structure buffer (d2) pointer to a buffer length (d3) value Outputs : result (d0) value Description : Write the given number of bytes of data from the buffer to the file. Returns the number of bytes written, or -1 in case of error. See also : Open.