|
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __WMFCONVERT_H__ |
|
17 #define __WMFCONVERT_H__ |
|
18 |
|
19 #include "icl/ImagePlugin.h" |
|
20 #include "WMFCodec.h" |
|
21 |
|
22 #include <w32std.h> |
|
23 |
|
24 // Decoder. |
|
25 class CWmfReadCodec; |
|
26 class CWmfDecoder : public CImageDecoderPlugin |
|
27 { |
|
28 public: |
|
29 enum TWmfSubType |
|
30 { |
|
31 EWmfUnknownSubType, EWmfStdSubType, EWmfApmSubType, EWmfClpSubType |
|
32 }; |
|
33 |
|
34 public: |
|
35 static CWmfDecoder* NewL(); |
|
36 static CWmfDecoder* NewStdL(); |
|
37 static CWmfDecoder* NewApmL(); |
|
38 static CWmfDecoder* NewClpL(); |
|
39 virtual ~CWmfDecoder(); |
|
40 |
|
41 virtual void ImageType(TInt aFrameNumber, TUid& aImageType, TUid& aImageSubType) const; |
|
42 CFrameInfoStrings* FrameInfoStringsL(RFs& aFs, TInt aFrameNumber); |
|
43 void EnableMaskGeneration(); |
|
44 |
|
45 protected: |
|
46 void Cleanup(); |
|
47 |
|
48 private: |
|
49 CWmfDecoder(TWmfSubType aWmfSubType); |
|
50 void ReadFormatL(); |
|
51 void ScanDataL(); |
|
52 |
|
53 void ProcessWmfApmHeaderL(const TUint16* aData, TRect& aFrameCoords, TSize& aOverallSize, TSize& aFrameSize); |
|
54 void ProcessWmfClpHeaderL(const TUint16* aData, TRect& aFrameCoords, TSize& aOverallSize, TSize& aFrameSize); |
|
55 void CheckDeviceL(); |
|
56 TSize FindSetWindowExtL(); |
|
57 |
|
58 private: |
|
59 CFbsScreenDevice* iDevice; |
|
60 TInt iWordsExpected; |
|
61 TBool iMaskGenerationEnabled; |
|
62 TWmfSubType iWmfSubType; |
|
63 TBool iRFbsSessionIsOurs; |
|
64 }; |
|
65 |
|
66 #endif // __WMFCONVERT_H__ |