Start integration branch for Symbian^3 Theme
The theme has been built using Carbide.ui on S60 5th Edition using the N97 plugin
The source code in sf/mw/uiresources/skins/Symbian/srcdata was used to generate the installable
SIS file which lives in the group directory, but the aim here is to build the theme
for delivery in the ROM (preferrably as the default theme).
Running "sbs -b bld.inf -c winscw" should build cleanly and deliver a matched set of files which
then show up in the Settings | Themes | General list. Attempting to install it produces "Theme Corrupted".
/*
* Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: APIs to provide information about a font ID
*
*/
// INCLUDE FILES
//#include <coemain.h>
#include "AknFontIdOffsets.hrh"
#include "AknFontId.h"
// CONSTANTS
// ============================ MEMBER FUNCTIONS ===============================
EXPORT_C TBool TAknFontId::IsEncodedFont(TInt aFontId)
{
const static TUint encodedMask = 0x80000000; // 1 bits starting at bit 31 = 1000.0000.0000.0000.0000.0000.0000.0000
return (aFontId & encodedMask) != 0;
}
TAknFontCategory TAknFontId::ExtractCategoryFromFontId(TInt aFontId)
{
const static TUint categoryMask = 0x0000000F; // 4 bits starting at bit 0 = 0000.0000.0000.0000.0000.0000.0000.1111
TInt category = 0;
if(IsEncodedFont(aFontId))
{
category = (aFontId & categoryMask);
}
return (TAknFontCategory)category;
}
TFontStrokeWeight TAknFontId::ExtractWeightFromFontId(TInt aFontId)
{
const static TUint weightMask = 0x00000010; // 1 bits starting at bit 4 = 0000.0000.0000.0000.0000.0000.0001.0000
TInt weight = 0;
if(IsEncodedFont(aFontId))
{
weight = (aFontId & weightMask) >> 4;
}
return (TFontStrokeWeight)weight;
}
TFontPosture TAknFontId::ExtractPostureFromFontId(TInt aFontId)
{
const static TUint postureMask = 0x00000020; // 1 bits starting at bit 5 = 0000.0000.0000.0000.0000.0000.0010.0000
TInt posture = 0;
if(IsEncodedFont(aFontId))
{
posture = (aFontId & postureMask) >> 5;
}
return (TFontPosture)posture;
}
TBool TAknFontId::ExtractOutlineFromFontId(TInt aFontId)
{
const static TUint outlineMask = 0x00000040; // 1 bits starting at bit 6 = 0000.0000.0000.0000.0000.0000.0100.0000
TInt outline = 0;
if(IsEncodedFont(aFontId))
{
outline = (aFontId & outlineMask) >> 6;
}
return (TBool)outline;
}
TInt TAknFontId::ExtractHeightFromFontId(TInt aFontId)
{
const static TUint heightMask = 0x7FE00000; // 10 bits starting at bit 21 = 0111.1111.1110.0000.0000.0000.0000.0000
TInt height = 0;
if(IsEncodedFont(aFontId))
{
height = (aFontId & heightMask) >> 21;
}
return height;
}
EXPORT_C TInt TAknFontId::FontIdForStartupNormalFont()
{
return 0x81000001; // Encodes a primary font with small, fixed size. Used for CEikonEnv::iNormalFont before a layout is available
}
// End of File