1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicscomposition/openwfcompositionengine/inc/openwfc_ri_display.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,121 @@
1.4 +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
1.5 +//
1.6 +// Permission is hereby granted, free of charge, to any person obtaining a
1.7 +// copy of this software and/or associated documentation files (the
1.8 +// "Materials"), to deal in the Materials without restriction, including
1.9 +// without limitation the rights to use, copy, modify, merge, publish,
1.10 +// distribute, sublicense, and/or sell copies of the Materials, and to
1.11 +// permit persons to whom the Materials are furnished to do so, subject to
1.12 +// the following conditions:
1.13 +//
1.14 +// The above copyright notice and this permission notice shall be included
1.15 +// in all copies or substantial portions of the Materials.
1.16 +//
1.17 +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1.18 +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1.19 +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1.20 +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1.21 +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1.22 +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1.23 +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
1.24 +//
1.25 +// Description:
1.26 +// Display Adaptation Interface
1.27 +//
1.28 +//
1.29 +
1.30 +#ifndef OPENWFC_RI_DISPLAY_H
1.31 +#define OPENWFC_RI_DISPLAY_H
1.32 +
1.33 +#include <WF/openwfc_ri_display_update.h>
1.34 +#include <pixelformats.h>
1.35 +
1.36 +class COpenWFC_RI_Display: public CBase, public MOpenWFC_RI_Display_Update
1.37 + {
1.38 +public:
1.39 + typedef enum
1.40 + {
1.41 + EScreenInvalid = 0x0000, // Initialisation value, don't use
1.42 + EScreenRotate0 = 0x0001, // No rotation
1.43 + EScreenRotate90 = 0x0002, // 90 degree
1.44 + EScreenRotate180 = 0x0004, // 180 degree
1.45 + EScreenRotate270 = 0x0008, // 270 degree
1.46 + EScreenRotateMirrorVertical = 0x0010, // Upside down/flip
1.47 + EScreenRotateMirrorHorizontal = 0x0020, // Mirrored
1.48 + EScreenRotateAll = 0x000F
1.49 + } TScreenRotation;
1.50 +
1.51 + typedef enum
1.52 + {
1.53 + EScreenAttributeInvalid = 0,
1.54 + EScreenAttributeImplementationVersion, // Version implementation (TUint32) RO
1.55 + // Currently the only pixel format support is EUidPixelFormatXRGB_8888
1.56 + EScreenAttributePixelFormat, // Pixel format (TUint32) RO
1.57 + // Curently, the only value supported is "4"
1.58 + EScreenAttributeBytesPerPixel, // Bytes per pixel (TUint32) RO
1.59 + EScreenAttributeSupportedRotation, // Supported rotation bitmap(TUint32) RO
1.60 + EScreenAttributeDefaultRotation, // Default rotation (TUint32) RO
1.61 + EScreenAttributeCurrentRotation, // Current rotation (TUint32) RW
1.62 + EScreenAttributeNormalWidth, // Width - rotaton 0 (TUint32) RO
1.63 + EScreenAttributeNormalHeight, // Height - rotaton 0 (TUint32) RO
1.64 + EScreenAttributeNormalStride, // Stride - rotaton 0 (TUint32) RO
1.65 + EScreenAttributeFlippedWidth, // Width - rotaton 90 (TUint32) RO
1.66 + EScreenAttributeFlippedHeight, // Height - rotaton 90 (TUint32) RO
1.67 + EScreenAttributeFlippedStride, // Stride - rotaton 90 (TUint32) RO
1.68 + EScreenAttributeScreenGeometry // geometry struct RO
1.69 + } TScreenAttribute;
1.70 +
1.71 + typedef struct {
1.72 + TInt32 iSupportedRotations;
1.73 + TInt32 iBytesPerPixel;
1.74 + TScreenRotation iDefaultRotation;
1.75 + TScreenRotation iCurrentRotation;
1.76 + TUidPixelFormat iPixelFormat;
1.77 + TInt32 iNormalWidth;
1.78 + TInt32 iNormalHeight;
1.79 + TInt32 iNormalStride;
1.80 + TInt32 iFlippedWidth;
1.81 + TInt32 iFlippedHeight;
1.82 + TInt32 iFlippedStride;
1.83 + } TScreenGeometryAttribute;
1.84 +
1.85 +public:
1.86 + /**
1.87 + * API version
1.88 + *
1.89 + * @return API version
1.90 + */
1.91 + inline TUint32 APIVersion();
1.92 +
1.93 + /**
1.94 + * Symbian function factory
1.95 + *
1.96 + * @param aStream Screen Id
1.97 + *
1.98 + * @return An instance of implemented interface
1.99 + */
1.100 + IMPORT_C static COpenWFC_RI_Display* NewL(TUint aScreen);
1.101 +
1.102 + /**
1.103 + * retrieves the default screen number for an implementation
1.104 + *
1.105 + *
1.106 + * @return Default Screen ID
1.107 + */
1.108 + IMPORT_C static TUint32 DefaultScreenNumber();
1.109 +
1.110 +public:
1.111 + static const TInt32 KTopMostLayer = 0;
1.112 + static const TUint32 KAPIVersion = 0x00000001;
1.113 +
1.114 +protected:
1.115 + TInt GetAttributeSize(TUint aAttributeId);
1.116 + };
1.117 +
1.118 +inline TUint32 COpenWFC_RI_Display::APIVersion()
1.119 + {
1.120 + return KAPIVersion;
1.121 + }
1.122 +
1.123 +
1.124 +#endif // OPENWFC_RI_DISPLAY_H