/* ciihtd.h
** Copyright (C) 1990, 1993 by Xerox Corporation.  All rights reserved.
** Michael Plass, June 7, 1993 3:32:18 pm PDT
*/

#ifndef ciihtd←h
#define ciihtd←h

/* c++ compatibility */
#ifdef c←plusplus
#define EXTERN extern "C"
#else
#define EXTERN extern
#endif

#include "cii.h"

/**********************************************************************
**
**  Creation of specific device handles
**  
**  The procedures in this section require a large number of
**  parameters in order to fully specify the characteristics
**  of the device.  However, in most cases there are reasonable
**  default values.  To allow new parameters (with appropriate
**  defaults) to be added without demanding source changes in
**  the clients of this interface, the creation of handles is a
**  three-step procedure.
**   1. The client requests an initialized parameter block, specific
**      to the kind of output device that is required.
**   2. The client fills in those fields which differ from the
**      default.
**   3. The client calls the device creation routine.
**  In many cases, further calls must be made to fully initialize
**  the device handle.
**  
**   
**********************************************************************/

/**********************
**  Halftoning device
**********************/
/* CII←ScanMode: For specifying orientation of device rasters.
*/
typedef enum {
	CII←slowRightFastUp,
	CII←slowDownFastRight,
	CII←slowLeftFastDown,
	CII←slowUpFastLeft,
	CII←slowRightFastDown,
	CII←slowDownFastLeft,
	CII←slowLeftFastUp,
	CII←slowUpFastRight
	} CII←ScanMode;
	
typedef struct CII←HTDParamRep {
	unsigned sSizeDevice;     /* scan count of device space */
	unsigned fSizeDevice;     /* scan length of device space */
	CII←ScanMode scanMode;    /* default slowRightFastUp */
	CII←VectorRep surfaceUnitsPerInch; /* default {1.0,1.0} */
	unsigned logicalDevice;   /* default 0 */
	CII←RasterRep * raster;   /* Must be 1 bit per pixel */
} CII←HTDParamRep;

EXTERN CII←RES
CII←HTD←SetDefaults(CII←HTDParamRep* paramRepResult);

EXTERN CII←RES
CII←HTD←Create(CII←HTDParamRep* param, CII←Handle* hResult);

EXTERN CII←RES
CII←HTD←SetBitmap(
	CII←Handle h,	      /* Must be from CII←HTD←Create */
	CII←RasterRep* buffer /* Must be 1 bit per pixel; may not change size*/
	);
	
/* What is this one? - mfp.
** In the Cedar impl, it is a NOP.
*/
EXTERN CII←RES
CII←HTD←Destroy(CII←Handle h);


/* The following two call should be phased out in favor
** of a stack-allocated paramRep.
*/
typedef CII←HTDParamRep* CII←HTDParam;
EXTERN CII←RES
CII←HTD←Defaults(CII←HTDParam *p);
EXTERN CII←RES
CII←HTD←DefaultsDestroy(CII←HTDParam p);


#endif