; Assembler header file for PrintDbox
; 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: PrintDbox_Hdr
        GBLS    PrintDbox_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_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

;Symbols for constants
Class_PrintDbox                 *       &82B00
PrintDbox_GenerateAboutToBeShown *       &1
PrintDbox_GenerateDialogueCompleted *       &2
PrintDbox_GenerateShowSetupAction *       &4
PrintDbox_IncludeAllFromTo      *       &8
PrintDbox_IncludeCopies         *       &10
PrintDbox_IncludeScale          *       &20
PrintDbox_IncludeOrientation    *       &40
PrintDbox_IncludeSave           *       &80
PrintDbox_IncludeSetUp          *       &100
PrintDbox_IncludeDraft          *       &200
PrintDbox_SelectFromTo          *       &400
PrintDbox_SelectSideways        *       &800
PrintDbox_SelectDraft           *       &1000
PrintDbox_Print                 *       &82B0000
PrintDbox_Save                  *       &82B0001
PrintDbox_Cancel                *       &82B0002
PrintDbox_FromTo                *       &82B0003
PrintDbox_All                   *       &82B0004
PrintDbox_From                  *       &82B0005
PrintDbox_To                    *       &82B000D
PrintDbox_Copies                *       &82B000E
PrintDbox_Scale                 *       &82B000F
PrintDbox_Upright               *       &82B0009
PrintDbox_Sideways              *       &82B000A
PrintDbox_Draft                 *       &82B000B
PrintDbox_SetUp                 *       &82B000C
PrintDbox_Percent               *       &82B0010
Action_PrintDboxAboutToBeShown  *       &82B00
Action_PrintDboxDialogueCompleted *       &82B01
Action_PrintDboxSetUpAboutToBeShown *       &82B02
Action_PrintDboxSave            *       &82B03
Action_PrintDboxSetUp           *       &82B04
Action_PrintDboxPrint           *       &82B05
PrintDbox_PrintSideways         *       &1
PrintDbox_PrintDraft            *       &2
Error_PrintDboxTasksActive      *       &80B300
Error_PrintDboxAllocFailed      *       &80B301
Error_PrintDboxShortBuffer      *       &80B302
Error_PrintDboxNoSuchTask       *       &80B311
Error_PrintDboxNoSuchMethod     *       &80B312
Error_PrintDboxNoSuchMiscOpMethod *       &80B313
PrintDbox_PageRangeAll          *       -1

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

        ^       0
PrintDbox_Object_flags          #       PrintDbox_Flags
PrintDbox_Object_from           #       Int
PrintDbox_Object_to             #       Int
PrintDbox_Object_copies         #       Int
PrintDbox_Object_scale          #       Int
PrintDbox_Object_further_options #       Toolbox_StringReference
PrintDbox_Object_alternative_window_name #       Toolbox_StringReference
PrintDbox_Object                *       @

        ^       0
PrintDbox_ObjectTemplate        Toolbox_ResourceFileObject_MEMBERS
PrintDbox_ObjectTemplate_objectflags #       PrintDbox_Flags
PrintDbox_ObjectTemplate_from   #       Int
PrintDbox_ObjectTemplate_to     #       Int
PrintDbox_ObjectTemplate_copies #       Int
PrintDbox_ObjectTemplate_scale  #       Int
PrintDbox_ObjectTemplate_further_options #       Toolbox_StringReference
PrintDbox_ObjectTemplate_alternative_window_name #       Toolbox_StringReference
PrintDbox_ObjectTemplate        *       @

PrintDbox_Full                  *       Toolbox_Full

        ^       0
PrintDbox_ActionAboutToBeShown_tag #       Toolbox_PositionTag
PrintDbox_ActionAboutToBeShown_position *       @
PrintDbox_ActionAboutToBeShown_position_top_left #       OS_Coord
        ^       PrintDbox_ActionAboutToBeShown_position
PrintDbox_ActionAboutToBeShown_position_full #       PrintDbox_Full
PrintDbox_ActionAboutToBeShown  *       @

        ^       0
PrintDbox_ActionAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
PrintDbox_ActionAboutToBeShownBlock_tag #       Toolbox_PositionTag
PrintDbox_ActionAboutToBeShownBlock_position *       @
PrintDbox_ActionAboutToBeShownBlock_position_top_left #       OS_Coord
        ^       PrintDbox_ActionAboutToBeShownBlock_position
PrintDbox_ActionAboutToBeShownBlock_position_full #       PrintDbox_Full
PrintDbox_ActionAboutToBeShownBlock *       @

PrintDbox_ActionDialogueCompletedBlock *       Toolbox_ActionHeaderBase

        ^       0
PrintDbox_ActionSetupAboutToBeShown_setup #       Toolbox_O
PrintDbox_ActionSetupAboutToBeShown_tag #       Toolbox_PositionTag
PrintDbox_ActionSetupAboutToBeShown_position *       @
PrintDbox_ActionSetupAboutToBeShown_position_top_left #       OS_Coord
        ^       PrintDbox_ActionSetupAboutToBeShown_position
PrintDbox_ActionSetupAboutToBeShown_position_full #       PrintDbox_Full
PrintDbox_ActionSetupAboutToBeShown *       @

        ^       0
PrintDbox_ActionSetupAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
PrintDbox_ActionSetupAboutToBeShownBlock_setup #       Toolbox_O
PrintDbox_ActionSetupAboutToBeShownBlock_tag #       Toolbox_PositionTag
PrintDbox_ActionSetupAboutToBeShownBlock_position *       @
PrintDbox_ActionSetupAboutToBeShownBlock_position_top_left #       OS_Coord
        ^       PrintDbox_ActionSetupAboutToBeShownBlock_position
PrintDbox_ActionSetupAboutToBeShownBlock_position_full #       PrintDbox_Full
PrintDbox_ActionSetupAboutToBeShownBlock *       @

        ^       0
PrintDbox_ActionSave_start      #       Int
PrintDbox_ActionSave_finish     #       Int
PrintDbox_ActionSave_copies     #       Int
PrintDbox_ActionSave_scale_factor #       Int
PrintDbox_ActionSave            *       @

        ^       0
PrintDbox_ActionSaveBlock       Toolbox_ActionHeader_MEMBERS
PrintDbox_ActionSaveBlock_start #       Int
PrintDbox_ActionSaveBlock_finish #       Int
PrintDbox_ActionSaveBlock_copies #       Int
PrintDbox_ActionSaveBlock_scale_factor #       Int
PrintDbox_ActionSaveBlock       *       @

        ^       0
PrintDbox_ActionPrint_start     #       Int
PrintDbox_ActionPrint_finish    #       Int
PrintDbox_ActionPrint_copies    #       Int
PrintDbox_ActionPrint_scale_factor #       Int
PrintDbox_ActionPrint           *       @

        ^       0
PrintDbox_ActionPrintBlock      Toolbox_ActionHeader_MEMBERS
PrintDbox_ActionPrintBlock_start #       Int
PrintDbox_ActionPrintBlock_finish #       Int
PrintDbox_ActionPrintBlock_copies #       Int
PrintDbox_ActionPrintBlock_scale_factor #       Int
PrintDbox_ActionPrintBlock      *       @


;Symbols for SWI's and SWI reason codes
XPrintDbox_ClassSWI             *       &A2B00
PrintDbox_ClassSWI              *       &82B00

XPrintDbox_PostFilter           *       &A2B01
PrintDbox_PostFilter            *       &82B01

XPrintDbox_PreFilter            *       &A2B02
PrintDbox_PreFilter             *       &82B02

PrintDbox_GetWindowId           *       &0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &0
   ;Exit
   ;  R0 = window (Toolbox_O)

PrintDbox_SetPageRange          *       &1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &1
   ;  R3 = start (Int)
   ;  R4 = end (Int)

PrintDbox_GetPageRange          *       &2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &2
   ;Exit
   ;  R0 = start (Int)
   ;  R1 = end (Int)

PrintDbox_SetCopies             *       &3
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &3
   ;  R3 = copy_count (Int)

PrintDbox_GetCopies             *       &4
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &4
   ;Exit
   ;  R0 = copy_count (Int)

PrintDbox_SetScale              *       &5
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &5
   ;  R3 = scale (Int)

PrintDbox_GetScale              *       &6
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &6
   ;Exit
   ;  R0 = scale (Int)

PrintDbox_SetOrientation        *       &7
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &7
   ;  R3 = landscape (Bool)

PrintDbox_GetOrientation        *       &8
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &8
   ;Exit
   ;  R0 = landscape (Bool)

PrintDbox_GetTitle              *       &9
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &9
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

PrintDbox_SetDraft              *       &A
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &A
   ;  R3 = draft (Bool)

PrintDbox_GetDraft              *       &B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = print_dbox (Toolbox_O)
   ;  R2 = &B
   ;Exit
   ;  R0 = draft (Bool)

        ]
        END
