os/graphics/windowing/windowserver/nga/SERVER/rootwin.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2006-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 // CWsRootWindow and associated classes definitions
    15 // 
    16 //
    17 
    18 #ifndef __ROOTWIN_H__
    19 #define __ROOTWIN_H__
    20 
    21 #include "server.h"
    22 #include "window.h"
    23 
    24 class CWsRootWindow : public CWsWindow
    25 	{
    26 public:
    27 	CWsRootWindow(CWsClient* aOwner, CScreen* aScreen);
    28 	~CWsRootWindow();
    29 	void ConstructL();
    30 	const CWsWindow *PointerWindow(const TPoint &inPos,TPoint *outPos, TPoint *parentPos, const CWsWindow *grabWin,
    31 											const CWsWindow *&aOriginalWinItIsIn,const CWsWindowGroup *aForceInGroup);
    32 	CWsWindowGroup *Child() const;
    33 	inline CWsWindowBase *PrevSibling() const;
    34 	inline CWsWindowBase *NextSibling() const;
    35 	CWsWindowBase *Parent() const;
    36 	virtual void GenerateWindowRegion(RWsRegion &aRegion) const;
    37 	void SetColor(TRgb aColor);
    38 	void SetColorIfClear();
    39 	void InvalidateWholeScreen();
    40 	void Invalidate(RWsRegion* aRegion);
    41 	void AdjustCoordsDueToRotation();
    42 	void ClearDisplay();
    43 	void SetSystemFaded(TBool aFaded, TUint8 aBlackMap, TUint8 aWhiteMap);
    44 	CWsWindowGroup* WindowGroup(TInt aWindowGroup);
    45 	CWsTopClientWindow *FirstTopClientWindow() const;
    46 	inline TRgb DefaultBackgroundColor() const;
    47 public:	// from CWsObject
    48 	void CommandL(TInt aOpcode, const TAny *aCmdData);
    49 public: // from MWsWindowTreeNode
    50 	const MWsWindow* Window() const;	
    51 public: // from MWsWindow
    52 	const TRegion& WindowArea() const;
    53 public: // from CWsWindowBase
    54 	void SendState(MWsWindowTreeObserver& aWindowTreeObserver) const;
    55 private:
    56 	inline CWsBlankWindow* BlankRedraw();
    57 private:
    58 	TRegionFix<1> iArea;
    59 	TRgb iDefaultBackgroundColor;
    60 	};
    61 	
    62 inline CWsBlankWindow* CWsRootWindow::BlankRedraw()
    63 	{
    64 	return STATIC_CAST(CWsBlankWindow*,iRedraw);
    65 	}
    66 
    67 inline CWsWindowGroup *CWsRootWindow::Child() const
    68 	{
    69 	return (CWsWindowGroup *)iChild;
    70 	}
    71 
    72 inline CWsWindowBase *CWsRootWindow::NextSibling() const
    73 	{
    74 	return iSibling;
    75 	}
    76 
    77 inline CWsWindowBase *CWsRootWindow::PrevSibling() const
    78 	{
    79 	return GetPrevSibling();
    80 	}
    81 
    82 inline CWsWindowBase *CWsRootWindow::Parent() const
    83 	{
    84 	return iParent;
    85 	}
    86 inline TRgb CWsRootWindow::DefaultBackgroundColor() const
    87 	{
    88 	return iDefaultBackgroundColor;
    89 	}	
    90 
    91 #endif