; Assembler header file for LineEditor
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:44:04 2012
; Christian Ludlam, <chris@recoil.org> 13-Feb-02 13:26

; OSLib---efficient, type-safe, transparent, extensible,
; register-safe API coverage of RISC OS
; 
; Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
; 
; Licence:
; 
;    OSLib is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 1, or (at your option)
; any later version - and this with the following clarification and
; special exception:
; 
;    Linking this library statically or dynamically with other modules
; is making a combined work based on this library. Thus, the terms
; and conditions of the GNU General Public License cover the whole
; combination.
; 
;    As a special exception, the copyright holders of this library
; give you permission to link this library with independent modules
; to produce an executable, regardless of the license terms of these
; independent modules, and to copy and distribute the resulting
; executable under terms of your choice, provided that you also meet,
; for each linked independent module, the terms and conditions of the
; license of that module. An independent module is a module which is
; not derived from or based on this library. If you modify this
; library, you may extend this exception to your version of the library,
; but you are not obliged to do so. If you do not wish to do so, delete
; this exception statement from your version.
; 
;    OSLib is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; 
;    You should have received a copy of the GNU General Public License
; along with this programme; if not, write to the Free Software
; Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

        [       :LNOT: :DEF: LineEditor_Hdr
        GBLS    LineEditor_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

;Symbols for constants
LineEditor_Unknown              *       &FFFFFFFE
LineEditor_NoEdit               *       &FFFFFFFF
LineEditor_End                  *       &7FFFFFFF
LineEditor_PreviousWrap         *       &80000000
LineEditor_PreviousNoWrap       *       &80000001
LineEditor_NextNoWrap           *       &80000003
LineEditor_NextWrap             *       &80000002
LineEditor_Block                *       &0
LineEditor_Underline            *       &1
LineEditor_Steady               *       &0
LineEditor_Flashing             *       &2
LineEditor_NormalShift          *       0
LineEditor_OvertypeShift        *       8
LineEditor_LocalTaskwindows     *       &1
LineEditor_LocalAppendDots      *       &2
LineEditor_LocalOvertype        *       &4
LineEditor_LocalKeepDuplicates  *       &8
LineEditor_LocalNoTilde         *       &10
LineEditor_LocalNoEvents        *       &20
LineEditor_LocalNoCircumflex    *       &40

;Symbols for structure offsets and sizes
LineEditor_H                    *       4 ;abstract type
        ^       0
        #       Int
LineEditor_Length               *       @

        ^       0
        #       Int
LineEditor_Pos                  *       @

        ^       0
        #       Int
LineEditor_Cursors              *       @

        ^       0
        #       Bits
LineEditorSetOptions_Flags      *       @


;Symbols for SWI's and SWI reason codes
XLineEditor_SetOptions          *       &A3880
LineEditor_SetOptions           *       &83880
   ;Entry
   ;  R0 = size (Int)
   ;  R1 = flags (LineEditorSetOptions_Flags)
   ;  R2 = min (Int)
   ;  R3 = max (Int)
   ;  R4 = cursors (LineEditor_Cursors)

XLineEditor_GetOptions          *       &A3881
LineEditor_GetOptions           *       &83881
   ;Exit
   ;  R0 = size (Int)
   ;  R1 = flags (LineEditorSetOptions_Flags)
   ;  R2 = min (Int)
   ;  R3 = max (Int)
   ;  R4 = cursors (LineEditor_Cursors)

XLineEditor_CreateBuffer        *       &A3882
LineEditor_CreateBuffer         *       &83882
   ;Entry
   ;  R0 = size (Int)
   ;  R1 = task (Wimp_T)
   ;  R2 = expansion (Bits)
   ;Exit
   ;  R0 = handle (LineEditor_H)

XLineEditor_DeleteBuffer        *       &A3883
LineEditor_DeleteBuffer         *       &83883
   ;Entry
   ;  R0 = handle (LineEditor_H)

XLineEditor_SetPos              *       &A3884
LineEditor_SetPos               *       &83884
   ;Entry
   ;  R0 = handle (LineEditor_H)
   ;  R1 = position (LineEditor_Pos)

XLineEditor_GetPos              *       &A3885
LineEditor_GetPos               *       &83885
   ;Entry
   ;  R0 = handle (LineEditor_H)
   ;Exit
   ;  R0 = position (LineEditor_Pos)

XLineEditor_GetLine             *       &A3886
LineEditor_GetLine              *       &83886
   ;Entry
   ;  R0 = handle (LineEditor_H)
   ;  R1 = buffer (pointer to Char)
   ;  R2 = length (Int)
   ;Exit
   ;  R2 = used (Int)

XLineEditor_AppendLine          *       &A3887
LineEditor_AppendLine           *       &83887
   ;Entry
   ;  R0 = handle (LineEditor_H)
   ;  R1 -> line (Char)

XLineEditor_DeleteLine          *       &A3888
LineEditor_DeleteLine           *       &83888
   ;Entry
   ;  R0 = handle (LineEditor_H)

XLineEditor_ReadInfo            *       &A3889
LineEditor_ReadInfo             *       &83889
   ;Entry
   ;  R0 = task_handle (Wimp_T)
   ;Exit
   ;  R0 = length (LineEditor_Length)
   ;  R1 = pos (Int)

XLineEditor_ReadLine            *       &A388A
LineEditor_ReadLine             *       &8388A
   ;Entry
   ;  R0 = buffer (pointer to Char)
   ;  R1 = size (Int)
   ;  R2 = min_char (Char)
   ;  R3 = max_char (Char)
   ;  R5 = &0
   ;  R6 = handle (LineEditor_H)
   ;Exit
   ;  R0 corrupted
   ;  R1 = used (Int)

XLineEditor_ReadLineGivenEcho   *       &A388A
LineEditor_ReadLineGivenEcho    *       &8388A
   ;Entry
   ;  R0 = buffer (pointer to Char)
   ;  R1 = size (Int)
   ;  R2 = min_char (Char)
   ;  R3 = max_char (Char)
   ;  R4 = echo (Char)
   ;  R5 = &1
   ;  R6 = handle (LineEditor_H)
   ;Exit
   ;  R0 corrupted
   ;  R1 = used (Int)

XLineEditor_ReadLineSuppressInvalid *       &A388A
LineEditor_ReadLineSuppressInvalid *       &8388A
   ;Entry
   ;  R0 = buffer (pointer to Char)
   ;  R1 = size (Int)
   ;  R2 = min_char (Char)
   ;  R3 = max_char (Char)
   ;  R5 = &2
   ;  R6 = handle (LineEditor_H)
   ;Exit
   ;  R0 corrupted
   ;  R1 = used (Int)

XLineEditor_ReadLineGivenEchoSuppressInvalid *       &A388A
LineEditor_ReadLineGivenEchoSuppressInvalid *       &8388A
   ;Entry
   ;  R0 = buffer (pointer to Char)
   ;  R1 = size (Int)
   ;  R2 = min_char (Char)
   ;  R3 = max_char (Char)
   ;  R4 = echo (Char)
   ;  R5 = &3
   ;  R6 = handle (LineEditor_H)
   ;Exit
   ;  R0 corrupted
   ;  R1 = used (Int)

        ]
        END
