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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // CWsClientWindow and associated classes definitions
24 class CWsClientWindow : public CWsWindow
29 KWinRedrawPriBitsPerLevel=4,
30 KWinRedrawPriMaxOrdinal=(1<<KWinRedrawPriBitsPerLevel)-1, // 15
31 KWinRedrawPriMaxLevel=32/KWinRedrawPriBitsPerLevel-1, // 7
35 CWsClientWindow(CWsClient* aOwner, CScreen* aScreen);
37 virtual void ConstructL(const TWsClCmdCreateWindow &aCmd,CWsWindowBase *aParent, TBool aScreenDeviceIsInvalid);
38 CWsClientWindow *Child() const;
39 inline CWsClientWindow *PrevSibling() const;
40 inline CWsClientWindow *NextSibling() const;
41 inline CWsClientWindow *PrevSiblingMultiParent() const;
42 inline CWsClientWindow *NextSiblingMultiParent() const;
43 virtual const TRegion& WindowArea() const;
44 virtual void GenerateWindowRegion(RWsRegion &aRegion) const;
45 void GenerateTopRegion(RWsRegion &aRegion) const;
47 public: // from CWsObject
48 virtual void CommandL(TInt aOpcode, const TAny *aCmdData);
50 public: // from MWsWindow
51 virtual void Invalidate(const TRect * aRect = 0);
54 void GcActivated(CWsGc *aGc);
55 void GcDeactivated(CWsGc *aGc);
56 void ResetHiddenFlag();
57 void SetClippedBaseArea(RWsRegion &aRegion) const;
58 void SetOpaqueClippedBaseArea(RWsRegion &aRegion) const;
59 inline const TRegion *BaseArea() const;
60 virtual TUint RedrawPriority(TInt *aShift=NULL) const;
61 inline void UpdateAnimArea();
62 void AddKeyRectL(const TRect &aRect, TInt aScanCode, TBool aActivatedByPointerSwitchOn);
63 void RemoveAllKeyRects();
64 void SetVisible(TBool aState);
65 inline TBool IsFadeBehind() const;
68 void SetFaded(TBool aFade,TUint8 aBlackMap,TUint8 aWhiteMap);
69 void RecalcChildAbs(const TPoint *aOffset);
70 void ResetHiddenFlagsInParentAndChildren();
71 static inline void SetAbsoluteFading(TBool aAbsoluteFading);
72 inline const TRegion * GetUserOpaqueRegion();
73 void OffsetUserTransparentRegion(const TPoint& aOffset);
74 void SetUserOpaqueRegion();
76 void ScheduleRegionUpdate(const TRegion* aDefinitelyDirty);
78 void DoMoveWindowToGroupL(TInt aIdentifier);
79 void SetScreenDeviceValidState(TBool aState);
80 TBool SetScreenDeviceValidStateFlag(TBool aState);
84 void SetExtentL(const TPoint *aPos, const TSize *aSize);
85 static void ClipWindows(TRegion ®ion,const CWsClientWindow *start, const CWsClientWindow *end, TBool aClipTranslucent);
86 void GenerateArea(RWsRegion &aArea, TBool aClipTranslucent) const;
88 void Scroll(const TRect &aClipRect, const TPoint &aPoint, const TRect &aRect);
90 void OffsetBaseArea(const TPoint &aOffset);
91 void DeleteBaseArea();
92 void SetCornerTypeL(TCornerType aType, TInt aFlags, TRegion *aNewBaseArea=NULL);
93 void ResetHiddenFlags();
94 TDblQue<TPointerKeyList> *PointerKeyList() const;
95 void SetUserTransparentRegion(RWsRegion* aRegion);
96 // from CWsWindowBase thru CWsWindow
97 TBool IsDSAHost() const;
101 TUint iBackupsRequested;
102 TRegion *iBaseArea; // The base area of the window without any clipping from windows taken into account
103 TDblQue<TPointerKeyList> *iPointerKeyList;
104 static TBool iAbsoluteFading;
106 By default the full window region is transparent if the window is marked
107 as transparent. If this is not the desired behaviour the client can
108 define the transparent region itself.
110 @see RWindow::SetTransparentRegion()
112 RWsRegion* iUserDefinedTransparentRegion;
113 RWsRegion* iUserDefinedOpaqueRegion;
116 inline CWsClientWindow *CWsClientWindow::Child() const
118 return((CWsClientWindow *)iChild);
121 inline CWsClientWindow *CWsClientWindow::NextSibling() const
123 return((CWsClientWindow *)iSibling);
126 inline CWsClientWindow *CWsClientWindow::PrevSibling() const
128 return((CWsClientWindow *)GetPrevSibling());
131 inline const TRegion *CWsClientWindow::BaseArea() const
136 inline void CWsClientWindow::UpdateAnimArea()
138 iRedraw->UpdateAnimArea();
141 inline TBool CWsClientWindow::IsFadeBehind() const
143 return(iFlags&EFlagFadeBehind);
146 inline void CWsClientWindow::SetAbsoluteFading(TBool aAbsoluteFading)
148 iAbsoluteFading=aAbsoluteFading;
151 inline CWsClientWindow *CWsClientWindow::PrevSiblingMultiParent() const
153 return((CWsClientWindow *)CWsWindowBase::PrevSiblingMultiParent());
156 inline CWsClientWindow *CWsClientWindow::NextSiblingMultiParent() const
158 return((CWsClientWindow *)CWsWindowBase::NextSiblingMultiParent());
161 inline const TRegion * CWsClientWindow::GetUserOpaqueRegion()
163 return iUserDefinedOpaqueRegion;