' ########################################################################################
' Microsoft Windows
' File: wcsplugin.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_wcsplugin_PBI)
#DEFINE PBX_wcsplugin_PBI
%EQUATE `WCSPLUGIN_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
'//+-------------------------------------------------------------------------
'//
'// Copyright (c) Microsoft Corporation. All rights reserved.
'//
'//--------------------------------------------------------------------------
' // Size = 12 bytes
TYPE XYZColorF DWORD
 X AS SINGLE ' FLOAT
 Y AS SINGLE ' FLOAT
 Z AS SINGLE ' FLOAT
END TYPE
' // Size = 12 bytes
TYPE JChColorF DWORD
 J AS SINGLE ' FLOAT
 C AS SINGLE ' FLOAT
 h AS SINGLE ' FLOAT
END TYPE
' // Size = 12 bytes
TYPE JabColorF DWORD
 J AS SINGLE ' FLOAT
 a AS SINGLE ' FLOAT
 b AS SINGLE ' FLOAT
END TYPE
' // Size = 12 bytes
TYPE GamutShellTriangle DWORD
 aVertexIndex(2) AS DWORD ' UINT[3]
END TYPE
' // Size = 24 bytes
TYPE GamutShell DWORD
 JMin AS SINGLE ' FLOAT
 JMax AS SINGLE ' FLOAT
 cVertices AS DWORD ' UINT
 cTriangles AS DWORD ' UINT
 pVertices AS JabColorF PTR ' JabColorF *
 pTriangles AS GamutShellTriangle PTR ' GamutShellTriangle *
END TYPE
' // Size = 96 bytes
TYPE PrimaryJabColors DWORD
 red AS JabColorF
 yellow AS JabColorF
 green AS JabColorF
 cyan AS JabColorF
 blue AS JabColorF
 magenta AS JabColorF
 black AS JabColorF
 white AS JabColorF
END TYPE
' // Size = 96 bytes
TYPE PrimaryXYZColors DWORD
 red AS XYZColorF
 yellow AS XYZColorF
 green AS XYZColorF
 cyan AS XYZColorF
 blue AS XYZColorF
 magenta AS XYZColorF
 black AS XYZColorF
 white AS XYZColorF
END TYPE
' // Size = 24 bytes
TYPE GamutBoundaryDescription DWORD
 pPrimaries AS PrimaryJabColors PTR ' PrimaryJabColors *
 cNeutralSamples AS DWORD ' UINT
 pNeutralSamples AS JabColorF PTR ' JabColorF *
 pReferenceShell AS GamutShell PTR ' GamutShell *
 pPlausibleShell AS GamutShell PTR ' GamutShell *
 pPossibleShell AS GamutShell PTR ' GamutShell *
END TYPE
' // Size = 8 bytes
TYPE BlackInformation DWORD
 fBlackOnly AS LONG
 blackWeight AS SINGLE ' FLOAT
END TYPE
' ########################################################################################
' IDeviceModelPlugIn interface
' IID = 1CD63475-07C4-46FE-A903-D655316D11FD
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IDeviceModelPlugIn_INTERFACE_DEFINED)
 %IDeviceModelPlugIn_INTERFACE_DEFINED = 1
$IID_IDeviceModelPlugIn = GUID$("{1CD63475-07C4-46FE-A903-D655316D11FD}")
INTERFACE IDeviceModelPlugIn $IID_IDeviceModelPlugIn
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL bstrXml AS WSTRING
 , BYVAL cNumModels AS DWORD
 , BYVAL iModelPosition AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumChannels ( ' VTable offset = 16
 BYREF pNumChannels AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeviceToColorimetricColors ( ' VTable offset = 20
 BYVAL cColors AS DWORD
 , BYVAL cChannels AS DWORD
 , BYREF pDeviceValues AS SINGLE
 , BYREF pXYZColors AS XYZColorF
 ) AS LONG
 ' =====================================================================================
 METHOD ColorimetricToDeviceColors ( ' VTable offset = 24
 BYVAL cColors AS DWORD
 , BYVAL cChannels AS DWORD
 , BYREF pXYZColors AS XYZColorF
 , BYREF pDeviceValues AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD ColorimetricToDeviceColorsWithBlack ( ' VTable offset = 28
 BYVAL cColors AS DWORD
 , BYVAL cChannels AS DWORD
 , BYREF pXYZColors AS XYZColorF
 , BYREF pBlackInformation AS BlackInformation
 , BYREF pDeviceValues AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetTransformDeviceModelInfo ( ' VTable offset = 32
 BYVAL iModelPosition AS DWORD
 , OPTIONAL BYVAL pIDeviceModelOther AS IDeviceModelPlugIn
 ) AS LONG
 ' =====================================================================================
 METHOD GetPrimarySamples ( ' VTable offset = 36
 BYREF pPrimaryColor AS PrimaryXYZColors
 ) AS LONG
 ' =====================================================================================
 METHOD GetGamutBoundaryMeshSize ( ' VTable offset = 40
 BYREF pNumVertices AS DWORD
 , BYREF pNumTriangles AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetGamutBoundaryMesh ( ' VTable offset = 44
 BYVAL cChannels AS DWORD
 , BYVAL cVertices AS DWORD
 , BYVAL cTriangles AS DWORD
 , BYREF pVertices AS SINGLE
 , BYREF pTriangles AS GamutShellTriangle
 ) AS LONG
 ' =====================================================================================
 METHOD GetNeutralAxisSize ( ' VTable offset = 48
 BYREF pcColors AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNeutralAxis ( ' VTable offset = 52
 BYVAL cColors AS DWORD
 , BYREF pXYZColors AS XYZColorF
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IDeviceModelPlugIn_INTERFACE_DEFINED__ */
' ########################################################################################
' IGamutMapModelPlugIn interface
' IID = 2DD80115-AD1E-41F6-A219-A4F4B583D1F9
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IGamutMapModelPlugIn_INTERFACE_DEFINED)
 %IGamutMapModelPlugIn_INTERFACE_DEFINED = 1
$IID_IGamutMapModelPlugIn = GUID$("{2DD80115-AD1E-41F6-A219-A4F4B583D1F9}")
INTERFACE IGamutMapModelPlugIn $IID_IGamutMapModelPlugIn
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL bstrXml AS WSTRING
 , BYVAL pSrcPlugIn AS IDeviceModelPlugIn
 , BYVAL pDestPlugIn AS IDeviceModelPlugIn
 , BYREF pSrcGBD AS GamutBoundaryDescription
 , BYREF pDestGBD AS GamutBoundaryDescription
 ) AS LONG
 ' =====================================================================================
 METHOD SourceToDestinationAppearanceColors ( ' VTable offset = 16
 BYVAL cColors AS DWORD
 , BYREF pInputColors AS JChColorF
 , BYREF pOutputColors AS JChColorF
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IGamutMapModelPlugIn_INTERFACE_DEFINED__ */
#ENDIF
