Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

csprof.h

Go to the documentation of this file.
00001 #ifndef SUPPORT_H 00002 #define SUPPORT_H 00003 #include "windows.h" 00004 #include "icc.h" 00005 #include "icc_i386.h" 00006 00007 #ifdef __cplusplus 00008 extern "C" 00009 { 00010 #endif 00011 00012 #define TYPE_CIEBASEDDEF 1 00013 #define TYPE_CIEBASEDDEFG 2 00014 #define TempBfSize 128 00015 #define CIEXYZRange 1.99997 00016 #define MAX_LINELENG 240 00017 00018 /*------------------------------------------------------------------------*/ 00019 // Foreword to the functions format. 00020 // All functions return TRUE if successful 00021 // and FALSE if not. Exact reason for the FALSE return can be determined 00022 // by calling GetLastCPError() function. 00023 // This allows us to use the "C" standard left-to-right evaluation order 00024 // for the logical expression and the requirement that logical AND 00025 // operation is performed until FALSE condition is met. That way we can use 00026 // expression like: 00027 // if( LoadCP() && ValidateCP() && 00028 // DoesCPTagExist() && GetCPTagSig() && 00029 // ValidateCPElement()) 00030 // { // Profile element is OK 00031 // Process CP Element........ 00032 // }else 00033 // { //Something is wrong 00034 // Err=GetLastCPError(); 00035 // } 00036 00037 // Implementation-specific representation of the handle to the ColorProfile 00038 00039 typedef MEMPTR CHANDLE, // For the convinience and speed 00040 __far *LPCHANDLE; // let's use the pointer to the 00041 // memory block of the profile 00042 // as the profile handle 00043 00044 BOOL EXTERN LoadCP(LPCSTR filename, HGLOBAL FAR *phMem, LPCHANDLE lphCP); 00045 BOOL EXTERN LoadCP32(LPCSTR filename, HGLOBAL *phMem, LPCHANDLE lpCP); 00046 00047 BOOL EXTERN FreeCP(HGLOBAL hMem); 00048 00049 /* Checks if the profile has all required fields for 00050 this specific type of the color profile */ 00051 BOOL EXTERN ValidateCP(CHANDLE hCP); 00052 00053 BOOL EXTERN DoesCPTagExist(CHANDLE hCP, CSIG CPTag); 00054 BOOL EXTERN GetCPTagIndex(CHANDLE hCP, CSIG CPTag, LPSINT lpIndex); 00055 00056 BOOL EXTERN GetCPElementCount(CHANDLE hCP, LPSINT lpIndex); 00057 BOOL EXTERN ValidateCPElement(CHANDLE hCP, SINT Index); 00058 BOOL EXTERN GetCPTagSig(CHANDLE hCP, SINT Index, LPCSIG lpCPTag); 00059 BOOL EXTERN GetCPElementType(CHANDLE hCP, SINT Index, LPCSIG lpCSig); 00060 00061 BOOL EXTERN GetCPElementSize(CHANDLE hCP, SINT Index, LPSINT lpSize); 00062 BOOL EXTERN GetCPElementDataSize(CHANDLE hCP, SINT Index, LPSINT lpSize); 00063 BOOL EXTERN GetCPElement(CHANDLE hCP, SINT Index, MEMPTR lpData, SINT Size); 00064 BOOL EXTERN GetCPElementData(CHANDLE hCP, SINT Index, MEMPTR lpData, SINT Size); 00065 BOOL EXTERN GetCPElementDataType(CHANDLE CP, SINT Index, long far *lpDataType); 00066 00067 // Functions that get all information from the Color Profile Header 00068 BOOL EXTERN GetCPSize(CHANDLE hCP, LPSINT lpSize); 00069 BOOL EXTERN GetCPCMMType(CHANDLE hCP, LPCSIG lpType); 00070 BOOL EXTERN GetCPVersion(CHANDLE hCP, LPSINT lpVers); 00071 BOOL EXTERN GetCPClass(CHANDLE hCP, LPCSIG lpClass); 00072 BOOL EXTERN GetCPDevSpace(CHANDLE hCP, LPCSIG lpDevSpace); 00073 BOOL EXTERN GetCPConnSpace(CHANDLE hCP, LPCSIG lpConnSpace); 00074 BOOL EXTERN GetCPTarget(CHANDLE hCP, LPCSIG lpTarget); 00075 BOOL EXTERN GetCPManufacturer(CHANDLE hCP, LPCSIG lpManuf); 00076 BOOL EXTERN GetCPModel(CHANDLE hCP, LPCSIG lpModel); 00077 BOOL EXTERN GetCPFlags(CHANDLE hCP, LPSINT lpFlags); 00078 BOOL EXTERN GetCPAttributes(CHANDLE hCP, LPATTRIB lpAttributes); 00079 BOOL EXTERN GetCPWhitePoint(CHANDLE CP, LPSFLOAT lpWP); 00080 BOOL EXTERN GetCPMediaWhitePoint(CHANDLE CP, LPSFLOAT lpMediaWP); 00081 BOOL EXTERN GetCPRenderIntent(CHANDLE CP, LPSINT lpIntent); 00082 BOOL EXTERN GetPS2ColorRenderingIntent(CHANDLE cp, DWORD Intent, 00083 MEMPTR lpMem, LPDWORD Size); 00084 00085 SINT EXTERN GetCPLastCPError(); 00086 BOOL EXTERN SetCPLastCPError(SINT cpError); 00087 BOOL EXTERN SetCPLastError(SINT LastError); 00088 #ifndef ICMDLL 00089 BOOL EXTERN ValidColorSpace(LPPDEVICE lppd, LPICMINFO lpICMI); 00090 #endif 00091 00092 BOOL EXTERN GetCPWhitePoint(CHANDLE CP, LPSFLOAT lpWP); 00093 SINT WriteInt(MEMPTR lpMem, SINT Number); 00094 SINT WriteHex(MEMPTR lpMem, SINT Number); 00095 SINT WriteObject(MEMPTR lpMem, MEMPTR Obj); 00096 SINT WriteObjectN(MEMPTR lpMem, MEMPTR Obj, SINT n); 00097 SINT WriteHexBuffer(MEMPTR lpMem, MEMPTR lpBuff, MEMPTR lpLineStart, DWORD dwBytes); 00098 SINT WriteFloat(MEMPTR lpMem, double dFloat); 00099 SINT WriteStringToken(MEMPTR lpMem, BYTE Token, SINT sNum); 00100 SINT WriteByteString(MEMPTR lpMem, MEMPTR lpBuff, SINT sBytes); 00101 SINT WriteInt2ByteString(MEMPTR lpMem, MEMPTR lpBuff, SINT sBytes); 00102 SINT WriteIntStringU2S(MEMPTR lpMem, MEMPTR lpBuff, SINT sNum); 00103 SINT WriteIntStringU2S_L(MEMPTR lpMem, MEMPTR lpBuff, SINT sNum); 00104 SINT WriteHNAToken(MEMPTR lpMem, BYTE Token, SINT sNum); 00105 SINT WriteAscii85(MEMPTR lpDest, unsigned long inword, SINT nBytes); 00106 SINT ConvertBinaryData2Ascii(MEMPTR lpMem, SINT DataSize, SINT BufSize); 00107 SINT Convert2Ascii(CHANDLE CP, SINT Index, 00108 MEMPTR lpData, SINT BufSize, SINT DataSize, BOOL AllowBinary); 00109 #ifdef ICMDLL 00110 SINT MemCopy(MEMPTR Dest, MEMPTR Source, SINT Length); 00111 #endif 00112 BOOL EXTERN MemAlloc(SINT Size, HGLOBAL FAR *hMemory, LPMEMPTR lpMH); 00113 BOOL EXTERN MemFree(HGLOBAL hMem); 00114 DWORD FIXED_2DOT30(float); 00115 DWORD FIXED_16DOT16(float); 00116 00117 #ifdef __cplusplus 00118 } 00119 #endif 00120 00121 #endif // __SUPPORT_H

Generated on Sat May 15 19:39:36 2004 for test by doxygen 1.3.7