/* ciisetup.h ** Copyright (C) 1993 by Xerox Corporation. All rights reserved. ** MFP, September 28, 1993 5:12:41 pm PDT ** ** Dependencies: ** cii.h ** ** Caveats: ** ** Change log: ** August 19, 1993 (MFP) - creation (as ciistartup.h) ** September 21, 1993 (MFP) - renamed *startup* to *setup* ** September 28, 1993 (MFP) - Added more comments */ #ifndef ciisetup_h #define ciisetup_h #ifndef cii_h #include "cii.h" #endif /********************************************************************** ** CII_SetupHandle: TYPE ** ** ** ** This object provides methods for the creation and ** ** initialization of a CII_Handle for some specific raster ** ** devices. Note that it is NOT the case that all CII_Handle ** ** instances are created via this route, which is why this class ** ** is defined separately from the cii interface. Other suppliers ** ** of cii implementations may well have their own CII_Handle ** ** creation routines. ** ** ** ** It is not normally necessary for interpreters to use this ** ** interface, since they will be passed a CII_Handle. ** **********************************************************************/ typedef struct CII_SetupObjectRep * CII_SetupHandle; /********************************************************************** ** CII_ScanMode: TYPE ** ** ** ** For specifying the orientation of device rasters. The most ** ** popular are: ** ** CII_slowRightFastUp - for long-edge feed printers ** ** CII_slowDownFastRight - for short-edge feed printers, ** ** raster displays ** **********************************************************************/ typedef enum { CII_slowRightFastUp, CII_slowDownFastRight, CII_slowLeftFastDown, CII_slowUpFastLeft, CII_slowRightFastDown, CII_slowDownFastLeft, CII_slowLeftFastUp, CII_slowUpFastRight } CII_ScanMode; /********************************************************************** ** CII_SetupStandardParams: METHOD ** ** ** ** This sets the standard parameters, needed for every raster ** ** device. ** **********************************************************************/ #define CII_SetupStandardParams(a, b, c, d, e, f) \ (((a)->SetupStandardParams)(a, b, c, d, e, f)) typedef CII_RES PROC_CII_SetupStandardParams( CII_SetupHandle s, unsigned int sSizeDevice, unsigned int fSizeDevice, CII_ScanMode scanMode, float surfaceUnitsPerInchX, float surfaceUnitsPerInchY ); /********************************************************************** ** CII_SetupArrayParamSize: METHOD ** ** ** ** This provides an extension mechanism, for creators that need ** ** variable-sized array parameters. ** **********************************************************************/ #define CII_SetupArrayParamSize(s, name, size) \ (((s)->SetupArrayParamSize)(s, name, size)) typedef CII_RES PROC_CII_SetupArrayParamSize( CII_SetupHandle s, char* name, unsigned int size ); /********************************************************************** ** CII_SetupIntParam: METHOD ** ** ** ** This provides an extension mechanism, for creators that need ** ** parameters in addition to those set by SetupStandardParams. If ** ** index is not 0, the client must have called ** ** CII_SetupArrayParamSize with the same name paramenter, and a ** ** size greater than the index value. ** **********************************************************************/ #define CII_SetupIntParam(s, name, index, value) \ (((s)->SetupIntParam)(s, name, index, value)) typedef CII_RES PROC_CII_SetupIntParam( CII_SetupHandle s, char* name, unsigned int index, int value ); /********************************************************************** ** CII_SetupFloatParam: METHOD ** ** ** ** Similar to CII_SetupIntParam, but for floating-point parameters. ** **********************************************************************/ #define CII_SetupFloatParam(s, name, index, value) \ (((s)->SetupFloatParam)(s, name, index, value)) typedef CII_RES PROC_CII_SetupFloatParam( CII_SetupHandle s, char* name, unsigned int index, float value ); /********************************************************************** ** CII_SetupNameParam: METHOD ** ** ** ** Similar to CII_SetupIntParam, but for string-valued parameters. ** **********************************************************************/ #define CII_SetupNameParam(s, name, index, value) \ (((s)->SetupNameParam)(s, name, index, value)) typedef CII_RES PROC_CII_SetupNameParam( CII_SetupHandle s, char* name, unsigned int index, char* value ); /********************************************************************** ** CII_CreateHandleFromRasters: METHOD ** ** ** ** Actually creates a CII_Handle. After the handle is created, ** ** there may be some additional calls needed to complete the ** ** initializaton. ** **********************************************************************/ #define CII_CreateHandleFromRasters(s, logicalDevice, nRasters, rasters, handleResult) \ (((s)->CreateHandleFromRasters)(s, logicalDevice, nRasters, rasters, handleResult)) typedef CII_RES PROC_CII_CreateHandleFromRasters( CII_SetupHandle s, unsigned int logicalDevice, unsigned int nRasters, CII_RasterRep rasters[], CII_Handle* handleResult ); /********************************************************************** ** CII_DestroySetupObject: METHOD ** ** ** ** Should be called exactly once on each CII_SetupHandle created, ** ** after which the client must not use it. It is OK to destroy a ** ** CII_SetupHandle before you are done with the CII_Handles that ** ** it was used to create. ** **********************************************************************/ #define CII_DestroySetupObject(s) \ (((s)->DestroySetupObject)(s)) typedef CII_RES PROC_CII_DestroySetupObject(CII_SetupHandle s); #ifdef c_plusplus #define C_PROC "C" #else #define C_PROC #endif /********************************************************************** ** CII_HighlightDeviceSetup: PROCEDURE ** ** ** ** This makes a CII_SetupHandle for creating a highlight device. ** ** Additional initialization calls: ** ** CII_SetOutputBuffers (allowed) ** ** CII_SetHalftoneProperties (recommended) ** **********************************************************************/ extern C_PROC CII_SetupHandle CII_HighlightDeviceSetup(); /********************************************************************** ** CII_BWHalftoneDeviceSetup: PROCEDURE ** ** ** ** This makes a CII_SetupHandle for creating a monochrome ** ** halftoning device. Additional initialization calls: ** ** CII_SetOutputBuffers (allowed) ** ** CII_SetHalftoneProperties (recommended) ** **********************************************************************/ extern C_PROC CII_SetupHandle CII_BWHalftoneDeviceSetup(); /********************************************************************** ** CII_CMYKHalftoneDeviceSetup: PROCEDURE ** ** ** ** This makes a CII_SetupHandle for creating a four-color CMYK ** ** halftoning device. Additional initialization calls: ** ** CII_SetOutputBuffers (allowed) ** ** CII_SetHalftoneProperties (recommended) ** **********************************************************************/ extern C_PROC CII_SetupHandle CII_CMYKHalftoneDeviceSetup(); /********************************************************************** ** CII_CMYKHalftoneSeparationDeviceSetup: PROCEDURE ** ** ** ** This makes a CII_SetupHandle for creating a halftoning device ** ** that makes just one separation of a four-color CMYK device. ** ** Additional initialization calls: ** ** CII_SetOutputBuffers (allowed) ** ** CII_SetSeparation (required) ** ** CII_SetHalftoneProperties (recommended) ** **********************************************************************/ extern C_PROC CII_SetupHandle CII_CMYKHalftoneSeparationDeviceSetup(); /********************************************************************** ** CII_SetupObjectRep: OBJECT ** ** ** **********************************************************************/ typedef struct CII_SetupObjectRep { void* data; PROC_CII_SetupStandardParams* SetupStandardParams; PROC_CII_SetupArrayParamSize* SetupArrayParamSize; PROC_CII_SetupIntParam* SetupIntParam; PROC_CII_SetupFloatParam* SetupFloatParam; PROC_CII_SetupNameParam* SetupNameParam; PROC_CII_CreateHandleFromRasters* CreateHandleFromRasters; PROC_CII_DestroySetupObject* DestroySetupObject; } CII_SetupObjectRep; #undef C_PROC #endif /* ciisetup_h */