First public contribution.
1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
3 // Permission is hereby granted, free of charge, to any person obtaining a
4 // copy of this software and/or associated documentation files (the
5 // "Materials"), to deal in the Materials without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Materials, and to
8 // permit persons to whom the Materials are furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be included
12 // in all copies or substantial portions of the Materials.
14 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23 // Display Adaptation Interface
27 #ifndef OPENWFC_RI_DISPLAY_H
28 #define OPENWFC_RI_DISPLAY_H
30 #include <WF/openwfc_ri_display_update.h>
31 #include <pixelformats.h>
33 class COpenWFC_RI_Display: public CBase, public MOpenWFC_RI_Display_Update
38 EScreenInvalid = 0x0000, // Initialisation value, don't use
39 EScreenRotate0 = 0x0001, // No rotation
40 EScreenRotate90 = 0x0002, // 90 degree
41 EScreenRotate180 = 0x0004, // 180 degree
42 EScreenRotate270 = 0x0008, // 270 degree
43 EScreenRotateMirrorVertical = 0x0010, // Upside down/flip
44 EScreenRotateMirrorHorizontal = 0x0020, // Mirrored
45 EScreenRotateAll = 0x000F
50 EScreenAttributeInvalid = 0,
51 EScreenAttributeImplementationVersion, // Version implementation (TUint32) RO
52 // Currently the only pixel format support is EUidPixelFormatXRGB_8888
53 EScreenAttributePixelFormat, // Pixel format (TUint32) RO
54 // Curently, the only value supported is "4"
55 EScreenAttributeBytesPerPixel, // Bytes per pixel (TUint32) RO
56 EScreenAttributeSupportedRotation, // Supported rotation bitmap(TUint32) RO
57 EScreenAttributeDefaultRotation, // Default rotation (TUint32) RO
58 EScreenAttributeCurrentRotation, // Current rotation (TUint32) RW
59 EScreenAttributeNormalWidth, // Width - rotaton 0 (TUint32) RO
60 EScreenAttributeNormalHeight, // Height - rotaton 0 (TUint32) RO
61 EScreenAttributeNormalStride, // Stride - rotaton 0 (TUint32) RO
62 EScreenAttributeFlippedWidth, // Width - rotaton 90 (TUint32) RO
63 EScreenAttributeFlippedHeight, // Height - rotaton 90 (TUint32) RO
64 EScreenAttributeFlippedStride, // Stride - rotaton 90 (TUint32) RO
65 EScreenAttributeScreenGeometry // geometry struct RO
69 TInt32 iSupportedRotations;
70 TInt32 iBytesPerPixel;
71 TScreenRotation iDefaultRotation;
72 TScreenRotation iCurrentRotation;
73 TUidPixelFormat iPixelFormat;
78 TInt32 iFlippedHeight;
79 TInt32 iFlippedStride;
80 } TScreenGeometryAttribute;
88 inline TUint32 APIVersion();
91 * Symbian function factory
93 * @param aStream Screen Id
95 * @return An instance of implemented interface
97 IMPORT_C static COpenWFC_RI_Display* NewL(TUint aScreen);
100 * retrieves the default screen number for an implementation
103 * @return Default Screen ID
105 IMPORT_C static TUint32 DefaultScreenNumber();
108 static const TInt32 KTopMostLayer = 0;
109 static const TUint32 KAPIVersion = 0x00000001;
112 TInt GetAttributeSize(TUint aAttributeId);
115 inline TUint32 COpenWFC_RI_Display::APIVersion()
121 #endif // OPENWFC_RI_DISPLAY_H