; Assembler header file for TextArea
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:59 2012
; Tom Hughes, tom@compton.nu, 14 Mar 1999

; 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: TextArea_Hdr
        GBLS    TextArea_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_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

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

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET oslib/Gadget.Hdr"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

;Symbols for constants
Class_TextArea                  *       &4018
TextArea_StateHasVerticalScrollbar *       &1
TextArea_StateHasHorizontalScrollbar *       &2
TextArea_StateWordwrappingEnabled *       &4
TextArea_AllowSelection         *       &8
TextArea_AllowSave              *       &10
TextArea_AllowLoad              *       &20
TextArea_Clipboard              *       &40
TextArea_AutoScroll             *       &80
TextArea_GetSelectionReturnText *       &1
TextArea_SetColourDesktop       *       &1

;Symbols for structure offsets and sizes
        ^       0
TextArea_Gadget_type            #       Int
TextArea_Gadget_event           #       Int
TextArea_Gadget_text            #       Toolbox_MsgReference
TextArea_Gadget_foreground      #       OS_Colour
TextArea_Gadget_background      #       OS_Colour
TextArea_Gadget                 *       @

        ^       0
TextArea_Object                 Gadget_Object_MEMBERS
TextArea_Object_type            #       Int
TextArea_Object_event           #       Int
TextArea_Object_text            #       Toolbox_MsgReference
TextArea_Object_foreground      #       OS_Colour
TextArea_Object_background      #       OS_Colour
TextArea_Object                 *       @

        ^       0
        #       Bits
TextArea_State                  *       @

        ^       0
        #       Bits
TextArea_GetSelectionFlags      *       @

        ^       0
        #       Bits
TextArea_SetColourFlags         *       @

        ^       0
TextArea_Colour_real            #       OS_Colour
        ^       0
TextArea_Colour_desktop         #       Wimp_Colour
TextArea_Colour                 *       @


;Symbols for SWI's and SWI reason codes
TextArea_GetState               *       &4018
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4018
   ;  R3 = text_area (Toolbox_C)
   ;Exit
   ;  R0 = state (TextArea_State)

TextArea_SetState               *       &4019
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4019
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = state (TextArea_State)

TextArea_SetText                *       &401A
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401A
   ;  R3 = text_area (Toolbox_C)
   ;  R4 -> text (String)

TextArea_GetTextSize            *       &401B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401B
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = &0
   ;Exit
   ;  R5 = buffer_size (Int)

TextArea_GetText                *       &401B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401B
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = buffer_size (Int)
   ;Exit
   ;  R5 = length (Int)

TextArea_InsertText             *       &401C
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401C
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = insert_at (Int)
   ;  R5 -> text (String)

TextArea_ReplaceText            *       &401D
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = start (Int)
   ;  R5 = end (Int)
   ;  R6 -> text (String)

TextArea_GetSelection           *       &401E
   ;Entry
   ;  R0 = flags (TextArea_GetSelectionFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = text_area (Toolbox_C)
   ;Exit
   ;  R4 = start (Int)
   ;  R5 = end (Int)

TextArea_GetSelectionTextSize   *       &401E
   ;Entry
   ;  R0 = &1 :OR: flags (TextArea_GetSelectionFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = &0
   ;Exit
   ;  R5 = buffer_size (Int)

TextArea_GetSelectionText       *       &401E
   ;Entry
   ;  R0 = &1 :OR: flags (TextArea_GetSelectionFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = buffer_size (Int)
   ;Exit
   ;  R5 = length (Int)

TextArea_SetSelection           *       &401F
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401F
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = start (Int)
   ;  R5 = end (Int)

TextArea_SetFont                *       &4020
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4020
   ;  R3 = text_area (Toolbox_C)
   ;  R4 -> font_name (String)
   ;  R5 = width (Int)
   ;  R6 = height (Int)

TextArea_SetColour              *       &4021
   ;Entry
   ;  R0 = flags (TextArea_SetColourFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4021
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = foreground (TextArea_Colour)
   ;  R5 = background (TextArea_Colour)

TextArea_GetColour              *       &4022
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4022
   ;  R3 = text_area (Toolbox_C)
   ;Exit
   ;  R0 = foreground (OS_Colour)
   ;  R1 = background (OS_Colour)

TextArea_SetTextBorder          *       &4023
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4023
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = border_size (Int)

        ]
        END
