
//
// Make sure ICM_ON, ICM_OFF are defined
//
#ifndef ICM_ON
#define ICM_ON  2
#define ICM_OFF 1
#endif

// **********************************************************************  
//                                                                         
// Constants to determine the size of data structures, string lengths,     
// etc.                                                                    
//                                                                         
// **********************************************************************  

#define CS_ENABLE           1
#define CS_DISABLE          2
#define CS_DELETE_TRANSFORM 3

#define BMP_8               1   // Constants used to track current BMP    
#define BMP_16              2   // information.  MAX_BMP must be one      
#define BMP_555             3   // greater than number of BMP's used      
#define BMP_565             4   // to allow functions to use these        
#define BMP_24              5   // constants as indices to array.          
#define BMP_32              6
#define BMP_888             7
#define BMP_16_ICM          8
#define BMP_555_ICM         9
#define BMP_565_ICM         10
#define BMP_24_ICM          11
#define BMP_32_ICM          12
#define BMP_888_ICM         13
#define BMP_24_BIG          14
#define MAX_BMP             15   

#define MAXPALETTE          256     // max. # supported palette entries     
#define MAXREAD             32768   // Number of bytes to be read during    

//
// A few misc. string lengths
//
#define MAX_CHAR            256
#define MAX_COLORSPACES     16
#define MAX_FRIENDLY_NAME   32  
#define MAX_COLORSPACE_NAME 256

#define FIRST_ROW           50
#define FIRST_COL           165
#define ROW_HEIGHT          35
#define COL_WIDTH           140
#define COL_SPACING         100

// **********************************************************************  
//                                                                         
// Constants to determine the size of data structures, string lengths,     
// etc.                                                                    
//                                                                         
// **********************************************************************  
#define DIB8      1
#define DIB16     2
#define DIB24     3
#define DIB24BIG  4

// **********************************************************************  
//                                                                         
// Macros to display/remove hourglass cursor for lengthy operations        
//                                                                         
// **********************************************************************  
#define StartWait() ghcurSave = SetCursor(LoadCursor(NULL,IDC_WAIT))
#define EndWait()   SetCursor(ghcurSave)

// **********************************************************************  
//                                                                         
// Macros to ensure Win16/Win32 portability                                
//                                                                         
// **********************************************************************  

#ifndef WIN32

#define MoveToEx(hDC, X, Y, lpPoint)  MoveTo(hDC, X, Y)
#define HUGE  huge

#else

#define HUGE 
#endif


#ifdef DEBUG
#define INT3(lpsz)                                            \
OutputDebugString((LPSTR)">>>");                              \
OutputDebugString((LPSTR)lpsz);                               \
OutputDebugString((LPSTR)"\r\n>>>Here comes an INT3!!\r\n");  \
_asm                                                          \
{                                                             \
  int     3                                                   \
}
#else
#define INT3(lpsz)                                            \
OutputDebugString(lpsz);                                      \
OutputDebugString("\r\n");
#endif

// **********************************************************************  
//                                                                         
// Typedefs for ICMTEST                                                    
//                                                                         
// **********************************************************************  
typedef struct tagBMPINFO 
{
  char      szBMP[128];     // Name of BMP
  HANDLE    hDib;           // Handle to memory DIB
  HBITMAP   hBmp;           // Handle to memory BITMAP
} BMPINFO, *lpBMPINFO;


// **********************************************************************  
//                                                                         
// Typedefs for ICM structures                                             
//                                                                         
// **********************************************************************  
typedef struct tagCOLORSPACECONTROLENTRY
{
  LOGCOLORSPACE   lcs;
  HCOLORSPACE     hlcs;
  char            szName[MAX_FRIENDLY_NAME];
} COLORSPACECONTROLENTRY;

// ***********************************************************************
//
//   Functions needed across files
//
// ***********************************************************************
void        DIBPaint (HDC,int,int);
BOOL        InitDIBs(void);
void        FreeDIBs (void);
int         ErrMsg (PSTR sz,...);
WORD        PaletteSize (VOID FAR * pv);
HDC PASCAL  GetPrinterDC (void);
BOOL        PrintICMImage(HWND hWnd);
void        DebugOut (PSTR sz,...);
