os/graphics/fbs/fontandbitmapserver/tfbs/tfonttableandglyph.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef TFONTTABLEANDGLYPH_H_
    17 #define TFONTTABLEANDGLYPH_H_
    18 
    19 #include <gdi.h>
    20 #include "test/TGraphicsHarness.h"
    21 
    22 class CTFontAndGlyphStep : public CTGraphicsStep
    23     {
    24 public:
    25     CTFontAndGlyphStep();
    26 protected:  
    27     //from CTGraphicsStep
    28     virtual CTGraphicsBase* CreateTestL();
    29     };
    30 
    31 _LIT(KTFontTableAndGlyphStep,"TFontTableAndGlyphOutline");
    32 
    33 
    34 
    35 class CFbsTestForFont: public CFbsFont 
    36     {
    37 public:
    38     CFbsTestForFont():CFbsFont() { }
    39     void Duplicate(TInt aFontHandle) {CFbsFont::Duplicate(aFontHandle);}    
    40     void SetHandle(TInt aHandle) { iHandle = aHandle; }
    41     TInt ClientHandle(){return iHandle;};
    42     ~CFbsTestForFont() { iHandle = 0; }
    43     };
    44 
    45 
    46 
    47 
    48 class CTFontAndGlyph : public CTGraphicsBase
    49     {
    50     
    51 public:
    52     CTFontAndGlyph(CTestStep* aStep);
    53     ~CTFontAndGlyph();
    54 
    55 protected:
    56 //from  CTGraphicsStep
    57     virtual void RunTestCaseL(TInt aCurTestCase);
    58 
    59 private:
    60     void ConstructL();
    61     void CleanEnv();
    62 
    63     void GetHintedGlyphById();
    64     void GetUnHintedGlyphById();
    65     void GetHintedGlyphByWrongId();
    66     void GetGlyphWithNoMem();
    67     void GetFontTable();    
    68     void GetFontTableByWrongTag();
    69     void GetFontTableWithNoMem();
    70     
    71     void TestFbsFontHandleIsZeroForFont();          
    72     void TestFbsFontHandleIsZeroForGlyph();         
    73     void GlyphOutlineIteratorPanics();
    74     void SMPAndWDPSafeTest();
    75     
    76     void OutlinePanics(TInt (*aThreadFun)(TAny*));
    77     void OutlineLengthPanics(TInt (*aThreadFun)(TAny*));
    78        
    79 private:
    80     CFbsBitmap*         iBmp;
    81     CFbsBitmap*         iBmp2;
    82     CFbsBitmapDevice*   iDevice;
    83     CFbsBitmapDevice*   iDevice2;
    84     CFont*       iFont;
    85     CFont*       iFont2;
    86     CFontStore*         iFontStore;
    87     TFontSpec           iFontSpec, iFontSpec2;
    88     TUid                iUid, iUid2;    
    89     };
    90 
    91 
    92 
    93 #endif /* TFONTTABLEANDGLYPH_H_ */