S60UIExampleInitialView.inc
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:1156k
源码类别:
Symbian
开发平台:
C/C++
- const TInt KUidOpenFontRasterizerPlunginInterface = 0x101F7F5D;
- #line 64
- const TUint KReplacementCharacter = 0xF6DB;
- const TInt KFillCharacterOffset = 0x7FFF;
- #line 81
- class TOpenFontMetrics
- {
- public:
- inline TOpenFontMetrics();
- __declspec(dllexport) TOpenFontMetrics(const CFont* aFont);
- inline TInt Size() const;
- inline TInt Ascent() const;
- inline TInt Descent() const;
- inline TInt MaxHeight() const;
- inline TInt MaxDepth() const;
- inline TInt MaxWidth() const;
- inline void SetSize(TInt aSize);
- inline void SetAscent(TInt aAscent);
- inline void SetDescent(TInt aDescent);
- inline void SetMaxHeight(TInt aMaxHeight);
- inline void SetMaxDepth(TInt aMaxDepth);
- inline void SetMaxWidth(TInt aMaxWidth);
- private:
- TInt16 iDesignHeight;
- TInt16 iAscent;
- TInt16 iDescent;
- TInt16 iMaxHeight;
- TInt16 iMaxDepth;
- TInt16 iMaxWidth;
- TInt32 iReserved;
- };
- #line 128
- class TOpenFontCharMetrics
- {
- public:
- enum TUninitialized { EUninitialized };
- public:
- inline TOpenFontCharMetrics();
- TOpenFontCharMetrics(TUninitialized) {}
- __declspec(dllexport) TOpenFontCharMetrics(const TCharacterMetrics& aMetrics);
- __declspec(dllexport) TBool GetTCharacterMetrics(TCharacterMetrics& aMetrics) const;
- inline TInt Width() const;
- inline TInt Height() const;
- inline TInt HorizBearingX() const;
- inline TInt HorizBearingY() const;
- inline TInt HorizAdvance() const;
- inline TInt VertBearingX() const;
- inline TInt VertBearingY() const;
- inline TInt VertAdvance() const;
- inline void GetHorizBounds(TRect& aBounds) const;
- inline void GetVertBounds(TRect& aBounds) const;
- inline void SetWidth(TInt aWidth);
- inline void SetHeight(TInt aHeight);
- inline void SetHorizBearingX(TInt aHorizBearingX);
- inline void SetHorizBearingY(TInt aHorizBearingY);
- inline void SetHorizAdvance(TInt aHorizAdvance);
- inline void SetVertBearingX(TInt aVertBearingX);
- inline void SetVertBearingY(TInt aVertBearingY);
- inline void SetVertAdvance(TInt aVertAdvance);
- private:
- TInt16 iWidth;
- TInt16 iHeight;
- TInt16 iHorizBearingX;
- TInt16 iHorizBearingY;
- TInt16 iHorizAdvance;
- TInt16 iVertBearingX;
- TInt16 iVertBearingY;
- TInt16 iVertAdvance;
- TInt32 iReserved;
- };
- #line 187
- class TOpenFontGlyphData
- {
- public:
- __declspec(dllexport) static TOpenFontGlyphData* New(RHeap* aHeap,TInt aBufferSize);
- inline TBool Overflow() const;
- inline TInt BytesNeeded() const;
- inline TPtrC8 Bitmap() const;
- inline const TUint8* BitmapPointer() const;
- inline const TOpenFontCharMetrics* Metrics() const;
- inline TInt GlyphIndex() const;
- inline TUint8* BufferStart();
- inline TUint8* BufferEnd();
- inline void SetBytesNeeded(TInt aBytes);
- inline void SetBitmapPointer(const TUint8* aBitmap);
- inline void SetMetricsPointer(const TOpenFontCharMetrics* aMetrics);
- inline void SetPointersToInternalBuffers();
- inline void SetMetrics(TOpenFontCharMetrics& aMetrics);
- inline void SetGlyphIndex(TInt aGlyphIndex);
- private:
- TOpenFontGlyphData();
- ~TOpenFontGlyphData();
- private:
- TInt iBitmapBufferSize;
- TInt iBytesNeeded;
- TOpenFontCharMetrics iMetricsBuffer;
- const TUint8* iBitmap;
- const TOpenFontCharMetrics* iMetrics;
- TInt iGlyphIndex;
- TAny* iReserved;
- TUint8 iBitmapBuffer[1];
- };
- #line 254
- class COpenFont: public CBase
- {
- public:
- #line 282
- virtual void RasterizeL(TInt aCode,TOpenFontGlyphData* aGlyphData) = 0;
- __declspec(dllexport) virtual void Reserved();
- __declspec(dllexport) COpenFont(RHeap* aHeap,COpenFontSessionCacheList* aSessionCacheList,COpenFontFile* aFile);
- __declspec(dllexport) COpenFont(RHeap* aHeap,COpenFontSessionCacheList* aSessionCacheList,COpenFontFile* aFile,TInt aFaceIndex);
- __declspec(dllexport) ~COpenFont();
- __declspec(dllexport) void operator delete(TAny*);
- inline const TOpenFontMetrics& Metrics() const;
- inline const TOpenFontFaceAttrib* FaceAttrib() const;
- inline COpenFontFile* File() const;
- inline TInt FaceIndex() const;
- inline TBool CharacterNeedsToBeRasterized(TInt aSessionHandle,TInt aCode) const;
- TBool Rasterize(TInt aSessionHandle,TInt aCode,TOpenFontGlyphData* aGlyphData);
- TBool HasCharacterL(TInt aCode) const;
- TBool GetCharacterData(TInt aSessionHandle,TInt aCode,const TOpenFontCharMetrics*& aMetrics,const TUint8*& aBitmap) const;
- void OnFileDeleted();
- inline TInt FontCapitalAscent() const;
- inline TInt FontMaxAscent() const;
- inline TInt FontStandardDescent() const;
- inline TInt FontMaxDescent() const;
- inline TInt FontLineGap() const;
- inline TInt FontMaxHeight() const;
- protected:
- RHeap* iHeap;
- TOpenFontMetrics iMetrics;
- const COpenFontPositioner* iPositioner;
- TInt iFontCapitalAscent;
- TInt iFontMaxAscent;
- TInt iFontStandardDescent;
- TInt iFontMaxDescent;
- TInt iFontLineGap;
- private:
- const COpenFontGlyph* Glyph(TInt aSessionHandle,TInt aCode) const;
- const COpenFontGlyph* FontCacheGlyph(TInt aCode,COpenFontGlyphTreeEntry**& aNode);
- const COpenFontGlyph* SessionCacheGlyph(RHeap* aHeap,TInt aSessionHandle,TInt aCode,
- COpenFontSessionCache*& aCache,TInt& aIndex,TBool aCreate) const;
- void RasterizeHelperL(TInt aCode,TOpenFontGlyphData* aGlyphData,TOpenFontGlyphData*& aTempGlyphData);
- private:
- COpenFontFile* iFile;
- TInt iFaceIndex;
- COpenFontGlyphCache* iGlyphCache;
- COpenFontSessionCacheList* iSessionCacheList;
- TAny* iReserved;
- };
- #line 351
- class TOpenFontFaceAttribBase
- {
- public:
- inline TOpenFontFaceAttribBase();
- inline TBool HasLatin() const;
- inline TBool HasGreek() const;
- inline TBool HasCyrillic() const;
- inline TBool HasKana() const;
- inline TBool HasHangul() const;
- inline TBool HasCJK() const;
- inline TBool IsSymbol() const;
- inline TBool IsBold() const;
- inline TBool IsItalic() const;
- inline TBool IsSerif() const;
- inline TBool IsMonoWidth() const;
- inline TPtrC Name() const;
- inline const TUint* Coverage() const;
- inline void SetName(const TDesC& aName);
- inline void SetCoverage(TUint aCoverage0,TUint aCoverage1 = 0,TUint aCoverage2 = 0,TUint aCoverage3 = 0);
- inline void SetBold(TBool aBold);
- inline void SetItalic(TBool aItalic);
- inline void SetSerif(TBool aSerif);
- inline void SetMonoWidth(TBool aMonoWidth);
- inline TBool operator==(const TOpenFontFaceAttribBase& aAttrib) const;
- enum
- {
- ELatinSet = 0x1,
- EGreekSet = 0x80,
- ECyrillicSet = 0x200,
- EArmenianSet = 0x400,
- EHebrewSet = 0x800,
- EArabicSet = 0x2000,
- EDevanagariSet = 0x8000,
- EBengaliSet = 0x10000,
- EGurmukhiSet = 0x20000,
- EGujuratiSet = 0x40000,
- EOriyaSet = 0x80000,
- ETamilSet = 0x100000,
- ETeluguSet = 0x200000,
- EKannadaSet = 0x400000,
- EMalayalamSet = 0x800000,
- EThaiSet = 0x1000000,
- ELaoSet = 0x2000000,
- EGeorgianSet = 0x8000000,
- EHangulJamoSet = 0x10000000,
- };
- enum
- {
- ESymbolSets = 0xFFFE,
- EKanaSets = 0x60000,
- EHangulSet = 0x100000,
- ECJKSet = 0x8000000
- };
- enum
- {
- EBold = 0x1,
- EItalic = 0x2,
- ESerif = 0x4,
- EMonoWidth = 0x8
- };
- enum
- {
- ENameLength = 32
- };
- protected:
- TBufC<ENameLength> iName;
- TUint iCoverage[4];
- TInt iStyle;
- TInt32 iReserved;
- };
- #line 443
- class TOpenFontFaceAttrib: public TOpenFontFaceAttribBase
- {
- public:
- inline TOpenFontFaceAttrib();
- inline TBool operator==(const TOpenFontFaceAttrib& aAttrib) const;
- inline TPtrC FullName() const;
- inline TPtrC FamilyName() const;
- inline TPtrC LocalFullName() const;
- inline TPtrC LocalFamilyName() const;
- inline TPtrC ShortFullName() const;
- inline TPtrC ShortFamilyName() const;
- inline TPtrC ShortLocalFullName() const;
- inline TPtrC ShortLocalFamilyName() const;
- inline void SetFullName(const TDesC& aName);
- inline void SetFamilyName(const TDesC& aName);
- inline void SetLocalFullName(const TDesC& aName);
- inline void SetLocalFamilyName(const TDesC& aName);
- inline TInt MinSizeInPixels() const;
- inline void SetMinSizeInPixels(TInt aSize);
- private:
- TBufC<ENameLength> iFamilyName;
- TBufC<ENameLength> iLocalFullName;
- TBufC<ENameLength> iLocalFamilyName;
- TInt iMinSizeInPixels;
- TInt32 iReserved2;
- };
- #line 488
- class TOpenFontSpec: public TOpenFontFaceAttribBase
- {
- public:
- __declspec(dllexport) TOpenFontSpec();
- __declspec(dllexport) TOpenFontSpec(const TFontSpec& aFontSpec);
- __declspec(dllexport) void operator=(const TFontSpec& aFontSpec);
- inline TBool operator==(const TOpenFontSpec& aFontSpec) const;
- __declspec(dllexport) void SetAttrib(const TOpenFontFaceAttribBase& aAttrib);
- __declspec(dllexport) void GetTFontSpec(TFontSpec& aFontSpec) const;
- __declspec(dllexport) void CompensateForAspectRatio(TInt aPixelWidth,TInt aPixelHeight);
- __declspec(dllexport) void CompensateForAspectRatio(const MGraphicsDeviceMap& aMap);
- inline TInt Height() const;
- inline TInt32 WidthFactor() const;
- inline TInt32 SlantFactor() const;
- inline TGlyphBitmapType BitmapType() const;
- inline TUint32 Effects() const;
- inline TFontPrintPosition PrintPosition() const;
- inline void SetHeight(TInt aHeight);
- inline void SetWidthFactor(TInt32 aWidthFactor);
- inline void SetSlantFactor(TInt32 aSlantFactor);
- inline void SetBitmapType(TGlyphBitmapType aBitmapType);
- inline void SetEffects(TUint32 aEffects);
- __declspec(dllexport) void SetEffects(FontEffect::TEffect aEffect, TBool aOn);
- __declspec(dllexport) TBool IsEffectOn(FontEffect::TEffect aEffect) const;
- static TBool IsCompensationForAspectRatioNeeded(TInt aPixelWidth, TInt aPixelHeight, TReal& aRatio);
- enum
- {
- EAlgorithmicBold = 1,
- EDropShadow = 2,
- EOutline = 4
- };
- private:
- TInt iHeight;
- TInt32 iWidthFactor;
- TInt32 iSlantFactor;
- TInt iBitmapType;
- TUint32 iEffects;
- TBool iSymbol;
- TFontPrintPosition iPrintPosition;
- TInt iReserved2;
- };
- enum TOpenFontAttachment
- {
- EBaselineLeft,
- EBaselineRight,
- ETopLeft,
- ETopCenter,
- ETopRight,
- EBottomLeft,
- EBottomCenter,
- EBottomRight
- };
- #line 599
- class COpenFontFile: public CBase
- {
- public:
- virtual void GetNearestFontInPixelsL(RHeap* aHeap, COpenFontSessionCacheList* aSessionCacheList,
- const TOpenFontSpec& aDesiredFontSpec, TInt aPixelWidth, TInt aPixelHeight,
- COpenFont*& aFont, TOpenFontSpec& aActualFontSpec) = 0;
- virtual void GetNearestFontToDesignHeightInPixelsL(RHeap* , COpenFontSessionCacheList* ,
- const TOpenFontSpec& , TInt , TInt ,
- COpenFont*& , TOpenFontSpec& ){}
- virtual void GetNearestFontToMaxHeightInPixelsL(RHeap* , COpenFontSessionCacheList* ,
- const TOpenFontSpec& , TInt , TInt ,
- COpenFont*& , TOpenFontSpec& , TInt ){}
- virtual TBool HasUnicodeCharacterL(TInt aFaceIndex,TInt aCode) const = 0;
- __declspec(dllexport) virtual void Reserved();
- __declspec(dllexport) COpenFontFile(TInt aUid,const TDesC& aFileName);
- __declspec(dllexport) ~COpenFontFile();
- __declspec(dllexport) TBool GetNearestFontHelper(const TOpenFontSpec& aDesiredFontSpec,TInt aPixelWidth,TInt aPixelHeight,
- TInt& aFaceIndex,TOpenFontSpec& aActualFontSpec) const;
- __declspec(dllexport) void AddFaceL(const TOpenFontFaceAttrib& aAttrib);
- inline TUid Uid() const;
- inline const TDesC& FileName() const;
- inline const TOpenFontFaceAttrib& FaceAttrib(TInt aFaceIndex) const;
- inline TInt FaceCount() const;
- inline void IncRefCount();
- inline TBool DecRefCount();
- TInt GetNearestFontInPixels(RHeap* aHeap,COpenFontSessionCacheList* aSessionCacheList,
- const TOpenFontSpec& aDesiredFontSpec,TInt aPixelWidth,TInt aPixelHeight,
- COpenFont*& aFont,TOpenFontSpec& aActualFontSpec);
- TInt GetNearestFontToDesignHeightInPixels(RHeap* aHeap, COpenFontSessionCacheList* aSessionCacheList,
- const TOpenFontSpec& aDesiredFontSpec, TInt aPixelWidth, TInt aPixelHeight,
- COpenFont*& aFont, TOpenFontSpec& aActualFontSpec);
- TInt GetNearestFontToMaxHeightInPixels(RHeap* aHeap, COpenFontSessionCacheList* aSessionCacheList,
- const TOpenFontSpec& aDesiredFontSpec, TInt aPixelWidth, TInt aPixelHeight,
- COpenFont*& aFont, TOpenFontSpec& aActualFontSpec, TInt aMaxHeight);
- void RemoveFontFromList(const COpenFont* aFont);
- void SetFontStoreL(CFontStore* aFontStore);
- protected:
- __declspec(dllexport) TBool GetNearestFontHelperOld(const TOpenFontSpec& aDesiredFontSpec,TInt aPixelWidth,TInt aPixelHeight,
- TInt& aFaceIndex,TOpenFontSpec& aActualFontSpec) const;
- private:
- class TAttrib: public TOpenFontFaceAttrib
- {
- public:
- COpenFontPositioner* iPositioner;
- };
- static TInt ScoreByName(const TOpenFontSpec& aDesiredFontSpec, const TAttrib& aAttrib);
- static TInt ScoreByStyle(const TOpenFontSpec& aDesiredFontSpec, const TAttrib& aAttrib, const TOpenFontFileData* aOpenFontFileData);
- private:
- CArrayFixFlat<TAttrib> iFaceAttrib;
- TUid iUid;
- TBuf<KMaxFileName> iFileName;
- TInt iRefCount;
- CArrayPtrFlat<COpenFont> iFontList;
- TOpenFontFileData* iData;
- };
- #line 697
- class COpenFontRasterizer: public CBase
- {
- public:
- #line 730
- virtual COpenFontFile* NewFontFileL(TInt aUid,const TDesC& aFileName,RFs& aFileSession) = 0;
- inline static COpenFontRasterizer* NewL(TUid aInterfaceImplUid);
- inline virtual ~COpenFontRasterizer();
- __declspec(dllexport) virtual void Reserved();
- private:
- TUid iDtor_ID_Key;
- };
- #line 753
- class COpenFontRasterizerContext: public CBase
- {
- public:
- inline COpenFontRasterizerContext();
- inline void StartGlyph(TOpenFontGlyphData* aGlyphData);
- inline void WriteGlyphBit(TInt aBit);
- inline void WriteGlyphByte(TInt aByte);
- inline void EndGlyph();
- private:
- TOpenFontGlyphData* iGlyphData;
- TUint8* iGlyphDataStart;
- TUint8* iGlyphDataPtr;
- TUint8* iGlyphDataEnd;
- TInt iGlyphBit;
- TInt iBytesNeeded;
- TBool iOverflow;
- TAny* iReserved;
- };
- inline TOpenFontMetrics::TOpenFontMetrics()
- {
- Mem::FillZ(this,sizeof(*this));
- }
- inline TInt TOpenFontMetrics::Size() const
- {
- return iDesignHeight;
- }
- inline TInt TOpenFontMetrics::Ascent() const
- {
- return iAscent;
- }
- inline TInt TOpenFontMetrics::Descent() const
- {
- return iDescent;
- }
- #line 824
- inline TInt TOpenFontMetrics::MaxHeight() const
- {
- return iMaxHeight;
- }
- #line 839
- inline TInt TOpenFontMetrics::MaxDepth() const
- {
- return iMaxDepth;
- }
- inline TInt TOpenFontMetrics::MaxWidth() const
- {
- return iMaxWidth;
- }
- inline void TOpenFontMetrics::SetSize(TInt aSize)
- {
- iDesignHeight = static_cast<TInt16>(aSize);
- }
- inline void TOpenFontMetrics::SetAscent(TInt aAscent)
- {
- iAscent = static_cast<TInt16>(aAscent);
- }
- inline void TOpenFontMetrics::SetDescent(TInt aDescent)
- {
- iDescent = static_cast<TInt16>(aDescent);
- }
- inline void TOpenFontMetrics::SetMaxHeight(TInt aMaxHeight)
- {
- iMaxHeight = static_cast<TInt16>(aMaxHeight);
- }
- inline void TOpenFontMetrics::SetMaxDepth(TInt aMaxDepth)
- {
- iMaxDepth = static_cast<TInt16>(aMaxDepth);
- }
- inline void TOpenFontMetrics::SetMaxWidth(TInt aMaxWidth)
- {
- iMaxWidth = static_cast<TInt16>(aMaxWidth);
- }
- inline TOpenFontCharMetrics::TOpenFontCharMetrics()
- {
- Mem::FillZ(this,sizeof(*this));
- }
- inline TInt TOpenFontCharMetrics::Width() const
- {
- return iWidth;
- }
- inline TInt TOpenFontCharMetrics::Height() const
- {
- return iHeight;
- }
- #line 939
- inline TInt TOpenFontCharMetrics::HorizBearingX() const
- {
- return iHorizBearingX;
- }
- #line 951
- inline TInt TOpenFontCharMetrics::HorizBearingY() const
- {
- return iHorizBearingY;
- }
- #line 963
- inline TInt TOpenFontCharMetrics::HorizAdvance() const
- {
- return iHorizAdvance;
- }
- #line 975
- inline TInt TOpenFontCharMetrics::VertBearingX() const
- {
- return iVertBearingX;
- }
- #line 987
- inline TInt TOpenFontCharMetrics::VertBearingY() const
- {
- return iVertBearingY;
- }
- #line 1002
- inline TInt TOpenFontCharMetrics::VertAdvance() const
- {
- return iVertAdvance;
- }
- inline void TOpenFontCharMetrics::GetHorizBounds(TRect& aBounds) const
- {
- aBounds.iTl.iX = iHorizBearingX;
- aBounds.iTl.iY = -iHorizBearingY;
- aBounds.iBr.iX = aBounds.iTl.iX + iWidth;
- aBounds.iBr.iY = aBounds.iTl.iY + iHeight;
- }
- inline void TOpenFontCharMetrics::GetVertBounds(TRect& aBounds) const
- {
- aBounds.iTl.iX = -iVertBearingX;
- aBounds.iTl.iY = iVertBearingY;
- aBounds.iBr.iX = aBounds.iTl.iX + iWidth;
- aBounds.iBr.iY = aBounds.iTl.iY + iHeight;
- }
- inline void TOpenFontCharMetrics::SetWidth(TInt aWidth)
- {
- iWidth = (TInt16)aWidth;
- }
- inline void TOpenFontCharMetrics::SetHeight(TInt aHeight)
- {
- iHeight = (TInt16)aHeight;
- }
- #line 1058
- inline void TOpenFontCharMetrics::SetHorizBearingX(TInt aHorizBearingX)
- {
- iHorizBearingX = (TInt16)aHorizBearingX;
- }
- #line 1070
- inline void TOpenFontCharMetrics::SetHorizBearingY(TInt aHorizBearingY)
- {
- iHorizBearingY = (TInt16)aHorizBearingY;
- }
- #line 1082
- inline void TOpenFontCharMetrics::SetHorizAdvance(TInt aHorizAdvance)
- {
- iHorizAdvance = (TInt16)aHorizAdvance;
- }
- #line 1094
- inline void TOpenFontCharMetrics::SetVertBearingX(TInt aVertBearingX)
- {
- iVertBearingX = (TInt16)aVertBearingX;
- }
- #line 1106
- inline void TOpenFontCharMetrics::SetVertBearingY(TInt aVertBearingY)
- {
- iVertBearingY = (TInt16)aVertBearingY;
- }
- #line 1121
- inline void TOpenFontCharMetrics::SetVertAdvance(TInt aVertAdvance)
- {
- iVertAdvance = (TInt16)aVertAdvance;
- }
- inline const TOpenFontMetrics& COpenFont::Metrics() const
- {
- return iMetrics;
- }
- #line 1144
- inline TInt TOpenFontGlyphData::GlyphIndex() const
- {
- return iGlyphIndex;
- }
- inline const TOpenFontFaceAttrib* COpenFont::FaceAttrib() const
- {
- return iFile ? &iFile->FaceAttrib(iFaceIndex) : 0 ;
- }
- #line 1166
- inline COpenFontFile* COpenFont::File() const
- {
- return iFile;
- }
- inline TInt COpenFont::FaceIndex() const
- {
- return iFaceIndex;
- }
- #line 1188
- inline TBool COpenFont::CharacterNeedsToBeRasterized(TInt aSessionHandle,TInt aCode) const
- {
- return Glyph(aSessionHandle,aCode) == 0 ;
- }
- #line 1201
- inline TInt COpenFont::FontCapitalAscent() const
- {
- return iFontCapitalAscent;
- }
- #line 1217
- inline TInt COpenFont::FontMaxAscent() const
- {
- return iFontMaxAscent;
- }
- #line 1230
- inline TInt COpenFont::FontStandardDescent() const
- {
- return iFontStandardDescent;
- }
- #line 1245
- inline TInt COpenFont::FontMaxDescent() const
- {
- return iFontMaxDescent;
- }
- inline TInt COpenFont::FontLineGap() const
- {
- return iFontLineGap;
- }
- #line 1268
- inline TInt COpenFont::FontMaxHeight() const
- {
- return iFontMaxAscent + iFontMaxDescent;
- }
- inline TOpenFontFaceAttribBase::TOpenFontFaceAttribBase()
- {
- Mem::FillZ(this,sizeof(*this));
- }
- inline TOpenFontFaceAttrib::TOpenFontFaceAttrib():
- iMinSizeInPixels(0),
- iReserved2(0)
- {
- }
- inline TBool TOpenFontFaceAttribBase::HasLatin() const
- {
- return iCoverage[0] & ELatinSet;
- }
- inline TBool TOpenFontFaceAttribBase::HasGreek() const
- {
- return iCoverage[0] & EGreekSet;
- }
- inline TBool TOpenFontFaceAttribBase::HasCyrillic() const
- {
- return iCoverage[0] & ECyrillicSet;
- }
- #line 1336
- inline TBool TOpenFontFaceAttribBase::HasKana() const
- {
- return iCoverage[1] & EKanaSets;
- }
- #line 1350
- inline TBool TOpenFontFaceAttribBase::HasHangul() const
- {
- return iCoverage[1] & EHangulSet;
- }
- #line 1363
- inline TBool TOpenFontFaceAttribBase::HasCJK() const
- {
- return iCoverage[1] & ECJKSet;
- }
- inline TBool TOpenFontFaceAttribBase::IsSymbol() const
- {
- return iCoverage[0] == 0 && iCoverage[2] == 0 && iCoverage[3] == 0 &&
- iCoverage[1] & ESymbolSets && !(iCoverage[1] & ~ESymbolSets);
- }
- inline TBool TOpenFontFaceAttribBase::IsBold() const
- {
- return iStyle & EBold;
- }
- inline TBool TOpenFontFaceAttribBase::IsItalic() const
- {
- return iStyle & EItalic;
- }
- inline TBool TOpenFontFaceAttribBase::IsSerif() const
- {
- return iStyle & ESerif;
- }
- inline TBool TOpenFontFaceAttribBase::IsMonoWidth() const
- {
- return iStyle & EMonoWidth;
- }
- inline TPtrC TOpenFontFaceAttribBase::Name() const
- {
- return iName;
- }
- #line 1424
- inline TPtrC TOpenFontFaceAttrib::FullName() const
- {
- return Name();
- }
- #line 1436
- inline TPtrC TOpenFontFaceAttrib::FamilyName() const
- {
- return iFamilyName;
- }
- #line 1451
- inline TPtrC TOpenFontFaceAttrib::LocalFullName() const
- {
- return iLocalFullName;
- }
- #line 1466
- inline TPtrC TOpenFontFaceAttrib::LocalFamilyName() const
- {
- return iLocalFamilyName;
- }
- #line 1482
- inline TPtrC TOpenFontFaceAttrib::ShortFullName() const
- {
- return TPtrC(iName.Ptr(),Min(iName.Length(),KMaxTypefaceNameLength));
- }
- #line 1498
- inline TPtrC TOpenFontFaceAttrib::ShortFamilyName() const
- {
- return TPtrC(iFamilyName.Ptr(),Min(iFamilyName.Length(),KMaxTypefaceNameLength));
- }
- #line 1514
- inline TPtrC TOpenFontFaceAttrib::ShortLocalFullName() const
- {
- return TPtrC(iLocalFullName.Ptr(),Min(iLocalFullName.Length(),KMaxTypefaceNameLength));
- }
- #line 1530
- inline TPtrC TOpenFontFaceAttrib::ShortLocalFamilyName() const
- {
- return TPtrC(iLocalFamilyName.Ptr(),Min(iLocalFamilyName.Length(),KMaxTypefaceNameLength));
- }
- #line 1547
- inline const TUint* TOpenFontFaceAttribBase::Coverage() const
- {
- return iCoverage;
- }
- inline TInt TOpenFontFaceAttrib::MinSizeInPixels() const
- {
- return iMinSizeInPixels;
- }
- inline void TOpenFontFaceAttribBase::SetName(const TDesC& aName)
- {
- iName = TPtrC(aName.Ptr(),Min(aName.Length(),(TInt)ENameLength));
- }
- inline void TOpenFontFaceAttrib::SetFullName(const TDesC& aName)
- {
- SetName(aName);
- }
- inline void TOpenFontFaceAttrib::SetFamilyName(const TDesC& aName)
- {
- iFamilyName = TPtrC(aName.Ptr(),Min(aName.Length(),(TInt)ENameLength));
- }
- inline void TOpenFontFaceAttrib::SetLocalFullName(const TDesC& aName)
- {
- iLocalFullName = TPtrC(aName.Ptr(),Min(aName.Length(),(TInt)ENameLength));
- }
- inline void TOpenFontFaceAttrib::SetLocalFamilyName(const TDesC& aName)
- {
- iLocalFamilyName = TPtrC(aName.Ptr(),Min(aName.Length(),(TInt)ENameLength));
- }
- #line 1620
- inline void TOpenFontFaceAttribBase::SetCoverage(TUint aCoverage0,TUint aCoverage1,TUint aCoverage2,TUint aCoverage3)
- {
- iCoverage[0] = aCoverage0;
- iCoverage[1] = aCoverage1;
- iCoverage[2] = aCoverage2;
- iCoverage[3] = aCoverage3;
- }
- inline void TOpenFontFaceAttrib::SetMinSizeInPixels(TInt aSize)
- {
- iMinSizeInPixels = aSize;
- }
- #line 1647
- inline TBool TOpenFontFaceAttrib::operator==(const TOpenFontFaceAttrib& aAttrib) const
- {
- return TOpenFontFaceAttribBase::operator==(aAttrib) &&
- iFamilyName == aAttrib.iFamilyName &&
- iLocalFullName == aAttrib.iLocalFullName &&
- iLocalFamilyName == aAttrib.iLocalFamilyName &&
- iMinSizeInPixels == aAttrib.iMinSizeInPixels;
- }
- inline void TOpenFontFaceAttribBase::SetBold(TBool aBold)
- {
- if (aBold)
- iStyle |= EBold;
- else
- iStyle &= ~EBold;
- }
- inline void TOpenFontFaceAttribBase::SetItalic(TBool aItalic)
- {
- if (aItalic)
- iStyle |= EItalic;
- else
- iStyle &= ~EItalic;
- }
- inline void TOpenFontFaceAttribBase::SetSerif(TBool aSerif)
- {
- if (aSerif)
- iStyle |= ESerif;
- else
- iStyle &= ~ESerif;
- }
- inline void TOpenFontFaceAttribBase::SetMonoWidth(TBool aMonoWidth)
- {
- if (aMonoWidth)
- iStyle |= EMonoWidth;
- else
- iStyle &= ~EMonoWidth;
- }
- #line 1710
- inline TBool TOpenFontFaceAttribBase::operator==(const TOpenFontFaceAttribBase& aAttrib) const
- {
- return iStyle == aAttrib.iStyle &&
- iCoverage[0] == aAttrib.iCoverage[0] &&
- iCoverage[1] == aAttrib.iCoverage[1] &&
- iCoverage[2] == aAttrib.iCoverage[2] &&
- iCoverage[3] == aAttrib.iCoverage[3] &&
- iName.CompareF(aAttrib.iName) == 0;
- }
- #line 1727
- inline TBool TOpenFontSpec::operator==(const TOpenFontSpec& aFontSpec) const
- {
- return TOpenFontFaceAttribBase::operator==(aFontSpec) &&
- iHeight == aFontSpec.iHeight &&
- iWidthFactor == aFontSpec.iWidthFactor &&
- iSlantFactor == aFontSpec.iSlantFactor &&
- iBitmapType == aFontSpec.iBitmapType &&
- iEffects == aFontSpec.iEffects &&
- iSymbol == aFontSpec.iSymbol &&
- iPrintPosition == aFontSpec.iPrintPosition;
- }
- inline TInt TOpenFontSpec::Height() const
- {
- return iHeight;
- }
- inline TInt32 TOpenFontSpec::WidthFactor() const
- {
- return iWidthFactor;
- }
- inline TInt32 TOpenFontSpec::SlantFactor() const
- {
- return iSlantFactor;
- }
- inline TGlyphBitmapType TOpenFontSpec::BitmapType() const
- {
- return (TGlyphBitmapType)iBitmapType;
- }
- inline TUint32 TOpenFontSpec::Effects() const
- {
- return iEffects;
- }
- inline TFontPrintPosition TOpenFontSpec::PrintPosition() const
- {
- return iPrintPosition;
- }
- inline void TOpenFontSpec::SetHeight(TInt aHeight)
- {
- iHeight = aHeight;
- }
- #line 1811
- inline void TOpenFontSpec::SetWidthFactor(TInt32 aWidthFactor)
- {
- iWidthFactor = aWidthFactor;
- }
- #line 1831
- inline void TOpenFontSpec::SetSlantFactor(TInt32 aSlantFactor)
- {
- iSlantFactor = aSlantFactor;
- }
- #line 1845
- inline void TOpenFontSpec::SetBitmapType(TGlyphBitmapType aBitmapType)
- {
- iBitmapType = aBitmapType;
- }
- inline void TOpenFontSpec::SetEffects(TUint32 aEffects)
- {
- iEffects = aEffects;
- }
- inline TUid COpenFontFile::Uid() const
- {
- return iUid;
- }
- inline const TDesC& COpenFontFile::FileName() const
- {
- return iFileName;
- }
- inline const TOpenFontFaceAttrib& COpenFontFile::FaceAttrib(TInt aFaceIndex) const
- {
- return iFaceAttrib[aFaceIndex];
- }
- #line 1899
- inline TInt COpenFontFile::FaceCount() const
- {
- return iFaceAttrib.Count();
- }
- inline void COpenFontFile::IncRefCount()
- {
- iRefCount++;
- }
- inline TBool COpenFontFile::DecRefCount()
- {
- iRefCount--;
- return iRefCount <= 0;
- }
- inline COpenFontRasterizerContext::COpenFontRasterizerContext():
- iGlyphData(0 )
- {
- }
- inline void COpenFontRasterizerContext::StartGlyph(TOpenFontGlyphData* aGlyphData)
- {
- aGlyphData->SetPointersToInternalBuffers();
- iGlyphData = aGlyphData;
- iGlyphDataStart = iGlyphDataPtr = aGlyphData->BufferStart();
- iGlyphDataEnd = aGlyphData->BufferEnd() - 4;
- iGlyphBit = 1;
- *iGlyphDataPtr = 0;
- iBytesNeeded = 1;
- iOverflow = 0 ;
- }
- inline void COpenFontRasterizerContext::WriteGlyphBit(TInt aBit)
- {
- if (aBit && !iOverflow)
- *iGlyphDataPtr |= iGlyphBit;
- iGlyphBit <<= 1;
- if (iGlyphBit == 256)
- {
- iGlyphBit = 1;
- iBytesNeeded++;
- if (++iGlyphDataPtr < iGlyphDataEnd)
- *iGlyphDataPtr = 0;
- else
- iOverflow = 1 ;
- }
- }
- inline void COpenFontRasterizerContext::WriteGlyphByte(TInt aByte)
- {
- if (iGlyphDataPtr < iGlyphDataEnd)
- *iGlyphDataPtr++ = (TUint8)aByte;
- else
- iOverflow = 1 ;
- iBytesNeeded++;
- }
- inline void COpenFontRasterizerContext::EndGlyph()
- {
- iGlyphData->SetBytesNeeded(iBytesNeeded + 4);
- iGlyphData = 0 ;
- }
- inline TBool TOpenFontGlyphData::Overflow() const
- {
- return iBytesNeeded > iBitmapBufferSize;
- }
- inline TInt TOpenFontGlyphData::BytesNeeded() const
- {
- return iBytesNeeded;
- }
- inline TPtrC8 TOpenFontGlyphData::Bitmap() const
- {
- return TPtrC8(iBitmap,iBytesNeeded);
- }
- inline const TUint8* TOpenFontGlyphData::BitmapPointer() const
- {
- return iBitmap;
- }
- inline const TOpenFontCharMetrics* TOpenFontGlyphData::Metrics() const
- {
- return iMetrics;
- }
- inline TUint8* TOpenFontGlyphData::BufferStart()
- {
- return iBitmapBuffer;
- }
- inline TUint8* TOpenFontGlyphData::BufferEnd()
- {
- return iBitmapBuffer + iBitmapBufferSize;
- }
- inline void TOpenFontGlyphData::SetBytesNeeded(TInt aBytes)
- {
- iBytesNeeded = aBytes;
- }
- inline void TOpenFontGlyphData::SetBitmapPointer(const TUint8* aBitmap)
- {
- iBitmap = aBitmap;
- }
- inline void TOpenFontGlyphData::SetMetricsPointer(const TOpenFontCharMetrics* aMetrics)
- {
- iMetrics = aMetrics;
- }
- inline void TOpenFontGlyphData::SetPointersToInternalBuffers()
- {
- iBitmap = iBitmapBuffer;
- iMetrics = &iMetricsBuffer;
- }
- inline void TOpenFontGlyphData::SetMetrics(TOpenFontCharMetrics& aMetrics)
- {
- iMetricsBuffer = aMetrics;
- iMetrics = &iMetricsBuffer;
- }
- inline void TOpenFontGlyphData::SetGlyphIndex(TInt aGlyphIndex)
- {
- iGlyphIndex = aGlyphIndex;
- }
- #line 2117
- inline COpenFontRasterizer* COpenFontRasterizer::NewL(TUid aInterfaceImplUid)
- {
- return reinterpret_cast <COpenFontRasterizer*> (
- REComSession::CreateImplementationL(
- aInterfaceImplUid,
- (((TInt)&(((COpenFontRasterizer *)0x1000)-> iDtor_ID_Key))-0x1000) ));
- }
- inline COpenFontRasterizer::~COpenFontRasterizer()
- {
- REComSession::DestroyedImplementation(iDtor_ID_Key);
- }
- #line 22 "C:\Symbian\9.1\S60_3rd\epoc32\include\fntstore.h" /* stack depth 5 */
- class CFontStoreFile;
- class CFontBitmap;
- class RReadStream;
- class TTypefaceFontBitmap;
- class TCharacterMetrics
- {
- public:
- __declspec(dllexport) TCharacterMetrics();
- TInt16 iAscentInPixels;
- TInt16 iHeightInPixels;
- TInt16 iLeftAdjustInPixels;
- TInt16 iMoveInPixels;
- TInt16 iRightAdjustInPixels;
- };
- class TAlgStyle
- #line 53
- {
- public:
- __declspec(dllexport) TAlgStyle();
- __declspec(dllexport) void SetIsBold(TBool aIsBold);
- __declspec(dllexport) void SetIsItalic(TBool aIsItalic);
- __declspec(dllexport) void SetIsMono(TBool aIsMono);
- __declspec(dllexport) void SetWidthFactor(TInt aWidthFactor);
- __declspec(dllexport) void SetHeightFactor(TInt aHeightFactor);
- __declspec(dllexport) TBool IsBold() const;
- __declspec(dllexport) TBool IsItalic() const;
- __declspec(dllexport) TBool IsMono() const;
- __declspec(dllexport) TInt WidthFactor() const;
- __declspec(dllexport) TInt HeightFactor() const;
- __declspec(dllexport) TBool operator==(const TAlgStyle& aAlgStyle) const;
- public:
- TInt iBaselineOffsetInPixels;
- private:
- enum
- {
- EBold=1,
- EItalic=2,
- EMono=4,
- };
- TInt8 iFlags;
- TInt8 iWidthFactor;
- TInt8 iHeightFactor;
- };
- #line 94
- class CBitmapFont : public CFont
- {
- friend class CFontStore;
- private:
- CBitmapFont(RHeap* aHeap,const TFontSpec& aFontSpecInTwips, const TAlgStyle& aAlgStyle, CFontBitmap* aFontBitmap);
- CBitmapFont(RHeap* aHeap,const TFontSpec& aFontSpecInTwips, const TAlgStyle& aAlgStyle, COpenFont* aOpenFont);
- void ConstructL();
- ~CBitmapFont();
- static CBitmapFont* NewL(RHeap* aHeap, const TFontSpec& aFontSpecInTwips, const TAlgStyle& aAlgStyle, CFontBitmap* aFontBitmap);
- static CBitmapFont* NewL(RHeap* aHeap, const TFontSpec& aFontSpecInTwips, const TAlgStyle& aAlgStyle, COpenFont* aOpenFont);
- private:
- __declspec(dllexport) virtual TUid DoTypeUid() const;
- __declspec(dllexport) virtual TInt DoHeightInPixels() const;
- __declspec(dllexport) virtual TInt DoAscentInPixels() const;
- __declspec(dllexport) virtual TInt DoCharWidthInPixels(TChar aChar) const;
- __declspec(dllexport) virtual TInt DoTextWidthInPixels(const TDesC &aText) const;
- __declspec(dllexport) virtual TInt DoBaselineOffsetInPixels() const;
- __declspec(dllexport) virtual TInt DoTextCount(const TDesC &aText, TInt aWidthInPixels) const;
- __declspec(dllexport) virtual TInt DoTextCount(const TDesC &aText, TInt aWidthInPixels, TInt &aExcessWidthInPixels) const;
- __declspec(dllexport) virtual TInt DoMaxCharWidthInPixels() const;
- __declspec(dllexport) virtual TInt DoMaxNormalCharWidthInPixels() const;
- __declspec(dllexport) virtual TFontSpec DoFontSpecInTwips() const;
- __declspec(dllexport) virtual TInt DoExtendedFunction(TUid aFunctionId, TAny* aParam = 0 ) const;
- public:
- TUid Uid() const;
- __declspec(dllexport) TCharacterMetrics CharacterMetrics(TInt aCode,const TUint8*& aBytes) const;
- __declspec(dllexport) TBool GetCharacterData(TInt aSessionHandle, TInt aCode, TOpenFontCharMetrics& aMetrics, const TUint8*& aBitmap) const;
- __declspec(dllexport) TBool Rasterize(TInt aSessionHandle,TInt aCode,TOpenFontGlyphData* aGlyphData) const;
- __declspec(dllexport) void GetFontMetrics(TOpenFontMetrics& aMetrics) const;
- __declspec(dllexport) TBool GetFaceAttrib(TOpenFontFaceAttrib& aAttrib) const;
- __declspec(dllexport) TInt BitmapEncoding() const;
- __declspec(dllexport) TBool HasCharacterL(TInt aCode) const;
- __declspec(dllexport) TBool CharacterNeedsToBeRasterized(TInt aSessionHandle,TInt aCode) const;
- __declspec(dllexport) void operator delete(TAny*);
- inline TBool IsOpenFont() const;
- inline COpenFont* OpenFont() const;
- inline TGlyphBitmapType GlyphBitmapType() const;
- private:
- TInt Width(TInt aNum) const;
- TInt Height(TInt aNum) const;
- CFontBitmap* FontBitmap() const;
- private:
- TFontSpec iFontSpecInTwips;
- public:
- TAlgStyle iAlgStyle;
- private:
- RHeap* iHeap;
- TInt iFontBitmapOffset;
- COpenFont* iOpenFont;
- };
- class CFontStore : public CTypefaceStore
- #line 167
- {
- private:
- CFontStore();
- void ConstructL();
- public:
- __declspec(dllexport) static CFontStore* NewL(RHeap* aHeap);
- __declspec(dllexport) ~CFontStore();
- __declspec(dllexport) TUid AddFileL(const TDesC& aName);
- __declspec(dllexport) void RemoveFile(TUid aFileUid);
- __declspec(dllexport) TInt GetNearestFontInTwips(CFont *&aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontInPixels(CFont *&aFont, const TFontSpec &aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToDesignHeightInPixels(CFont *&aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToMaxHeightInTwips(CFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetNearestFontToMaxHeightInPixels(CFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetNearestFontInTwips(CFont *&aFont, const TOpenFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontInPixels(CFont *&aFont, const TOpenFontSpec &aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont, const TOpenFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToDesignHeightInPixels(CFont *&aFont, const TOpenFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToMaxHeightInTwips(CFont*& aFont, const TOpenFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetNearestFontToMaxHeightInPixels(CFont*& aFont, const TOpenFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetFontById(CFont *&aFont,TUid aUid,const TAlgStyle& aAlgStyle);
- __declspec(dllexport) TInt NumTypefaces() const;
- __declspec(dllexport) void TypefaceSupport(TTypefaceSupport &aTypefaceSupport,TInt aTypefaceIndex) const;
- __declspec(dllexport) TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
- __declspec(dllexport) TInt FontHeightInPixels(TInt aTypefaceIndex,TInt aHeightIndex) const;
- __declspec(dllexport) void InstallRasterizerL(COpenFontRasterizer* aRasterizer);
- __declspec(dllexport) void DeleteSessionCache(TInt aSessionHandle);
- inline TGlyphBitmapType DefaultBitmapType() const;
- inline void SetDefaultBitmapType(TGlyphBitmapType aType);
- TInt BitmapFontFilesCount() const;
- private:
- void InternalizeFontStoreFileL(CFontStoreFile* aFontStoreFile, TInt aFontVersion);
- TTypeface* GetNearestTypeface(const TTypeface& aTypeface) const;
- TTypefaceFontBitmap GetNearestTypefaceFontBitmap(const TFontSpec& aFontSpecInPixels, TInt aMaxHeight = 0);
- CFontBitmap* GetFontBitmapById(TUid aUid);
- CBitmapFont* FindFont(const TFontSpec& aFontSpecInPixels,const TAlgStyle& aAlgStyle,TUid aUid) const;
- CBitmapFont* FindFont(const TOpenFontSpec& aFontSpecInPixels,const TAlgStyle& aAlgStyle) const;
- CBitmapFont* NewFontL(const TFontSpec& aFontSpecInTwips,const TAlgStyle& aAlgStyle,CFontBitmap* aFontBitmap);
- CBitmapFont* NewFontL(const TOpenFontSpec& aFontSpecInTwips,const TAlgStyle& aAlgStyle,COpenFont* aOpenFont);
- TInt VerticalPixelsToTwips(TInt aPixelHeight) const;
- TInt VerticalTwipsToPixels(TInt aTwipsHeight) const;
- TInt GetNearestBitmapFontInPixels(CBitmapFont *&aFont, TFontSpec &aFontSpec, TInt aMaxHeight = 0);
- TInt GetNearestOpenFontInPixels(CBitmapFont *&aFont, TOpenFontSpec &aFontSpec, const TOpenFontSpec& aIdealFontSpecInPixels, TInt aMaxHeight = 0);
- TInt GetNearestFontInPixels(CFont *&aFont, const TOpenFontSpec &aFontSpec, TInt aMaxHeight);
- void UpdateTypefaceSupportListL();
- public:
- TInt iKPixelWidthInTwips;
- TInt iKPixelHeightInTwips;
- private:
- RFs iFs;
- RHeap* iHeap;
- CArrayPtrFlat<CFontStoreFile> iFontStoreFileList;
- CArrayPtrFlat<TTypeface> iTypefaceList;
- CArrayPtrFlat<CFontBitmap> iFontBitmapList;
- CArrayFixFlat<TTypefaceFontBitmap> iTypefaceFontBitmapList;
- CArrayPtrFlat<COpenFontFile> iOpenFontFileList;
- CArrayFixFlat<TTypefaceSupport> iOpenFontTypefaceSupportList;
- CArrayPtrFlat<COpenFontRasterizer> iOpenFontRasterizerList;
- COpenFontSessionCacheList* iOpenFontSessionCacheList;
- TInt iOpenFontUid;
- TGlyphBitmapType iDefaultBitmapType;
- };
- inline TBool CBitmapFont::IsOpenFont() const
- {
- return iOpenFont != 0 ;
- }
- inline COpenFont* CBitmapFont::OpenFont() const
- {
- return iOpenFont;
- }
- inline TGlyphBitmapType CBitmapFont::GlyphBitmapType() const
- #line 275
- {
- return iFontSpecInTwips.iFontStyle.BitmapType();
- }
- inline TGlyphBitmapType CFontStore::DefaultBitmapType() const
- {
- return iDefaultBitmapType;
- }
- inline void CFontStore::SetDefaultBitmapType(TGlyphBitmapType aType)
- {
- iDefaultBitmapType = aType;
- }
- #line 23 "C:\Symbian\9.1\S60_3rd\epoc32\include\w32std.h" /* stack depth 4 */
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.h" /* stack depth 5 */
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\fbs.h" /* stack depth 6 */
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitmap.h" /* stack depth 7 */
- #line 20
- const TUid KCBitwiseBitmapUid={268435520};
- const TUid KCBitwiseBitmapHardwareUid={0x10009a3d};
- const TUid KMultiBitmapFileImageUid={268435522};
- const TInt KCompressionBookMarkThreshold=0x2000;
- class CChunkPile;
- class TCompressionBookMark;
- enum TBitmapfileCompression
- {
- ENoBitmapCompression,
- EByteRLECompression,
- ETwelveBitRLECompression,
- ESixteenBitRLECompression,
- ETwentyFourBitRLECompression,
- EThirtyTwoUBitRLECompression,
- ERLECompressionLast
- };
- class TRgb24bit
- {
- public:
- TUint8 iRed;
- TUint8 iGreen;
- TUint8 iBlue;
- };
- class SEpocBitmapHeader
- {
- public:
- enum TColor
- {
- ENoColor=0,
- EColor=1,
- EColorAlpha=2,
- EColorUndefined=8
- };
- public:
- TInt iBitmapSize;
- TInt iStructSize;
- TSize iSizeInPixels;
- TSize iSizeInTwips;
- TInt iBitsPerPixel;
- TInt iColor;
- TInt iPaletteEntries;
- TBitmapfileCompression iCompression;
- };
- class TLineScanningPosition
- {
- public:
- TLineScanningPosition(TUint32* aSrcDataPtr): iSrcDataPtr((TUint8*)aSrcDataPtr), iCursorPos(0), iScanLineBuffer(0 ) {}
- public:
- TUint8* iSrcDataPtr;
- TInt iCursorPos;
- HBufC8* iScanLineBuffer;
- };
- class CShiftedFileStore;
- class CBitwiseBitmap
- {
- friend class CFbTop;
- friend class CFbClient;
- friend class CFbsBitmap;
- friend class CBitmapObject;
- friend class CFbsBitmapAsyncStreamer;
- friend class CleanupDelete<CBitwiseBitmap>;
- public:
- __declspec(dllexport) TUid Uid() const;
- __declspec(dllexport) void ExternalizeL(RWriteStream& aStream,const CFbsBitmap& aHandleBitmap) const;
- __declspec(dllexport) void ExternalizeRectangleL(RWriteStream& aStream,const TRect& aRect,const CFbsBitmap& aHandleBitmap) const;
- __declspec(dllexport) void InternalizeL(RReadStream& aStream);
- __declspec(dllexport) static void InternalizeHeaderL(RReadStream& aStream,SEpocBitmapHeader& aHeader);
- __declspec(dllexport) TSize SizeInPixels() const;
- __declspec(dllexport) TSize SizeInTwips() const;
- __declspec(dllexport) TDisplayMode DisplayMode() const;
- __declspec(dllexport) TInt HorizontalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) TInt VerticalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) TInt HorizontalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) TInt VerticalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) void GetPixel(TRgb& aColor,const TPoint& aPos,TUint32* aBase) const;
- __declspec(dllexport) TInt GetScanLinePtr(TUint32*& aSlptr, TPoint& aPixel,TInt aLength, TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- __declspec(dllexport) TInt GetScanLinePtr(TUint32*& aSlptr, TInt& aLength, TPoint& aPixel,TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- __declspec(dllexport) void GetScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TBool aDither,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- __declspec(dllexport) void GetScanLine(TUint32*& aSlptr, TDes8& aBuf,const TPoint& aPixel,TInt aLength,TBool aDither,const TPoint& aDitherOffset,TDisplayMode aDispMode) const;
- __declspec(dllexport) void GetScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TBool aDither,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase) const;
- __declspec(dllexport) void GetVerticalScanLine(TDes8& aBuf,TInt aX,TBool aDither,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase) const;
- __declspec(dllexport) void StretchScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aClipStrchX,TInt aClipStrchLen,TInt aStretchLength,TInt aOrgX,TInt aOrgLen,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase) const;
- __declspec(dllexport) void StretchScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aClipStrchX,TInt aClipStrchLen,TInt aStretchLength,TInt aOrgX,TInt aOrgLen,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- __declspec(dllexport) TUint32* ScanLineAddress(TUint32* aBase,TUint aY) const;
- __declspec(dllexport) TBool IsMonochrome(TUint32* aBase) const;
- __declspec(dllexport) void Compress(TUint8* aNewData,TUint8* aOldData);
- __declspec(dllexport) TBool IsLargeBitmap() const;
- __declspec(dllexport) TInt CompressData();
- __declspec(dllexport) void SetCompressionBookmark(TLineScanningPosition& aLineScanningPosition, TUint32* aBase, const CFbsBitmap* aFbsBitmap);
- __declspec(dllexport) TInt HardwareBitmapHandle() const;
- __declspec(dllexport) TBool IsCompressedInRAM() const;
- __declspec(dllexport) TBool IsCompressed() const;
- private:
- __declspec(dllexport) void operator delete(TAny*);
- void operator delete(TAny*, TAny*) {}
- __declspec(dllexport) CBitwiseBitmap(RHeap* aHeap,CChunkPile* aPile);
- __declspec(dllexport) ~CBitwiseBitmap();
- __declspec(dllexport) void Reset();
- __declspec(dllexport) TInt Construct(const TSize& aSize,TDisplayMode aDispMode,TUid aCreatorUid);
- __declspec(dllexport) void ConstructL(RFs& aFs,const TDesC& aFilename,TInt32 aId,TUint aFileOffset);
- __declspec(dllexport) void ConstructL(RFile& aFile,TInt32 aId,TUint aFileOffset);
- __declspec(dllexport) void ConstructL(CShiftedFileStore* aFileStore,TStreamId aStreamId);
- __declspec(dllexport) TInt Resize(const TSize& aSize);
- private:
- void GenerateLineFromCompressedTwelveBitData(TUint8* aDestBuffer, const TPoint& aPixel,TInt aLength,TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- void GenerateLineFromCompressedEightBitData(TUint8* aDestBuffer, const TPoint& aPixel,TInt aLength,TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- TUint8 GetGrayPixelEx(TInt aX,TUint32* aScanLineAddress) const;
- TRgb GetRgbPixelEx(TInt aX,TUint32* aScanLineAddress) const;
- void GetRgbPixelExMany(TInt aX,TUint32* aScanlinePtr,TUint32* aDest,TInt aLength) const;
- void GetRgbPixelExMany16M(TInt aX,TUint32* aScanlinePtr,TUint8* aDest,TInt aLength) const;
- void GetScanLineGray2(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TBool aDither,const TPoint& aDitherOffset,TUint32* aScanlinePtr) const;
- void GetScanLineGray4(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TBool aDither,const TPoint& aDitherOffset,TUint32* aScanlinePtr) const;
- void GetScanLineGray16(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineGray256(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColor16(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColor256(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColor4K(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColor64K(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColor16M(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColor16MU(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineColorRgb(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineExBits(TDes8& aBuf,TInt aX,TInt aLength,TUint32* aScanlinePtr) const;
- void GetScanLineExBytes(TDes8& aBuf,TInt aX,TInt aLength,TUint32* aScanlinePtr) const;
- void DoExternalizeDataCompressedL(RWriteStream& aStream,TUint8* aData,TInt aSizeInBytes) const;
- void DoExternalizeByteDataCompressedL(RWriteStream& aStream,TUint8* aData,TInt aSizeInBytes) const;
- void DoExternalizeTwelveBitDataCompressedL(RWriteStream& aStream,TUint8* aData,TInt aSizeInBytes) const;
- void DoExternalizeSixteenBitDataCompressedL(RWriteStream& aStream,TUint8* aData,TInt aSizeInBytes) const;
- void DoExternalizeTwentyFourBitDataCompressedL(RWriteStream& aStream,TUint8* aData,TInt aSizeInBytes) const;
- void DoExternalizeThirtyTwoUBitDataCompressedL(RWriteStream& aStream,TUint8* aData,TInt aSizeInBytes) const;
- TInt SizeOfDataCompressed(TUint8* aData,TInt aSizeInBytes) const;
- TInt SizeOfByteDataCompressed(TUint8* aData,TInt aSizeInBytes) const;
- TInt SizeOfTwelveBitDataCompressed(TUint8* aData,TInt aSizeInBytes) const;
- TInt SizeOfSixteenBitDataCompressed(TUint8* aData,TInt aSizeInBytes) const;
- TInt SizeOfTwentyFourBitDataCompressed(TUint8* aData,TInt aSizeInBytes) const;
- TInt SizeOfThirtyTwoUBitDataCompressed(TUint8* aData,TInt aSizeInBytes) const;
- TBool TrueColorPointerCompare(TUint8* aColorPointer,TUint8 aComponent1,TUint8 aComponent2,TUint8 aComponent3) const;
- void DoInternalizeL(RReadStream& aStream,TInt aSrceSize,TUint32* aBase);
- void DoInternalizeCompressedDataL(RReadStream& aStream,TInt aSrceSize,TUint32* aBase,TBitmapfileCompression aCompression);
- void DoDecompressByteData(TUint8* aDestBuffer,TInt aDestSize,TUint8* aSrceBuffer,TInt aSrceSize);
- void DoDecompressByteDataAltL(RReadStream& aStream,TInt aSrceSizeInBytes,TUint32* aBase);
- void DoDecompressTwelveBitData(TUint8* aDestBuffer,TInt aDestSize,TUint8* aSrceBuffer,TInt aSrceSize);
- void DoDecompressTwelveBitDataAltL(RReadStream& aStream,TInt aSrceSizeInBytes,TUint32* aBase);
- void DoDecompressSixteenBitData(TUint8* aDestBuffer,TInt aDestSize,TUint8* aSrceBuffer,TInt aSrceSize);
- void DoDecompressSixteenBitDataAltL(RReadStream& aStream,TInt aSrceSizeInBytes,TUint32* aBase);
- void DoDecompressTwentyFourBitData(TUint8* aDestBuffer,TInt aDestSize,TUint8* aSrceBuffer,TInt aSrceSize);
- void DoDecompressTwentyFourBitDataAltL(RReadStream& aStream,TInt aSrceSizeInBytes,TUint32* aBase);
- void DoDecompressThirtyTwoUBitData(TUint8* aDestBuffer,TInt aDestSize,TUint8* aSrceBuffer,TInt aSrceSize);
- void DoDecompressThirtyTwoUBitDataAltL(RReadStream& aStream,TInt aSrceSizeInBytes,TUint32* aBase);
- void DoStretchScanLine(TDes8& aBuf,TInt x,TInt y,TInt aClipStrchX,TInt aClipStrchLen,TInt aStretchLength,TInt aOrgX,TInt aOrgLen,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase,TLineScanningPosition& aLineScanningPosition) const;
- void DoCompressScanLine(TDes8& aBuf,TInt x,TInt y,TInt aClipStrchX,TInt aClipStrchLen,TInt aStretchLength,TInt aOrgX,TInt aOrgLen,const TPoint& aDitherOffset,TDisplayMode aDispMode,TUint32* aBase,TLineScanningPosition& aLineScanningPosition) const;
- TUint32 HashTo1bpp(TUint32 aGray256,TBool aOddX,TBool aOddY) const;
- TUint32 HashTo2bpp(TUint32 aGray256,TInt aDitherIndex) const;
- TBool IsWordMonochrome(TUint32 aWord) const;
- TUint32* DataAddress() const;
- static void WhiteFill(TUint8* aData,TInt aDataSize,TDisplayMode aDispMode);
- static TInt ByteWidth(TInt aPixelWidth,TDisplayMode aDispMode);
- static TInt Bpp(TDisplayMode aDispMode);
- static TInt IsColor(TDisplayMode aDispMode);
- static TDisplayMode DisplayMode(TInt aBpp,TInt aColor);
- static TBitmapfileCompression CompressionType(TInt aBpp, TInt aColor);
- TInt DoGetScanLinePtr(TUint32*& aSlptr, TPoint& aPixel,TInt aLength, TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- void GenerateLineFromCompressedSixteenBitData(TUint8* aDestBuffer, const TPoint& aPixel,TInt aLength, TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- TDisplayMode InitialDisplayMode() const;
- TInt SetDisplayMode(TDisplayMode aDisplayMode, TUint32* aDataAddress);
- TInt DisplayModeArgCheck(TDisplayMode aDisplayMode, TUint32* aDataAddress) const;
- void ChangeDisplayMode( TDisplayMode aNewDisplayMode,
- TInt aScanLineWidthNew,
- TUint8* aDataAddrNew,
- TUint32* aDataAddress,
- TInt aYStart,
- TInt aYInc,
- TInt aYEnd);
- void UpdateBitmapProperties(TDisplayMode aNewDisplayMode);
- TInt SwapWidthAndHeight(TUint32* aDataAddress);
- void CopyOldData(TUint8* aDest, const TUint8* aSrc, TInt aNewByteWidth, const TSize aNewSize);
- void DecompressOldData(TUint8* aDest, TInt aNewByteWidth, const TSize aNewSize, HBufC8* aScanLineBuf);
- TInt ResizeConditionsCheck(const TSize& aSize, TInt aNewByteWidth, TInt& aNewBitmapSize) const;
- TInt Alloc(TInt aNewBitmapSize, const TSize& aNewSize, TUint8*& aNewBuf, TInt& aNewDataOffset);
- void MoveData(TUint8* aDest, TUint8* aSrc, TInt aNewByteWidth, const TSize& aNewSize, HBufC8* aScanLineBuf);
- void ReinitializeHeader(const TSize& aNewSize, TInt aNewBitmapSize);
- void Free(TUint8* aSrc, TBool aLargeBmp, HBufC8* aScanLineBuf);
- void GenerateLineFromCompressed24BitData(TUint8* aDestBuffer, const TPoint& aPixel,TInt aLength, TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- void GenerateLineFromCompressed32UBitData(TUint8* aDestBuffer, const TPoint& aPixel,TInt aLength, TUint32* aBase, TLineScanningPosition& aLineScanningPosition) const;
- void AdjustXCoord(TInt& aX) const;
- void GetLineScanPos(TLineScanningPosition& aLineScanPos,
- const TCompressionBookMark*& aComprBookMark,
- const TUint8* aBase) const;
- void UpdateBookMark(const TLineScanningPosition& aLineScanPos,
- TCompressionBookMark* aComprBookMark,
- const TUint8* aBase) const;
- void GetScanLineColor16MA(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TUint32* aScanlinePtr) const;
- private:
- TUid iUid;
- struct TSettings
- {
- TSettings(TDisplayMode aDisplayMode);
- void SetDisplayModes(TDisplayMode aDisplayMode);
- void SetCurrentDisplayMode(TDisplayMode aDisplayMode);
- TDisplayMode CurrentDisplayMode() const;
- TDisplayMode InitialDisplayMode() const;
- void SetLargeBitmap(TBool aLargeBitmap);
- TBool IsLargeBitmap() const;
- TUint32 iData;
- } iSettings;
- RHeap* iHeap;
- CChunkPile* iPile;
- TInt iByteWidth;
- SEpocBitmapHeader iHeader;
- RChunk iLargeChunk;
- TInt iDataOffset;
- TBool iIsCompressedInRAM;
- };
- #line 22 "C:\Symbian\9.1\S60_3rd\epoc32\include\fbs.h" /* stack depth 6 */
- const TUid KCFbsFontUid = { 268435518 };
- const TUid KMultiBitmapRomImageUid = { 268435521 };
- const TUint32 KFontBitmapServerUidValue = 0x10003a16;
- const TUid KFontBitmapServerUid = { KFontBitmapServerUidValue };
- __declspec(dllexport) TInt FbsStartup();
- __declspec(dllexport) void DummyReserved1();
- class SCharWidth
- {
- public:
- TInt iLeftAdjust;
- TInt iRightAdjust;
- TInt iMove;
- TInt iWidth;
- };
- class CFbsRalCache;
- class RFbsSession : protected RSessionBase
- {
- friend class RClean;
- friend class TestFbs;
- friend class CTBitmap;
- friend class CTClean;
- friend class CTFbs;
- friend class CFbsBitmap;
- friend class CFbsBitmapAsyncStreamer;
- public:
- __declspec(dllexport) RFbsSession();
- __declspec(dllexport) static TInt Connect();
- __declspec(dllexport) static TInt Connect(RFs& aFileServer);
- __declspec(dllexport) static void Disconnect();
- __declspec(dllexport) static RFbsSession* GetSession();
- __declspec(dllexport) void CallBack();
- __declspec(dllexport) void SetCallBack(TCallBack aCallBack);
- __declspec(dllexport) void ResetCallBack();
- __declspec(dllexport) TInt ResourceCount();
- __declspec(dllexport) TInt SendCommand(TInt aMessage,TInt aInt0=0,TInt aInt1=0,TInt aInt2=0,TInt aInt3=0) const;
- TInt SendCommand(TInt aMessage, const TIpcArgs& aArgs) const;
- __declspec(dllexport) TVersion Version();
- __declspec(dllexport) TUint8* HeapBase() const;
- __declspec(dllexport) TInt GetHeapSizes(TInt& aDefaultHeap, TInt& aSmallBmpHeap, TInt& aBigBmpChunk);
- TInt SessionHandle() const { return Handle(); }
- TInt AllocScanLineBuffer(TInt aSize);
- HBufC8* GetScanLineBuffer();
- void SetCallBackPtr(TInt* aBitmapHandle)const;
- HBufC8* GetDecompressionBuffer(TInt aSize);
- private:
- TBool LookupBitmapInROM(const TDesC& aFilename, TAny*& aAddr);
- RFs& FileServer() { return *((RFs*)iSpare); }
- static TInt DoAlloc(RFbsSession*& aNewSession);
- TInt DoConnect(RFs& aFileServer);
- private:
- TInt iConnections;
- mutable TCallBack iCallBack;
- RChunk iSharedChunk;
- RMutex iAddressMutex;
- RChunk iLargeBitmapChunk;
- RFs iFileServer;
- CFbsRalCache* iRomFileAddrCache;
- HBufC8* iDecompressionBuffer;
- HBufC8* iScanLineBuffer;
- TUint32* iSpare;
- };
- #line 133
- class CFbsFont: public CFont
- {
- friend class CFbsTypefaceStore;
- private:
- virtual TUid DoTypeUid() const { return KCFbsFontUid; }
- __declspec(dllexport) virtual TInt DoHeightInPixels() const;
- __declspec(dllexport) virtual TInt DoAscentInPixels() const;
- __declspec(dllexport) virtual TInt DoCharWidthInPixels(TChar aChar) const;
- __declspec(dllexport) virtual TInt DoTextWidthInPixels(const TDesC& aText) const;
- __declspec(dllexport) virtual TInt DoBaselineOffsetInPixels() const;
- __declspec(dllexport) virtual TInt DoTextCount(const TDesC& aText,TInt aWidthInPixels) const;
- __declspec(dllexport) virtual TInt DoTextCount(const TDesC& aText,TInt aWidthInPixels,TInt& aExcessWidthInPixels) const;
- __declspec(dllexport) virtual TInt DoMaxCharWidthInPixels() const;
- __declspec(dllexport) virtual TInt DoMaxNormalCharWidthInPixels() const;
- __declspec(dllexport) virtual TFontSpec DoFontSpecInTwips() const;
- __declspec(dllexport) virtual CFont::TCharacterDataAvailability DoGetCharacterData(TUint aCode, TOpenFontCharMetrics& aMetrics,
- const TUint8*& aBitmap, TSize& aBitmapSize) const;
- __declspec(dllexport) virtual TInt DoExtendedFunction(TUid aFunctionId, TAny* aParam = 0 ) const;
- public:
- __declspec(dllexport) TBool GetFontMetrics(TOpenFontMetrics& aMetrics) const;
- __declspec(dllexport) TInt TextWidthInPixels(const TDesC& aText) const;
- __declspec(dllexport) void TextWidthInPixels(const TDesC& aText,SCharWidth& aCharWidth) const;
- __declspec(dllexport) TInt Handle() const;
- __declspec(dllexport) TCharacterMetrics CharacterMetrics(TInt aCode,const TUint8*& aBytes) const;
- __declspec(dllexport) TInt RawTextWidthInPixels(const TDesC& aText) const;
- __declspec(dllexport) TBool GetFaceAttrib(TOpenFontFaceAttrib& aAttrib) const;
- __declspec(dllexport) TBool IsOpenFont() const;
- __declspec(dllexport) TBool HasCharacter(TInt aCode) const;
- protected:
- __declspec(dllexport) CFbsFont();
- __declspec(dllexport) ~CFbsFont();
- __declspec(dllexport) CFbsFont(const CFbsFont& aFont);
- __declspec(dllexport) CBitmapFont* Address() const;
- __declspec(dllexport) TInt Duplicate(TInt aHandle);
- __declspec(dllexport) void Reset();
- protected:
- RFbsSession* iFbs;
- CBitmapFont* iAddressPointer;
- TInt iHandle;
- TInt iServerHandle;
- };
- class CDirectFileStore;
- #line 201
- class CFbsBitmap : public CBase
- {
- friend class TBitmapUtil;
- friend class CBitwiseBitmap;
- friend class CFbsBitmapAsyncStreamer;
- public:
- __declspec(dllexport) CFbsBitmap();
- __declspec(dllexport) ~CFbsBitmap();
- __declspec(dllexport) void Reset();
- __declspec(dllexport) static TInt ScanLineLength(TInt aLength,TDisplayMode aDispMode);
- __declspec(dllexport) TDisplayMode DisplayMode() const;
- __declspec(dllexport) TDisplayMode InitialDisplayMode() const;
- __declspec(dllexport) TInt SetDisplayMode(TDisplayMode aDisplayMode);
- __declspec(dllexport) TInt Create(const TSize& aSizeInPixels,TDisplayMode aDispMode);
- __declspec(dllexport) TInt Duplicate(TInt aHandle);
- __declspec(dllexport) TBool IsRomBitmap() const;
- __declspec(dllexport) void SetRomBitmapL(CBitwiseBitmap* aRomBitmapPointer,TInt& aBitmapSizeInBytes);
- __declspec(dllexport) TInt Load(const TDesC& aFileName,TInt32 aId=0,TBool aShareIfLoaded=ETrue);
- __declspec(dllexport) TInt Load(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
- __declspec(dllexport) TInt LoadAndCompress(const TDesC& aFileName,TInt32 aId=0,TBool aShareIfLoaded=ETrue);
- __declspec(dllexport) TInt LoadAndCompress(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
- __declspec(dllexport) TInt Load(RFile& aFile,TInt32 aId=0,TBool aShareIfLoaded=ETrue);
- __declspec(dllexport) TInt Load(RFile& aFile,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
- __declspec(dllexport) TInt LoadAndCompress(RFile& aFile,TInt32 aId=0,TBool aShareIfLoaded=ETrue);
- __declspec(dllexport) TInt LoadAndCompress(RFile& aFile,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
- __declspec(dllexport) TInt Save(const TDesC& aFilename);
- __declspec(dllexport) TInt Save(RFile& aFile);
- __declspec(dllexport) static void StoreL(const TDesC& aFilename,TInt aNumSources,const TDesC* aSources[],TInt32 aSourceIds[]);
- __declspec(dllexport) static void StoreL(RFile& aFile,TInt aNumSources,const TDesC* aSources[],TInt32 aSourceIds[]);
- __declspec(dllexport) void GetScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TDisplayMode aDispMode) const;
- __declspec(dllexport) void SetScanLine(TDes8& aBuf,TInt aY) const;
- __declspec(dllexport) void GetVerticalScanLine(TDes8& aBuf,TInt aX,TDisplayMode aDispMode) const;
- __declspec(dllexport) void GetVerticalScanLine(TDes8& aBuf,TInt aX,const TPoint& aDitherOffset,TDisplayMode aDispMode) const;
- __declspec(dllexport) TInt Handle() const;
- __declspec(dllexport) SEpocBitmapHeader Header() const;
- __declspec(dllexport) TInt HorizontalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) TInt HorizontalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) void GetPixel(TRgb& aColor,const TPoint& aPixel) const;
- __declspec(dllexport) TInt Resize(const TSize& aSizeInPixels);
- __declspec(dllexport) TSize SizeInPixels() const;
- __declspec(dllexport) TSize SizeInTwips() const;
- __declspec(dllexport) void SetSizeInTwips(const MGraphicsDeviceMap* aMap);
- __declspec(dllexport) void SetSizeInTwips(const TSize& aSizeInTwips);
- __declspec(dllexport) void ExternalizeL(RWriteStream& aStream) const;
- __declspec(dllexport) void ExternalizeRectangleL(RWriteStream& aStream,const TRect& aRect) const;
- __declspec(dllexport) void InternalizeL(RReadStream& aStream);
- __declspec(dllexport) TInt Compress();
- __declspec(dllexport) TInt VerticalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) TInt VerticalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) static TBool IsFileInRom(const TDesC& aFilename,TUint32*& aWord);
- __declspec(dllexport) static TBool IsFileInRom(RFile& aFile,TUint32*& aWord);
- __declspec(dllexport) TBool IsMonochrome() const;
- __declspec(dllexport) TBool IsLargeBitmap() const;
- __declspec(dllexport) void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;
- __declspec(dllexport) void SetPalette(CPalette* aPalette);
- __declspec(dllexport) TInt GetPalette(CPalette*& aPalette) const;
- __declspec(dllexport) TUint32* DataAddress() const;
- __declspec(dllexport) TInt CreateHardwareBitmap(const TSize& aSizeInPixels,TDisplayMode aDispMode,TUid aCreatorUid);
- __declspec(dllexport) TInt HardwareBitmapHandle() const;
- __declspec(dllexport) void LockHeap(TBool aAlways=EFalse) const;
- __declspec(dllexport) void UnlockHeap(TBool aAlways=EFalse) const;
- __declspec(dllexport) void LockHeapLC(TBool aAlways=EFalse) const;
- __declspec(dllexport) static void UnlockHeap(TAny* aFbsBitmap);
- __declspec(dllexport) TBool IsCompressedInRAM() const;
- __declspec(dllexport) TInt SwapWidthAndHeight();
- __declspec(dllexport) static HBufC8* GetDecompressionBuffer(TInt aSize);
- protected:
- __declspec(dllexport) void GetScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aLength,const TPoint& aDitherOffset,TDisplayMode aDispMode) const;
- CBitwiseBitmap* Address() const;
- void DoSaveL(RFile& aFile);
- TInt DoCreate(const TSize& aSizeInPixels,TDisplayMode aDispMode,TUid aCreatorUid);
- private:
- TInt DoLoad(RFile& aFile,TUint32* aRomPointer,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
- TInt DoLoadAndCompress(RFile& aFile,TUint32* aRomPointer,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset);
- TBool LoadShiftedRomBmpL(const TDesC& aFileName,TInt32 aId,TUint aFileOffset);
- static void DoStoreL(CDirectFileStore* aFileStore,CFbsBitmap* aBitmap,TInt aNumSources,const TDesC* aSources[],TInt32 aSourceIds[]);
- protected:
- RFbsSession* iFbs;
- CBitwiseBitmap* iAddressPointer;
- CBitwiseBitmap* iRomPointer;
- TInt iHandle;
- TInt iServerHandle;
- };
- class CDirectFileStore;
- class CFbsBitmapAsyncStreamer : public CBase
- {
- public:
- enum TMode {ELoad, ESave};
- public:
- __declspec(dllexport) ~CFbsBitmapAsyncStreamer();
- __declspec(dllexport) static CFbsBitmapAsyncStreamer* NewL(TMode aMode);
- __declspec(dllexport) TInt Load(const TDesC& aFilename,TInt32 aId,TInt& aScanLines);
- __declspec(dllexport) TBool LoadScanLinesL(TInt aNumberOfScanLines,CFbsBitmap*& aBitmap);
- __declspec(dllexport) TInt Save(const TDesC& aFilename,CFbsBitmap* aBitmap,TInt32& aId,TInt& aScanLines);
- __declspec(dllexport) TBool SaveScanLinesL(TInt aNumberOfScanLines);
- private:
- CFbsBitmapAsyncStreamer(TMode aMode);
- void ConstructL();
- void DoLoadL(const TDesC& aFilename,TInt32 aId);
- void DoSaveL(RFile& aFile);
- private:
- RFbsSession* iFbs;
- RStoreReadStream iReadStream;
- RStoreWriteStream iWriteStream;
- TStreamId iId;
- CDirectFileStore* iStore;
- TInt iCurrentScanLine;
- TUint32* iScanLineBase;
- CFbsBitmap* iBitmap;
- SEpocBitmapHeader iHeader;
- TDisplayMode iDispMode;
- TMode iMode;
- };
- #line 348
- class TBitmapUtil
- {
- public:
- __declspec(dllexport) void Begin(const TPoint& aPosition);
- __declspec(dllexport) void Begin(const TPoint& aPosition,const TBitmapUtil& aUtil);
- __declspec(dllexport) void End();
- __declspec(dllexport) TBitmapUtil(CFbsBitmap* aBitmap);
- __declspec(dllexport) TUint32 GetPixel() const;
- __declspec(dllexport) void SetPixel(TUint32 aValue);
- __declspec(dllexport) void SetPixel(const TBitmapUtil& aSource);
- __declspec(dllexport) void SetPos(const TPoint& aPosition);
- __declspec(dllexport) void DecXPos();
- __declspec(dllexport) void DecYPos();
- __declspec(dllexport) void IncXPos();
- __declspec(dllexport) void IncYPos();
- private:
- void DoBegin(const TPoint& aPosition,const TBitmapUtil* aUtil);
- private:
- CFbsBitmap* iFbsBitmap;
- TUint32* iWordPos;
- TUint32* iMinWordPos;
- TUint32* iMaxWordPos;
- TInt iBpp;
- TInt iPixelShift;
- TInt iBitShift;
- TUint32 iMask;
- TInt iScanlineWordLength;
- TBool iHeapLocked;
- };
- class TFontInfo;
- class CFbsTypefaceStore : public CTypefaceStore
- {
- public:
- __declspec(dllexport) static CFbsTypefaceStore* NewL(CGraphicsDevice* aDevice);
- __declspec(dllexport) ~CFbsTypefaceStore();
- __declspec(dllexport) TInt AddFile(const TDesC& aName,TInt& aId);
- __declspec(dllexport) TInt InstallFile(const TDesC& aName,TInt& aId);
- __declspec(dllexport) void RemoveFile(TInt aId=0);
- __declspec(dllexport) virtual TInt GetNearestFontInTwips(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontInPixels(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) virtual TInt GetNearestFontToDesignHeightInTwips(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) TInt GetNearestFontToDesignHeightInPixels(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) virtual TInt GetNearestFontToMaxHeightInTwips(CFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetNearestFontToMaxHeightInPixels(CFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetFontById(CFont *&aFont,TUid aUid,const TAlgStyle& aAlgStyle);
- __declspec(dllexport) virtual TInt NumTypefaces() const;
- __declspec(dllexport) virtual void TypefaceSupport(TTypefaceSupport& aTypefaceSupport,TInt aTypefaceIndex) const;
- __declspec(dllexport) virtual TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
- __declspec(dllexport) TInt FontHeightInPixels(TInt aTypefaceIndex,TInt aHeightIndex) const;
- __declspec(dllexport) TGlyphBitmapType DefaultBitmapType() const;
- __declspec(dllexport) void SetDefaultBitmapType(TGlyphBitmapType aType) const;
- __declspec(dllexport) void SetFontNameAliasL(const TDesC& aFontAlias,const TDesC& aFontName) const;
- __declspec(dllexport) static void RemoveFontFileLocksL();
- __declspec(dllexport) static void RemoveFontFileLocksL(const TDesC& aDrive, TBool aAllFonts);
- __declspec(dllexport) static void RemoveFontFileLocksL(const TDesC& aFileName);
- private:
- CFbsTypefaceStore(CGraphicsDevice* aDevice);
- TInt CreateFont(CFont*& aFont,const TFontInfo& aFontInfo);
- TInt FontHeight(TInt aTypefaceIndex,TInt aHeightIndex,TInt aMessage) const;
- void SetSize() const;
- TInt GetNearestFontToDesignHeightInTwipsL(CFont*& aFont,const TFontSpec& aFontSpec);
- private:
- RFbsSession* iFbs;
- CGraphicsDevice* iDevice;
- CFontCache* iTwipsCache;
- };
- class CDitherColor256;
- class CFbsColor256BitmapUtil : public CBase
- {
- public:
- enum TDither
- {
- ENoDither,
- EFloydSteinberg
- };
- public:
- __declspec(dllexport) static CFbsColor256BitmapUtil* NewL(const CPalette* aPalette);
- __declspec(dllexport) TInt CopyBitmap(CFbsBitmap* aColor256Destination,CFbsBitmap* aSource,TDither aDither=ENoDither);
- ~CFbsColor256BitmapUtil();
- private:
- CFbsColor256BitmapUtil();
- private:
- TColor256Util* iColor256Util;
- CDitherColor256* iDither;
- };
- #line 20 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.h" /* stack depth 5 */
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitbase.h" /* stack depth 6 */
- #line 14
- class TSpriteBase
- {
- public:
- virtual void Hide(const TRect& aRect,const TRegion* aRegion)=0;
- virtual void Reveal(const TRect& aRect,const TRegion* aRegion)=0;
- };
- #line 21 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.h" /* stack depth 5 */
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitstd.h" /* stack depth 6 */
- #line 18
- class CFbsBitGcFont : public CFbsFont
- {
- public:
- __declspec(dllexport) CFbsBitGcFont();
- __declspec(dllexport) virtual ~CFbsBitGcFont();
- __declspec(dllexport) CBitmapFont* Address() const;
- __declspec(dllexport) TInt Duplicate(TInt aHandle);
- __declspec(dllexport) void Reset();
- __declspec(dllexport) void operator=(const CFbsBitGcFont& aFont);
- protected:
- TBool iCopy;
- };
- class CFbsBitGcBitmap : public CFbsBitmap
- {
- public:
- __declspec(dllexport) CBitwiseBitmap* Address() const;
- __declspec(dllexport) void LockHeap() const;
- __declspec(dllexport) void UnlockHeap() const;
- };
- class TEllipse
- {
- public:
- enum TEllipseStatus
- {
- EInitialised,
- EFirstSector,
- ESecondSector,
- EComplete,
- ELine
- };
- public:
- __declspec(dllexport) void Construct(const TRect& aRect);
- __declspec(dllexport) TBool SingleStep(TPoint& aTopLeft,TPoint& aTopRight,TPoint& aBottomLeft,TPoint& aBottomRight);
- __declspec(dllexport) TBool NextStep(TPoint& aTopLeft,TPoint& aTopRight,TPoint& aBottomLeft,TPoint& aBottomRight);
- __declspec(dllexport) TPoint Intersection(const TRect& aRect,const TPoint& aPoint);
- protected:
- __declspec(dllexport) TBool Output(TPoint& aTopLeft,TPoint& aTopRight,TPoint& aBottomLeft,TPoint& aBottomRight);
- protected:
- TEllipseStatus iStatus;
- TInt iA;
- TInt iB;
- TInt64 iASquared;
- TInt64 iBSquared;
- TInt64 iASquBSqu;
- TInt iX;
- TInt iY;
- TInt iXAdj;
- TInt iYAdj;
- TPoint iOffset;
- TInt64 iD1;
- TInt64 iD2;
- };
- class CPolygonFiller : public CBase
- {
- public:
- enum TUsage
- {
- EGetAllPixelRunsSequentially,
- EGetPixelRunsSequentiallyForSpecifiedScanLines
- };
- public:
- __declspec(dllexport) CPolygonFiller();
- __declspec(dllexport) ~CPolygonFiller();
- __declspec(dllexport) void Construct(const CArrayFix<TPoint> * aPointArray,CGraphicsContext::TFillRule aFillRule,TUsage aUsage=EGetAllPixelRunsSequentially);
- __declspec(dllexport) void Construct(const TPoint* aPointList,TInt aNumPoints, CGraphicsContext::TFillRule aFillRule, TUsage aUsage=EGetAllPixelRunsSequentially);
- __declspec(dllexport) void Reset();
- __declspec(dllexport) void GetNextPixelRun(TBool& aExists, TInt& aScanLine, TInt& aStart, TInt& aEnd);
- __declspec(dllexport) void GetNextPixelRunOnSpecifiedScanLine(TBool& aExists, TInt aScanLine, TInt& aStart, TInt& aEnd);
- private:
- struct SFastEdge
- {
- TInt upperVertex;
- TInt lowerVertex;
- TInt firstVertex;
- };
- struct SFastScanLineIntersection;
- struct SFastActiveEdge
- {
- SFastEdge* edgePtr;
- TLinearDDA lineGenerator;
- SFastScanLineIntersection* scanLineIntersectionPtr;
- };
- struct SFastScanLineIntersection
- {
- TInt firstPixel;
- TInt lastPixel;
- SFastActiveEdge* activeEdgePtr;
- };
- private:
- struct SSlowScanLineIntersection
- {
- TInt firstPixel;
- TInt lastPixel;
- TInt firstVertexOfEdge;
- };
- private:
- struct SFastData
- {
- TPoint* vertexList;
- SFastEdge* edgeList;
- SFastActiveEdge* activeEdgeList;
- SFastScanLineIntersection* scanLineIntersectionList;
- TInt numActiveEdges;
- TInt numScanLineIntersections;
- TInt nextEdgeToActivate;
- };
- struct SSlowData
- {
- enum {EStoreSize=8};
- TLinearDDA lineGenerator;
- SSlowScanLineIntersection scanLineIntersectionList[EStoreSize];
- TInt numIntersectionsWithSameFirstPixelPreviouslyMet;
- TInt numIntersectionsWithSameFirstPixelMetThisTime;
- TInt numScanLineIntersections;
- TBool scanLineComplete;
- TInt firstPixelOfLastIntersectionInPrevBuffer;
- };
- private:
- void Construct(CGraphicsContext::TFillRule aFillRule,TUsage aUsage);
- void FastHandleVertexIntersection(TInt& aCurrentActiveEdge, TBool aIsLowerVertex);
- void SetFastIntersection(SFastActiveEdge& aActiveEdge, SFastScanLineIntersection& aScanLineIntersection);
- void SlowHandleVertexIntersection(SSlowScanLineIntersection& aScanLineIntersection, TInt& aVertexStartingCurrentEdge,TBool aIsLowerVertex);
- void JumpToCurrentScanLine(TLinearDDA& aLineGenerator, const TPoint& aUpper, const TPoint& aLower,TPoint& aStartPos, TPoint& aEndPos) const;
- const TPoint& Point(TInt aIndex);
- private:
- const CArrayFix<TPoint> * iPointArray;
- const TPoint* iPointList;
- CGraphicsContext::TFillRule iFillRule;
- TBool iUseFastAlgorithm;
- TInt iNumVertexes;
- TBool iToggler;
- TInt iNestingLevel;
- TInt iScanLineIntersection;
- TInt iRightMostPixelOnScanLine;
- TInt iFirstVertex;
- TBool iPolygonIsAllHorizontal;
- TInt iFirstScanLine;
- TInt iLastScanLine;
- TInt iCurrentScanLine;
- SFastData iFastData;
- SSlowData iSlowData;
- private:
- friend class TCompareEdgesUpperY;
- friend class TCompareActiveEdgesFirstVertex;
- friend class TCompareScanLineIntersectionsFirstPixel;
- friend class TSwapEdges;
- friend class TSwapActiveEdges;
- friend class TSwapScanLineIntersections;
- };
- class CFbsDevice;
- class TOpenFontCharMetrics;
- class CGraphicsAccelerator;
- class CWsBitmap;
- #line 200
- class CFbsBitGc : public CBitmapContext
- {
- public:
- enum TGraphicsOrientation
- {
- EGraphicsOrientationNormal,
- EGraphicsOrientationRotated90,
- EGraphicsOrientationRotated180,
- EGraphicsOrientationRotated270
- };
- public:
- __declspec(dllexport) static CFbsBitGc* NewL();
- __declspec(dllexport) virtual ~CFbsBitGc();
- __declspec(dllexport) void Activate(CFbsDevice* aDevice);
- __declspec(dllexport) void ActivateNoJustAutoUpdate(CFbsDevice* aDevice);
- __declspec(dllexport) void BitBlt(const TPoint& aPoint,const CFbsBitGc& aGc);
- __declspec(dllexport) void BitBlt(const TPoint& aPoint,const CFbsBitGc& aGc,const TRect& aSourceRect);
- __declspec(dllexport) void BitBlt(const TPoint& aPoint,const CFbsBitmap* aBitmap);
- __declspec(dllexport) void BitBlt(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect);
- __declspec(dllexport) void BitBltMasked(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
- __declspec(dllexport) void CancelClipping();
- __declspec(dllexport) void CancelClippingRect();
- __declspec(dllexport) void CancelClippingRegion();
- __declspec(dllexport) void Clear();
- __declspec(dllexport) void Clear(const TRect& aRect);
- __declspec(dllexport) void CopyRect(const TPoint& aOffset,const TRect& aRect);
- __declspec(dllexport) void CopySettings(const CFbsBitGc& aGc);
- __declspec(dllexport) CGraphicsDevice* Device() const;
- __declspec(dllexport) void DiscardBrushPattern();
- __declspec(dllexport) void DiscardFont();
- __declspec(dllexport) void DrawArc(const TRect& aRect,const TPoint& aStart,const TPoint& aEnd);
- __declspec(dllexport) void DrawPie(const TRect& aRect,const TPoint& aStart,const TPoint& aEnd);
- __declspec(dllexport) void DrawBitmap(const TPoint& aTopLeft,const CFbsBitmap* aSource);
- __declspec(dllexport) void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource);
- __declspec(dllexport) void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource,const TRect& aSourceRect);
- __declspec(dllexport) void DrawBitmapMasked(const TRect& aDestRect,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
- __declspec(dllexport) void DrawBitmapMasked(const TRect& aDestRect,const CWsBitmap* aBitmap,const TRect& aSourceRect,const CWsBitmap* aMaskBitmap,TBool aInvertMask);
- __declspec(dllexport) void DrawRoundRect(const TRect& aRect,const TSize& aEllipse);
- __declspec(dllexport) void DrawPolyLine(const CArrayFix<TPoint> * aPointList);
- __declspec(dllexport) void DrawPolyLineNoEndPoint(const CArrayFix<TPoint> * aPointList);
- __declspec(dllexport) void DrawPolyLine(const TPoint* aPointList,TInt aNumPoints);
- __declspec(dllexport) void DrawPolyLineNoEndPoint(const TPoint* aPointList,TInt aNumPoints);
- __declspec(dllexport) TInt DrawPolygon(const CArrayFix<TPoint> * aPointList,CGraphicsContext::TFillRule aFillRule=CGraphicsContext::EAlternate);
- __declspec(dllexport) TInt DrawPolygon(const TPoint* aPointList,TInt aNumPoints,CGraphicsContext::TFillRule aFillRule=CGraphicsContext::EAlternate);
- __declspec(dllexport) void DrawEllipse(const TRect& aRect);
- __declspec(dllexport) void DrawLine(const TPoint& aStart,const TPoint& aEnd);
- __declspec(dllexport) void DrawLineTo(const TPoint& aPoint);
- __declspec(dllexport) void DrawLineBy(const TPoint& aVector);
- __declspec(dllexport) void DrawRect(const TRect& aRect);
- __declspec(dllexport) void DrawText(const TDesC& aText);
- __declspec(dllexport) void DrawText(const TDesC& aText,const TPoint& aPosition);
- __declspec(dllexport) void DrawText(const TDesC& aText,const TRect& aBox);
- __declspec(dllexport) void DrawText(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TTextAlign aHrz=ELeft,TInt aMargin=0);
- __declspec(dllexport) void DrawText(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TInt aTextWidth,TTextAlign aHrz=ELeft,TInt aMargin=0);
- __declspec(dllexport) void DrawTextVertical(const TDesC& aText,TBool aUp);
- __declspec(dllexport) void DrawTextVertical(const TDesC& aText,const TPoint& aPosition,TBool aUp);
- __declspec(dllexport) void DrawTextVertical(const TDesC& aText,const TRect& aBox,TBool aUp);
- __declspec(dllexport) void DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
- __declspec(dllexport) void DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TInt aTextWidth,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
- __declspec(dllexport) void MapColors(const TRect& aRect,const TRgb* aColors,TInt aNumPairs=2,TBool aMapForwards=ETrue);
- __declspec(dllexport) void MoveTo(const TPoint& aPoint);
- __declspec(dllexport) void MoveBy(const TPoint& aVector);
- __declspec(dllexport) void OrientationsAvailable(TBool aOrientation[4]);
- __declspec(dllexport) void Plot(const TPoint& aPoint);
- __declspec(dllexport) void RectDrawnTo(TRect& aRect);
- __declspec(dllexport) void Reset();
- __declspec(dllexport) void Resized();
- __declspec(dllexport) void SetBrushColor(const TRgb& aColor);
- __declspec(dllexport) void SetBrushOrigin(const TPoint& aOrigin);
- __declspec(dllexport) void SetBrushStyle(TBrushStyle aBrushStyle);
- __declspec(dllexport) void SetClippingRegion(const TRegion* aRegion);
- __declspec(dllexport) void SetClippingRect(const TRect& aRect);
- __declspec(dllexport) void SetDitherOrigin(const TPoint& aPoint);
- __declspec(dllexport) void SetDrawMode(TDrawMode);
- __declspec(dllexport) void SetOrigin(const TPoint& aPoint=TPoint(0,0));
- __declspec(dllexport) void SetPenColor(const TRgb& aColor);
- __declspec(dllexport) void SetPenStyle(TPenStyle);
- __declspec(dllexport) void SetPenSize(const TSize& aSize);
- __declspec(dllexport) void SetCharJustification(TInt aExcessWidth,TInt aNumGaps);
- __declspec(dllexport) void SetWordJustification(TInt aExcessWidth,TInt aNumChars);
- __declspec(dllexport) void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
- __declspec(dllexport) void SetUserDisplayMode(TDisplayMode aDisplayMode);
- __declspec(dllexport) void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
- __declspec(dllexport) void SetShadowMode(TBool aShadowMode = EFalse);
- inline void SetFadeMode(TBool aFadeMode = EFalse);
- inline void SetFadingParameters(TUint8 aBlackMap = 0);
- __declspec(dllexport) void SetFaded(TBool aFaded);
- __declspec(dllexport) void SetFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap);
- __declspec(dllexport) TBool SetOrientation(TGraphicsOrientation aOrientation);
- __declspec(dllexport) void ShadowArea(const TRegion* aRegion);
- __declspec(dllexport) void FadeArea(const TRegion* aRegion);
- __declspec(dllexport) void UpdateJustification(const TDesC& aText);
- __declspec(dllexport) void UpdateJustificationVertical(const TDesC& aText,TBool aUp);
- __declspec(dllexport) void UseBrushPattern(const CFbsBitmap* aBitmap);
- __declspec(dllexport) TInt UseBrushPattern(TInt aFbsBitmapHandle);
- __declspec(dllexport) void UseFont(const CFont* aFont);
- __declspec(dllexport) TInt UseFont(TInt aFontHandle);
- __declspec(dllexport) void UseFontNoDuplicate(const CFbsBitGcFont* aFont);
- __declspec(dllexport) TBool IsBrushPatternUsed() const;
- __declspec(dllexport) TBool IsFontUsed() const;
- inline static TInt16 Load16(const TUint8* aPtr) { return TInt16(aPtr[0]+(aPtr[1]<<8)); }
- __declspec(dllexport) TInt AlphaBlendBitmaps(const TPoint& aDestPt,
- const CFbsBitmap* aSrcBmp1,
- const CFbsBitmap* aSrcBmp2,
- const TRect& aSrcRect1,
- const TPoint& aSrcPt2,
- const CFbsBitmap* aAlphaBmp,
- const TPoint& aAlphaPt);
- __declspec(dllexport) TInt AlphaBlendBitmaps(const TPoint& aDestPt,
- const CFbsBitmap* aSrcBmp,
- const TRect& aSrcRect,
- const CFbsBitmap* aAlphaBmp,
- const TPoint& aAlphaPt);
- __declspec(dllexport) void ExternalizeL(RWriteStream& aWriteStream);
- __declspec(dllexport) void InternalizeL(RReadStream& aReadStream);
- __declspec(dllexport) TInt SetClippingRegion(const TRegion& aRegion);
- __declspec(dllexport) TInt AlphaBlendBitmaps(const TPoint& aDestPt,
- const CWsBitmap* aSrcBmp,
- const TRect& aSrcRect,
- const CWsBitmap* aAlphaBmp,
- const TPoint& aAlphaPt);
- __declspec(dllexport) TRgb BrushColor();
- __declspec(dllexport) TRgb PenColor();
- private:
- CFbsBitGc();
- void AddRect(const TRect& aRect);
- void AnalyseEllipse(const TRect& rc,TPoint& srad,TPoint& erad,TPoint& center,TInt& startq,TInt& endq,TBool* quads);
- void BitMultiply(TUint32* aBinaryDataPtr,TInt aBitLength,TInt aMultiplier);
- void CheckDevice() const;
- TBool CheckDevice(const TRect& aRect) const;
- TUint32* ClipBinaryArray(TUint32* aArray,TUint32* aArrayLimit,TInt aArrayWordWd,TInt& aDataWd,TInt& aDataHt,TPoint& aPos);
- void ClipFillLine(TPoint,TPoint);
- void CopyCharWord(TUint32* aBinaryDataPtr,const TUint8* aData,TInt aBitShift);
- void CopyCharLine(TUint32* aBinaryDataPtr,TInt aBufferWords,const TUint8* aData,TInt aBitShift,TInt aCharWidth);
- void DrawText(const TDesC& aText,const TPoint& aPosition,TTextAlign aAlignment,
- CFont::TTextDirection aDirection,const TRect* aBox = 0 );
- void DoBitBlt(const TPoint& aDest,CFbsDevice* aDevice,const TRect& aSourceRect);
- void DoBitBlt(const TPoint& aDest,CBitwiseBitmap* aBitmap,TUint32* aBase,const TRect& aSourceRect);
- void DoBitBltMasked(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
- void DoBitBltMaskedFlicker(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
- void DoBitBltMaskedNonFlicker(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
- void DoBitBltMaskedNonFlickerSolid(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
- void DoBitBltMaskedNonFlickerPatterned(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin,TInt aShadowMode);
- void DoBitBltAlpha(const TPoint& aDest,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,const TPoint& aDitherOrigin,TInt aShadowMode);
- void DoBitBltAlpha(const TPoint& aDestPt,
- const CBitwiseBitmap* aSrcBmp1,
- TUint32* aSrcBmpDataAddr1,
- const CBitwiseBitmap* aSrcBmp2,
- TUint32* aSrcBmpDataAddr2,
- const CBitwiseBitmap* aAlphaBmp,
- TUint32* aAlphaBmpDataAddr,
- const TRect& aSrcRect1,
- const TPoint& aSrcPt2,
- const TPoint& aAlphaPt,
- TInt aShadowMode);
- void DoCopyRect(const TPoint&,const TRect&);
- void DoDrawBitmap(const TRect&,CBitwiseBitmap*,TUint32* aBase,const TRect&,const TPoint& aDitherOrigin);
- void DoDrawBitmapMasked(const TRect& aDestRect,CBitwiseBitmap* aSourceBitmap,TUint32* aSourceBase,const TRect& aSourceRect,CBitwiseBitmap* aMaskBitmap,TUint32* aMaskBase,TBool aInvertMask,const TPoint& aDitherOrigin);
- void DoDrawLine(TPoint aStart,TPoint aEnd,TBool aDrawStartPoint);
- void DoDrawDottedWideLine(const TPoint& pt1,const TPoint& pt2,TBool drawstart,const TRect& screenrect);
- void DoDrawSolidWideLine(const TPoint& pt1,const TPoint& pt2,TBool drawstart,const TRect& screenrect);
- void DoDrawText(CFont::TPositionParam& aParam);
- void DoDrawCharacter(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData);
- void DoDrawTextEx(CFont::TPositionParam& aParam,const CBitmapFont* font);
- void DoDrawCharacterEx(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
- TBool aBold,TBool aItalic,TInt aSemiAscent);
- void DoDrawCharacterAntiAliased(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData);
- void DoDrawTextLarge(CFont::TPositionParam& aParam,const CBitmapFont* font);
- void DoDrawCharacterLarge(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
- TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthFactor,TInt aHeightFactor);
- void DoDrawCharacterExLarge(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
- TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthFactor,TInt aHeightFactor);
- void DoDrawCharacterMultiplied(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
- TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthMultiplier,TInt aHeightMultiplier);
- void DoDrawTextVertical(CFont::TPositionParam& aParam,const CBitmapFont* font,TBool aUp);
- void DoDrawCharacterVertical(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,
- TBool aBold,TBool aItalic,TInt aSemiAscent,TInt aWidthFactor,TInt aHeightFactor,TBool aUp);
- void DoDrawCharacterVerticalAntiAliased(const TPoint& aTopLeft,const TSize& aDataSize,const TUint8* aData,TBool aUp);
- void DoPlot(const TPoint& pt);
- void EllipseFill(const TRect& aRect);
- void EllipseOutline(const TRect& aRect);
- void EllipseOutlineWide(const TRect& aRect);
- void GetUnderlineMetrics(TInt& aTop,TInt& aBottom);
- void GetStrikethroughMetrics(TInt& aTop,TInt& aBottom);
- void OutputCharLine(TPoint aPrintPos,TUint32* aBuffer,TInt aDataLength,TInt aNum,TBool aBold,TInt aWidthFactor,TInt aHeightFactor);
- void OutputCharLineMultiplied(TPoint aPrintPos,TUint32* aBuffer,TInt aDataLength,TInt aNum,TBool aBold,TInt aWidthMultiplier,TInt aHeightMultiplier);
- void OutputCharLineVertical(TPoint aPrintPos,TUint32* aBuffer,TInt aDataLength,TInt aNum,TBool aBold,TInt aWidthFactor,TInt aHeightFactor,TBool aUp);
- void PenAllocate();
- void PenDrawClipped(TPoint aPoint);
- void PenDrawDeferred(TPoint aPoint,TInt* aArray,TInt aFirstElement);
- void PieArcOutline(const TRect& aRect,const TPoint& aStartRadius,const TPoint& aEndRadius,TBool aDoPie);
- void PieFill(const TRect& aRect,const TPoint& aStartRadius,const TPoint& aEndRadius);
- void PieShell(const TRect& ellrect,const TPoint& startradius,const TPoint& endradius,TBool quads[5],TInt startquad,TInt endquad);
- void PieTriangles(TBool aInside,const TPoint& aStart,const TPoint& aEnd);
- void PieSliver(const TRect& ellrect,const TPoint& startradius,const TPoint& endradius,TInt quad);
- void PolyFill(const CArrayFix<TPoint> * aPointList,TFillRule aFillRule);
- void PolyFillLarge(const CArrayFix<TPoint> * aPointList,TFillRule aFillRule);
- void PolyFill(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule);
- void PolyFillLarge(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule);
- void PolyOutline(const CArrayFix<TPoint> * aPointList);
- void PolyOutline(const TPoint* aPointList,TInt aNumPoints);
- void RectFill(const TRect& aRect);
- void RoundRectFill(const TRect& aRect,TSize aSize);
- void RoundRectOutline(const TRect& aRect,TSize aSize);
- void SetupDevice() const;
- void ShadowFadeArea(const TRegion* aRegion,TInt8 aShadowMode);
- TBool UserClipRect(TRect& aRect);
- CGraphicsAccelerator* GraphicsAccelerator();
- private:
- __declspec(dllexport) void Reserved_CGraphicsContext_1();
- __declspec(dllexport) void Reserved_CGraphicsContext_2();
- __declspec(dllexport) void Reserved_CBitmapContext_1();
- __declspec(dllexport) void Reserved_CBitmapContext_2();
- __declspec(dllexport) void Reserved_CBitmapContext_3();
- __declspec(dllexport) virtual void Reserved_CFbsBitGc_1();
- __declspec(dllexport) virtual void Reserved_CFbsBitGc_2();
- __declspec(dllexport) virtual void Reserved_CFbsBitGc_3();
- __declspec(dllexport) virtual void Reserved_CFbsBitGc_4();
- __declspec(dllexport) virtual void Reserved_CFbsBitGc_5();
- private:
- CFbsBitGcBitmap iBrushBitmap;
- TBool iBrushUsed;
- TRgb iBrushColor;
- TPoint iBrushOrigin;
- TBrushStyle iBrushStyle;
- TRect iClipRect;
- TRegionFix<1> iDefaultRegion;
- const TRegion* iDefaultRegionPtr;
- TRect iUserClipRect;
- CFbsDevice* iDevice;
- TPoint iDitherOrigin;
- TInt iDotLength;
- TInt iDotMask;
- TInt iDotParam;
- TInt iDotDirection;
- TDrawMode iDrawMode;
- TRect iDrawnTo;
- CFbsBitGcFont iFont;
- TInt iCharJustExcess;
- TInt iCharJustNum;
- TInt iWordJustExcess;
- TInt iWordJustNum;
- TPoint iLastPrintPosition;
- TPoint iLinePosition;
- TPoint iOrigin;
- TInt* iPenArray;
- TRgb iPenColor;
- TPenStyle iPenStyle;
- TSize iPenSize;
- TInt8 iShadowMode;
- TInt8 iAutoUpdateJustification;
- TUint8 iFadeBlackMap;
- TUint8 iFadeWhiteMap;
- TFontStrikethrough iStrikethrough;
- TFontUnderline iUnderline;
- TDisplayMode iUserDisplayMode;
- RRegion iClippingRegion;
- };
- inline void CFbsBitGc::SetFadeMode(TBool aFadeMode )
- {SetFaded(aFadeMode);}
- inline void CFbsBitGc::SetFadingParameters(TUint8 aBlackMap )
- {SetFadingParameters(aBlackMap,255);}
- #line 22 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.h" /* stack depth 5 */
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\graphicsaccelerator.h" /* stack depth 6 */
- #line 17
- class CFbsBitmap;
- class TAcceleratedBitmapSpec;
- #line 32
- class TAcceleratedBitmapInfo
- {
- public:
- TDisplayMode iDisplayMode;
- TUint8* iAddress;
- TSize iSize;
- TInt iLinePitch;
- TInt iPixelShift;
- TUint8* iPhysicalAddress;
- };
- #line 69
- class RHardwareBitmap
- {
- friend class CBitwiseBitmap;
- friend class CFbsScreenDevice;
- public:
- inline RHardwareBitmap();
- inline RHardwareBitmap(TInt aHandle);
- __declspec(dllexport) TInt GetInfo(TAcceleratedBitmapInfo& aInfo) const;
- private:
- __declspec(dllexport) TInt SetAsScreenReference(TInt aScreen=-1);
- __declspec(dllexport) TInt Create(TDisplayMode aDisplayMode, TSize aSize, TUid aCreatorUid);
- __declspec(dllexport) void Destroy();
- public:
- TInt iHandle;
- };
- inline RHardwareBitmap::RHardwareBitmap()
- : iHandle(0)
- {}
- inline RHardwareBitmap::RHardwareBitmap(TInt aHandle)
- : iHandle(aHandle)
- {}
- #line 114
- class TBitmapLockCount
- {
- friend class TAcceleratedBitmapSpec;
- public:
- inline TBitmapLockCount() : iCount(0) {}
- private:
- inline TInt Inc() { return iCount++; }
- inline TInt Dec() { return --iCount; }
- private:
- TInt iCount;
- };
- #line 139
- class TAcceleratedBitmapSpec
- {
- public:
- inline TAcceleratedBitmapSpec();
- __declspec(dllexport) TAcceleratedBitmapSpec(CFbsBitmap* aBitmap);
- __declspec(dllexport) TAcceleratedBitmapSpec(RHardwareBitmap aBitmap);
- __declspec(dllexport) TInt GetInfo(TAcceleratedBitmapInfo& aInfo) const;
- inline void Lock(TBitmapLockCount& aCount);
- inline void Lock(TBitmapLockCount& aCount,TAcceleratedBitmapInfo& aInfo);
- inline void Unlock(TBitmapLockCount& aCount);
- enum TAcceleratedBitmapType
- {
- ENoBitmap,
- EFbsBitmap,
- EHardwareBitmap,
- };
- enum TAcceleratedBitmapLock
- {
- EBitmapIsStatic,
- EBitmapNeedsLocking,
- };
- inline TAcceleratedBitmapType Type() const;
- inline TInt Handle() const;
- private:
- __declspec(dllexport) void DoLock(TBitmapLockCount& aCount);
- __declspec(dllexport) void DoLock(TBitmapLockCount& aCount,TAcceleratedBitmapInfo& aInfo);
- __declspec(dllexport) void DoUnlock(TBitmapLockCount& aCount);
- private:
- TUint8 iType;
- TUint8 iLockStatus;
- TUint8 iSpare1;
- TUint8 iSpare2;
- TInt iHandle;
- };
- inline TAcceleratedBitmapSpec::TAcceleratedBitmapSpec()
- : iType(ENoBitmap), iLockStatus(EBitmapIsStatic)
- {}
- #line 210
- inline void TAcceleratedBitmapSpec::Lock(TBitmapLockCount& aCount)
- { if(iLockStatus==EBitmapNeedsLocking) DoLock(aCount); }
- #line 226
- inline void TAcceleratedBitmapSpec::Lock(TBitmapLockCount& aCount,TAcceleratedBitmapInfo& aInfo)
- { if(iLockStatus==EBitmapNeedsLocking) DoLock(aCount,aInfo); }
- #line 237
- inline void TAcceleratedBitmapSpec::Unlock(TBitmapLockCount& aCount)
- { if(iLockStatus==EBitmapNeedsLocking) DoUnlock(aCount); }
- inline TAcceleratedBitmapSpec::TAcceleratedBitmapType TAcceleratedBitmapSpec::Type() const
- { return (TAcceleratedBitmapSpec::TAcceleratedBitmapType)iType; }
- inline TInt TAcceleratedBitmapSpec::Handle() const
- { return iHandle; }
- #line 268
- enum TTransparencyType
- {
- ETransparentPixelZero,
- ETransparentPixel,
- ETransparentColor,
- ETransparent1555,
- };
- #line 303
- class TGraphicsAcceleratorCaps
- {
- public:
- enum TClipCaps
- {
- EClipToBitmap = 1,
- EClipping = 2
- };
- enum TMaskBitmapCaps
- {
- EMaskBitmapNone = 0,
- EMaskBitmapAnyDisplayMode,
- EMaskBitmapMatchingDisplayMode,
- EMaskBitmapGray2,
- };
- enum TAlphaChannelCaps
- {
- EAlpha4444 = 1,
- EAlpha8888 = 2,
- EAlpha1555 = 4,
- };
- enum TAlphaBitmapCaps
- {
- EAlphaBitmapGray256 = 1,
- EAlphaBitmapColor16M = 2,
- EAlphaBitmapMatchingMode = 4,
- };
- enum TPatternSizeCaps
- {
- EPatternSizeAny = 0xFFFFFFFF,
- };
- enum TPatternCaps
- {
- EPatternAnyDisplayMode = 1,
- EPatternMatchingDisplayMode = 2,
- EPatternMustBeSquare = 4,
- };
- enum TPolygonCaps
- {
- EPolygonFillAlternate = 1,
- EPolygonFillWinding = 2,
- };
- TInt iStructureSize;
- TInt iVersion;
- TUid iVendorUid;
- TUint iDisplayModes;
- TUint iClipping;
- TMaskBitmapCaps iMaskType;
- TUint iTransparency;
- TUint iAlphaChannel;
- TUint iAlphaBitmap;
- #line 473
- TUint iPatternSizes;
- TUint iPattern;
- TUint iPolygon;
- TUint iReserved[4];
- };
- #line 508
- class TGraphicsOperation
- {
- public:
- enum TGopFunction
- {
- EFilledRect,
- EFilledRectUsingDrawMode,
- EFilledRectWithPattern,
- EInvertRect,
- EFadeRect,
- EBitBlt,
- EBitBltMasked,
- EBitBltTransparent,
- EBitBltAlphaChannel,
- EBitBltAlphaBitmap,
- EScaledBitBlt,
- EScaledBitBltMasked,
- EScaledBitBltTransparent,
- EScaledBitBltAlphaChannel,
- EScaledBitBltAlphaBitmap,
- EFilledPolygon,
- EFilledPolygonWithPattern,
- };
- public:
- inline TGopFunction Function() const { return iFunction; }
- inline TInt Size() const { return iSize; }
- inline TGraphicsOperation* Next() const;
- inline void Append(TInt aNumBytes,TAny* aData);
- protected:
- inline TGraphicsOperation(TGopFunction aFunction, TInt aArgSize);
- inline TGraphicsOperation() {}
- protected:
- TGopFunction iFunction;
- TInt iSize;
- };
- inline TGraphicsOperation::TGraphicsOperation(TGopFunction aFunction, TInt aSize)
- : iFunction(aFunction) , iSize(aSize) {}
- inline TGraphicsOperation* TGraphicsOperation::Next() const
- { return (TGraphicsOperation*)((TUint8*)this+iSize); }
- inline void TGraphicsOperation::Append(TInt aNumBytes,TAny* aData)
- {
- Mem::Copy(Next(),aData,aNumBytes);
- iSize += aNumBytes;
- }
- #line 579
- class CGraphicsAccelerator : public CBase
- {
- public:
- virtual const TGraphicsAcceleratorCaps* Capabilities() = 0;
- #line 598
- virtual TInt Operation(const TGraphicsOperation& aOperation) = 0;
- #line 611
- virtual TInt Operation(const TGraphicsOperation& aOperation,TInt aNumClipRects,TRect* aClipRects) = 0;
- #line 634
- virtual TInt Operation(TDes8& aBuffer) = 0;
- #line 657
- virtual TInt Operation(TDes8& aBuffer,TInt aNumClipRects,TRect* aClipRects) = 0;
- public:
- virtual void Reserved_1() = 0;
- virtual void Reserved_2() = 0;
- virtual void Reserved_3() = 0;
- virtual void Reserved_4() = 0;
- };
- #line 678
- class CSoftwareGraphicsAccelerator : public CGraphicsAccelerator
- {
- public:
- __declspec(dllexport) static CSoftwareGraphicsAccelerator* NewL(CFbsBitmap* aBitmap);
- __declspec(dllexport) static const TGraphicsAcceleratorCaps* GenericCapabilities();
- public:
- virtual const TGraphicsAcceleratorCaps* Capabilities() = 0;
- virtual TInt Operation(const TGraphicsOperation& aOperation) = 0;
- virtual TInt Operation(const TGraphicsOperation& aOperation,TInt aNumClipRects,TRect* aClipRects) = 0;
- virtual TInt Operation(TDes8& aBuffer) = 0;
- virtual TInt Operation(TDes8& aBuffer,TInt aNumClipRects,TRect* aClipRects) = 0;
- virtual void Reserved_1() = 0;
- virtual void Reserved_2() = 0;
- virtual void Reserved_3() = 0;
- virtual void Reserved_4() = 0;
- };
- #line 713
- class CHardwareGraphicsAccelerator : public CGraphicsAccelerator
- {
- public:
- __declspec(dllexport) static CHardwareGraphicsAccelerator* NewL(RHardwareBitmap aBitmap);
- __declspec(dllexport) static const TGraphicsAcceleratorCaps* GenericCapabilities();
- public:
- virtual const TGraphicsAcceleratorCaps* Capabilities() = 0;
- virtual TInt Operation(const TGraphicsOperation& aOperation) = 0;
- virtual TInt Operation(const TGraphicsOperation& aOperation,TInt aNumClipRects,TRect* aClipRects) = 0;
- virtual TInt Operation(TDes8& aBuffer) = 0;
- virtual TInt Operation(TDes8& aBuffer,TInt aNumClipRects,TRect* aClipRects) = 0;
- virtual void Reserved_1() = 0;
- virtual void Reserved_2() = 0;
- virtual void Reserved_3() = 0;
- virtual void Reserved_4() = 0;
- };
- #line 752
- class TGopFillPattern
- {
- public:
- TAcceleratedBitmapSpec iBitmap;
- TPoint iOrigin;
- };
- #line 789
- class TGopFadeParams
- {
- public:
- TInt iScale;
- TInt iOffset;
- };
- #line 814
- class TGopTransparency
- {
- public:
- inline TGopTransparency(TTransparencyType aType) : iType(aType), iParam(0) {}
- inline TGopTransparency(TInt aPixelValue) : iType(ETransparentPixel), iParam(aPixelValue) {}
- inline TGopTransparency(TRgb aRgb) : iType(ETransparentColor), iParam(aRgb.Value()) {}
- inline TRgb Color() const { return TRgb(iParam); }
- inline TInt Pixel() const { return iParam; }
- public:
- TTransparencyType iType;
- TUint32 iParam;
- };
- #line 865
- #pragma warning(disable : 4355)
- #line 876
- class TGopFilledRect : public TGraphicsOperation
- {
- public:
- inline TGopFilledRect(const TRect& aRect,TRgb aColor)
- : TGraphicsOperation(EFilledRect,sizeof(*this)), iRect(aRect) , iColor(aColor) {}
- public:
- TRect iRect;
- TRgb iColor;
- };
- #line 905
- class TGopFilledRectUsingDrawMode : public TGraphicsOperation
- {
- public:
- inline TGopFilledRectUsingDrawMode(const TRect& aRect,TRgb aColor,CGraphicsContext::TDrawMode aDrawMode)
- : TGraphicsOperation(EFilledRectUsingDrawMode,sizeof(*this)), iRect(aRect) , iColor(aColor) , iDrawMode(aDrawMode) {}
- public:
- TRect iRect;
- TRgb iColor;
- CGraphicsContext::TDrawMode iDrawMode;
- };
- #line 935
- class TGopFilledRectWithPattern : public TGraphicsOperation
- {
- public:
- inline TGopFilledRectWithPattern(const TRect& aRect,TGopFillPattern aPattern)
- : TGraphicsOperation(EFilledRectWithPattern,sizeof(*this)), iRect(aRect) , iPattern(aPattern) {}
- public:
- TRect iRect;
- TGopFillPattern iPattern;
- };
- #line 963
- class TGopInvertRect : public TGraphicsOperation
- {
- public:
- inline TGopInvertRect(const TRect& aRect)
- : TGraphicsOperation(EInvertRect,sizeof(*this)), iRect(aRect) {}
- public:
- TRect iRect;
- };
- #line 984
- class TGopFadeRect : public TGraphicsOperation
- {
- public:
- inline TGopFadeRect(const TRect& aRect, const TGopFadeParams aFade)
- : TGraphicsOperation(EFadeRect,sizeof(*this)), iRect(aRect), iFade(aFade) {}
- public:
- TRect iRect;
- TGopFadeParams iFade;
- };
- #line 1011
- class TGopBitBlt : public TGraphicsOperation
- {
- public:
- inline TGopBitBlt(const TPoint& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect)
- : TGraphicsOperation(EBitBlt,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect) {}
- public:
- TPoint iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- };
- #line 1050
- class TGopBitBltMasked : public TGraphicsOperation
- {
- public:
- #line 1062
- inline TGopBitBltMasked(const TPoint& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect, TAcceleratedBitmapSpec aMask)
- : TGraphicsOperation(EBitBltMasked,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect), iMask(aMask) {}
- public:
- TPoint iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- TAcceleratedBitmapSpec iMask;
- };
- #line 1091
- class TGopBitBltTransparent : public TGraphicsOperation
- {
- public:
- #line 1106
- inline TGopBitBltTransparent(const TPoint& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect, TGopTransparency aTransparency)
- : TGraphicsOperation(EBitBltTransparent,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect), iTransparency(aTransparency) {}
- public:
- TPoint iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- TGopTransparency iTransparency;
- };
- #line 1139
- class TGopBitBltAlphaChannel : public TGraphicsOperation
- {
- public:
- inline TGopBitBltAlphaChannel(const TPoint& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect)
- : TGraphicsOperation(EBitBltAlphaChannel,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect) {}
- public:
- TPoint iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- };
- #line 1188
- class TGopBitBltAlphaBitmap : public TGraphicsOperation
- {
- public:
- #line 1200
- inline TGopBitBltAlphaBitmap(const TPoint& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect, TAcceleratedBitmapSpec aAlphaBitmap)
- : TGraphicsOperation(EBitBltAlphaBitmap,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect), iAlphaBitmap(aAlphaBitmap) {}
- public:
- TPoint iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- TAcceleratedBitmapSpec iAlphaBitmap;
- };
- #line 1227
- class TGopScaledBitBlt : public TGraphicsOperation
- {
- public:
- #line 1238
- inline TGopScaledBitBlt(const TRect& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect)
- : TGraphicsOperation(EScaledBitBlt,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect) {}
- public:
- TRect iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- };
- #line 1267
- class TGopScaledBitBltMasked : public TGraphicsOperation
- {
- public:
- #line 1280
- inline TGopScaledBitBltMasked(const TRect& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect, TAcceleratedBitmapSpec aMask)
- : TGraphicsOperation(EScaledBitBltMasked,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect), iMask(aMask) {}
- public:
- TRect iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- TAcceleratedBitmapSpec iMask;
- };
- #line 1310
- class TGopScaledBitBltTransparent : public TGraphicsOperation
- {
- public:
- #line 1325
- inline TGopScaledBitBltTransparent(const TRect& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect, TGopTransparency aTransparency)
- : TGraphicsOperation(EScaledBitBltTransparent,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect), iTransparency(aTransparency) {}
- public:
- TRect iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- TGopTransparency iTransparency;
- };
- #line 1355
- class TGopScaledBitBltAlphaChannel : public TGraphicsOperation
- {
- public:
- #line 1367
- inline TGopScaledBitBltAlphaChannel(const TRect& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect)
- : TGraphicsOperation(EScaledBitBltAlphaChannel,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect) {}
- public:
- TRect iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- };
- #line 1394
- class TGopScaledBitBltAlphaBitmap : public TGraphicsOperation
- {
- public:
- #line 1406
- inline TGopScaledBitBltAlphaBitmap(const TRect& aDestination, TAcceleratedBitmapSpec aSourceBitmap, TRect& aSourceRect, TAcceleratedBitmapSpec aAlphaBitmap)
- : TGraphicsOperation(EScaledBitBltAlphaBitmap,sizeof(*this)), iDestination(aDestination), iSourceBitmap(aSourceBitmap), iSourceRect(aSourceRect), iAlphaBitmap(aAlphaBitmap) {}
- public:
- TRect iDestination;
- TAcceleratedBitmapSpec iSourceBitmap;
- TRect iSourceRect;
- TAcceleratedBitmapSpec iAlphaBitmap;
- };
- #line 1434
- class TGopFilledPolygon : public TGraphicsOperation
- {
- public:
- inline TGopFilledPolygon(TRgb aColor, CGraphicsContext::TFillRule aFillRule)
- : TGraphicsOperation(EFilledPolygon,sizeof(*this)), iColor(aColor), iFillRule(aFillRule), iNumPoints(0) {}
- inline void AddPoints(TInt aNumPoints, TPoint* aPoints);
- public:
- TRgb iColor;
- CGraphicsContext::TFillRule iFillRule;
- TInt iNumPoints;
- };
- inline void TGopFilledPolygon::AddPoints(TInt aNumPoints, TPoint* aPoints)
- { Append(aNumPoints*sizeof(TPoint),aPoints); iNumPoints += aNumPoints; }
- #line 1478
- class TGopFilledPolygonWithPattern : public TGraphicsOperation
- {
- public:
- inline TGopFilledPolygonWithPattern(TGopFillPattern aPattern, CGraphicsContext::TFillRule aFillRule)
- : TGraphicsOperation(EFilledPolygonWithPattern,sizeof(*this)), iPattern(aPattern), iFillRule(aFillRule), iNumPoints(0) {}
- inline void AddPoints(TInt aNumPoints, TPoint* aPoints);
- public:
- TGopFillPattern iPattern;
- CGraphicsContext::TFillRule iFillRule;
- TInt iNumPoints;
- };
- inline void TGopFilledPolygonWithPattern::AddPoints(TInt aNumPoints, TPoint* aPoints)
- { Append(aNumPoints*sizeof(TPoint),aPoints); iNumPoints += aNumPoints; }
- #line 23 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.h" /* stack depth 5 */
- enum {EScanBufSize=0x80};
- class CFbsDrawDevice;
- #line 53
- class CFbsDevice : public CBitmapDevice
- {
- friend class CFbsBitGc;
- public:
- __declspec(dllexport) ~CFbsDevice();
- __declspec(dllexport) TInt CreateContext(CFbsBitGc*& aGc);
- inline TInt CreateContext(CGraphicsContext*& aGc);
- __declspec(dllexport) TDisplayMode DisplayMode() const;
- __declspec(dllexport) TSize SizeInPixels() const;
- __declspec(dllexport) TBool RectCompare(const TRect& aSourceRect,const CFbsDevice& aDevice,const TRect& aDeviceRect) const;
- __declspec(dllexport) TInt AddFile(const TDesC& aName,TInt& aId);
- __declspec(dllexport) void RemoveFile(TInt aId=0);
- __declspec(dllexport) virtual TInt GetNearestFontInTwips(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) virtual TInt GetNearestFontInPixels(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) virtual TInt GetNearestFontToDesignHeightInTwips(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) virtual TInt GetNearestFontToDesignHeightInPixels(CFont*& aFont, const TFontSpec& aFontSpec);
- __declspec(dllexport) virtual TInt GetNearestFontToMaxHeightInTwips(CFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) virtual TInt GetNearestFontToMaxHeightInPixels(CFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- __declspec(dllexport) TInt GetFontById(CFont*& aFont,TUid aFileId,const TAlgStyle& aStyle);
- inline TInt GetNearestFontInTwips(CFbsFont*& aFont, const TFontSpec& aFontSpec);
- inline TInt GetNearestFontInPixels(CFbsFont*& aFont, const TFontSpec& aFontSpec);
- inline TInt GetNearestFontToDesignHeightInTwips(CFbsFont*& aFont, const TFontSpec& aFontSpec);
- inline TInt GetNearestFontToDesignHeightInPixels(CFbsFont*& aFont, const TFontSpec& aFontSpec);
- inline TInt GetNearestFontToMaxHeightInTwips(CFbsFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- inline TInt GetNearestFontToMaxHeightInPixels(CFbsFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight);
- inline TInt GetFontById(CFbsFont*& aFont,TUid aFileId,const TAlgStyle& aStyle);
- __declspec(dllexport) void ReleaseFont(CFont* aFont);
- __declspec(dllexport) TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
- __declspec(dllexport) TInt FontHeightInPixels(TInt aTypefaceIndex,TInt aHeightIndex) const;
- __declspec(dllexport) TInt NumTypefaces() const;
- __declspec(dllexport) void TypefaceSupport(TTypefaceSupport& aTypefaceSupport,TInt aTypefaceIndex) const;
- __declspec(dllexport) TInt SetCustomPalette(const CPalette* aPalette);
- inline CGraphicsAccelerator* GraphicsAccelerator() const;
- inline CFbsBitGc::TGraphicsOrientation Orientation() const;
- __declspec(dllexport) static TDisplayMode DisplayMode16M();
- __declspec(dllexport) TInt SetScalingFactor(const TPoint& aOrigin,
- TInt aFactorX, TInt aFactorY,
- TInt aDivisorX, TInt aDivisorY);
- __declspec(dllexport) void GetDrawRect(TRect& aRect) const;
- protected:
- CFbsDevice();
- virtual void DrawingBegin(TBool = EFalse) {}
- virtual void DrawingEnd(TBool = EFalse) {}
- virtual void SetBits() {}
- virtual void CancelSprite() const {}
- virtual TSpriteBase* HideSprite() const {return(0 );}
- virtual TSpriteBase* HideSprite(const TRect&,const TRegion*) const {return(0 );}
- virtual void ShowSprite(TSpriteBase*) const {}
- virtual void ShowSprite(TSpriteBase*,const TRect&,const TRegion*) const {}
- TInt GetNearestFbsFont(CFbsFont*& aFont,const TFontSpec& aFontSpec);
- void DoGetScanLine(TDes8& aBuf,const TPoint& aPixel,TInt aLength,TDisplayMode aDispMode);
- void ReadLineDiffMode(TInt,TInt,TInt,TAny*,TDisplayMode) const;
- void TruncateRect(TRect& aRect);
- TBool SetOrientation(CFbsBitGc::TGraphicsOrientation aOrientation);
- void DrawingBegin(const CFbsBitmap* aBitmap,TBool aAlways);
- void DrawingEnd(const CFbsBitmap* aBitmap,TBool aAlways);
- protected:
- CFbsDrawDevice* iDrawDevice;
- RFbsSession* iFbs;
- CFbsTypefaceStore* iTypefaceStore;
- TBool iLockHeap;
- TBool iScreenDevice;
- TUint8* iBitBltMaskedBuffer;
- CGraphicsAccelerator* iGraphicsAccelerator;
- CFbsBitGc::TGraphicsOrientation iOrientation;
- };
- #line 131
- class CFbsScreenDevice : public CFbsDevice
- {
- public:
- __declspec(dllexport) static CFbsScreenDevice* NewL(const TDesC& aLibname,TDisplayMode aDispMode);
- __declspec(dllexport) static CFbsScreenDevice* NewL(const TDesC& aLibname,TDisplayMode aDispMode, TRgb aWhite);
- __declspec(dllexport) static CFbsScreenDevice* NewL(TInt aScreenNo, TDisplayMode aDispMode);
- __declspec(dllexport) virtual ~CFbsScreenDevice();
- __declspec(dllexport) void GetScanLine(TDes8& aBuf,const TPoint& aStartPixel,TInt aLength,TDisplayMode aDispMode) const;
- __declspec(dllexport) void GetPixel(TRgb& aColor,const TPoint& aPixel) const;
- __declspec(dllexport) TInt HorizontalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) TInt VerticalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) TInt HorizontalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) TInt VerticalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) void SetAutoUpdate(TBool aValue);
- __declspec(dllexport) void DrawSpriteBegin();
- __declspec(dllexport) void DrawSpriteEnd();
- __declspec(dllexport) void CancelSprite() const;
- __declspec(dllexport) TSpriteBase* HideSprite() const;
- __declspec(dllexport) TSpriteBase* HideSprite(const TRect& aRect,const TRegion* aClippingRegion) const;
- __declspec(dllexport) void ShowSprite(TSpriteBase* aSprite) const;
- __declspec(dllexport) void ShowSprite(TSpriteBase* aSprite,const TRect& aRect,const TRegion* aClippingRegion) const;
- __declspec(dllexport) void ChangeScreenDevice(CFbsScreenDevice* aOldDevice);
- __declspec(dllexport) void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;
- __declspec(dllexport) void SetPalette(CPalette* aPalette);
- __declspec(dllexport) TInt GetPalette(CPalette*& aPalette) const;
- __declspec(dllexport) void Update();
- __declspec(dllexport) void Update(const TRegion& aRegion);
- __declspec(dllexport) TSize SizeInTwips() const;
- __declspec(dllexport) RHardwareBitmap HardwareBitmap();
- private:
- CFbsScreenDevice(TInt aScreenNo);
- void ConstructL(TInt aScreenNo, TDisplayMode aDispMode);
- private:
- TSpriteBase* iSprite;
- TBool iSpriteDraw;
- TInt iScreenNo;
- };
- #line 177
- class CFbsBitmapDevice : public CFbsDevice
- {
- public:
- __declspec(dllexport) static CFbsBitmapDevice* NewL(CFbsBitmap* aFbsBitmap);
- __declspec(dllexport) static CFbsBitmapDevice* NewL(CFbsBitmap* aFbsBitmap,const TDesC& aLibname);
- __declspec(dllexport) virtual ~CFbsBitmapDevice();
- __declspec(dllexport) TInt Resize(const TSize& aSize);
- __declspec(dllexport) virtual void GetScanLine(TDes8& aBuf,const TPoint& aStartPixel,TInt aLength,TDisplayMode iDispMode) const;
- __declspec(dllexport) virtual void GetPixel(TRgb& aColor,const TPoint& aPixel) const;
- __declspec(dllexport) virtual TInt HorizontalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) virtual TInt VerticalPixelsToTwips(TInt aPixels) const;
- __declspec(dllexport) virtual TInt HorizontalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) virtual TInt VerticalTwipsToPixels(TInt aTwips) const;
- __declspec(dllexport) virtual TSize SizeInTwips() const;
- __declspec(dllexport) virtual void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;
- __declspec(dllexport) virtual void SetPalette(CPalette* aPalette);
- __declspec(dllexport) virtual TInt GetPalette(CPalette*& aPalette) const;
- __declspec(dllexport) virtual void DrawingBegin(TBool aAlways);
- __declspec(dllexport) virtual void DrawingEnd(TBool aAlways);
- __declspec(dllexport) TInt SwapWidthAndHeight();
- private:
- CFbsBitmapDevice();
- virtual void SetBits();
- void ConstructL(CFbsBitmap* aFbsBitmap);
- void ConstructL(CFbsBitmap* aFbsBitmap,const TDesC& aLibname);
- private:
- CFbsBitGcBitmap* iFbsBmp;
- };
- #line 1 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.inl" /* stack depth 6 */
- #line 16
- TInt CFbsDevice::CreateContext(CGraphicsContext*& aGc)
- {
- return CreateContext((CFbsBitGc*&)aGc);
- }
- #line 36
- TInt CFbsDevice::GetNearestFontInTwips(CFbsFont*& aFont, const TFontSpec& aFontSpec)
- {
- return GetNearestFontToDesignHeightInTwips(aFont, aFontSpec);
- }
- #line 55
- TInt CFbsDevice::GetNearestFontInPixels(CFbsFont*& aFont, const TFontSpec& aFontSpec)
- {
- return GetNearestFontToDesignHeightInPixels(aFont, aFontSpec);
- }
- #line 74
- TInt CFbsDevice::GetNearestFontToDesignHeightInTwips(CFbsFont*& aFont, const TFontSpec& aFontSpec)
- {
- return GetNearestFontToDesignHeightInTwips((CFont*&)aFont, aFontSpec);
- }
- #line 92
- TInt CFbsDevice::GetNearestFontToDesignHeightInPixels(CFbsFont*& aFont, const TFontSpec& aFontSpec)
- {
- return GetNearestFontToDesignHeightInPixels((CFont*&)aFont, aFontSpec);
- }
- #line 117
- TInt CFbsDevice::GetNearestFontToMaxHeightInTwips(CFbsFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight)
- {
- return GetNearestFontToMaxHeightInTwips((CFont*&)aFont, aFontSpec, aMaxHeight);
- }
- #line 142
- TInt CFbsDevice::GetNearestFontToMaxHeightInPixels(CFbsFont*& aFont, const TFontSpec& aFontSpec, TInt aMaxHeight)
- {
- return GetNearestFontToMaxHeightInPixels((CFont*&)aFont, aFontSpec, aMaxHeight);
- }
- #line 156
- TInt CFbsDevice::GetFontById(CFbsFont*& aFont,TUid aFileId,const TAlgStyle& aStyle)
- {
- return GetFontById((CFont*&)aFont,aFileId,aStyle);
- }
- CGraphicsAccelerator* CFbsDevice::GraphicsAccelerator() const
- {
- return iGraphicsAccelerator;
- }
- CFbsBitGc::TGraphicsOrientation CFbsDevice::Orientation() const
- {
- return iOrientation;
- }
- #line 206 "C:\Symbian\9.1\S60_3rd\epoc32\include\bitdev.h" /* stack depth 5 */
- #line 26 "C:\Symbian\9.1\S60_3rd\epoc32\include\w32std.h" /* stack depth 4 */
- const static TLitC<sizeof(L"Wserv")/2> KWSERVThreadName={sizeof(L"Wserv")/2-1,L"Wserv"} ;
- const static TLitC<sizeof(L"!Windowserver")/2> KWSERVServerName={sizeof(L"!Windowserver")/2-1,L"!Windowserver"} ;
- class RWindowBase;
- class RWindow;
- class RWsBuffer;
- class TSizeMode
- {
- public:
- inline TSizeMode(){}
- inline TSizeMode(TSize& aSize);
- static inline TInt ScaledCord(TInt aOrigin,TInt aScale);
- inline TPoint ScaledOrigin();
- public:
- CFbsBitGc::TGraphicsOrientation iRotation;
- TPoint iOrigin;
- TSize iScreenSize;
- TSize iScreenTwipsSize;
- TUint iAlternativeRotations;
- TRect iPointerCursorArea;
- TSize iScreenScale;
- TDisplayMode iDefaultDisplayMode;
- };
- #line 79
- enum TScreenModeEnforcement
- {
- ESizeEnforcementNone,
- ESizeEnforcementPixelsAndRotation,
- ESizeEnforcementPixelsTwipsAndRotation,
- };
- struct TPixelsAndRotation
- #line 112
- {
- TSize iPixelSize;
- CFbsBitGc::TGraphicsOrientation iRotation;
- };
- struct TPixelsTwipsAndRotation
- #line 128
- {
- TSize iPixelSize;
- TSize iTwipsSize;
- CFbsBitGc::TGraphicsOrientation iRotation;
- };
- #line 144
- enum {
- KLogMessageLength=0x80
- };
- typedef TBuf<KLogMessageLength> TLogMessageText;
- #line 165
- enum
- {
- KPasswordWindowGroupPriority=1000
- };
- #line 185
- enum {
- KOrdinalPositionSwitchToOwningWindow=0x80000000
- };
- #line 201
- enum TCornerType
- {
- EWindowCornerSquare,
- EWindowCorner1,
- EWindowCorner2,
- EWindowCorner3,
- EWindowCorner5,
- EWindowCornerRegion,
- ECornerTypeMask=0xFFFF
- };
- #line 240
- enum TCornerFlags
- {
- EWindowCornerNotTL=0x10000,
- EWindowCornerNotTR=0x20000,
- EWindowCornerNotBL=0x40000,
- EWindowCornerNotBR=0x80000,
- };
- enum TWindowBackupType
- {
- EWindowBackupAreaBehind=0x0001,
- EWindowBackupFullScreen=0x0002,
- };
- #line 281
- enum TEventCode
- {
- EEventNull,
- #line 298
- EEventKey,
- EEventKeyUp,
- EEventKeyDown,
- EEventModifiersChanged,
- #line 325
- EEventPointer,
- EEventPointerEnter,
- EEventPointerExit,
- EEventPointerBufferReady,
- EEventDragDrop,
- EEventFocusLost,
- EEventFocusGained,
- EEventSwitchOn,
- #line 370
- EEventPassword,
- EEventWindowGroupsChanged,
- #line 386
- EEventErrorMessage,
- EEventMessageReady,
- EEventMarkInvalid,
- #line 401
- EEventSwitchOff,
- EEventKeySwitchOff,
- EEventScreenDeviceChanged,
- EEventFocusGroupChanged,
- EEventCaseOpened,
- #line 427
- EEventCaseClosed,
- EEventWindowGroupListChanged,
- EEventWindowVisibilityChanged,
- EEventKeyRepeat=100,
- EEventDirectScreenAccessBegin=200,
- EEventDirectScreenAccessEnd,
- EEventHeartbeatTimerStateChange,
- #line 472
- EEventUser=1000,
- };
- enum THotKey
- {
- EHotKeyEnableLogging,
- EHotKeyDisableLogging,
- EHotKeyStateDump,
- EHotKeyOfDeath,
- EHotKeyShutDown,
- EHotKeyHeapDump,
- EHotKeyIncContrast,
- EHotKeyDecContrast,
- EHotKeyOff,
- EHotKeyBacklightOn,
- EHotKeyBacklightOff,
- EHotKeyBacklightToggle,
- EHotKeyScreenDimension0,
- EHotKeyScreenDimension1,
- EHotKeyScreenDimension2,
- EHotKeyScreenDimension3,
- #line 569
- EHotKeyCycleDisplaySize,
- #line 583
- EHotKeyCycleOrientation,
- EHotKeyIncBrightness,
- EHotKeyDecBrightness,
- EHotKeyCycleFocusScreen,
- EHotKeyFirstKeyType=EHotKeyEnableLogging,
- EHotKeyLastKeyType=EHotKeyCycleFocusScreen,
- };
- enum TPasswordMode
- {
- EPasswordCancel,
- EPasswordNone,
- EPasswordOnceADay,
- EPasswordAlways,
- EPasswordAlwaysTriggerNow,
- EPasswordOnceADayTriggerNow,
- };
- struct TTextCursor
- #line 662
- {
- #line 675
- enum ENamedCursors
- {
- ETypeNone,
- ETypeRectangle,
- ETypeHollowRectangle,
- ETypeFirst=ETypeRectangle,
- ETypeLast=ETypeHollowRectangle,
- ETypeLastBasic = 1000,
- };
- typedef TInt EType;
- enum EFlags
- {
- EFlagNoFlash = 0x00000001,
- EFlagClipHorizontal = 0x00000002,
- EFlagClipVertical = 0x00000004,
- EUserFlags = 0x0000FFFF,
- EFlagClipped = 0x00010000,
- EPrivateFlags = 0xFFFF0000,
- };
- TInt iType;
- TInt iHeight;
- TInt iAscent;
- TInt iWidth;
- TUint iFlags;
- TRgb iColor;
- };
- #line 762
- enum TSpriteFlags
- {
- ESpriteFlash=0x1,
- #line 782
- ESpriteNoChildClip=0x2,
- ESpriteNoShadows=0x4,
- ESpriteNonSystemFlags=0x0000FFFF,
- ESpriteSystemFlags= 0xFFFF0000,
- ESpritePointer=0x10000,
- ESpriteOOM=0x20000,
- ESpriteDisabled=0x40000,
- ESpriteActive=0x80000,
- };
- struct TSpriteMember
- {
- CFbsBitmap *iBitmap;
- #line 832
- CFbsBitmap *iMaskBitmap;
- TBool iInvertMask;
- CGraphicsContext::TDrawMode iDrawMode;
- TPoint iOffset;
- TTimeIntervalMicroSeconds32 iInterval;
- };
- #line 860
- enum TEventControl
- {
- EEventControlAlways,
- EEventControlOnlyWithKeyboardFocus,
- EEventControlOnlyWhenVisible
- };
- #line 882
- enum TPointerFilter
- {
- EPointerFilterEnterExit=0x1,
- EPointerFilterMove=0x2,
- EPointerFilterDrag=0x4,
- EPointerGenerateSimulatedMove=0x8,
- #line 907
- EPointerMoveEvents=EPointerFilterMove|EPointerGenerateSimulatedMove,
- };
- struct TPointerEvent
- {
- enum TType
- {
- EButton1Down,
- EButton1Up,
- EButton2Down,
- EButton2Up,
- EButton3Down,
- EButton3Up,
- EDrag,
- EMove,
- EButtonRepeat,
- ESwitchOn,
- };
- TType iType;
- TUint iModifiers;
- TPoint iPosition;
- TPoint iParentPosition;
- };
- struct TKeyEvent
- #line 989
- {
- TUint iCode;
- TInt iScanCode;
- TUint iModifiers;
- TInt iRepeats;
- };
- struct TModifiersChangedEvent
- {
- TUint iChangedModifiers;
- TUint iModifiers;
- };
- struct TWsVisibilityChangedEvent
- {
- enum
- {
- ECanBeSeen = 0x01,
- ECantBeSeen = 0x02,
- };
- enum
- {
- EPartiallyVisible = 0x01,
- ENotVisible = 0x02,
- EFullyVisible = 0x04,
- };
- TUint iFlags;
- };
- struct TWsErrorMessage
- {
- enum TErrorCategory
- {
- EDrawingRegion,
- EBackLight,
- ELogging,
- EContrast,
- };
- TErrorCategory iErrorCategory;
- TUint iError;
- };
- class TWsRedrawEvent
- #line 1096
- {
- public:
- inline TUint Handle() const;
- inline TRect Rect() const;
- public:
- void SetHandle(TUint aHandle);
- void SetRect(TRect aRect);
- protected:
- TUint iHandle;
- TRect iRect;
- };
- class TWsPriorityKeyEvent
- {
- public:
- inline TKeyEvent *Key() const;
- inline TUint Handle() const;
- inline void SetHandle(TUint aHandle);
- protected:
- TUint iHandle;
- TUint8 iEventData[sizeof(TKeyEvent)];
- };
- class TWsEvent
- #line 1143
- {
- public:
- enum
- {
- EWsEventDataSize=sizeof(TPointerEvent)+8
- };
- public:
- inline TPointerEvent* Pointer() const;
- inline TKeyEvent* Key() const;
- inline TModifiersChangedEvent* ModifiersChanged() const;
- inline TWsVisibilityChangedEvent* VisibilityChanged();
- inline const TWsVisibilityChangedEvent* VisibilityChanged() const;
- inline TWsErrorMessage* ErrorMessage() const;
- inline TUint8* EventData() const;
- inline TInt Type() const;
- inline TUint Handle() const;
- inline TTime Time() const;
- inline void SetType(TInt aType);
- inline void SetHandle(TUint aHandle);
- inline void SetTimeNow();
- inline TInt* Int() const;
- protected:
- TInt iType;
- TUint iHandle;
- TTime iTime;
- TUint8 iEventData[EWsEventDataSize];
- };
- class RWsPointerCursor;
- #line 1192
- enum TPointerCursorMode
- {
- EPointerCursorNone,
- EPointerCursorFixed,
- EPointerCursorNormal,
- EPointerCursorWindow,
- EPointerCursorFirstMode=EPointerCursorNone,
- EPointerCursorLastMode=EPointerCursorWindow,
- };
- #line 1229
- enum TLongCaptureFlags
- {
- ELongCaptureShortEventImmediately=0x01,
- ELongCaptureRepeatEvents=0x02,
- ELongCaptureNormal=ELongCaptureShortEventImmediately,
- ELongCaptureWaitShort=0,
- };
- class TIpcArgs;
- class TReadDescriptorType;
- class TWriteDescriptorType;
- class CWindowGc;
- class MWsClientClass
- {
- friend class CWindowGc;
- public:
- MWsClientClass();
- MWsClientClass(RWsBuffer *aBuffer);
- inline TInt WsHandle() const;
- protected:
- void Write(const TAny *aData, TInt aLength,const TAny *aData2, TInt aLength2,TUint aOpcode) const;
- void Write(const TAny *aBuf, TInt aBufLen,TUint aOpcode) const;
- void Write(TUint aOpcode) const;
- void WriteInt(TInt aInt, TUint aOpcode) const;
- void WriteRect(const TRect &aRect, TUint aOpcode) const;
- void WritePoint(const TPoint &aPoint, TUint aOpcode) const;
- void WriteSize(const TSize &aSize, TUint aOpcode) const;
- TInt WriteReply(TUint aOpcode,const TIpcArgs* aIpcArgs=0 ) const;
- TInt WriteReplyInt(TInt aInt, TUint aOpcode,const TIpcArgs* aIpcArgs=0 ) const;
- TInt WriteReply(const TAny *aBuf, TInt aBufLen,TUint aOpcode,const TIpcArgs* aIpcArgs=0 ) const;
- TInt WriteReply(const TAny *aBuf, TInt aBufLen,const TAny *aBuf2, TInt aBuflen2,TUint aOpcode,const TIpcArgs* aIpcArgs=0 ) const;
- TInt WriteReplyP(const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
- TInt WriteReplyIntP(TInt aInt, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
- TInt WriteReplyP(const TAny *aBuf, TInt aBufLen, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
- TInt WriteReplyP(const TAny *aBuf, TInt aBufLen,const TAny *aBuf2, TInt aBuflen2, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
- TInt WriteReplyByProvidingRemoteReadAccess(const TAny* aBuf, TInt aBufLen,const TReadDescriptorType& aRemoteReadBuffer,TUint aOpcode) const;
- void AddToBitmapArray(const TInt aBitmapHandle)const;
- protected:
- TInt32 iWsHandle;
- RWsBuffer *iBuffer;
- };
- class RWindowTreeNode;
- class CWsScreenDevice;
- class CWsBitmap;
- class RAnimDll;
- class RWsSpriteBase;
- class RDirectScreenAccess;
- class RSoundPlugIn;
- class RWsSession : public MWsClientClass, public RSessionBase
- #line 1339
- {
- friend class RWsBuffer;
- friend class RWindowTreeNode;
- friend class CWsScreenDevice;
- friend class CWsBitmap;
- friend class RAnimDll;
- friend class RWsSpriteBase;
- friend class RDirectScreenAccess;
- friend class RSoundPlugIn;
- public:
- #line 1357
- enum TComputeMode
- {
- EPriorityControlDisabled,
- EPriorityControlComputeOn,
- EPriorityControlComputeOff
- };
- enum {ESystemInfoArraySize=16};
- enum TLoggingCommand
- {
- ELoggingEnable,
- ELoggingDisable,
- ELoggingStatusDump,
- ELoggingHeapDump,
- };
- struct TWindowGroupChainInfo
- {
- TInt iId;
- TInt iParentId;
- };
- struct SSystemInfo
- {
- TInt iInfo[ESystemInfoArraySize];
- };
- enum TCustomTextCursorAlignment
- {
- ECustomTextCursorAlignTop,
- ECustomTextCursorAlignBaseline,
- ECustomTextCursorAlignBottom
- };
- public:
- __declspec(dllexport) RWsSession();
- __declspec(dllexport) TInt Connect();
- __declspec(dllexport) TInt Connect(RFs& aFileServer);
- __declspec(dllexport) void Close();
- __declspec(dllexport) TVersion Version();
- __declspec(dllexport) TInt SetHotKey(THotKey aType, TUint aKeyCode, TUint aModifierMask, TUint aModifier);
- __declspec(dllexport) TInt ClearHotKeys(THotKey aType);
- __declspec(dllexport) TInt RestoreDefaultHotKey(THotKey aType);
- __declspec(dllexport) void EventReady(TRequestStatus *aStat);
- __declspec(dllexport) void EventReadyCancel();
- __declspec(dllexport) void GetEvent(TWsEvent &aEvent);
- __declspec(dllexport) void PurgePointerEvents();
- __declspec(dllexport) void RedrawReady(TRequestStatus *aStat);
- __declspec(dllexport) void RedrawReadyCancel();
- __declspec(dllexport) void GetRedraw(TWsRedrawEvent &aEvent);
- __declspec(dllexport) void PriorityKeyReady(TRequestStatus *aStat);
- __declspec(dllexport) void PriorityKeyReadyCancel();
- __declspec(dllexport) void GetPriorityKey(TWsPriorityKeyEvent &aEvent);
- __declspec(dllexport) void Flush();
- __declspec(dllexport) TBool SetAutoFlush(TBool aState);
- __declspec(dllexport) TInt SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime);
- __declspec(dllexport) void GetKeyboardRepeatRate(TTimeIntervalMicroSeconds32 &aInitialTime, TTimeIntervalMicroSeconds32 &aTime);
- __declspec(dllexport) void GetDoubleClickSettings(TTimeIntervalMicroSeconds32 &aInterval, TInt &aDistance);
- __declspec(dllexport) TInt SetDoubleClick(const TTimeIntervalMicroSeconds32 &aInterval, TInt aDistance);
- __declspec(dllexport) TInt NumWindowGroups() const;
- __declspec(dllexport) TInt WindowGroupList(CArrayFixFlat<TInt> *aWindowList);
- __declspec(dllexport) TInt WindowGroupList(RArray<TWindowGroupChainInfo> * aWindowList);
- __declspec(dllexport) TInt NumWindowGroups(TInt aPriority) const;
- __declspec(dllexport) TInt WindowGroupList(TInt aPriority, CArrayFixFlat<TInt> *aWindowList);
- __declspec(dllexport) TInt WindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo> * aWindowList);
- __declspec(dllexport) TInt GetFocusWindowGroup();
- __declspec(dllexport) TInt GetDefaultOwningWindow();
- __declspec(dllexport) TInt SetWindowGroupOrdinalPosition(TInt aIdentifier, TInt aPosition);
- __declspec(dllexport) TInt GetWindowGroupClientThreadId(TInt aIdentifier, TThreadId &aThreadId);
- __declspec(dllexport) TInt GetWindowGroupHandle(TInt aIdentifier);
- __declspec(dllexport) TInt GetWindowGroupOrdinalPriority(TInt aIdentifier);
- __declspec(dllexport) TInt SendEventToWindowGroup(TInt aIdentifier, const TWsEvent &aEvent);
- __declspec(dllexport) TInt SendEventToAllWindowGroups(const TWsEvent &aEvent);
- __declspec(dllexport) TInt SendEventToAllWindowGroups(TInt aPriority, const TWsEvent &aEvent);
- __declspec(dllexport) TInt SendEventToOneWindowGroupsPerClient(const TWsEvent &aEvent);
- __declspec(dllexport) TInt GetWindowGroupNameFromIdentifier(TInt aIdentifier, TDes &aWindowName);
- __declspec(dllexport) TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,const TDesC& aMatch,TInt aOffset=0);
- __declspec(dllexport) TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,TThreadId aThreadId);
- __declspec(dllexport) TInt SendMessageToWindowGroup(TInt aIdentifier, TUid aUid, const TDesC8 &aParams);
- __declspec(dllexport) TInt SendMessageToAllWindowGroups(TUid aUid, const TDesC8& aParams);
- __declspec(dllexport) TInt SendMessageToAllWindowGroups(TInt aPriority, TUid aUid, const TDesC8& aParams);
- __declspec(dllexport) TInt FetchMessage(TUid &aUid, TPtr8 &aParams, const TWsEvent& aMessageEvent);
- __declspec(dllexport) void SetShadowVector(const TPoint &aVector);
- __declspec(dllexport) TPoint ShadowVector() const;
- __declspec(dllexport) void SetBackgroundColor(TRgb aColor);
- __declspec(dllexport) TRgb GetBackgroundColor() const;
- __declspec(dllexport) TInt SetSystemPointerCursor(const RWsPointerCursor &aPointerCursor,TInt aCursorNumber);