; Assembler header file for JPEG
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:44:04 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.

        [       :LNOT: :DEF: JPEG_Hdr
        GBLS    JPEG_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_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

;Symbols for constants
JPEG_InfoMonochrome             *       &1
JPEG_InfoNoTrfm                 *       &2
JPEG_InfoDPIUnknown             *       &4
JPEG_ScaleDithered              *       &1
JPEG_ScaleErrorDiffused         *       &2
JPEG_ScaleGivenColourMapping    *       &4
JPEG_ScaleTranslucency          *       &FF0
JPEG_ScaleTranslucencyShift     *       4
JPEG_DestinationCoords          *       &1
JPEG_TransformDithered          *       &2
JPEG_TransformErrorDiffused     *       &4
JPEG_TransformGivenColourMapping *       &8
JPEG_TransformTranslucency      *       &1FE0
JPEG_TransformTranslucencyShift *       5
JPEG_FileType                   *       &C85
JPEG_PrintPlotting              *       &1
JPEG_PrintUsingTransTab         *       &2

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

        ^       0
        #       Bits
JPEG_ScaleFlags                 *       @

        ^       0
        #       Bits
JPEG_TransformFlags             *       @

        ^       0
JPEG_Image_i                    #       Byte
JPEG_Image                      *       @

        ^       0
        #       Bits
JPEG_PrintFlags                 *       @


;Symbols for SWI's and SWI reason codes
XJPEG_Info                      *       &69980
JPEG_Info                       *       &49980

JPEGInfo_Dimensions             *       &1
   ;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)

XJPEG_FileInfo                  *       &69981
JPEG_FileInfo                   *       &49981

JPEGFileInfo_Dimensions         *       &1
   ;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)

XJPEG_PlotScaled                *       &69982
JPEG_PlotScaled                 *       &49982
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = x (Int)
   ;  R2 = y (Int)
   ;  R3 -> factors (OS_Factors)
   ;  R4 = size (Int)
   ;  R5 = flags (JPEG_ScaleFlags)

XJPEG_PlotScaledMapped          *       &69982
JPEG_PlotScaledMapped           *       &49982
   ;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)

XJPEG_PlotFileScaled            *       &69983
JPEG_PlotFileScaled             *       &49983
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = x (Int)
   ;  R2 = y (Int)
   ;  R3 -> factors (OS_Factors)
   ;  R4 = flags (JPEG_ScaleFlags)

XJPEG_PlotFileScaledMapped      *       &69983
JPEG_PlotFileScaledMapped       *       &49983
   ;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)

XJPEG_PlotTransformed           *       &69984
JPEG_PlotTransformed            *       &49984
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)
   ;  R3 = size (Int)

XJPEG_PlotTransformedMapped     *       &69984
JPEG_PlotTransformedMapped      *       &49984
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = &8 :OR: flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)
   ;  R3 = size (Int)
   ;  R4 -> mapping (OSSpriteOp_ColourMapping)

XJPEG_PlotFileTransformed       *       &69985
JPEG_PlotFileTransformed        *       &49985
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)

XJPEG_PlotFileTransformedMapped *       &69985
JPEG_PlotFileTransformedMapped  *       &49985
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = &8 :OR: flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)
   ;  R3 -> mapping (OSSpriteOp_ColourMapping)

XJPEG_PDriverIntercept          *       &69986
JPEG_PDriverIntercept           *       &49986
   ;Entry
   ;  R0 = flags (JPEG_PrintFlags)
   ;Exit
   ;  R0 = flags_out (JPEG_PrintFlags)

        ]
        END
