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

#ifndef PrintDbox_Hdr
#  define PrintDbox_Hdr

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

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_Toolbox
#    define Get_Toolbox
#    include "oslib/Toolbox.Hdr"
#  endif

#  ifndef Get_Window
#    define Get_Window
#    include "oslib/Window.Hdr"
#  endif

@Symbols for constants
#  define Class_PrintDbox 0x82b00
#  define PrintDbox_GenerateAboutToBeShown 0x1
#  define PrintDbox_GenerateDialogueCompleted 0x2
#  define PrintDbox_GenerateShowSetupAction 0x4
#  define PrintDbox_IncludeAllFromTo 0x8
#  define PrintDbox_IncludeCopies 0x10
#  define PrintDbox_IncludeScale 0x20
#  define PrintDbox_IncludeOrientation 0x40
#  define PrintDbox_IncludeSave 0x80
#  define PrintDbox_IncludeSetUp 0x100
#  define PrintDbox_IncludeDraft 0x200
#  define PrintDbox_SelectFromTo 0x400
#  define PrintDbox_SelectSideways 0x800
#  define PrintDbox_SelectDraft 0x1000
#  define PrintDbox_Print 0x82b0000
#  define PrintDbox_Save 0x82b0001
#  define PrintDbox_Cancel 0x82b0002
#  define PrintDbox_FromTo 0x82b0003
#  define PrintDbox_All 0x82b0004
#  define PrintDbox_From 0x82b0005
#  define PrintDbox_To 0x82b000d
#  define PrintDbox_Copies 0x82b000e
#  define PrintDbox_Scale 0x82b000f
#  define PrintDbox_Upright 0x82b0009
#  define PrintDbox_Sideways 0x82b000a
#  define PrintDbox_Draft 0x82b000b
#  define PrintDbox_SetUp 0x82b000c
#  define PrintDbox_Percent 0x82b0010
#  define Action_PrintDboxAboutToBeShown 0x82b00
#  define Action_PrintDboxDialogueCompleted 0x82b01
#  define Action_PrintDboxSetUpAboutToBeShown 0x82b02
#  define Action_PrintDboxSave 0x82b03
#  define Action_PrintDboxSetUp 0x82b04
#  define Action_PrintDboxPrint 0x82b05
#  define PrintDbox_PrintSideways 0x1
#  define PrintDbox_PrintDraft 0x2
#  define Error_PrintDboxTasksActive 0x80b300
#  define Error_PrintDboxAllocFailed 0x80b301
#  define Error_PrintDboxShortBuffer 0x80b302
#  define Error_PrintDboxNoSuchTask 0x80b311
#  define Error_PrintDboxNoSuchMethod 0x80b312
#  define Error_PrintDboxNoSuchMiscOpMethod 0x80b313
#  define PrintDbox_PageRangeAll 0xffffffff

@Symbols for structure offsets and sizes
        .struct 0
        .skip   Bits
PrintDbox_Flags                : 

        .struct 0
PrintDbox_Object_flags         : .skip   PrintDbox_Flags
PrintDbox_Object_from          : .skip   Int
PrintDbox_Object_to            : .skip   Int
PrintDbox_Object_copies        : .skip   Int
PrintDbox_Object_scale         : .skip   Int
PrintDbox_Object_further_options: .skip   Toolbox_StringReference
PrintDbox_Object_alternative_window_name: .skip   Toolbox_StringReference
PrintDbox_Object               : 

        .struct 0
        Toolbox_ResourceFileObject_MEMBERS PrintDbox_ObjectTemplate
PrintDbox_ObjectTemplate_objectflags: .skip   PrintDbox_Flags
PrintDbox_ObjectTemplate_from  : .skip   Int
PrintDbox_ObjectTemplate_to    : .skip   Int
PrintDbox_ObjectTemplate_copies: .skip   Int
PrintDbox_ObjectTemplate_scale : .skip   Int
PrintDbox_ObjectTemplate_further_options: .skip   Toolbox_StringReference
PrintDbox_ObjectTemplate_alternative_window_name: .skip   Toolbox_StringReference
PrintDbox_ObjectTemplate       : 

        .struct 0
        .skip   Toolbox_Full
PrintDbox_Full                 : 

        .struct 0
PrintDbox_ActionAboutToBeShown_tag: .skip   Toolbox_PositionTag
PrintDbox_ActionAboutToBeShown_position: 
PrintDbox_ActionAboutToBeShown_position_top_left: .skip   OS_Coord
        .struct PrintDbox_ActionAboutToBeShown_position
PrintDbox_ActionAboutToBeShown_position_full: .skip   PrintDbox_Full
PrintDbox_ActionAboutToBeShown : 

        .struct 0
        Toolbox_ActionHeader_MEMBERS PrintDbox_ActionAboutToBeShownBlock
PrintDbox_ActionAboutToBeShownBlock_tag: .skip   Toolbox_PositionTag
PrintDbox_ActionAboutToBeShownBlock_position: 
PrintDbox_ActionAboutToBeShownBlock_position_top_left: .skip   OS_Coord
        .struct PrintDbox_ActionAboutToBeShownBlock_position
PrintDbox_ActionAboutToBeShownBlock_position_full: .skip   PrintDbox_Full
PrintDbox_ActionAboutToBeShownBlock: 

        .struct 0
        .skip   Toolbox_ActionHeaderBase
PrintDbox_ActionDialogueCompletedBlock: 

        .struct 0
PrintDbox_ActionSetupAboutToBeShown_setup: .skip   Toolbox_O
PrintDbox_ActionSetupAboutToBeShown_tag: .skip   Toolbox_PositionTag
PrintDbox_ActionSetupAboutToBeShown_position: 
PrintDbox_ActionSetupAboutToBeShown_position_top_left: .skip   OS_Coord
        .struct PrintDbox_ActionSetupAboutToBeShown_position
PrintDbox_ActionSetupAboutToBeShown_position_full: .skip   PrintDbox_Full
PrintDbox_ActionSetupAboutToBeShown: 

        .struct 0
        Toolbox_ActionHeader_MEMBERS PrintDbox_ActionSetupAboutToBeShownBlock
PrintDbox_ActionSetupAboutToBeShownBlock_setup: .skip   Toolbox_O
PrintDbox_ActionSetupAboutToBeShownBlock_tag: .skip   Toolbox_PositionTag
PrintDbox_ActionSetupAboutToBeShownBlock_position: 
PrintDbox_ActionSetupAboutToBeShownBlock_position_top_left: .skip   OS_Coord
        .struct PrintDbox_ActionSetupAboutToBeShownBlock_position
PrintDbox_ActionSetupAboutToBeShownBlock_position_full: .skip   PrintDbox_Full
PrintDbox_ActionSetupAboutToBeShownBlock: 

        .struct 0
PrintDbox_ActionSave_start     : .skip   Int
PrintDbox_ActionSave_finish    : .skip   Int
PrintDbox_ActionSave_copies    : .skip   Int
PrintDbox_ActionSave_scale_factor: .skip   Int
PrintDbox_ActionSave           : 

        .struct 0
        Toolbox_ActionHeader_MEMBERS PrintDbox_ActionSaveBlock
PrintDbox_ActionSaveBlock_start: .skip   Int
PrintDbox_ActionSaveBlock_finish: .skip   Int
PrintDbox_ActionSaveBlock_copies: .skip   Int
PrintDbox_ActionSaveBlock_scale_factor: .skip   Int
PrintDbox_ActionSaveBlock      : 

        .struct 0
PrintDbox_ActionPrint_start    : .skip   Int
PrintDbox_ActionPrint_finish   : .skip   Int
PrintDbox_ActionPrint_copies   : .skip   Int
PrintDbox_ActionPrint_scale_factor: .skip   Int
PrintDbox_ActionPrint          : 

        .struct 0
        Toolbox_ActionHeader_MEMBERS PrintDbox_ActionPrintBlock
PrintDbox_ActionPrintBlock_start: .skip   Int
PrintDbox_ActionPrintBlock_finish: .skip   Int
PrintDbox_ActionPrintBlock_copies: .skip   Int
PrintDbox_ActionPrintBlock_scale_factor: .skip   Int
PrintDbox_ActionPrintBlock     : 


@Symbols for SWI's and SWI reason codes
.set XPrintDbox_ClassSWI,0xa2b00
.set PrintDbox_ClassSWI,0x82b00

.set XPrintDbox_PostFilter,0xa2b01
.set PrintDbox_PostFilter,0x82b01

.set XPrintDbox_PreFilter,0xa2b02
.set PrintDbox_PreFilter,0x82b02

#  define PrintDbox_GetWindowId 0x0
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &0
   @Exit
   @  R0 = window (Toolbox_O)

#  define PrintDbox_SetPageRange 0x1
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &1
   @  R3 = start (Int)
   @  R4 = end (Int)

#  define PrintDbox_GetPageRange 0x2
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &2
   @Exit
   @  R0 = start (Int)
   @  R1 = end (Int)

#  define PrintDbox_SetCopies 0x3
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &3
   @  R3 = copy_count (Int)

#  define PrintDbox_GetCopies 0x4
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &4
   @Exit
   @  R0 = copy_count (Int)

#  define PrintDbox_SetScale 0x5
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &5
   @  R3 = scale (Int)

#  define PrintDbox_GetScale 0x6
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &6
   @Exit
   @  R0 = scale (Int)

#  define PrintDbox_SetOrientation 0x7
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &7
   @  R3 = landscape (Bool)

#  define PrintDbox_GetOrientation 0x8
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &8
   @Exit
   @  R0 = landscape (Bool)

#  define PrintDbox_GetTitle 0x9
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &9
   @  R3 = buffer (pointer to String)
   @  R4 = size (Int)
   @Exit
   @  R4 = used (Int)

#  define PrintDbox_SetDraft 0xa
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &A
   @  R3 = draft (Bool)

#  define PrintDbox_GetDraft 0xb
   @Entry
   @  R0 = flags (Bits)
   @  R1 = print_dbox (Toolbox_O)
   @  R2 = &B
   @Exit
   @  R0 = draft (Bool)

#endif
