fbs/fontandbitmapserver/inc/FBS.H
branchRCL_3
changeset 163 bbf46f59e123
parent 150 57c618273d5c
child 164 25ffed67c7ef
equal deleted inserted replaced
150:57c618273d5c 163:bbf46f59e123
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    38 @publishedAll
    38 @publishedAll
    39 @released
    39 @released
    40 */
    40 */
    41 #define SYMBIAN_FBSERV_V2
    41 #define SYMBIAN_FBSERV_V2
    42 
    42 
       
    43 /**
       
    44 Indicates version of FBS that provides the CFbsFont extension 
       
    45 interfaces RFbsGlyphDataIterator for using hardware glyphs, and
       
    46 RFbsGlyphMetricsArray.
       
    47 @publishedAll
       
    48 @prototype
       
    49 */
       
    50 //#define SYMBIAN_FBSERV_GLYPHDATA
       
    51 
    43 /** 
    52 /** 
    44 Character width and adjustment information. 
    53 Character width and adjustment information. 
    45 @publishedAll
    54 @publishedAll
    46 @released
    55 @released
    47 */
    56 */
    59 	};
    68 	};
    60 
    69 
    61 class CFbsRalCache;
    70 class CFbsRalCache;
    62 class CFbsSessionHelper;
    71 class CFbsSessionHelper;
    63 class CFbsRasterizer;
    72 class CFbsRasterizer;
       
    73 class TGlyphCacheMetrics;
       
    74 class TFbsOogmMessage;
    64 
    75 
    65 /** 
    76 /** 
    66 A session with the font and bitmap server. 
    77 A session with the font and bitmap server. 
    67 @publishedAll 
    78 @publishedAll 
    68 @released
    79 @released
    99 	HBufC8* GetScanLineBuffer();
   110 	HBufC8* GetScanLineBuffer();
   100 	void SetCallBackPtr(TInt* aBitmapHandle)const;
   111 	void SetCallBackPtr(TInt* aBitmapHandle)const;
   101 	HBufC8* GetDecompressionBuffer(TInt aSize);
   112 	HBufC8* GetDecompressionBuffer(TInt aSize);
   102 	HBufC8* GetExtraBuffer(TInt aSize);
   113 	HBufC8* GetExtraBuffer(TInt aSize);
   103     TInt ServerSessionHandle() const;
   114     TInt ServerSessionHandle() const;
       
   115     IMPORT_C TInt GetGlyphCacheMetrics(TGlyphCacheMetrics& aGlyphCacheMetrics);
       
   116     IMPORT_C TInt ConveyOogmMessage( TFbsOogmMessage& aOogmMessage );
       
   117 
   104 public:
   118 public:
   105 	/** WARNING: For internal use ONLY.  Compatibility is not guaranteed in future releases.	 
   119 	/** WARNING: For internal use ONLY.  Compatibility is not guaranteed in future releases.	 
   106 	Used for testing server side out of memory failures.	
   120 	Used for testing server side out of memory failures.	
   107 	@test
   121 	@test
   108 	*/
   122 	*/
   127 	HBufC8* iDecompressionBuffer;
   141 	HBufC8* iDecompressionBuffer;
   128 	HBufC8* iScanLineBuffer;	
   142 	HBufC8* iScanLineBuffer;	
   129 	TUint32* iSpare;
   143 	TUint32* iSpare;
   130 	};
   144 	};
   131 
   145 
       
   146 /** forward declaration of some private classes. */
       
   147 class TGetFontTableParam;
       
   148 class TReleaseGlyphOutlineParam;
       
   149 class TGetGlyphOutlineParam;
       
   150 
       
   151 
   132 /** 
   152 /** 
   133 Font managed by the font and bitmap server.
   153 Font managed by the font and bitmap server.
   134 CFbsFont objects are used for screen and off-screen bitmap fonts. They are 
   154 CFbsFont objects are used for screen and off-screen bitmap fonts. They are 
   135 usually obtained by calls to the CBitmapDevice::GetNearestFontInPixels() and 
   155 usually obtained by calls to the CBitmapDevice::GetNearestFontInPixels() and 
   136 MGraphicsDeviceMap::GetNearestFontInTwips() functions.
   156 MGraphicsDeviceMap::GetNearestFontInTwips() functions.
   141 @released
   161 @released
   142 */
   162 */
   143 class CFbsFont: public CFont
   163 class CFbsFont: public CFont
   144 	{
   164 	{
   145 	friend class CFbsTypefaceStore;
   165 	friend class CFbsTypefaceStore;
       
   166 	friend class RFbsGlyphDataIterator;
       
   167 	friend class RFbsGlyphMetricsArray;
   146 
   168 
   147 private:
   169 private:
   148 	// From CFont
   170 	// From CFont
   149 	/** Gets the font's UID. 
   171 	/** Gets the font's UID. 
   150 	All CFbsFont objects have the constant UID KCFbsFontUid. It is safe to cast 
   172 	All CFbsFont objects have the constant UID KCFbsFontUid. It is safe to cast 
   191 	
   213 	
   192 private:
   214 private:
   193 	TInt DoFontGetShaping(TFontShapeFunctionParameters* aParam) const;
   215 	TInt DoFontGetShaping(TFontShapeFunctionParameters* aParam) const;
   194 	TInt DoFontDeleteShaping(TFontShapeDeleteFunctionParameters* aParam) const;
   216 	TInt DoFontDeleteShaping(TFontShapeDeleteFunctionParameters* aParam) const;
   195 	TInt DoTextWidthInPixels(const TDesC& aText,const TMeasureTextInput* aParam) const;
   217 	TInt DoTextWidthInPixels(const TDesC& aText,const TMeasureTextInput* aParam) const;
       
   218 	TInt DoGetFontTable(TGetFontTableParam * aParam) const;
       
   219 	TInt DoGetGlyphOutline(TGetGlyphOutlineParam *aParam) const;
       
   220 	TInt DoReleaseGlyphOutline(TReleaseGlyphOutlineParam *aParam) const;
       
   221 	TInt DoReleaseFontTable(TUint32 *aParam) const;
   196 
   222 
   197 protected:
   223 protected:
   198 	RFbsSession* iFbs;
   224 	RFbsSession* iFbs;
   199 	CBitmapFont* iAddressPointer;
   225 	CBitmapFont* iAddressPointer;
   200 	TInt iHandle;
   226 	TInt iHandle;
   201 	TInt iServerHandle;
   227     TInt iServerHandle;
   202 	};
   228 	};
   203 
   229 
   204 /**
   230 /**
   205 An interface for initialization of extended bitmaps. By implementing this interface, 
   231 An interface for initialization of extended bitmaps. By implementing this interface, 
   206 creators of extended bitmaps can set the contents of an extended bitmap without 
   232 creators of extended bitmaps can set the contents of an extended bitmap without 
   495 private:
   521 private:
   496 	TColor256Util* iColor256Util;
   522 	TColor256Util* iColor256Util;
   497 	CDitherColor256* iDither;
   523 	CDitherColor256* iDither;
   498 	};
   524 	};
   499 
   525 
   500 #endif
   526 
       
   527 /**
       
   528  A class encapsulating the current state of the glyph cache.
       
   529 
       
   530  @publishedAll
       
   531  @released
       
   532 */
       
   533 class TGlyphCacheMetrics
       
   534     {
       
   535 public:
       
   536     TInt iMaxCacheSizeInBytes;
       
   537     TInt iMaxCacheSizeHigh;
       
   538     TInt iMaxCacheSizeLow;
       
   539     TInt iCacheSizeInBytes;
       
   540     TBool iGpuCacheSizeLimitIsMax;
       
   541     };
       
   542 
       
   543 #endif // __FBS_H__
       
   544