@ GNU AS assembler header file for FontDbox
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:45:47 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 FontDbox_Hdr
#  define FontDbox_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_FontDbox 0x82a00
#  define FontDbox_SetHeight 0x1
#  define FontDbox_SetAspect 0x2
#  define FontDbox_GenerateAboutToBeShown 0x1
#  define FontDbox_GenerateDialogueCompleted 0x2
#  define FontDbox_IncludeSystemFont 0x4
#  define FontDbox_Apply 0x82a0000
#  define FontDbox_Cancel 0x82a0001
#  define FontDbox_Try 0x82a0002
#  define FontDbox_TryString 0x82a0003
#  define FontDbox_AspectRatio 0x82a0004
#  define FontDbox_Height 0x82a0005
#  define FontDbox_StandardSize0 0x82a0006
#  define FontDbox_StandardSize1 0x82a0007
#  define FontDbox_StandardSize2 0x82a0008
#  define FontDbox_StandardSize3 0x82a0009
#  define FontDbox_StandardSize4 0x82a000a
#  define FontDbox_StandardSize5 0x82a000b
#  define FontDbox_StandardSize6 0x82a000c
#  define FontDbox_StandardSize7 0x82a000d
#  define FontDbox_StandardSize8 0x82a000e
#  define FontDbox_StandardSize9 0x82a000f
#  define FontDbox_Style 0x82a0010
#  define FontDbox_Weight 0x82a0011
#  define FontDbox_FONT 0x82a0012
#  define Action_FontDboxAboutToBeShown 0x82a00
#  define Action_FontDboxDialogueCompleted 0x82a01
#  define Action_FontDboxApplyFont 0x82a02
#  define Error_FontDboxTasksActive 0x80af00
#  define Error_FontDboxAllocFailed 0x80af01
#  define Error_FontDboxShortBuffer 0x80af02
#  define Error_FontDboxNoSuchTask 0x80af11
#  define Error_FontDboxNoSuchMethod 0x80af12
#  define Error_FontDboxNoSuchMiscOpMethod 0x80af13
#  define Error_FontDboxNoSuchFont 0x80af14
#  define Error_FontDboxNoFonts 0x80af21
#  define Error_FontDboxOutOfMessageSpace 0x80af31

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

        .struct 0
FontDbox_Font_font             : .skip   Toolbox_StringReference
FontDbox_Font_height           : .skip   Int
FontDbox_Font_aspect           : .skip   Int
FontDbox_Font                  : 

        .struct 0
FontDbox_Object_flags          : .skip   FontDbox_Flags
FontDbox_Object_title          : .skip   Toolbox_MsgReference
FontDbox_Object_title_limit    : .skip   Int
FontDbox_Object_initial        : .skip   FontDbox_Font
FontDbox_Object_try_string     : .skip   Toolbox_MsgReference
FontDbox_Object_alternative_window_name: .skip   Toolbox_StringReference
FontDbox_Object                : 

        .struct 0
        Toolbox_ResourceFileObject_MEMBERS FontDbox_ObjectTemplate
FontDbox_ObjectTemplate_objectflags: .skip   FontDbox_Flags
FontDbox_ObjectTemplate_title  : .skip   Toolbox_MsgReference
FontDbox_ObjectTemplate_title_limit: .skip   Int
FontDbox_ObjectTemplate_initial: .skip   FontDbox_Font
FontDbox_ObjectTemplate_try_string: .skip   Toolbox_MsgReference
FontDbox_ObjectTemplate_alternative_window_name: .skip   Toolbox_StringReference
FontDbox_ObjectTemplate        : 

        .struct 0
        .skip   Toolbox_Full
FontDbox_Full                  : 

        .struct 0
FontDbox_ActionAboutToBeShown_tag: .skip   Toolbox_PositionTag
FontDbox_ActionAboutToBeShown_position: 
FontDbox_ActionAboutToBeShown_position_top_left: .skip   OS_Coord
        .struct FontDbox_ActionAboutToBeShown_position
FontDbox_ActionAboutToBeShown_position_full: .skip   FontDbox_Full
FontDbox_ActionAboutToBeShown  : 

        .struct 0
        Toolbox_ActionHeader_MEMBERS FontDbox_ActionAboutToBeShownBlock
FontDbox_ActionAboutToBeShownBlock_tag: .skip   Toolbox_PositionTag
FontDbox_ActionAboutToBeShownBlock_position: 
FontDbox_ActionAboutToBeShownBlock_position_top_left: .skip   OS_Coord
        .struct FontDbox_ActionAboutToBeShownBlock_position
FontDbox_ActionAboutToBeShownBlock_position_full: .skip   FontDbox_Full
FontDbox_ActionAboutToBeShownBlock: 

        .struct 0
        .skip   Toolbox_ActionHeaderBase
FontDbox_ActionDialogueCompletedBlock: 

        .struct 0
FontDbox_ActionApplyFont_height: .skip   Int
FontDbox_ActionApplyFont_aspect: .skip   Int
FontDbox_ActionApplyFont_font  : .skip   204*Char
FontDbox_ActionApplyFont       : 

        .struct 0
        Toolbox_ActionHeader_MEMBERS FontDbox_ActionApplyFontBlock
FontDbox_ActionApplyFontBlock_height: .skip   Int
FontDbox_ActionApplyFontBlock_aspect: .skip   Int
FontDbox_ActionApplyFontBlock_font: .skip   204*Char
FontDbox_ActionApplyFontBlock  : 


@Symbols for SWI's and SWI reason codes
.set XFontDbox_ClassSWI,0xa2a00
.set FontDbox_ClassSWI,0x82a00

.set XFontDbox_PostFilter,0xa2a01
.set FontDbox_PostFilter,0x82a01

.set XFontDbox_PreFilter,0xa2a02
.set FontDbox_PreFilter,0x82a02

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

#  define FontDbox_SetFont 0x1
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &1
   @  R3 -> font_identifier (String)

#  define FontDbox_GetFont 0x2
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &2
   @  R3 = buffer (pointer to String)
   @  R4 = size (Int)
   @Exit
   @  R4 = used (Int)

#  define FontDbox_SetSize 0x3
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &3
   @  R3 = height (Int)
   @  R4 = aspect (Int)

#  define FontDbox_GetSize 0x4
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &4
   @Exit
   @  R0 = height (Int)
   @  R1 = aspect (Int)

#  define FontDbox_SetTryString 0x5
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &5
   @  R3 -> try_string (String)

#  define FontDbox_GetTryString 0x6
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &6
   @  R3 = buffer (pointer to String)
   @  R4 = size (Int)
   @Exit
   @  R4 = used (Int)

#  define FontDbox_SetTitle 0x7
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &7
   @  R3 -> title (String)

#  define FontDbox_GetTitle 0x8
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_dbox (Toolbox_O)
   @  R2 = &8
   @  R3 = buffer (pointer to String)
   @  R4 = size (Int)
   @Exit
   @  R4 = used (Int)

#endif
