|
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 virtual const TRegion& WindowArea() 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 ScreenSizeChanged(const TBool aSwapWidthAndHeight); |
|
42 void OrientationChanged(); |
|
43 void ClearDisplay(); |
|
44 void SetSystemFaded(TBool aFaded, TUint8 aBlackMap, TUint8 aWhiteMap); |
|
45 CWsWindowGroup* WindowGroup(TInt aWindowGroup); |
|
46 CWsClientWindow *FirstTopClientWindow() const; |
|
47 inline TRgb DefaultBackgroundColor(); |
|
48 |
|
49 public: // from CWsObject |
|
50 virtual void CommandL(TInt aOpcode, const TAny *aCmdData); |
|
51 |
|
52 private: |
|
53 inline CWsBlankWindow* BlankRedraw(); |
|
54 private: |
|
55 TRegionFix<1> iArea; |
|
56 TRgb iDefaultBackgroundColor; |
|
57 }; |
|
58 |
|
59 inline CWsBlankWindow* CWsRootWindow::BlankRedraw() |
|
60 { |
|
61 return STATIC_CAST(CWsBlankWindow*,iRedraw); |
|
62 } |
|
63 |
|
64 inline CWsWindowGroup *CWsRootWindow::Child() const |
|
65 { |
|
66 return (CWsWindowGroup *)iChild; |
|
67 } |
|
68 |
|
69 inline CWsWindowBase *CWsRootWindow::NextSibling() const |
|
70 { |
|
71 return iSibling; |
|
72 } |
|
73 |
|
74 inline CWsWindowBase *CWsRootWindow::PrevSibling() const |
|
75 { |
|
76 return GetPrevSibling(); |
|
77 } |
|
78 |
|
79 inline TRgb CWsRootWindow::DefaultBackgroundColor() |
|
80 { |
|
81 return iDefaultBackgroundColor; |
|
82 } |
|
83 |
|
84 #endif |