@ GNU AS assembler header file for LineEditor
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:46:01 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.

#ifndef LineEditor_Hdr
#  define LineEditor_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_Wimp
#    define Get_Wimp
#    include "oslib/Wimp.Hdr"
#  endif

@Symbols for constants
#  define LineEditor_Unknown 0xfffffffe
#  define LineEditor_NoEdit 0xffffffff
#  define LineEditor_End 0x7fffffff
#  define LineEditor_PreviousWrap 0x80000000
#  define LineEditor_PreviousNoWrap 0x80000001
#  define LineEditor_NextNoWrap 0x80000003
#  define LineEditor_NextWrap 0x80000002
#  define LineEditor_Block 0x0
#  define LineEditor_Underline 0x1
#  define LineEditor_Steady 0x0
#  define LineEditor_Flashing 0x2
#  define LineEditor_NormalShift 0x0
#  define LineEditor_OvertypeShift 0x8
#  define LineEditor_LocalTaskwindows 0x1
#  define LineEditor_LocalAppendDots 0x2
#  define LineEditor_LocalOvertype 0x4
#  define LineEditor_LocalKeepDuplicates 0x8
#  define LineEditor_LocalNoTilde 0x10
#  define LineEditor_LocalNoEvents 0x20
#  define LineEditor_LocalNoCircumflex 0x40

@Symbols for structure offsets and sizes
@ abstract type
#  define LineEditor_H 4

        .struct 0
        .skip   Int
LineEditor_Length              : 

        .struct 0
        .skip   Int
LineEditor_Pos                 : 

        .struct 0
        .skip   Int
LineEditor_Cursors             : 

        .struct 0
        .skip   Bits
LineEditorSetOptions_Flags     : 


@Symbols for SWI's and SWI reason codes
.set XLineEditor_SetOptions,0xa3880
.set LineEditor_SetOptions,0x83880
   @Entry
   @  R0 = size (Int)
   @  R1 = flags (LineEditorSetOptions_Flags)
   @  R2 = min (Int)
   @  R3 = max (Int)
   @  R4 = cursors (LineEditor_Cursors)

.set XLineEditor_GetOptions,0xa3881
.set LineEditor_GetOptions,0x83881
   @Exit
   @  R0 = size (Int)
   @  R1 = flags (LineEditorSetOptions_Flags)
   @  R2 = min (Int)
   @  R3 = max (Int)
   @  R4 = cursors (LineEditor_Cursors)

.set XLineEditor_CreateBuffer,0xa3882
.set LineEditor_CreateBuffer,0x83882
   @Entry
   @  R0 = size (Int)
   @  R1 = task (Wimp_T)
   @  R2 = expansion (Bits)
   @Exit
   @  R0 = handle (LineEditor_H)

.set XLineEditor_DeleteBuffer,0xa3883
.set LineEditor_DeleteBuffer,0x83883
   @Entry
   @  R0 = handle (LineEditor_H)

.set XLineEditor_SetPos,0xa3884
.set LineEditor_SetPos,0x83884
   @Entry
   @  R0 = handle (LineEditor_H)
   @  R1 = position (LineEditor_Pos)

.set XLineEditor_GetPos,0xa3885
.set LineEditor_GetPos,0x83885
   @Entry
   @  R0 = handle (LineEditor_H)
   @Exit
   @  R0 = position (LineEditor_Pos)

.set XLineEditor_GetLine,0xa3886
.set LineEditor_GetLine,0x83886
   @Entry
   @  R0 = handle (LineEditor_H)
   @  R1 = buffer (pointer to Char)
   @  R2 = length (Int)
   @Exit
   @  R2 = used (Int)

.set XLineEditor_AppendLine,0xa3887
.set LineEditor_AppendLine,0x83887
   @Entry
   @  R0 = handle (LineEditor_H)
   @  R1 -> line (Char)

.set XLineEditor_DeleteLine,0xa3888
.set LineEditor_DeleteLine,0x83888
   @Entry
   @  R0 = handle (LineEditor_H)

.set XLineEditor_ReadInfo,0xa3889
.set LineEditor_ReadInfo,0x83889
   @Entry
   @  R0 = task_handle (Wimp_T)
   @Exit
   @  R0 = length (LineEditor_Length)
   @  R1 = pos (Int)

.set XLineEditor_ReadLine,0xa388a
.set LineEditor_ReadLine,0x8388a
   @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)

.set XLineEditor_ReadLineGivenEcho,0xa388a
.set LineEditor_ReadLineGivenEcho,0x8388a
   @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)

.set XLineEditor_ReadLineSuppressInvalid,0xa388a
.set LineEditor_ReadLineSuppressInvalid,0x8388a
   @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)

.set XLineEditor_ReadLineGivenEchoSuppressInvalid,0xa388a
.set LineEditor_ReadLineGivenEchoSuppressInvalid,0x8388a
   @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)

#endif
