@ GNU AS assembler header file for ZapFontMenu
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:48:23 2012
@ Christian Ludlam, <chris@recoil.org>, 22-Apr-05

@ 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 ZapFontMenu_Hdr
#  define ZapFontMenu_Hdr

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

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

#  ifndef Get_Menu
#    define Get_Menu
#    include "oslib/Menu.Hdr"
#  endif

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

@Symbols for constants
#  define Class_ZapFontMenu 0x100300
#  define ZapFontMenu_GenerateAboutToBeShown 0x1
#  define ZapFontMenu_GenerateHasBeenHidden 0x2
#  define ZapFontMenu_IncludeSystemFont 0x4
#  define ZapFontMenu_EncodingMenu 0x8
#  define ZapFontMenu_EncodingSelection 0x1
#  define Action_ZapFontMenuAboutToBeShown 0x100300
#  define Action_ZapFontMenuHasBeenHidden 0x100301
#  define Action_ZapFontMenuSelection 0x100302
#  define Error_ZapFontMenuTasksActive 0x81d440
#  define Error_ZapFontMenuAllocFailed 0x81d441
#  define Error_ZapFontMenuShortBuffer 0x81d442
#  define Error_ZapFontMenuNoSuchTask 0x81d443
#  define Error_ZapFontMenuNoSuchMethod 0x81d444
#  define Error_ZapFontMenuNoSuchMiscOpMethod 0x81d445

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

        .struct 0
ZapFontMenu_Object_flags       : .skip   ZapFontMenu_Flags
ZapFontMenu_Object_ticked_font : .skip   Toolbox_StringReference
ZapFontMenu_Object             : 

        .struct 0
        Toolbox_ResourceFileObject_MEMBERS ZapFontMenu_ObjectTemplate
ZapFontMenu_ObjectTemplate_objectflags: .skip   ZapFontMenu_Flags
ZapFontMenu_ObjectTemplate_ticked_font: .skip   Toolbox_StringReference
ZapFontMenu_ObjectTemplate     : 

        .struct 0
        .skip   OS_Coord
ZapFontMenu_Full               : 

        .struct 0
ZapFontMenu_ActionAboutToBeShown_tag: .skip   Toolbox_PositionTag
ZapFontMenu_ActionAboutToBeShown_position: 
ZapFontMenu_ActionAboutToBeShown_position_top_left: .skip   OS_Coord
        .struct ZapFontMenu_ActionAboutToBeShown_position
ZapFontMenu_ActionAboutToBeShown_position_full: .skip   ZapFontMenu_Full
ZapFontMenu_ActionAboutToBeShown: 

        .struct 0
        Toolbox_ActionHeader_MEMBERS ZapFontMenu_ActionAboutToBeShownBlock
ZapFontMenu_ActionAboutToBeShownBlock_tag: .skip   Toolbox_PositionTag
ZapFontMenu_ActionAboutToBeShownBlock_position: 
ZapFontMenu_ActionAboutToBeShownBlock_position_top_left: .skip   OS_Coord
        .struct ZapFontMenu_ActionAboutToBeShownBlock_position
ZapFontMenu_ActionAboutToBeShownBlock_position_full: .skip   ZapFontMenu_Full
ZapFontMenu_ActionAboutToBeShownBlock: 

        .struct 0
        .skip   Toolbox_ActionHeaderBase
ZapFontMenu_ActionHasBeenHiddenBlock: 

        .struct 0
        .skip   Toolbox_ActionHeaderBase
ZapFontMenu_ActionDialogueCompletedBlock: 

        .struct 0
ZapFontMenu_ActionSelection_identifier: .skip   212*Char
ZapFontMenu_ActionSelection    : 

        .struct 0
        Toolbox_ActionHeader_MEMBERS ZapFontMenu_ActionSelectionBlock
ZapFontMenu_ActionSelectionBlock_identifier: .skip   212*Char
ZapFontMenu_ActionSelectionBlock: 


@Symbols for SWI's and SWI reason codes
.set XZapFontMenu_ClassSWI,0x120300
.set ZapFontMenu_ClassSWI,0x100300

.set XZapFontMenu_PostFilter,0x120301
.set ZapFontMenu_PostFilter,0x100301

.set XZapFontMenu_PreFilter,0x120302
.set ZapFontMenu_PreFilter,0x100302

#  define ZapFontMenu_SetFont 0x0
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_menu (Toolbox_O)
   @  R2 = &0
   @  R3 -> font_identifier (String)

#  define ZapFontMenu_GetFont 0x1
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_menu (Toolbox_O)
   @  R2 = &1
   @  R3 = buffer (pointer to String)
   @  R4 = size (Int)
   @Exit
   @  R4 = used (Int)

#  define ZapFontMenu_SetSystemAvailable 0x2
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_menu (Toolbox_O)
   @  R2 = &2
   @  R3 = available (Bool)

#  define ZapFontMenu_GetSystemAvailable 0x3
   @Entry
   @  R0 = flags (Bits)
   @  R1 = font_menu (Toolbox_O)
   @  R2 = &3
   @Exit
   @  R0 = available (Bool)

#endif
