os/kernelhwsrv/kernel/eka/include/e32twin.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/e32twin.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,132 @@
     1.4 +// Copyright (c) 1995-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 the License "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 +// e32\include\e32twin.h
    1.18 +// 
    1.19 +// WARNING: This file contains some APIs which are internal and are subject
    1.20 +//          to change without notice. Such APIs should therefore not be used
    1.21 +//          outside the Kernel and Hardware Services package.
    1.22 +//
    1.23 +
    1.24 +#ifndef __E32TWIN_H__
    1.25 +#define __E32TWIN_H__
    1.26 +#include <e32cons.h>
    1.27 +//
    1.28 +
    1.29 +/** @internalComponent */
    1.30 +_LIT(KE32WindowServer,"!E32WindowServer");
    1.31 +
    1.32 +/** @internalTechnology */
    1.33 +enum TEventType
    1.34 +    {
    1.35 +    EKeyPress,
    1.36 +    EMouseClick
    1.37 +    };
    1.38 +
    1.39 +/**
    1.40 +@publishedPartner
    1.41 +@released
    1.42 +*/
    1.43 +enum TVideoMode
    1.44 +	{
    1.45 +	EMono=1,
    1.46 +	EGray4=2,
    1.47 +	EGray16=4,
    1.48 +	EColor256=8,
    1.49 +	EColor4K=12,
    1.50 +	EColor64K=16,
    1.51 +	EColor16M=24
    1.52 +
    1.53 +	};
    1.54 +
    1.55 +/** @internalTechnology */
    1.56 +struct SConsoleKey
    1.57 +	{
    1.58 + 	TKeyCode iCode;
    1.59 +	TUint iModifiers;
    1.60 +    TPoint iMousePos;
    1.61 +    TInt iType;
    1.62 +	};
    1.63 +
    1.64 +/** @internalTechnology */
    1.65 +class TConsoleKey : public TPckgBuf<SConsoleKey>
    1.66 +	{
    1.67 +public:
    1.68 +	IMPORT_C TKeyCode Code() const;
    1.69 +	IMPORT_C TInt Modifiers() const;
    1.70 +    IMPORT_C TInt Type() const;
    1.71 +    IMPORT_C TPoint MousePos() const;
    1.72 +	};
    1.73 +
    1.74 +/** @internalTechnology */
    1.75 +class RConsole : public RSessionBase
    1.76 +	{
    1.77 +public:
    1.78 +	IMPORT_C TVersion Version();
    1.79 +	TInt Connect();
    1.80 +	IMPORT_C TInt Create();
    1.81 +	IMPORT_C TInt Init(const TDesC &aName,const TSize &aSize);
    1.82 +	IMPORT_C TInt Write(const TDesC &aDes);
    1.83 +	IMPORT_C TInt ClearScreen();
    1.84 +	IMPORT_C TInt ClearToEndOfLine();
    1.85 +	IMPORT_C TInt Destroy();
    1.86 +	IMPORT_C TInt SetTitle(const TDesC &aName);
    1.87 +	IMPORT_C TInt SetSize(const TSize &aSize);
    1.88 +	IMPORT_C TInt SetWindowPosAbs(const TPoint &aPosition);
    1.89 +	IMPORT_C TInt SetCursorHeight(TInt aPercentage);
    1.90 +	IMPORT_C TInt SetCursorPosAbs(const TPoint &aPosition);
    1.91 +	IMPORT_C TInt SetCursorPosRel(const TPoint &aVector);
    1.92 +	IMPORT_C TInt Size(TSize &aSize) const;
    1.93 +	IMPORT_C TInt ScreenSize(TSize &aSize) const;
    1.94 +	IMPORT_C TInt CursorPos(TPoint &aPosition) const;
    1.95 +	IMPORT_C TInt Control(const TDesC &aDes);
    1.96 +	IMPORT_C TInt Read(TConsoleKey &aKeystroke);
    1.97 +	IMPORT_C void Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
    1.98 +	IMPORT_C TInt ReadCancel();
    1.99 +	IMPORT_C TInt SetMode(TVideoMode aMode);
   1.100 +	IMPORT_C void SetPaletteEntry(TUint anIndex,TUint8 aRed,TUint8 aGreen,TUint8 aBlue);
   1.101 +	IMPORT_C void GetPaletteEntry(TUint anIndex,TUint8 &aRed,TUint8 &aGreen,TUint8 &aBlue);
   1.102 +	IMPORT_C void SetTextColors(TUint anFgColor,TUint aBgColor);
   1.103 +	IMPORT_C void SetUIColors(TUint aWindowBgColor,TUint aBorderColor,TUint aScreenColor);
   1.104 +	IMPORT_C void SetTextAttribute(TTextAttribute anAttribute);
   1.105 +	};
   1.106 +
   1.107 +/** @internalComponent */
   1.108 +NONSHARABLE_CLASS(CConsoleTextWin) : public CConsoleBase
   1.109 +	{
   1.110 +public:
   1.111 +	static CConsoleTextWin *NewL(const TDesC &aTitle,TSize aSize);
   1.112 +	CConsoleTextWin();
   1.113 +	virtual ~CConsoleTextWin();
   1.114 +	virtual TInt Create(const TDesC &aTitle,TSize aSize);
   1.115 +	virtual void Read(TRequestStatus &aStatus);
   1.116 +	virtual void ReadCancel();
   1.117 +	virtual void Write(const TDesC &aDes);
   1.118 +	virtual TPoint CursorPos() const;
   1.119 +	virtual void SetCursorPosAbs(const TPoint &aPoint);
   1.120 +	virtual void SetCursorPosRel(const TPoint &aPoint);
   1.121 +	virtual void SetCursorHeight(TInt aPercentage);
   1.122 +	virtual void SetTitle(const TDesC &aTitle);
   1.123 +	virtual void ClearScreen();
   1.124 +	virtual void ClearToEndOfLine();
   1.125 +	virtual TSize ScreenSize() const;
   1.126 +	virtual TKeyCode KeyCode() const;
   1.127 +	virtual TUint KeyModifiers() const;
   1.128 +	virtual void SetTextAttribute(TTextAttribute anAttribute);
   1.129 +	RConsole &Console();
   1.130 +private:
   1.131 +	TConsoleKey iKey;
   1.132 +	RConsole iConsole;
   1.133 +	};
   1.134 +#endif
   1.135 +