os/graphics/graphicsdeviceinterface/screendriver/swins/_WININC.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef ___WININC_H__
    17 #define ___WININC_H__
    18 
    19 #define UNICODE
    20 #pragma warning( disable : 4201 )
    21 #define WIN32_LEAN_AND_MEAN
    22 #define NOSERVICE
    23 #include <windows.h>
    24 #pragma warning( default : 4201 )
    25 #include <TCHAR.H>
    26 
    27 #include <gdi.h>
    28 
    29 /**
    30 RWindows describes an object, which creates and manages a Windows OS window,
    31 used for the Symbian OS drawing operations on the Emulator.
    32 A single window object can be shared between one or more RWindows clients.
    33 @internalComponent
    34 */
    35 class RWindows
    36 	{
    37 public:
    38 	static RWindows* GetWindow(TInt aScreenNo, TAny* aHwnd,const TSize& aSize);
    39 	static void ReleaseWindow(TInt aScreenNo);
    40 	void Update(const TRegion& aRgn,const TSize& aSize);
    41 	TUint8* PixelAddress(TInt aX,TInt aY);
    42 	TUint32* EpocBitmapBits() const {return iEpocBitmapBits;}
    43 	void SetOrientation(TInt aOrientation);
    44 	TInt Orientation() const;
    45 	TSize GetOrientedSize();
    46 	TRect GetOrientedRect(const TRect &aSize);
    47 private:
    48 	RWindows();
    49 	void ConstructL(TAny* aHwnd,const TSize& aSize);
    50 	void Destroy();
    51 	void UpdateRect(const TRect& aRect,const TSize& aSize);
    52 public:
    53 	TDisplayMode iDisplayMode;
    54 	TSize iEpocBitmapSize;
    55 	TInt iEpocBitmapLinePitch;
    56 	TRgb* iPalette;
    57 private:
    58 	HWND iHwnd;
    59 	HDC iHdc;
    60 	HBITMAP iHbitmap;
    61 	BITMAPINFO* iBitmapInfo;
    62 	TUint8* iBitmapBits;
    63 	HBITMAP iH90bitmap;
    64 	BITMAPINFO* i90BitmapInfo;
    65 	TUint8* i90BitmapBits;
    66 	TInt iByteWidth;
    67 	TInt i90ByteWidth;
    68 	TUint32* iEpocBitmapBits;
    69 	TInt iOrientation;
    70     TInt iScreenNo;
    71 	};
    72 
    73 RWindows* WindowHandler(TInt aScreenNo);
    74 void CreateScreenSemaphoreName(TInt aScreenNo, TDes& aScreenSemaphoreName);
    75 
    76 #endif