author | Tom Pritchard <tomp@symbian.org> |
Thu, 12 Aug 2010 13:20:01 +0100 | |
changeset 21 | ab1d0f4d2aa4 |
parent 0 | bb4b476bbb96 |
permissions | -rw-r--r-- |
0
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
1 |
/* |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
2 |
display_updater.h |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
3 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
4 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
5 |
All rights reserved. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
6 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
7 |
This program and the accompanying materials are made available |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
8 |
under the terms of the Eclipse Public License v1.0 which accompanies |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
9 |
this distribution, and is available at |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
10 |
http://www.eclipse.org/legal/epl-v10.html |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
11 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
12 |
Initial Contributors: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
13 |
Nokia Corporation - initial contribution. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
14 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
15 |
Contributors: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
16 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
17 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
18 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
19 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
20 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
21 |
@mainpage |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
22 |
@section intro_sec Introduction |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
23 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
24 |
<p>This is adaptation component which hides hw-drivers from users. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
25 |
Because this is adaptation API, and user is also adaptation, this |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
26 |
API is not binary compatible, only source compatible. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
27 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
28 |
Following tags definities the category where method/member/enum causes: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
29 |
[@Update] Display updating |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
30 |
[@Rotate] Display rotation |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
31 |
[@Overlay] Display Hw made overlay/composition |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
32 |
[@Variation] Dynamic variation of display Hw |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
33 |
</p> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
34 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
35 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
36 |
/** @file |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
37 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
38 |
API for updating and controlling display. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
39 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
40 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
41 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
42 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
43 |
#ifndef __DISPLAY_UPDATER_H__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
44 |
#define __DISPLAY_UPDATER_H__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
45 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
46 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
47 |
//- Include Files ---------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
48 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
49 |
#ifndef __KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
50 |
#include <e32base.h> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
51 |
#else |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
52 |
#include <e32cmn.h> |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
53 |
#endif //__KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
54 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
55 |
//- Enumerations and consts ------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
56 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
57 |
//API version number |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
58 |
// 3: ARGB4444 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
59 |
// 2: Pre-multiplied alpha modes |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
60 |
// 1: First version |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
61 |
const TUint KDisplayUpdaterApiVersion = 3; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
62 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
63 |
/** Display rotation */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
64 |
enum TDispRotation |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
65 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
66 |
EInvalidDeg = 0x0000, /**< Initialisation value, don't use */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
67 |
ERotate0Deg = ( 1 << 0 ),/**< No rotation */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
68 |
ERotate90Deg = ( 1 << 1 ),/**< 90 degree */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
69 |
ERotate180Deg = ( 1 << 2 ),/**< 180 degree */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
70 |
ERotate270Deg = ( 1 << 3 ),/**< 270 degree */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
71 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
72 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
73 |
/** Color formats */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
74 |
const TUint32 KDispLittleEndian = 0x0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
75 |
const TUint32 KDispBigEndian = 0x1; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
76 |
enum TDisplayPixelFormats |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
77 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
78 |
EPixelFormatInvalid = 0, /**< Initialisation value, don't use */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
79 |
EPixelFormatXRgb8888Le = ( 1 << 1 ) | KDispLittleEndian, /**< = EColor16MU */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
80 |
EPixelFormatXRgb8888Be = ( 1 << 1 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
81 |
EPixelFormatARgb8888Le = ( 1 << 2 ) | KDispLittleEndian, /**< = EColor16MA */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
82 |
EPixelFormatARgb8888Be = ( 1 << 2 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
83 |
EPixelFormatARgb8888LeP = ( 1 << 3 ) | KDispLittleEndian, /**< = EColor16MAP, Pre-multiplied */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
84 |
EPixelFormatARgb8888BeP = ( 1 << 3 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
85 |
EPixelFormatRgb888Le = ( 1 << 4 ) | KDispLittleEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
86 |
EPixelFormatRgb888Be = ( 1 << 4 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
87 |
EPixelFormatRgb565Le = ( 1 << 5 ) | KDispLittleEndian, /**< = EColor64K */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
88 |
EPixelFormatRgb565Be = ( 1 << 5 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
89 |
EPixelFormatARgb1555Le = ( 1 << 6 ) | KDispLittleEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
90 |
EPixelFormatARgb1555Be = ( 1 << 6 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
91 |
EPixelFormatARgb1555LeP = ( 1 << 7 ) | KDispLittleEndian, /**< Pre-multiplied */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
92 |
EPixelFormatARgb1555BeP = ( 1 << 7 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
93 |
EPixelFormatARgb4444Le = ( 1 << 8 ) | KDispLittleEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
94 |
EPixelFormatARgb4444Be = ( 1 << 8 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
95 |
EPixelFormatARgb4444LeP = ( 1 << 9 ) | KDispLittleEndian, /**< Pre-multiplied */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
96 |
EPixelFormatARgb4444BeP = ( 1 << 9 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
97 |
EPixelFormatYCbCr422Le = ( 1 << 10 ) | KDispLittleEndian, /** 422 is assumed to be interleaved (as pixel pairs) */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
98 |
EPixelFormatYCbCr422Be = ( 1 << 10 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
99 |
EPixelFormatYCbCr420Le = ( 1 << 11 ) | KDispLittleEndian, /** 420 is assumed to be planar */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
100 |
EPixelFormatYCbCr420Be = ( 1 << 11 ) | KDispBigEndian, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
101 |
EPixelFormatPlatform = ( 1 << 12 ), /**< Non standard, platform specific format */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
102 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
103 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
104 |
/** YCbCr standard bit mask */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
105 |
enum TDisplayYCbCrBitMask |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
106 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
107 |
EYCbCrBitMaskInvalid = 0x0000, /**< Can be set when RGB */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
108 |
EYCbCrBitMaskFullRange = ( 1 << 0 ),/**< Full range 0-255 */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
109 |
EYCbCrBitMaskLimitedRange = ( 1 << 1 ),/**< Limited range 16-235 */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
110 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
111 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
112 |
/** Colorspace */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
113 |
enum TDisplayColorSpace |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
114 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
115 |
EColorSpaceNone = 0x0000, /**< Initialisation value, don't use */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
116 |
EColorSpaceSRgb = ( 1 << 0 ), /**< sRGB */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
117 |
EColorSpaceLinear = ( 1 << 1 ), /**< Linear color space */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
118 |
EColorSpaceFixedDisplayLinear = ( 1 << 2 ), /**< Fixed display color space - Buffer pixels are linearised RGB for Fixed colorspace */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
119 |
EColorSpaceFixedDisplay = ( 1 << 3 ), /**< Fixed display color space, one fixed colorspace, case-by-case */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
120 |
EColorSpaceColorCoordinates = ( 1 << 4 ), /**< Free color coordinates definition. @see TColorCoordinates */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
121 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
122 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
123 |
/** Advanced feature bit masks - Used for capability query */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
124 |
enum TDisplayFeatures |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
125 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
126 |
EFeatureNone = 0x0000, /**< Initialisation value */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
127 |
EFeatureScaling = ( 1 << 0 ), /**< Scaling */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
128 |
EFeatureRotation = ( 1 << 1 ), /**< 90, 180 or 270 rotation */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
129 |
EFeatureOverlay = ( 1 << 2 ), /**< Overlay without colorkey and alpha */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
130 |
EFeatureYCbCr = ( 1 << 3 ), /**< YCbCr support */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
131 |
EFeatureYCbCrPlanar = ( 1 << 4 ), /**< YCbCr planar */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
132 |
EFeatureAlphaBlend = ( 1 << 5 ), /**< Overlay with alpha */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
133 |
EFeatureInternalBuf = ( 1 << 6 ), /**< Internal buffers (display driver's own) */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
134 |
EFeatureExternalBuf = ( 1 << 7 ), /**< External buffers */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
135 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
136 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
137 |
/** Buffer purpose - TODO are these enough */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
138 |
enum TBufferPurpose |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
139 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
140 |
EPurposeNone = 0x0000, /**< Initialisation value, don't use */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
141 |
EPurposeUi = ( 1 << 0 ), /**< UI graphics */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
142 |
EPurposeOpenGlVg = ( 1 << 1 ), /**< OpenGl|ES or OpenVg. Game or pure graphics, not UI. */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
143 |
EPurposeVideo = ( 1 << 2 ), /**< Video playback */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
144 |
EPurposeCamera = ( 1 << 3 ), /**< Camera viewfinder */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
145 |
EPurposeImage = ( 1 << 4 ), /**< Still image */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
146 |
EPurposeCompose = ( 1 << 5 ), /**< Composition destination buffer */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
147 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
148 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
149 |
//- Structs ----------------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
150 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
151 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
152 |
[@Variation] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
153 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
154 |
CIE 1931 color space coordinates. To be defined if EColorSpaceColorCoordinates is used. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
155 |
Fixed point is 10th bit. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
156 |
E.g. If iRed.iY=625, it should be divided by 1024 (2^10) for getting real value 0.61035... |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
157 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
158 |
class TColorCoordinates |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
159 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
160 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
161 |
TColorCoordinates():iRed(0,0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
162 |
iGreen(0,0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
163 |
iBlue(0,0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
164 |
iWhite(0,0) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
165 |
{} |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
166 |
///Red chromaticity coordinates (X,Y) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
167 |
TPoint iRed; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
168 |
///Green chromaticity coordinates |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
169 |
TPoint iGreen; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
170 |
///Blue chromaticity coordinates |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
171 |
TPoint iBlue; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
172 |
///White chromaticity coordinates |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
173 |
TPoint iWhite; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
174 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
175 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
176 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
177 |
[@Update] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
178 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
179 |
Describes display buffer informations. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
180 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
181 |
One of four to be set, iLinearAddress, iPhysicalAddress, iBufferAdaptationId or iBufferRChunkHandle. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
182 |
It means that if iBufferAdaptationId is only set member, adaptation to have rights and access to use |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
183 |
only that ID for doing update, and e.g. addresses are not needed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
184 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
185 |
class TBufferInfo |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
186 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
187 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
188 |
TBufferInfo():iLinearAddress(NULL), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
189 |
iPhysicalAddress(NULL), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
190 |
iBufferAdaptationId(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
191 |
iBufferRChunkHandle(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
192 |
iStride(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
193 |
iOffsetToY(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
194 |
iOffsetToCb(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
195 |
iOffsetToCr(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
196 |
iBufferWidth(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
197 |
iBufferHeight(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
198 |
iBufferFormat(EPixelFormatInvalid), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
199 |
iYCbCrBitMask(EYCbCrBitMaskInvalid), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
200 |
iColorSpace(EColorSpaceSRgb), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
201 |
iColorCoordinates() |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
202 |
{} |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
203 |
///Linear address to begin of the pixels |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
204 |
TAny* iLinearAddress; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
205 |
///Physical address to begin of the pixels. If missing, physical address will be converted from iLinearAddress |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
206 |
TUint32 iPhysicalAddress; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
207 |
///Buffer ID for adaptation internal use |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
208 |
TUint32 iBufferAdaptationId; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
209 |
///RChunk handle ID for this buffer (RHandleBase::Handle()). Can be set 0 if not needed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
210 |
TInt iBufferRChunkHandle; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
211 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
212 |
///The color buffer stride in bytes. With 420 planar, this tells one line Y-components stride. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
213 |
TUint16 iStride; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
214 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
215 |
///Offset from iLinearAddress to Y-components (needed if planar, otherwise can be set 0) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
216 |
TUint32 iOffsetToY; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
217 |
///Offset from iLinearAddress to Cb-components (needed if planar, otherwise can be set 0) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
218 |
TUint32 iOffsetToCb; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
219 |
///Offset from iLinearAddress to Cr-components (needed if planar, otherwise can be set 0) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
220 |
TUint32 iOffsetToCr; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
221 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
222 |
///Buffer width in pixels |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
223 |
TInt16 iBufferWidth; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
224 |
///Buffer height in pixels |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
225 |
TInt16 iBufferHeight; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
226 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
227 |
///Pixel format |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
228 |
TDisplayPixelFormats iBufferFormat; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
229 |
///Full/limited range. Required if YCbCr defined in iBufferFormat |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
230 |
TDisplayYCbCrBitMask iYCbCrBitMask; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
231 |
///Buffer colorspace, most used is EColorSpaceSRgb |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
232 |
TDisplayColorSpace iColorSpace; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
233 |
///Buffer colorspace, this is used if iColorSpace = EColorSpaceColorCoordinates |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
234 |
TColorCoordinates iColorCoordinates; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
235 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
236 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
237 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
238 |
[@Update][@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
239 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
240 |
Describes display scaling, cropping, etc. view settings |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
241 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
242 |
class TDisplayViewSettings |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
243 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
244 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
245 |
TDisplayViewSettings():iPerLayerAlphaValue(0xFF), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
246 |
iMainBackgroundColor(0x000000),//Black |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
247 |
#ifndef __KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
248 |
iSourceScissor(0,0,0,0),//startCol, startRow, lastCol, lastRow |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
249 |
iDestinationScaledRect(0,0,0,0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
250 |
#endif //__KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
251 |
iLayerRotation(EInvalidDeg), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
252 |
iUsageHint(EPurposeNone), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
253 |
iTearingFree(EFalse) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
254 |
{} |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
255 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
256 |
///Per layer alpha if supported, 0x00-0xFF |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
257 |
TUint8 iPerLayerAlphaValue; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
258 |
///RGB888 background color. Farest layer in the view. Valid only when layer number 0. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
259 |
TUint32 iMainBackgroundColor; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
260 |
#ifndef __KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
261 |
/** Inputcrop (viewport) from source buffer. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
262 |
To be <= than iBufferWidth&iBufferHeight */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
263 |
TRect iSourceScissor; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
264 |
/** This is scaled resolution to destination (to display) (extent). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
265 |
Set to same with iSourceScissor if scaling is disabled. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
266 |
To be <= than display panel native resolution and are given in current |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
267 |
global orientation resolution (SetRotation()). */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
268 |
TRect iDestinationScaledRect; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
269 |
#endif //__KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
270 |
/** Per layer orientation. This to be given compared to global orientation (SetRotation()). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
271 |
If global orienation is ERotate90Deg and this has ERotate270Deg -> no rotation. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
272 |
Sequence for all view operations is: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
273 |
iSourceScissor->SetRotation()->iLayerRotation->iDestinationScaledRect */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
274 |
TDispRotation iLayerRotation; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
275 |
///Bit mask - Purpose of buffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
276 |
TBufferPurpose iUsageHint; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
277 |
///ETrue when tearing free needed. Remember that TE-logic increases power consumption. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
278 |
TBool iTearingFree; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
279 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
280 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
281 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
282 |
[@Variation] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
283 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
284 |
Describes the display driver capabilities and properties |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
285 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
286 |
class TDisplayDrvInfo |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
287 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
288 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
289 |
inline TDisplayDrvInfo():iPanelResolution(), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
290 |
iPanelRefreshRateHz(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
291 |
iNumberOfBuffers(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
292 |
iSupportedFormats(EPixelFormatInvalid), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
293 |
iPixelAspectRNumerator(1),//Square pixel by default (1/1) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
294 |
iPixelAspectRDenominator(1), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
295 |
iSupportedRotations(EInvalidDeg), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
296 |
iSupportedPerLayerRotations(EInvalidDeg), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
297 |
iRotationWorksWithTheseFeatures(EFeatureNone), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
298 |
iScalingWorksWithTheseFeatures(EFeatureNone), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
299 |
iScalingMinDenominator(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
300 |
iScalingMaxNumerator(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
301 |
iNumberOfOverlays(0), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
302 |
iDestinationColorSpace(EColorSpaceNone), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
303 |
iDestinationColorCoordinates(), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
304 |
iGivenBufferWorksAsFrameBuffer(EFalse), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
305 |
iVariableResolution(EFalse), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
306 |
iOverscanToBeDrawn(EFalse), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
307 |
iDisplayOn(EFalse) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
308 |
{} |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
309 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
310 |
///Display panel resolution. Parameters will not swap when rotated. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
311 |
TSize iPanelResolution; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
312 |
///Display panel twips. 0 when unknown (TV). Parameters will not swap when rotated. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
313 |
TSize iPanelTwips; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
314 |
///Display panel refresh rate. E.g. if 60Hz, then this is 6000 (iPanelRefreshRateHz / 100). 29.97Hz = 2997. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
315 |
TUint iPanelRefreshRateHz; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
316 |
///How many composition buffers (internal) are reserved for display. @see GetCompositionBuffer(). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
317 |
TUint8 iNumberOfBuffers; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
318 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
319 |
///Bit mask of supported pixel formats for external buffers |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
320 |
TDisplayPixelFormats iSupportedFormats; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
321 |
///Display pixel aspect ratio numerator (AR=iPixelAspectRNumerator/iPixelAspectRDenominator) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
322 |
TUint16 iPixelAspectRNumerator; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
323 |
///Display pixel aspect ratio denominator (@see iPixelAspectRNumerator) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
324 |
TUint16 iPixelAspectRDenominator; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
325 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
326 |
///Bit mask of supported global rotations (SetRotation()) [@Rotate] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
327 |
TDispRotation iSupportedRotations; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
328 |
///Bit mask of supported per layer rotations (TDisplayViewSettings::iLayerRotation) [@Rotate] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
329 |
TDispRotation iSupportedPerLayerRotations; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
330 |
///Bitmask for features when display driver can do rotation [@Rotate] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
331 |
TDisplayFeatures iRotationWorksWithTheseFeatures; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
332 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
333 |
///Bitmask for features when display driver can do scaling |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
334 |
TDisplayFeatures iScalingWorksWithTheseFeatures; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
335 |
///Minimum scaling factor. E.g. if 1/2x is min, then this is 200 (100 / iScalingMinDenominator). 1x = 100. 0xFFFF = infinity |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
336 |
TUint16 iScalingMinDenominator; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
337 |
///Maximum scaling factor. E.g. if 2.5x is max, then this is 250 (iScalingMaxNumerator / 100). 1x = 100. 0xFFFF = infinity |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
338 |
TUint16 iScalingMaxNumerator; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
339 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
340 |
///Value how many layers can be set to display driver (overlays). Minimum is 0, if overlays are not supported. [@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
341 |
TUint8 iNumberOfOverlays; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
342 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
343 |
/** Destination display colorspace - buffers can be delivered in these formats. Bit mask. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
344 |
If EColorSpaceColorCoordinates is set, then display driver has capability to convert |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
345 |
input (TBufferInfo.iColorCoordinates/iColorSpace) to needed space (iDestinationColorCoordinates), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
346 |
otherwise GCE has this responsibility */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
347 |
TDisplayColorSpace iDestinationColorSpace; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
348 |
///Destination display colorspace coordinates, valid if non-zeroes. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
349 |
TColorCoordinates iDestinationColorCoordinates; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
350 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
351 |
///If ETrue, given buffers works as frame buffer and display panel gets refresh from that (video display) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
352 |
TBool iGivenBufferWorksAsFrameBuffer; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
353 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
354 |
///If ETrue, display supports many resolutions and those can be set dynamically |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
355 |
TBool iVariableResolution; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
356 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
357 |
///ETrue when composition should draw overscan (inc. position) to destination buffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
358 |
TBool iOverscanToBeDrawn; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
359 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
360 |
///ETrue when display panel is ON, EFalse when OFF |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
361 |
TBool iDisplayOn; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
362 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
363 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
364 |
///Typedef for layer order, like a z-order. 0 is farest, and bigger is more nearest. @see TDisplayDrvInfo.iNumberOfLayers [@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
365 |
typedef TUint TLayerNumber; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
366 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
367 |
//- Macros ------------------------------------------------------------------ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
368 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
369 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
370 |
//- External Data ----------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
371 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
372 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
373 |
//- Variables --------------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
374 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
375 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
376 |
//- Forward Declarations ---------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
377 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
378 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
379 |
//- Class Definitions ------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
380 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
381 |
#ifndef __KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
382 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
383 |
/** |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
384 |
Adaptation API for display updating purpose |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
385 |
*/ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
386 |
class CDisplayUpdater : public CBase |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
387 |
{ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
388 |
public: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
389 |
/** [@Variation] Gets API version number. Compare this to KDisplayUpdaterApiVersion, must match. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
390 |
@return KDisplayUpdaterApiVersion which is used for display driver */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
391 |
IMPORT_C static TUint ApiVersion(); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
392 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
393 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
394 |
/** Creates object. Only one client can be registered (hold the object) for one display. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
395 |
@param aDisplayNumber Which display is connected, primary display is 0 |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
396 |
@return new CDisplayUpdater, NULL if there is error, otherwise CDisplayUpdater */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
397 |
IMPORT_C static CDisplayUpdater* NewL(TInt aDisplayNumber); |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
398 |
///Object destructor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
399 |
virtual ~CDisplayUpdater(){}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
400 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
401 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
402 |
/** [@Variation] Returns API provided properties to parameter |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
403 |
@param aInfo Supported features, filled by driver */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
404 |
virtual void GetDisplayProperties(TDisplayDrvInfo& aInfo) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
405 |
/** [@Variation] Listener for changing display configuration. When this listener is completed, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
406 |
GetDisplayProperties and needed actions to be executed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
407 |
@see GetDisplayProperties |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
408 |
@see CancelConfigurationListener |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
409 |
@param aCompletedWhenReady Will be completed when configuration is changed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
410 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
411 |
virtual TInt ConfigurationListener(TRequestStatus& aCompletedWhenReady) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
412 |
/** [@Variation] Cancels pending of ConfigurationListener. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
413 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
414 |
virtual TInt CancelConfigurationListener() = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
415 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
416 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
417 |
/** [@Update] Get method for DSA UI-buffer. This is same buffer what can be fetched from HAL. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
418 |
This call may allocate DSA-buffer, so to be called only when DSA-buffer is needed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
419 |
@see FreeDsaBuffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
420 |
@param aBuffer Buffer settings, filled by driver |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
421 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
422 |
virtual TInt GetDsaBuffer(TBufferInfo& aBuffer) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
423 |
/** [@Update] This will be called when DSA buffer is not anymore needed/used by compositor. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
424 |
After this call, DSA-buffer memory may be de-allocated. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
425 |
@see GetDsaBuffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
426 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
427 |
virtual TInt FreeDsaBuffer() = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
428 |
/** [@Update] Get method for composition engine's destination buffer. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
429 |
Needed if configuration has display driver allocated composition buffers. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
430 |
@see TDisplayDrvInfo.iNumberOfBuffers |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
431 |
@see FreeCompositionBuffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
432 |
@param aBufferNumber Buffer number which to be get (first is 0, @see TDisplayDrvInfo.iNumberOfBuffers) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
433 |
@param aBuffer Returned buffer info for caller |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
434 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
435 |
virtual TInt GetCompositionBuffer(TUint32 aBufferNumber, TBufferInfo& aBuffer) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
436 |
/** [@Update] This will be called when composition buffer is not anymore needed/used by compositor, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
437 |
then the display is disconnected or shut down. Used when display driver allocated composition buffers |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
438 |
are used. After this call, the buffer may be de-allocated. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
439 |
@see GetCompositionBuffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
440 |
@param aBufferNumber Buffer number which to be freed |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
441 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
442 |
virtual TInt FreeCompositionBuffer(TUint32 aBufferNumber) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
443 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
444 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
445 |
/** [@Update] If external buffers are used (display driver does not own), |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
446 |
those must be bound in here before use. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
447 |
@param aBuffer New buffer for display driver knowledge |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
448 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
449 |
virtual TInt BindExternalBuffer(const TBufferInfo& aBuffer) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
450 |
/** [@Update] Unbinds buffer if that is not wanted use anymore for displaying use. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
451 |
Buffer should not be visible on screen when unbinding happens. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
452 |
@pre Buffer is not "on screen" anymore, and display driver does not work with that. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
453 |
@pre BindExternalBuffer is called for this buffer, without errors. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
454 |
@param aBuffer Buffer to be removed from display driver knowledge |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
455 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
456 |
virtual TInt UnbindExternalBuffer(const TBufferInfo& aBuffer) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
457 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
458 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
459 |
/** [@Update][@Overlay] Constructs view on the display. Layer parameter tells which layer is set, and layernumber |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
460 |
means z-order of view. 0 to be always defined before Flush. Layer 0 is on background of layer 1. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
461 |
If is needed to remove e.g. layer 1, then replace default (clear) TDisplayViewSettings object. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
462 |
@param aLayer Z-order where layer to be set. 0 must be always defined. [@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
463 |
@param aViewSettings This layer view information, including changed areas [@Update at least for layer 0][@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
464 |
@param aBuffer Buffer which matching to this layer settings [@Update at least for layer 0][@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
465 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
466 |
virtual TInt SetView(TLayerNumber aLayer, const TDisplayViewSettings& aViewSettings, const TBufferInfo& aBuffer) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
467 |
/** [@Update] Changes TBufferInfo settings of layer. Settings will be taken use in next flush. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
468 |
@param aLayer Z-order where layer to be set. 0 must be always defined. [@Overlay] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
469 |
@param aLatestChangedRect Changed area rectangle. Set fullscreen if disabled. Driver can ignore these. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
470 |
To be smaller than iBufferWidth&iBufferHeight, and 0,0,0,0 means full screen [@Update] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
471 |
@param aBuffer New buffer which matching to this layer settings [@Update] |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
472 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
473 |
virtual TInt SetBuffer(TLayerNumber aLayer, const TRect& aLatestChangedRect, const TBufferInfo& aBuffer) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
474 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
475 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
476 |
/** [@Update] Flushes current view to display. Asynchronous method. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
477 |
TDisplayDrvInfo.iGivenBufferWorksAsFrameBuffer==EFalse: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
478 |
TRequestStatus will be completed when display buffer is transferred to the display. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
479 |
TDisplayDrvInfo.iGivenBufferWorksAsFrameBuffer==ETrue: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
480 |
TRequestStatus will be completed when display buffer is starting to be visible. So when request is completed |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
481 |
any pixel of flush is not yet shown. And after that, given buffer works as framebuffer |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
482 |
until next's flush TRequestStatus will be completed. So caller should be aware of that, |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
483 |
to avoiding tearing (no draw to buffer if that is still work as framebuffer). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
484 |
@param aCompletedWhenReady Will be completed when transfer is ready (or just begun, see above) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
485 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
486 |
KErrInUse if SetOrientation or other settings are changing */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
487 |
virtual TInt Flush(TRequestStatus& aCompletedWhenReady) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
488 |
/** [@Update] Cancels all pending Flush operations. Should not be called normally at all, correct way is to wait |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
489 |
that both pending Flush TRequestStatuses are completed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
490 |
@return KErrNone if success */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
491 |
virtual TInt FlushCancelAll() = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
492 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
493 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
494 |
/** [@Rotate] Changes orientation of full screen. New flushes are not welcome before TRequestStatus is completed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
495 |
Got buffers should not be under read/write while this mehtod is ongoing. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
496 |
All buffers should be read (GetDsaBuffer & GetCompositionBuffer & GetDisplayProperties) again after completed and ready. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
497 |
SetView to be called with valid parameters after rotation. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
498 |
@param aNewOrientation New orientation |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
499 |
@param aCompletedWhenReady Will be completed when orientation is changed |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
500 |
@return KErrNone if success, KErrNotSupported if driver cannot handle orientation */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
501 |
virtual TInt SetRotation(TDispRotation aNewOrientation, TRequestStatus& aCompletedWhenReady) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
502 |
/** [@Update] Changes resolution of full screen. New flushes are not welcome before TRequestStatus is completed. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
503 |
To be called every time before first SetView(). |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
504 |
Got buffers should not be under read/write while this mehtod is ongoing. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
505 |
All buffers should be read (GetDsaBuffer & GetCompositionBuffer & GetDisplayProperties) again after completed and ready. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
506 |
SetView to be called with valid parameters after rotation. |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
507 |
@param aNewResolution New resolution in 0deg |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
508 |
@param aCompletedWhenReady Will be completed when resolution is changed |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
509 |
@return KErrNone if success |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
510 |
KErrNotSupported if display cannot change resolution (TDisplayDrvInfo.iVariableResolution==EFalse) |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
511 |
KErrArgument if display resolution is not supported (aNewResolution) */ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
512 |
virtual TInt SetResolution(TSize aNewResolution, TRequestStatus& aCompletedWhenReady) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
513 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
514 |
protected: |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
515 |
///Constructor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
516 |
CDisplayUpdater(){}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
517 |
///Second phase constructor |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
518 |
virtual void ConstructL(TInt aDisplayNumber) = 0; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
519 |
}; |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
520 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
521 |
#endif //__KERNEL_MODE__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
522 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
523 |
//- Global Function Prototypes ---------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
524 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
525 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
526 |
//- Inline Functions -------------------------------------------------------- |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
527 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
528 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
529 |
#endif //__DISPLAY_UPDATER_H__ |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
530 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
531 |
// End of File |
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
532 |
|
bb4b476bbb96
Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff
changeset
|
533 |