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