< prev index next >

src/java.desktop/share/native/liblcms/lcms2.h

Print this page
*** 50,11 ***
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  //---------------------------------------------------------------------------------
  //
! // Version 2.15
  //
  
  #ifndef _lcms2_H
  
  // ********** Configuration toggles ****************************************
--- 50,11 ---
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  //---------------------------------------------------------------------------------
  //
! // Version 2.16
  //
  
  #ifndef _lcms2_H
  
  // ********** Configuration toggles ****************************************

*** 103,16 ***
  #include <time.h>
  #include <stddef.h>
  
  #ifndef CMS_USE_CPP_API
  #   ifdef __cplusplus
  extern "C" {
  #   endif
  #endif
  
  // Version/release
! #define LCMS_VERSION        2150
  
  // I will give the chance of redefining basic types for compilers that are not fully C99 compliant
  #ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
  
  // Base types
--- 103,19 ---
  #include <time.h>
  #include <stddef.h>
  
  #ifndef CMS_USE_CPP_API
  #   ifdef __cplusplus
+ #       if __cplusplus >= 201703L
+ #            define CMS_NO_REGISTER_KEYWORD 1
+ #       endif
  extern "C" {
  #   endif
  #endif
  
  // Version/release
! #define LCMS_VERSION        2160
  
  // I will give the chance of redefining basic types for compilers that are not fully C99 compliant
  #ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
  
  // Base types

*** 352,11 ***
      cmsSigUInt32ArrayType                   = 0x75693332,  // 'ui32'
      cmsSigUInt64ArrayType                   = 0x75693634,  // 'ui64'
      cmsSigUInt8ArrayType                    = 0x75693038,  // 'ui08'
      cmsSigVcgtType                          = 0x76636774,  // 'vcgt'
      cmsSigViewingConditionsType             = 0x76696577,  // 'view'
!     cmsSigXYZType                           = 0x58595A20   // 'XYZ '
  
  
  } cmsTagTypeSignature;
  
  // Base ICC tag definitions
--- 355,12 ---
      cmsSigUInt32ArrayType                   = 0x75693332,  // 'ui32'
      cmsSigUInt64ArrayType                   = 0x75693634,  // 'ui64'
      cmsSigUInt8ArrayType                    = 0x75693038,  // 'ui08'
      cmsSigVcgtType                          = 0x76636774,  // 'vcgt'
      cmsSigViewingConditionsType             = 0x76696577,  // 'view'
!     cmsSigXYZType                           = 0x58595A20,  // 'XYZ '
+     cmsSigMHC2Type                          = 0x4D484332   // 'MHC2'
  
  
  } cmsTagTypeSignature;
  
  // Base ICC tag definitions

*** 430,11 ***
      cmsSigViewingCondDescTag                = 0x76756564,  // 'vued'
      cmsSigViewingConditionsTag              = 0x76696577,  // 'view'
      cmsSigVcgtTag                           = 0x76636774,  // 'vcgt'
      cmsSigMetaTag                           = 0x6D657461,  // 'meta'
      cmsSigcicpTag                           = 0x63696370,  // 'cicp'
!     cmsSigArgyllArtsTag                     = 0x61727473   // 'arts'
  
  } cmsTagSignature;
  
  
  // ICC Technology tag
--- 434,12 ---
      cmsSigViewingCondDescTag                = 0x76756564,  // 'vued'
      cmsSigViewingConditionsTag              = 0x76696577,  // 'view'
      cmsSigVcgtTag                           = 0x76636774,  // 'vcgt'
      cmsSigMetaTag                           = 0x6D657461,  // 'meta'
      cmsSigcicpTag                           = 0x63696370,  // 'cicp'
!     cmsSigArgyllArtsTag                     = 0x61727473,  // 'arts'
+     cmsSigMHC2Tag                           = 0x4D484332   // 'MHC2'
  
  } cmsTagSignature;
  
  
  // ICC Technology tag

*** 975,10 ***
--- 980,11 ---
  #define TYPE_Lab_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(0))
  #define TYPE_GRAY_DBL         (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(0))
  #define TYPE_RGB_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0))
  #define TYPE_BGR_DBL          (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0)|DOSWAP_SH(1))
  #define TYPE_CMYK_DBL         (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(0))
+ #define TYPE_OKLAB_DBL        (FLOAT_SH(1)|COLORSPACE_SH(PT_MCH3)|CHANNELS_SH(3)|BYTES_SH(0))
  
  // IEEE 754-2008 "half"
  #define TYPE_GRAY_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2))
  #define TYPE_RGB_HALF_FLT     (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2))
  #define TYPE_RGBA_HALF_FLT    (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2))

*** 1075,10 ***
--- 1081,23 ---
      cmsUInt8Number  MatrixCoefficients;
      cmsUInt8Number  VideoFullRangeFlag;
  
  } cmsVideoSignalType;
  
+ typedef struct {
+     cmsUInt32Number   CurveEntries;
+     cmsFloat64Number* RedCurve;
+     cmsFloat64Number* GreenCurve;
+     cmsFloat64Number* BlueCurve;
+ 
+     cmsFloat64Number  MinLuminance;         // ST.2086 min luminance in nits
+     cmsFloat64Number  PeakLuminance;        // ST.2086 peak luminance in nits
+ 
+     cmsFloat64Number XYZ2XYZmatrix[3][4];
+ 
+ } cmsMHC2Type;
+ 
  
  
  // Get LittleCMS version (for shared objects) -----------------------------------------------------------------------------
  
  CMSAPI int               CMSEXPORT cmsGetEncodedCMMversion(void);

*** 1247,11 ***
  CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveLinear(const cmsToneCurve* Curve);
  CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveMonotonic(const cmsToneCurve* t);
  CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveDescending(const cmsToneCurve* t);
  CMSAPI cmsInt32Number    CMSEXPORT cmsGetToneCurveParametricType(const cmsToneCurve* t);
  CMSAPI cmsFloat64Number  CMSEXPORT cmsEstimateGamma(const cmsToneCurve* t, cmsFloat64Number Precision);
! CMSAPI cmsFloat64Number* CMSEXPORT cmsGetToneCurveParams(const cmsToneCurve* t);
  
  // Tone curve tabular estimation
  CMSAPI cmsUInt32Number         CMSEXPORT cmsGetToneCurveEstimatedTableEntries(const cmsToneCurve* t);
  CMSAPI const cmsUInt16Number*  CMSEXPORT cmsGetToneCurveEstimatedTable(const cmsToneCurve* t);
  
--- 1266,12 ---
  CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveLinear(const cmsToneCurve* Curve);
  CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveMonotonic(const cmsToneCurve* t);
  CMSAPI cmsBool           CMSEXPORT cmsIsToneCurveDescending(const cmsToneCurve* t);
  CMSAPI cmsInt32Number    CMSEXPORT cmsGetToneCurveParametricType(const cmsToneCurve* t);
  CMSAPI cmsFloat64Number  CMSEXPORT cmsEstimateGamma(const cmsToneCurve* t, cmsFloat64Number Precision);
! 
+ CMSAPI const cmsCurveSegment* CMSEXPORT cmsGetToneCurveSegment(cmsInt32Number n, const cmsToneCurve* t);
  
  // Tone curve tabular estimation
  CMSAPI cmsUInt32Number         CMSEXPORT cmsGetToneCurveEstimatedTableEntries(const cmsToneCurve* t);
  CMSAPI const cmsUInt16Number*  CMSEXPORT cmsGetToneCurveEstimatedTable(const cmsToneCurve* t);
  

*** 1341,12 ***
  
  // Multilocalized Unicode management ---------------------------------------------------------------------------------------
  
  typedef struct _cms_MLU_struct cmsMLU;
  
! #define  cmsNoLanguage "\0\0"
! #define  cmsNoCountry  "\0\0"
  
  CMSAPI cmsMLU*           CMSEXPORT cmsMLUalloc(cmsContext ContextID, cmsUInt32Number nItems);
  CMSAPI void              CMSEXPORT cmsMLUfree(cmsMLU* mlu);
  CMSAPI cmsMLU*           CMSEXPORT cmsMLUdup(const cmsMLU* mlu);
  
--- 1361,15 ---
  
  // Multilocalized Unicode management ---------------------------------------------------------------------------------------
  
  typedef struct _cms_MLU_struct cmsMLU;
  
! #define  cmsNoLanguage    "\0\0"
! #define  cmsNoCountry     "\0\0"
+ 
+ // Special language/country to retrieve unicode field for description in V2 profiles. Use with care.
+ #define  cmsV2Unicode     "\xff\xff"
  
  CMSAPI cmsMLU*           CMSEXPORT cmsMLUalloc(cmsContext ContextID, cmsUInt32Number nItems);
  CMSAPI void              CMSEXPORT cmsMLUfree(cmsMLU* mlu);
  CMSAPI cmsMLU*           CMSEXPORT cmsMLUdup(const cmsMLU* mlu);
  

*** 1354,18 ***
--- 1377,25 ---
                                                    const char LanguageCode[3], const char CountryCode[3],
                                                    const char* ASCIIString);
  CMSAPI cmsBool           CMSEXPORT cmsMLUsetWide(cmsMLU* mlu,
                                                    const char LanguageCode[3], const char CountryCode[3],
                                                    const wchar_t* WideString);
+ CMSAPI cmsBool           CMSEXPORT cmsMLUsetUTF8(cmsMLU* mlu,
+                                                   const char LanguageCode[3], const char CountryCode[3],
+                                                   const char* UTF8String);
  
  CMSAPI cmsUInt32Number   CMSEXPORT cmsMLUgetASCII(const cmsMLU* mlu,
                                                    const char LanguageCode[3], const char CountryCode[3],
                                                    char* Buffer,    cmsUInt32Number BufferSize);
  
  CMSAPI cmsUInt32Number   CMSEXPORT cmsMLUgetWide(const cmsMLU* mlu,
                                                   const char LanguageCode[3], const char CountryCode[3],
                                                   wchar_t* Buffer, cmsUInt32Number BufferSize);
+ CMSAPI cmsUInt32Number   CMSEXPORT cmsMLUgetUTF8(const cmsMLU* mlu,
+                                                  const char LanguageCode[3], const char CountryCode[3],
+                                                  char* Buffer, cmsUInt32Number BufferSize);
+ 
  
  CMSAPI cmsBool           CMSEXPORT cmsMLUgetTranslation(const cmsMLU* mlu,
                                                           const char LanguageCode[3], const char CountryCode[3],
                                                           char ObtainedLanguage[3], char ObtainedCountry[3]);
  

*** 1586,10 ***
--- 1616,14 ---
  
  CMSAPI cmsUInt32Number   CMSEXPORT cmsGetProfileInfoASCII(cmsHPROFILE hProfile, cmsInfoType Info,
                                                              const char LanguageCode[3], const char CountryCode[3],
                                                              char* Buffer, cmsUInt32Number BufferSize);
  
+ CMSAPI cmsUInt32Number  CMSEXPORT cmsGetProfileInfoUTF8(cmsHPROFILE hProfile, cmsInfoType Info,
+                                                             const char LanguageCode[3], const char CountryCode[3],
+                                                             char* Buffer, cmsUInt32Number BufferSize);
+ 
  // IO handlers ----------------------------------------------------------------------------------------------------------
  
  typedef struct _cms_io_handler cmsIOHANDLER;
  
  CMSAPI cmsIOHANDLER*     CMSEXPORT cmsOpenIOhandlerFromFile(cmsContext ContextID, const char* FileName, const char* AccessMode);

*** 1648,10 ***
--- 1682,13 ---
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateInkLimitingDeviceLinkTHR(cmsContext ContextID,
                                                                cmsColorSpaceSignature ColorSpace, cmsFloat64Number Limit);
  
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateInkLimitingDeviceLink(cmsColorSpaceSignature ColorSpace, cmsFloat64Number Limit);
  
+ CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateDeviceLinkFromCubeFile(const char* cFileName);
+ 
+ CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateDeviceLinkFromCubeFileTHR(cmsContext ContextID, const char* cFileName);
  
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab2ProfileTHR(cmsContext ContextID, const cmsCIExyY* WhitePoint);
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab2Profile(const cmsCIExyY* WhitePoint);
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab4ProfileTHR(cmsContext ContextID, const cmsCIExyY* WhitePoint);
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateLab4Profile(const cmsCIExyY* WhitePoint);

*** 1660,10 ***
--- 1697,12 ---
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateXYZProfile(void);
  
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreate_sRGBProfileTHR(cmsContext ContextID);
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreate_sRGBProfile(void);
  
+ CMSAPI cmsHPROFILE      CMSEXPORT cmsCreate_OkLabProfile(cmsContext ctx);
+ 
  CMSAPI cmsHPROFILE      CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID,
                                                               cmsUInt32Number nLUTPoints,
                                                               cmsFloat64Number Bright,
                                                               cmsFloat64Number Contrast,
                                                               cmsFloat64Number Hue,
< prev index next >