diff --git a/src/webp/decode.h b/src/webp/decode.h index dd7bf999..8ffddb81 100644 --- a/src/webp/decode.h +++ b/src/webp/decode.h @@ -23,8 +23,10 @@ extern "C" { typedef struct WebPRGBABuffer WebPRGBABuffer; typedef struct WebPYUVABuffer WebPYUVABuffer; typedef struct WebPDecBuffer WebPDecBuffer; +#if !(defined(__cplusplus) || defined(c_plusplus)) typedef enum VP8StatusCode VP8StatusCode; typedef enum WEBP_CSP_MODE WEBP_CSP_MODE; +#endif typedef struct WebPIDecoder WebPIDecoder; typedef struct WebPBitstreamFeatures WebPBitstreamFeatures; typedef struct WebPDecoderOptions WebPDecoderOptions; diff --git a/src/webp/encode.h b/src/webp/encode.h index b9a61472..40e98236 100644 --- a/src/webp/encode.h +++ b/src/webp/encode.h @@ -20,14 +20,16 @@ extern "C" { #define WEBP_ENCODER_ABI_VERSION 0x0200 // MAJOR(8b) + MINOR(8b) +#if !(defined(__cplusplus) || defined(c_plusplus)) typedef enum WebPImageHint WebPImageHint; typedef enum WebPEncCSP WebPEncCSP; -typedef struct WebPConfig WebPConfig; typedef enum WebPPreset WebPPreset; +typedef enum WebPEncodingError WebPEncodingError; +#endif +typedef struct WebPConfig WebPConfig; typedef struct WebPPicture WebPPicture; // main structure for I/O typedef struct WebPAuxStats WebPAuxStats; typedef struct WebPMemoryWriter WebPMemoryWriter; -typedef enum WebPEncodingError WebPEncodingError; // Return the encoder's version number, packed in hexadecimal using 8bits for // each of major/minor/revision. E.g: v2.5.7 is 0x020507. diff --git a/src/webp/mux.h b/src/webp/mux.h index 73d83a78..81e19397 100644 --- a/src/webp/mux.h +++ b/src/webp/mux.h @@ -55,14 +55,18 @@ extern "C" { typedef struct WebPMux WebPMux; // main opaque object. typedef struct WebPData WebPData; +#if !(defined(__cplusplus) || defined(c_plusplus)) typedef enum WebPMuxError WebPMuxError; typedef enum WebPFeatureFlags WebPFeatureFlags; typedef enum WebPChunkId WebPChunkId; +#endif typedef struct WebPMuxFrameInfo WebPMuxFrameInfo; typedef struct WebPDemuxer WebPDemuxer; +#if !(defined(__cplusplus) || defined(c_plusplus)) typedef enum WebPDemuxState WebPDemuxState; typedef enum WebPFormatFeature WebPFormatFeature; +#endif typedef struct WebPIterator WebPIterator; typedef struct WebPChunkIterator WebPChunkIterator;