diff options
author | José Fonseca <jfonseca@vmware.com> | 2012-12-07 15:33:21 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2012-12-07 15:39:39 +0000 |
commit | 692c0c1359bc49158b74960ca5d77cb0730418f0 (patch) | |
tree | a2b9986d3a2a2c5cee99b001265ff669f453179e /thirdparty/directxtex | |
parent | 51410519915899055f0ac3678e77833fe9fbded9 (diff) |
directxtex: Get it building on MinGW.
Diffstat (limited to 'thirdparty/directxtex')
-rw-r--r-- | thirdparty/directxtex/CMakeLists.txt | 30 | ||||
-rw-r--r-- | thirdparty/directxtex/DirectXTex/DirectXTexConvert.cpp | 17 | ||||
-rw-r--r-- | thirdparty/directxtex/DirectXTex/DirectXTexMipmaps.cpp | 4 | ||||
-rw-r--r-- | thirdparty/directxtex/DirectXTex/scoped.h | 2 | ||||
-rw-r--r-- | thirdparty/directxtex/mingw/guid.cpp | 5 | ||||
-rw-r--r-- | thirdparty/directxtex/mingw/sal.h | 294 |
6 files changed, 336 insertions, 16 deletions
diff --git a/thirdparty/directxtex/CMakeLists.txt b/thirdparty/directxtex/CMakeLists.txt index e9ef808b..14266404 100644 --- a/thirdparty/directxtex/CMakeLists.txt +++ b/thirdparty/directxtex/CMakeLists.txt @@ -1,6 +1,6 @@ include (CheckIncludeFileCXX) -if (MSVC AND DirectX_D3D11_INCLUDE_DIR) +if (DirectX_D3D11_INCLUDE_DIR) include_directories (BEFORE ${DirectX_D3D11_INCLUDE_DIR} @@ -14,23 +14,41 @@ if (MSVC AND DirectX_D3D11_INCLUDE_DIR) add_definitions (-DUSE_XNAMATH) endif () + if (MINGW) + include_directories (BEFORE + ${CMAKE_CURRENT_SOURCE_DIR}/mingw + ${CMAKE_SOURCE_DIR}/dispatch # for compat.h + ) + add_definitions ( + -std=c++0x # static_assert, nullptr unique_ptr + -w #inhibit warnings + + -D_XM_NO_INTRINSICS_ + -D_XM_X86_ + -DXMINLINE=inline + -DXM_NO_ALIGNMENT + ) + set (MINGW_GUID mingw/guid.cpp) + endif () + add_library (directxtex STATIC DirectXTex/BC4BC5.cpp DirectXTex/BC6HBC7.cpp DirectXTex/BC.cpp DirectXTex/DirectXTexCompress.cpp DirectXTex/DirectXTexConvert.cpp - DirectXTex/DirectXTexD3D11.cpp - DirectXTex/DirectXTexDDS.cpp - DirectXTex/DirectXTexFlipRotate.cpp + #DirectXTex/DirectXTexD3D11.cpp + #DirectXTex/DirectXTexDDS.cpp + #DirectXTex/DirectXTexFlipRotate.cpp DirectXTex/DirectXTexImage.cpp DirectXTex/DirectXTexMipmaps.cpp DirectXTex/DirectXTexMisc.cpp - DirectXTex/DirectXTexNormalMaps.cpp - DirectXTex/DirectXTexResize.cpp + #DirectXTex/DirectXTexNormalMaps.cpp + #DirectXTex/DirectXTexResize.cpp DirectXTex/DirectXTexTGA.cpp DirectXTex/DirectXTexUtil.cpp DirectXTex/DirectXTexWIC.cpp + ${MINGW_GUID} ) endif () diff --git a/thirdparty/directxtex/DirectXTex/DirectXTexConvert.cpp b/thirdparty/directxtex/DirectXTex/DirectXTexConvert.cpp index f19c269f..7c607346 100644 --- a/thirdparty/directxtex/DirectXTex/DirectXTexConvert.cpp +++ b/thirdparty/directxtex/DirectXTex/DirectXTexConvert.cpp @@ -1806,10 +1806,9 @@ static const ConvertData g_ConvertTable[] = { #endif }; -#pragma prefast( suppress : 25004, "Signature must match bsearch_s" ); -static int __cdecl _ConvertCompare( void *context, const void* ptr1, const void *ptr2 ) +#pragma prefast( suppress : 25004, "Signature must match bsearch" ); +static int __cdecl _ConvertCompare( const void* ptr1, const void *ptr2 ) { - UNREFERENCED_PARAMETER(context); const ConvertData *p1 = reinterpret_cast<const ConvertData*>(ptr1); const ConvertData *p2 = reinterpret_cast<const ConvertData*>(ptr2); if ( p1->format == p2->format ) return 0; @@ -1830,8 +1829,8 @@ DWORD _GetConvertFlags( DXGI_FORMAT format ) #endif ConvertData key = { format, 0 }; - const ConvertData* in = (const ConvertData*) bsearch_s( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData), - _ConvertCompare, 0 ); + const ConvertData* in = (const ConvertData*) bsearch( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData), + _ConvertCompare ); return (in) ? in->flags : 0; } @@ -1857,11 +1856,11 @@ void _ConvertScanline( XMVECTOR* pBuffer, size_t count, DXGI_FORMAT outFormat, D // Determine conversion details about source and dest formats ConvertData key = { inFormat, 0 }; - const ConvertData* in = (const ConvertData*) bsearch_s( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData), - _ConvertCompare, 0 ); + const ConvertData* in = (const ConvertData*) bsearch( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData), + _ConvertCompare ); key.format = outFormat; - const ConvertData* out = (const ConvertData*) bsearch_s( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData), - _ConvertCompare, 0 ); + const ConvertData* out = (const ConvertData*) bsearch( &key, g_ConvertTable, _countof(g_ConvertTable), sizeof(ConvertData), + _ConvertCompare ); if ( !in || !out ) { assert(false); diff --git a/thirdparty/directxtex/DirectXTex/DirectXTexMipmaps.cpp b/thirdparty/directxtex/DirectXTex/DirectXTexMipmaps.cpp index 666c9216..1e7e27cd 100644 --- a/thirdparty/directxtex/DirectXTex/DirectXTexMipmaps.cpp +++ b/thirdparty/directxtex/DirectXTex/DirectXTexMipmaps.cpp @@ -109,6 +109,8 @@ bool _CalculateMipLevels3D( _In_ size_t width, _In_ size_t height, _In_ size_t d return true; } +#ifndef __MINGW32__ + static HRESULT _EnsureWicBitmapPixelFormat( _In_ IWICImagingFactory* pWIC, _In_ IWICBitmap* src, _In_ DWORD filter, _In_ const WICPixelFormatGUID& desiredPixelFormat, _Deref_out_ IWICBitmap** dest ) @@ -1160,4 +1162,6 @@ HRESULT GenerateMipMaps3D( const Image* srcImages, size_t nimages, const TexMeta } } +#endif /* !__MINGW32__ */ + }; // namespace diff --git a/thirdparty/directxtex/DirectXTex/scoped.h b/thirdparty/directxtex/DirectXTex/scoped.h index 358290d7..81816069 100644 --- a/thirdparty/directxtex/DirectXTex/scoped.h +++ b/thirdparty/directxtex/DirectXTex/scoped.h @@ -33,7 +33,7 @@ typedef std::unique_ptr<DirectX::XMVECTOR, aligned_deleter> ScopedAlignedArrayXM //--------------------------------------------------------------------------------- struct handle_closer { void operator()(HANDLE h) { assert(h != INVALID_HANDLE_VALUE); if (h) CloseHandle(h); } }; -typedef public std::unique_ptr<void, handle_closer> ScopedHandle; +typedef std::unique_ptr<void, handle_closer> ScopedHandle; inline HANDLE safe_handle( HANDLE h ) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; } diff --git a/thirdparty/directxtex/mingw/guid.cpp b/thirdparty/directxtex/mingw/guid.cpp new file mode 100644 index 00000000..9a1af58b --- /dev/null +++ b/thirdparty/directxtex/mingw/guid.cpp @@ -0,0 +1,5 @@ +#define INITGUID + +#include <windows.h> +#include "sal.h" + diff --git a/thirdparty/directxtex/mingw/sal.h b/thirdparty/directxtex/mingw/sal.h new file mode 100644 index 00000000..2ecbfc20 --- /dev/null +++ b/thirdparty/directxtex/mingw/sal.h @@ -0,0 +1,294 @@ +/************************************************************************** + * + * Copyright 2012 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef _SAL_H_ +#define _SAL_H_ + +#ifndef __MINGW32__ +#error "This header should only be included for MinGW" +#endif + + +/* + * Several of the defines in compat.h clash with libstdc++ internal variables, + * so include the headers now, before they are re-defined. + */ +#include <algorithm> +#include <iostream> +#include <memory> +#include <vector> + + +#include "compat.h" + + +#define memcpy_s(dest, numberOfElements, src, count) memcpy(dest, src, count) + +#undef __uuidof +#define __uuidof(_iface) IID_##_iface + + +#ifndef ERROR_FILE_TOO_LARGE +#define ERROR_FILE_TOO_LARGE 223L +#endif + + +#ifdef __GNUC__ +static inline bool _isnan(float x) +{ + return x != x; +} +#endif + + +#include <wincodec.h> + + +//DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x00); +//DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x01); +//DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x02); +//DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x03); +//DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x04); +//DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x05); +//DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x06); +//DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x07); +//DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x08); +DEFINE_GUID(GUID_WICPixelFormat8bppAlpha, 0xe6cd0116, 0xeeba, 0x4161, 0xaa, 0x85, 0x27, 0xdd, 0x9f, 0xb3, 0xa8, 0x95); +//DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x09); +//DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0a); +//DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b, 0xf1e6, 0x4961, 0xad, 0x46, 0xe1, 0xcc, 0x81, 0x0a, 0x87, 0xd2); +//DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0b); +//DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c); +DEFINE_GUID(GUID_WICPixelFormat24bppRGB, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d); +//DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0e); +//DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f); +//DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x10); +DEFINE_GUID(GUID_WICPixelFormat32bppGrayFloat, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x11); +DEFINE_GUID(GUID_WICPixelFormat32bppRGBA, 0xf5c7ad2d, 0x6a8d, 0x43dd, 0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9); +DEFINE_GUID(GUID_WICPixelFormat32bppPRGBA, 0x3cc4a650, 0xa527, 0x4d37, 0xa9, 0x16, 0x31, 0x42, 0xc7, 0xeb, 0xed, 0xba); +//DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x15); +DEFINE_GUID(GUID_WICPixelFormat48bppBGR, 0xe605a384, 0xb468, 0x46ce, 0xbb, 0x2e, 0x36, 0xf1, 0x80, 0xe6, 0x43, 0x13); +//DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x16); +DEFINE_GUID(GUID_WICPixelFormat64bppBGRA, 0x1562ff7c, 0xd352, 0x46f9, 0x97, 0x9e, 0x42, 0x97, 0x6b, 0x79, 0x22, 0x46); +//DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x17); +DEFINE_GUID(GUID_WICPixelFormat64bppPBGRA, 0x8c518e8e, 0xa4ec, 0x468b, 0xae, 0x70, 0xc9, 0xa3, 0x5a, 0x9c, 0x55, 0x30); +DEFINE_GUID(GUID_WICPixelFormat16bppGrayFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x13); +DEFINE_GUID(GUID_WICPixelFormat32bppBGR101010, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x14); +DEFINE_GUID(GUID_WICPixelFormat48bppRGBFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x12); +DEFINE_GUID(GUID_WICPixelFormat48bppBGRFixedPoint, 0x49ca140e, 0xcab6, 0x493b, 0x9d, 0xdf, 0x60, 0x18, 0x7c, 0x37, 0x53, 0x2a); +DEFINE_GUID(GUID_WICPixelFormat96bppRGBFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x18); +DEFINE_GUID(GUID_WICPixelFormat128bppRGBAFloat, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x19); +DEFINE_GUID(GUID_WICPixelFormat128bppPRGBAFloat, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1a); +DEFINE_GUID(GUID_WICPixelFormat128bppRGBFloat, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1b); +//DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1c); +DEFINE_GUID(GUID_WICPixelFormat64bppRGBAFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1d); +DEFINE_GUID(GUID_WICPixelFormat64bppBGRAFixedPoint, 0x356de33c, 0x54d2, 0x4a23, 0xbb, 0x4, 0x9b, 0x7b, 0xf9, 0xb1, 0xd4, 0x2d); +DEFINE_GUID(GUID_WICPixelFormat64bppRGBFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x40); +DEFINE_GUID(GUID_WICPixelFormat128bppRGBAFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1e); +DEFINE_GUID(GUID_WICPixelFormat128bppRGBFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x41); +DEFINE_GUID(GUID_WICPixelFormat64bppRGBAHalf, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3a); +DEFINE_GUID(GUID_WICPixelFormat64bppRGBHalf, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x42); +DEFINE_GUID(GUID_WICPixelFormat48bppRGBHalf, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3b); +DEFINE_GUID(GUID_WICPixelFormat32bppRGBE, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3d); +DEFINE_GUID(GUID_WICPixelFormat16bppGrayHalf, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3e); +DEFINE_GUID(GUID_WICPixelFormat32bppGrayFixedPoint, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3f); +DEFINE_GUID(GUID_WICPixelFormat32bppRGBA1010102, 0x25238D72, 0xFCF9, 0x4522, 0xb5, 0x14, 0x55, 0x78, 0xe5, 0xad, 0x55, 0xe0); +DEFINE_GUID(GUID_WICPixelFormat32bppRGBA1010102XR, 0x00DE6B9A, 0xC101, 0x434b, 0xb5, 0x02, 0xd0, 0x16, 0x5e, 0xe1, 0x12, 0x2c); +DEFINE_GUID(GUID_WICPixelFormat64bppCMYK, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1f); +DEFINE_GUID(GUID_WICPixelFormat24bpp3Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x20); +DEFINE_GUID(GUID_WICPixelFormat32bpp4Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x21); +DEFINE_GUID(GUID_WICPixelFormat40bpp5Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x22); +DEFINE_GUID(GUID_WICPixelFormat48bpp6Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x23); +DEFINE_GUID(GUID_WICPixelFormat56bpp7Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x24); +DEFINE_GUID(GUID_WICPixelFormat64bpp8Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x25); +DEFINE_GUID(GUID_WICPixelFormat48bpp3Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x26); +DEFINE_GUID(GUID_WICPixelFormat64bpp4Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x27); +DEFINE_GUID(GUID_WICPixelFormat80bpp5Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x28); +DEFINE_GUID(GUID_WICPixelFormat96bpp6Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x29); +DEFINE_GUID(GUID_WICPixelFormat112bpp7Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2a); +DEFINE_GUID(GUID_WICPixelFormat128bpp8Channels, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2b); +DEFINE_GUID(GUID_WICPixelFormat40bppCMYKAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2c); +DEFINE_GUID(GUID_WICPixelFormat80bppCMYKAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2d); +DEFINE_GUID(GUID_WICPixelFormat32bpp3ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2e); +DEFINE_GUID(GUID_WICPixelFormat40bpp4ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2f); +DEFINE_GUID(GUID_WICPixelFormat48bpp5ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x30); +DEFINE_GUID(GUID_WICPixelFormat56bpp6ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x31); +DEFINE_GUID(GUID_WICPixelFormat64bpp7ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x32); +DEFINE_GUID(GUID_WICPixelFormat72bpp8ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x33); +DEFINE_GUID(GUID_WICPixelFormat64bpp3ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x34); +DEFINE_GUID(GUID_WICPixelFormat80bpp4ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x35); +DEFINE_GUID(GUID_WICPixelFormat96bpp5ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x36); +DEFINE_GUID(GUID_WICPixelFormat112bpp6ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x37); +DEFINE_GUID(GUID_WICPixelFormat128bpp7ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x38); +DEFINE_GUID(GUID_WICPixelFormat144bpp8ChannelsAlpha, 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x39); + + +#ifndef __IWICPixelFormatInfo_INTERFACE_DEFINED__ +#define __IWICPixelFormatInfo_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IWICPixelFormatInfo, 0xE8EDA601, 0x3D48, 0x431a, 0xAB, 0x44, 0x69, 0x05, 0x9B, 0xE8, 0x8B, 0xBE); + +#if defined(__cplusplus) && !defined(CINTERFACE) + +MIDL_INTERFACE("e8eda601-3d48-431a-ab4469059be88bbe") +IWICPixelFormatInfo : public IWICComponentInfo +{ + virtual HRESULT STDMETHODCALLTYPE GetFormatGUID( + GUID *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetColorContext( + IWICColorContext **ppIColorContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBitsPerPixel( + UINT *puiBitsPerPixel) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetChannelCount( + UINT *puiChannelCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetChannelMask( + UINT uiChannelIndex, + UINT cbMaskBuffer, + BYTE *pbMaskBuffer, + UINT *pcbActual) = 0; +}; + +#else + +typedef struct IWICPixelFormatInfoVtbl { + BEGIN_INTERFACE + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IWICPixelFormatInfo* This, + REFIID riid, + void **ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IWICPixelFormatInfo* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IWICPixelFormatInfo* This); + + /*** IWICComponentInfo methods ***/ + HRESULT (STDMETHODCALLTYPE *GetComponentType)( + IWICPixelFormatInfo* This, + WICComponentType *pType); + + HRESULT (STDMETHODCALLTYPE *GetCLSID)( + IWICPixelFormatInfo* This, + CLSID *pclsid); + + HRESULT (STDMETHODCALLTYPE *GetSigningStatus)( + IWICPixelFormatInfo* This, + DWORD *pStatus); + + HRESULT (STDMETHODCALLTYPE *GetAuthor)( + IWICPixelFormatInfo* This, + UINT cchAuthor, + WCHAR *wzAuthor, + UINT *pcchActual); + + HRESULT (STDMETHODCALLTYPE *GetVendorGUID)( + IWICPixelFormatInfo* This, + GUID *pguidVendor); + + HRESULT (STDMETHODCALLTYPE *GetVersion)( + IWICPixelFormatInfo* This, + UINT cchVersion, + WCHAR *wzVersion, + UINT *pcchActual); + + HRESULT (STDMETHODCALLTYPE *GetSpecVersion)( + IWICPixelFormatInfo* This, + UINT cchSpecVersion, + WCHAR *wzSpecVersion, + UINT *pcchActual); + + HRESULT (STDMETHODCALLTYPE *GetFriendlyName)( + IWICPixelFormatInfo* This, + UINT cchFriendlyName, + WCHAR *wzFriendlyName, + UINT *pcchActual); + + /*** IWICPixelFormatInfo methods ***/ + HRESULT (STDMETHODCALLTYPE *GetFormatGUID)( + IWICPixelFormatInfo* This, + GUID *pFormat); + + HRESULT (STDMETHODCALLTYPE *GetColorContext)( + IWICPixelFormatInfo* This, + IWICColorContext **ppIColorContext); + + HRESULT (STDMETHODCALLTYPE *GetBitsPerPixel)( + IWICPixelFormatInfo* This, + UINT *puiBitsPerPixel); + + HRESULT (STDMETHODCALLTYPE *GetChannelCount)( + IWICPixelFormatInfo* This, + UINT *puiChannelCount); + + HRESULT (STDMETHODCALLTYPE *GetChannelMask)( + IWICPixelFormatInfo* This, + UINT uiChannelIndex, + UINT cbMaskBuffer, + BYTE *pbMaskBuffer, + UINT *pcbActual); + + END_INTERFACE +} IWICPixelFormatInfoVtbl; +interface IWICPixelFormatInfo { + CONST_VTBL struct IWICPixelFormatInfoVtbl *lpVtbl; +}; + +#ifdef COBJMACROS +/*** IUnknow nmethods ***/ +#define IWICPixelFormatInfo_QueryInterface(This,riid,ppvObject) ((This)->lpVtbl->QueryInterface(This,riid,ppvObject)) +#define IWICPixelFormatInfo_AddRef(This) ((This)->lpVtbl->AddRef(This)) +#define IWICPixelFormatInfo_Release(This) ((This)->lpVtbl->Release(This)) +/*** IWICComponentInfo methods ***/ +#define IWICPixelFormatInfo_GetComponentType(This,pType) ((This)->lpVtbl->GetComponentType(This,pType)) +#define IWICPixelFormatInfo_GetCLSID(This,pclsid) ((This)->lpVtbl->GetCLSID(This,pclsid)) +#define IWICPixelFormatInfo_GetSigningStatus(This,pStatus) ((This)->lpVtbl->GetSigningStatus(This,pStatus)) +#define IWICPixelFormatInfo_GetAuthor(This,cchAuthor,wzAuthor,pcchActual) ((This)->lpVtbl->GetAuthor(This,cchAuthor,wzAuthor,pcchActual)) +#define IWICPixelFormatInfo_GetVendorGUID(This,pguidVendor) ((This)->lpVtbl->GetVendorGUID(This,pguidVendor)) +#define IWICPixelFormatInfo_GetVersion(This,cchVersion,wzVersion,pcchActual) ((This)->lpVtbl->GetVersion(This,cchVersion,wzVersion,pcchActual)) +#define IWICPixelFormatInfo_GetSpecVersion(This,cchSpecVersion,wzSpecVersion,pcchActual) ((This)->lpVtbl->GetSpecVersion(This,cchSpecVersion,wzSpecVersion,pcchActual)) +#define IWICPixelFormatInfo_GetFriendlyName(This,cchFriendlyName,wzFriendlyName,pcchActual) ((This)->lpVtbl->GetFriendlyName(This,cchFriendlyName,wzFriendlyName,pcchActual)) +/*** IWICPixelFormatInfo methods ***/ +#define IWICPixelFormatInfo_GetFormatGUID(This,pFormat) ((This)->lpVtbl->GetFormatGUID(This,pFormat)) +#define IWICPixelFormatInfo_GetColorContext(This,ppIColorContext) ((This)->lpVtbl->GetColorContext(This,ppIColorContext)) +#define IWICPixelFormatInfo_GetBitsPerPixel(This,puiBitsPerPixel) ((This)->lpVtbl->GetBitsPerPixel(This,puiBitsPerPixel)) +#define IWICPixelFormatInfo_GetChannelCount(This,puiChannelCount) ((This)->lpVtbl->GetChannelCount(This,puiChannelCount)) +#define IWICPixelFormatInfo_GetChannelMask(This,uiChannelIndex,cbMaskBuffer,pbMaskBuffer,pcbActual) ((This)->lpVtbl->GetChannelMask(This,uiChannelIndex,cbMaskBuffer,pbMaskBuffer,pcbActual)) +#endif + +#endif + +#endif /* __IWICPixelFormatInfo_INTERFACE_DEFINED__ */ + + +#endif /* _SAL_H_ */ |