os/graphics/graphicsdeviceinterface/screendriver/swins/_WININC.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/screendriver/swins/_WININC.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,76 @@
     1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef ___WININC_H__
    1.20 +#define ___WININC_H__
    1.21 +
    1.22 +#define UNICODE
    1.23 +#pragma warning( disable : 4201 )
    1.24 +#define WIN32_LEAN_AND_MEAN
    1.25 +#define NOSERVICE
    1.26 +#include <windows.h>
    1.27 +#pragma warning( default : 4201 )
    1.28 +#include <TCHAR.H>
    1.29 +
    1.30 +#include <gdi.h>
    1.31 +
    1.32 +/**
    1.33 +RWindows describes an object, which creates and manages a Windows OS window,
    1.34 +used for the Symbian OS drawing operations on the Emulator.
    1.35 +A single window object can be shared between one or more RWindows clients.
    1.36 +@internalComponent
    1.37 +*/
    1.38 +class RWindows
    1.39 +	{
    1.40 +public:
    1.41 +	static RWindows* GetWindow(TInt aScreenNo, TAny* aHwnd,const TSize& aSize);
    1.42 +	static void ReleaseWindow(TInt aScreenNo);
    1.43 +	void Update(const TRegion& aRgn,const TSize& aSize);
    1.44 +	TUint8* PixelAddress(TInt aX,TInt aY);
    1.45 +	TUint32* EpocBitmapBits() const {return iEpocBitmapBits;}
    1.46 +	void SetOrientation(TInt aOrientation);
    1.47 +	TInt Orientation() const;
    1.48 +	TSize GetOrientedSize();
    1.49 +	TRect GetOrientedRect(const TRect &aSize);
    1.50 +private:
    1.51 +	RWindows();
    1.52 +	void ConstructL(TAny* aHwnd,const TSize& aSize);
    1.53 +	void Destroy();
    1.54 +	void UpdateRect(const TRect& aRect,const TSize& aSize);
    1.55 +public:
    1.56 +	TDisplayMode iDisplayMode;
    1.57 +	TSize iEpocBitmapSize;
    1.58 +	TInt iEpocBitmapLinePitch;
    1.59 +	TRgb* iPalette;
    1.60 +private:
    1.61 +	HWND iHwnd;
    1.62 +	HDC iHdc;
    1.63 +	HBITMAP iHbitmap;
    1.64 +	BITMAPINFO* iBitmapInfo;
    1.65 +	TUint8* iBitmapBits;
    1.66 +	HBITMAP iH90bitmap;
    1.67 +	BITMAPINFO* i90BitmapInfo;
    1.68 +	TUint8* i90BitmapBits;
    1.69 +	TInt iByteWidth;
    1.70 +	TInt i90ByteWidth;
    1.71 +	TUint32* iEpocBitmapBits;
    1.72 +	TInt iOrientation;
    1.73 +    TInt iScreenNo;
    1.74 +	};
    1.75 +
    1.76 +RWindows* WindowHandler(TInt aScreenNo);
    1.77 +void CreateScreenSemaphoreName(TInt aScreenNo, TDes& aScreenSemaphoreName);
    1.78 +
    1.79 +#endif