First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Contains the inline functions IsAlphaChannel, QuoteOrBracketPair and IsIgnoredCharacterForLocalisedProcFunc.
21 /** Utility function to check if a display mode has Alpha channel information
22 @param aDisplayMode - the display mode being queried
23 @return ETrue if display mode contains Alpha information.
27 inline TBool IsAlphaChannel(TDisplayMode aDisplayMode)
29 if(aDisplayMode == EColor16MAP || aDisplayMode == EColor16MA)
39 inline TUint QuoteOrBracketPair(TUint code)
41 // given the opening/closing quote or bracket, return the corresponding closing/opening quote or bracket
44 case 0x0022: return 0x0022; // "..."
45 case 0x0027: return 0x0027; // '...'
46 case 0x0028: return 0x0029; // (...)
47 case 0x003c: return 0x003e; // <...>
48 case 0x005b: return 0x005d; // [...]
49 case 0x007b: return 0x007d; // {...}
50 case 0x2018: return 0x2019; // Single quotation marks
51 case 0x201b: return 0x2019; // Single high-reversed-9 quotation mark
52 case 0x201c: return 0x201d; // Double quotation marks
53 case 0x201f: return 0x201d; // Double high-reversed-9 quotation mark
54 case 0x2035: return 0x2032; // Single primes
55 case 0x2036: return 0x2033; // Double primes
56 case 0x2037: return 0x2034; // Triple primes
57 case 0x2039: return 0x203a; // Single left/right-pointing angle quotation marks
58 case 0x2045: return 0x2046; // Square brackets with quill
60 case 0x0029: return 0x0028; // (...)
61 case 0x003e: return 0x003c; // <...>
62 case 0x005d: return 0x005b; // [...]
63 case 0x007d: return 0x007b; // {...}
64 case 0x2019: return 0x2018; // Single quotation marks
65 case 0x201d: return 0x201c; // Double quotation marks
66 case 0x2032: return 0x2035; // Single primes
67 case 0x2033: return 0x2036; // Double primes
68 case 0x2034: return 0x2037; // Triple primes
69 case 0x203a: return 0x2039; // Single left/right-pointing angle quotation marks
70 case 0x2046: return 0x2045; // Square brackets with quill
80 inline TBool IsIgnoredCharacterForLocalisedProcFunc(TChar aCode)
82 TChar::TBdCategory cat = aCode.GetBdCategory();
84 if ((cat == TChar::ELeftToRight ||
85 cat == TChar::ERightToLeft ||
86 cat == TChar::ERightToLeftArabic) && aCode != 0 && aCode != 0xFFFF)
95 #endif /* GDIINLINE_INL */