@ GNU AS assembler header file for JPEG
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:46:01 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 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 JPEG_Hdr
#  define JPEG_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_OSSpriteOp
#    define Get_OSSpriteOp
#    include "oslib/OSSpriteOp.Hdr"
#  endif

@Symbols for constants
#  define JPEG_InfoMonochrome 0x1
#  define JPEG_InfoNoTrfm 0x2
#  define JPEG_InfoDPIUnknown 0x4
#  define JPEG_ScaleDithered 0x1
#  define JPEG_ScaleErrorDiffused 0x2
#  define JPEG_ScaleGivenColourMapping 0x4
#  define JPEG_ScaleTranslucency 0xff0
#  define JPEG_ScaleTranslucencyShift 0x4
#  define JPEG_DestinationCoords 0x1
#  define JPEG_TransformDithered 0x2
#  define JPEG_TransformErrorDiffused 0x4
#  define JPEG_TransformGivenColourMapping 0x8
#  define JPEG_TransformTranslucency 0x1fe0
#  define JPEG_TransformTranslucencyShift 0x5
#  define JPEG_FileType 0xc85
#  define JPEG_PrintPlotting 0x1
#  define JPEG_PrintUsingTransTab 0x2

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

        .struct 0
        .skip   Bits
JPEG_ScaleFlags                : 

        .struct 0
        .skip   Bits
JPEG_TransformFlags            : 

        .struct 0
JPEG_Image_i                   : .skip   Byte
JPEG_Image                     : 

        .struct 0
        .skip   Bits
JPEG_PrintFlags                : 


@Symbols for SWI's and SWI reason codes
.set XJPEG_Info,0x69980
.set JPEG_Info,0x49980

#  define JPEGInfo_Dimensions 0x1
   @Entry
   @  R0 = &1
   @  R1 -> image (JPEG_Image)
   @  R2 = size (Int)
   @Exit
   @  R0 = info_flags (JPEG_InfoFlags)
   @  R2 = width (Int)
   @  R3 = height (Int)
   @  R4 = xdpi (Int)
   @  R5 = ydpi (Int)
   @  R6 = workspace_size (Int)

.set XJPEG_FileInfo,0x69981
.set JPEG_FileInfo,0x49981

#  define JPEGFileInfo_Dimensions 0x1
   @Entry
   @  R0 = &1
   @  R1 -> file_name (String)
   @Exit
   @  R0 = info_flags (JPEG_InfoFlags)
   @  R2 = width (Int)
   @  R3 = height (Int)
   @  R4 = xdpi (Int)
   @  R5 = ydpi (Int)
   @  R6 = workspace_size (Int)

.set XJPEG_PlotScaled,0x69982
.set JPEG_PlotScaled,0x49982
   @Entry
   @  R0 -> image (JPEG_Image)
   @  R1 = x (Int)
   @  R2 = y (Int)
   @  R3 -> factors (OS_Factors)
   @  R4 = size (Int)
   @  R5 = flags (JPEG_ScaleFlags)

.set XJPEG_PlotScaledMapped,0x69982
.set JPEG_PlotScaledMapped,0x49982
   @Entry
   @  R0 -> image (JPEG_Image)
   @  R1 = x (Int)
   @  R2 = y (Int)
   @  R3 -> factors (OS_Factors)
   @  R4 = size (Int)
   @  R5 = &4 :OR: flags (JPEG_ScaleFlags)
   @  R6 -> mapping (OSSpriteOp_ColourMapping)

.set XJPEG_PlotFileScaled,0x69983
.set JPEG_PlotFileScaled,0x49983
   @Entry
   @  R0 -> file_name (String)
   @  R1 = x (Int)
   @  R2 = y (Int)
   @  R3 -> factors (OS_Factors)
   @  R4 = flags (JPEG_ScaleFlags)

.set XJPEG_PlotFileScaledMapped,0x69983
.set JPEG_PlotFileScaledMapped,0x49983
   @Entry
   @  R0 -> file_name (String)
   @  R1 = x (Int)
   @  R2 = y (Int)
   @  R3 -> factors (OS_Factors)
   @  R4 = &4 :OR: flags (JPEG_ScaleFlags)
   @  R5 -> mapping (OSSpriteOp_ColourMapping)

.set XJPEG_PlotTransformed,0x69984
.set JPEG_PlotTransformed,0x49984
   @Entry
   @  R0 -> image (JPEG_Image)
   @  R1 = flags (JPEG_TransformFlags)
   @  R2 -> trfm_or_rect (OS_Trfm)
   @  R3 = size (Int)

.set XJPEG_PlotTransformedMapped,0x69984
.set JPEG_PlotTransformedMapped,0x49984
   @Entry
   @  R0 -> image (JPEG_Image)
   @  R1 = &8 :OR: flags (JPEG_TransformFlags)
   @  R2 -> trfm_or_rect (OS_Trfm)
   @  R3 = size (Int)
   @  R4 -> mapping (OSSpriteOp_ColourMapping)

.set XJPEG_PlotFileTransformed,0x69985
.set JPEG_PlotFileTransformed,0x49985
   @Entry
   @  R0 -> file_name (String)
   @  R1 = flags (JPEG_TransformFlags)
   @  R2 -> trfm_or_rect (OS_Trfm)

.set XJPEG_PlotFileTransformedMapped,0x69985
.set JPEG_PlotFileTransformedMapped,0x49985
   @Entry
   @  R0 -> file_name (String)
   @  R1 = &8 :OR: flags (JPEG_TransformFlags)
   @  R2 -> trfm_or_rect (OS_Trfm)
   @  R3 -> mapping (OSSpriteOp_ColourMapping)

.set XJPEG_PDriverIntercept,0x69986
.set JPEG_PDriverIntercept,0x49986
   @Entry
   @  R0 = flags (JPEG_PrintFlags)
   @Exit
   @  R0 = flags_out (JPEG_PrintFlags)

#endif
