; Assembler header file for ColourDbox
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:59 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

; 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: ColourDbox_Hdr
        GBLS    ColourDbox_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_Window
        GBLS    Get_Window
        ]
        [       :LNOT: :DEF: Window_Hdr
Get_Window                      SETS    "GET oslib/Window.Hdr"
        |
Get_Window                      SETS    ""
        ]
        $Get_Window

        [       :LNOT: :DEF: Get_ColourPicker
        GBLS    Get_ColourPicker
        ]
        [       :LNOT: :DEF: ColourPicker_Hdr
Get_ColourPicker                SETS    "GET oslib/ColourPicker.Hdr"
        |
Get_ColourPicker                SETS    ""
        ]
        $Get_ColourPicker

;Symbols for constants
Class_ColourDbox                *       &829C0
Error_ColourDboxTasksActive     *       &80AE00
Error_ColourDboxAllocFailed     *       &80AE01
Error_ColourDboxShortBuffer     *       &80AE02
Error_ColourDboxNoSuchTask      *       &80AE11
Error_ColourDboxNoSuchMethod    *       &80AE12
Error_ColourDboxNoSuchMiscOpMethod *       &80AE13
ColourDbox_GenerateAboutToBeShown *       &1
ColourDbox_GenerateDialogueCompleted *       &2
ColourDbox_IncludeNoneButton    *       &4
ColourDbox_SelectNoneButton     *       &8
ColourDbox_ColourTransparent    *       &1
Action_ColourDboxAboutToBeShown *       &829C0
Action_ColourDboxDialogueCompleted *       &829C1
Action_ColourDboxColourSelected *       &829C2
ColourDbox_DialogueCompletedColourChoice *       &1

;Symbols for structure offsets and sizes
        ^       0
        #       Bits
ColourDbox_Flags                *       @

        ^       0
        #       Bits
ColourDbox_ColourFlags          *       @

        ^       0
ColourDbox_Object_flags         #       ColourDbox_Flags
ColourDbox_Object_title         #       Toolbox_MsgReference
ColourDbox_Object_title_limit   #       Int
ColourDbox_Object_colour        #       OS_Colour
ColourDbox_Object               *       @

        ^       0
ColourDbox_ObjectTemplate       Toolbox_ResourceFileObject_MEMBERS
ColourDbox_ObjectTemplate_objectflags #       ColourDbox_Flags
ColourDbox_ObjectTemplate_title #       Toolbox_MsgReference
ColourDbox_ObjectTemplate_title_limit #       Int
ColourDbox_ObjectTemplate_colour #       OS_Colour
ColourDbox_ObjectTemplate       *       @

ColourDbox_Full                 *       Toolbox_Full

        ^       0
ColourDbox_ActionAboutToBeShown_tag #       Toolbox_PositionTag
ColourDbox_ActionAboutToBeShown_position *       @
ColourDbox_ActionAboutToBeShown_position_top_left #       OS_Coord
        ^       ColourDbox_ActionAboutToBeShown_position
ColourDbox_ActionAboutToBeShown_position_full #       ColourDbox_Full
ColourDbox_ActionAboutToBeShown *       @

        ^       0
ColourDbox_ActionAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
ColourDbox_ActionAboutToBeShownBlock_tag #       Toolbox_PositionTag
ColourDbox_ActionAboutToBeShownBlock_position *       @
ColourDbox_ActionAboutToBeShownBlock_position_top_left #       OS_Coord
        ^       ColourDbox_ActionAboutToBeShownBlock_position
ColourDbox_ActionAboutToBeShownBlock_position_full #       ColourDbox_Full
ColourDbox_ActionAboutToBeShownBlock *       @

ColourDbox_ActionDialogueCompletedBlock *       Toolbox_ActionHeaderBase

        ^       0
ColourDbox_ActionColourSelectedBlock Toolbox_ActionHeader_MEMBERS
ColourDbox_ActionColourSelectedBlock_colour #       OS_Colour
ColourDbox_ActionColourSelectedBlock_block_size #       Int
ColourDbox_ActionColourSelectedBlock_info #       50*Int
ColourDbox_ActionColourSelectedBlock *       @

        ^       0
ColourDbox_ColourModel_size     #       Int
ColourDbox_ColourModel_info     #       Int
ColourDbox_ColourModel          *       @
        
        MACRO
$label                          ColourDbox_ColourModel_MEMBERS
$label._size                    #       Int
        MEND
        
        ^       0
ColourDbox_ColourModelBase      ColourDbox_ColourModel_MEMBERS
ColourDbox_ColourModelBase      *       @

        ^       0
        #       Bits
ColourDbox_DialogueCompletedFlags *       @

        ^       0
ColourDbox_ActionDialogueCompleted_flags #       ColourDbox_DialogueCompletedFlags
ColourDbox_ActionDialogueCompleted *       @

        ^       0
ColourDbox_ActionColourSelected_colour #       OS_Colour
ColourDbox_ActionColourSelected_size #       Int
ColourDbox_ActionColourSelected_info #       50*Int
ColourDbox_ActionColourSelected *       @


;Symbols for SWI's and SWI reason codes
XColourDbox_ClassSWI            *       &A29C0
ColourDbox_ClassSWI             *       &829C0

XColourDbox_PostFilter          *       &A29C1
ColourDbox_PostFilter           *       &829C1

XColourDbox_PreFilter           *       &A29C2
ColourDbox_PreFilter            *       &829C2

ColourDbox_GetWimpHandle        *       &0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &0
   ;Exit
   ;  R0 = w (Wimp_W)

ColourDbox_GetDialogueHandle    *       &1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &1
   ;Exit
   ;  R0 = d (ColourPicker_D)

ColourDbox_SetColour            *       &2
   ;Entry
   ;  R0 = flags (ColourDbox_ColourFlags)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &2
   ;  R3 -> colour (ColourPicker_Colour)

ColourDbox_GetColour            *       &3
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &3
   ;  R3 = buffer (pointer to ColourPicker_Colour)
   ;  R4 = size (Int)
   ;Exit
   ;  R0 = flags_out (ColourDbox_ColourFlags)
   ;  R4 = used (Int)

ColourDbox_SetColourModel       *       &4
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &4
   ;  R3 -> model (ColourDbox_ColourModel)

ColourDbox_GetColourModel       *       &5
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &5
   ;  R3 = buffer (pointer to ColourDbox_ColourModel)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

ColourDbox_SetNoneAvailable     *       &6
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &6
   ;  R3 = none (Bool)

ColourDbox_GetNoneAvailable     *       &7
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = colour_dbox (Toolbox_O)
   ;  R2 = &7
   ;Exit
   ;  R0 = none (Bool)

        ]
        END
