os/graphics/graphicsdeviceinterface/gdi/inc/gdiplatapi.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __GDIPLATAPI_H__
    17 #define __GDIPLATAPI_H__
    18 
    19 #include <e32base.h>
    20 
    21 /*
    22  * Please note that RFontTable API is officially supported from SymTB10.1.
    23  * It is not guaranteed to work in SymTB9.2 or earlier.
    24  * 
    25  * The class keeps the parameter 'aFont', and will use it in Close(). 
    26  * Destructing the CFont object before calling Close() can result in Panic.
    27  * 
    28  * @publishedPartner
    29  */
    30 class RFontTable 
    31     {
    32 public:
    33     IMPORT_C RFontTable();
    34     IMPORT_C TInt Open(CFont& aFont, TUint32 aTag);
    35     IMPORT_C TInt TableLength() const;
    36     IMPORT_C const TUint8* TableContent() const;
    37     IMPORT_C void Close();
    38 private:
    39     TAny* iTableContent;
    40     TInt iLength;
    41     
    42     // need to remember font and table name, to be used in releasing the table
    43     const CFont* iFont;
    44     TUint32 iTag;
    45     };
    46 
    47 
    48 /*
    49  * Please note that RGlyphOutlineIterator API is officially supported 
    50  * from SymTB10.1. It is not guaranteed to work in SymTB9.2 or earlier.
    51  * 
    52  * The class keeps the parameter 'aFont', and will use it in Close(). 
    53  * Destructing the CFont object before calling Close() can result in Panic.
    54  * 
    55  * @publishedPartner
    56  */
    57 class RGlyphOutlineIterator 
    58     {
    59 public:
    60     IMPORT_C RGlyphOutlineIterator();
    61     IMPORT_C TInt Open(CFont& aFont, const TUint* aCodes, TInt aCount, TBool aHinted = EFalse);
    62     IMPORT_C TInt Next();
    63     IMPORT_C const TUint8 *Outline() const;
    64     IMPORT_C TInt OutlineLength() const;
    65     IMPORT_C void Close();
    66 private:
    67     TAny** iOutlines;
    68     TInt* iLengths;
    69     TInt iCursor;
    70     TInt iCount;
    71     
    72     // these information is needed in Close().
    73     const CFont* iFont;
    74     TUint* iCodes;
    75     TBool iHinted;
    76     };
    77 
    78 
    79 #endif __GDIPLATAPI_H__