COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) GlobalPC 1999.  All rights reserved.

PROJECT:	GlobalPC
MODULE:		RGB2CMYK Library
FILE:		rgb2cmyk.def

AUTHOR:		Joon Song, Feb 08, 1999

MACROS:
	Name			Description
	----			-----------

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	joon	2/08/99   	Initial revision

DESCRIPTION:

	
		
	$Id$

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

;;
;;
;;    Filename    : ColorLib.h
;;    Data        : 1998/9/18
;;    Created by  : Tomo Watanabe
;;    Copyright   : Copyright CANON INC. 1998,  All Rights Reserved.
;;
;;    Description : This is the header file for the Color Library Interface.
;;

SetDef __RGB2CMYK

StartLibrary	rgb2cmyk

;;
;;  Printer models
;;

ConstPrinterModel	etype	word, 0, 1
    BJD_PM_UNKNOWN	enum	ConstPrinterModel
    BJD_PM_BJC35V2	enum	ConstPrinterModel
    BJD_PM_BJC80V	enum	ConstPrinterModel
    BJD_PM_BJC50V	enum	ConstPrinterModel
    BJD_PM_BJC210J	enum	ConstPrinterModel	
    BJD_PM_BJC240J	enum	ConstPrinterModel
    BJD_PM_BJC250J	enum	ConstPrinterModel
    BJD_PM_BJC610JW	enum	ConstPrinterModel
    BJD_PM_BJC620JW	enum	ConstPrinterModel
    BJD_PM_BJC410J	enum	ConstPrinterModel
    BJD_PM_BJC420J	enum	ConstPrinterModel    
    BJD_PM_BJC430J	enum	ConstPrinterModel
    BJD_PM_BJC440J	enum	ConstPrinterModel
    BJD_PM_BJC455J	enum	ConstPrinterModel
    BJD_PM_BJC465J	enum	ConstPrinterModel
    BJD_PM_BJC80	enum	ConstPrinterModel
    BJD_PM_BJC50	enum	ConstPrinterModel
    BJD_PM_BJC210	enum	ConstPrinterModel
    BJD_PM_BJC240	enum	ConstPrinterModel
    BJD_PM_BJC250	enum	ConstPrinterModel
    BJD_PM_BJC610	enum	ConstPrinterModel
    BJD_PM_BJC620	enum	ConstPrinterModel
    BJD_PM_BJC4100	enum	ConstPrinterModel
    BJD_PM_BJC4200	enum	ConstPrinterModel    
    BJD_PM_BJC4300	enum	ConstPrinterModel
    BJD_PM_BJC4400	enum	ConstPrinterModel
    BJD_PM_BJC4550	enum	ConstPrinterModel
    BJD_PM_BJC4650	enum	ConstPrinterModel
    BJD_PM_BJC210SP	enum	ConstPrinterModel
    BJD_PM_BJC255SP	enum	ConstPrinterModel
    BJD_PM_BJC4200SP	enum	ConstPrinterModel
    BJD_PM_BJC4310SP	enum	ConstPrinterModel
    BJD_PM_BJF600	enum	ConstPrinterModel
    BJD_PM_BJC6000	enum	ConstPrinterModel
    BJD_PM_BJF200	enum	ConstPrinterModel
    BJD_PM_BJC2000	enum	ConstPrinterModel
    BJD_PM_BJF100	enum	ConstPrinterModel
    BJD_PM_BJC1000	enum	ConstPrinterModel
    BJD_PM_NEW_MODELS	enum	ConstPrinterModel
    BJD_PM_MAX		enum	ConstPrinterModel


;;
;;  Media types
;;

ConstMediaType		etype	word, 0, 1
    BJD_MT_UNKNOWN	enum	ConstMediaType
    BJD_MT_PLAINPAPER	enum	ConstMediaType
    BJD_MT_COATEDPAPER	enum	ConstMediaType
    BJD_MT_TRANSPARENCY	enum	ConstMediaType
    BJD_MT_BACKPRINTFILM enum	ConstMediaType
    BJD_MT_GLOSSYPAPER	enum	ConstMediaType
    BJD_MT_HIGHGLOSSFILM enum	ConstMediaType
    BJD_MT_TEXTILESHEET	enum	ConstMediaType
    BJD_MT_ENVELOPE	enum	ConstMediaType
    BJD_MT_HIGHRESPAPER	enum	ConstMediaType
    BJD_MT_TSHIRT	enum	ConstMediaType
    BJD_MT_BANNER	enum	ConstMediaType
    BJD_MT_POSTCARD	enum	ConstMediaType
    BJD_MT_FULLBLEED	enum	ConstMediaType
    BJD_MT_MAX		enum	ConstMediaType


;;
;;  Ink types
;;

ConstInkType		etype	word, 0, 1
    BJD_IT_UNKNOWN	enum	ConstInkType
    BJD_IT_BC21		enum	ConstInkType
    BJD_IT_BC21e	enum	ConstInkType
    BJD_IT_BC22		enum	ConstInkType
    BJD_IT_BC22e	enum	ConstInkType
    BJD_IT_BC20		enum	ConstInkType
    BJD_IT_BC05		enum	ConstInkType
    BJD_IT_BC06		enum	ConstInkType
    BJD_IT_BC02		enum	ConstInkType
    BJD_IT_BJI201	enum	ConstInkType
    BJD_IT_BC10		enum	ConstInkType
    BJD_IT_BC11		enum	ConstInkType
    BJD_IT_BC11e	enum	ConstInkType
    BJD_IT_BC23		enum	ConstInkType
    BJD_IT_BC30BC31	enum	ConstInkType
    BJD_IT_BC31BC32	enum	ConstInkType
    BJD_IT_BC30		enum	ConstInkType
    BJD_IT_WRONG	enum	ConstInkType
    BJD_IT_MAX		enum	ConstInkType


;;
;;  Interface Data
;;

CLInfo	struct
    fPrintType		word		;; Printer type
    fInkSystemType	word		;; Ink system type
    fMediaType		word		;; Media type
    fRGBResolution	word		;; The resolution of original image
    fRGBLineWidth	word		;; Width of original image in pixel
    fRGBBufferSize	word		;; RGB buffer size
    fCMYKDepth		word 4 dup (0)	;; bits for CMYK of one pixel (0,1,2)
    fCMYKLevel		word 4 dup (0)	;; levels of CMYK for a dot (0,2,3,4)
    fCMYKBufferSize	word 4 dup (0)	;; The buffer size for output CMYK data
    fEDBufferSize	word 4 dup (0)	;; The error buffur size for CMYK

    fRGBBufferPtr	fptr		;; The pointer of RGB data buffer
    fCMYKBufferPtr	fptr 4 dup (0)	;; The pointer of CMYK data buffer
    fEDBufferPtr	fptr 4 dup (0)	;; The pointer of Error buffer

    fRGBWidthPixel	word		;; Japanese
    fCMYKWidthByte	word		;; Japanese
    fCMMBufferSize	dword		;; Japanese
    fCMMBufferPtr	fptr		;; Japanese

if 1
    fCMMTablePtr	fptr 32 dup (0) ;; 
else
    fCMMTablePtr	fptr 256 dup (0) ;
endif
    fCMMPalTablePtr	fptr		;;

    ;; the items for internal processing

    fReserve		word		;; Reserve for ED&CMM
    ;;frgb		word 3 dup (0)	;; The input value of RGB for CMM
    fcmyk		word 4 dup (0)	;; The output value of CMYK for CMM

    fUpsideSevenErr	word 4 dup (0)	;; Upside error diffusion buffer
    fBelowOneErr	word 4 dup (0)	;; Below error diffusion buffer
    fDestinationMask1	byte		;; CMYK data mask byte 1
    fDestinationMask2	byte		;; CMYK data mask byte 2
    fDestinationByte	byte 4 dup (0)	;; CMYK distination data working byte
    fErrBufferOffset	word		;; Error buffer address offset
    fCMYKBufferOffset	word		;; CMYK data buffer address offset

    fCMYKLineWidth	dword		;; Width of CMYK output Data in pixel

    fCMYKTotalLine	dword	;; The CMYK total lines before a new RGB line
    fRGBTotalLine	dword	;; The RGB total lines
    fCMYKLineCounter	word	;; The CMYK line counter for a RGB line
    CMYKPixelIndex	dword	;; The Pixel index for all line of CMYK
    RGBIndex		dword	;; The Pixel index for all line of RGB

    fFormulaDataPtr	fptr	;; The pointer of fomular data
    fEDParameterPtr	fptr	;; The pointer of parameter for ED processing

    fUseDither		word	;; Flag whether using Dither or ED
    fBitsPerPixel	word	;; Bits per Pixel of the source data ( 8/24 )
CLInfo	ends


;;
;;  Return values
;;

CL_OK		equ	0	;;  Success
CL_ERROR	equ	-1	;;  Failed


;;
;;  API functions
;;

global CLGetPrinterModel:far
global CLGetMediaType:far
global CLGetInkType:far
global CLInitialize:far
global CLStart:far
global CLRGBData:far
global CLRasterData:far
global CLTerminate:far

EndLibrary	rgb2cmyk
