|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Display sub session. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_ALFSRVDISPLAYSUBSESSION_H |
|
21 #define C_ALFSRVDISPLAYSUBSESSION_H |
|
22 |
|
23 #include "alfsrvsubsessionbase.h" |
|
24 #include <uiacceltk/huidisplaybackgrounditem.h> |
|
25 |
|
26 class CAlfAppSrvSessionBase; |
|
27 class CHuiDisplay; |
|
28 class CHuiDisplayCoeControl; |
|
29 |
|
30 /** |
|
31 * Display sub session. |
|
32 * |
|
33 * @lib alfappservercore.lib |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 NONSHARABLE_CLASS(CAlfSrvDisplaySubSession): public CAlfSrvSubSessionBase |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Two-phased constructor |
|
43 * |
|
44 * @param aSession Session in which this sub session belongs into. |
|
45 * @param aRect Display size. |
|
46 * @param aWindowGroupId Client window group ID. |
|
47 * @return New object. Ownership transferred. |
|
48 */ |
|
49 static CAlfSrvDisplaySubSession* NewL( CAlfAppSrvSessionBase& aSession, |
|
50 const TRect& aRect, |
|
51 TInt aWindowGroupId, |
|
52 TInt aDisplayType, |
|
53 const TUid& aBufferUid ); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. Leaves the objenct onto the cleanup stack. |
|
57 * |
|
58 * @param aSession Session in which this sub session belongs into. |
|
59 * @param aRect Display size. |
|
60 * @param aWindowGroupId Client window group ID. |
|
61 * @return New object on stack. Ownership transferred. |
|
62 */ |
|
63 static CAlfSrvDisplaySubSession* NewLC( CAlfAppSrvSessionBase& aSession, |
|
64 const TRect& aRect, |
|
65 TInt aWindowGroupId, |
|
66 TInt aDisplayType, |
|
67 const TUid& aBufferUid ); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 virtual ~CAlfSrvDisplaySubSession(); |
|
73 |
|
74 /** |
|
75 * Returns the used display. |
|
76 * |
|
77 * @return Used display. |
|
78 */ |
|
79 CHuiDisplay& Display(); |
|
80 |
|
81 /** |
|
82 * Called when session is about to get focus. |
|
83 */ |
|
84 void SetSessionFocused(TBool aFocused=ETrue); |
|
85 |
|
86 // From CAlfSrvSubSessionBase |
|
87 |
|
88 /** |
|
89 * From CAlfSrvSubSessionBase |
|
90 * Can process the given message? |
|
91 * |
|
92 * @param aMessage The message. |
|
93 * @return ETrue if can process the message. |
|
94 */ |
|
95 TBool CanProcessMessage(const RMessage2& aMessage) const; |
|
96 |
|
97 /** |
|
98 * From CAlfSrvSubSessionBase |
|
99 * Processes the message. |
|
100 * |
|
101 * @param aMessage The message. |
|
102 */ |
|
103 void DoProcessMessageL(const RMessage2& aMessage); |
|
104 |
|
105 TBool IsTvOut() const; |
|
106 |
|
107 TInt DisplayType() const; |
|
108 |
|
109 private: |
|
110 |
|
111 CAlfSrvDisplaySubSession( CAlfAppSrvSessionBase& aSession, |
|
112 const TRect& aRect, |
|
113 TInt aWindowGroupId, |
|
114 TInt aDisplayType, |
|
115 const TUid& aBufferUid ); |
|
116 |
|
117 void ConstructL(); |
|
118 |
|
119 void SetClearBackgroundL( const RMessage2& aMessage ); |
|
120 void SetVisibleAreaL( const RMessage2& aMessage, TBool aForce = EFalse ); |
|
121 void VisibleAreaL( const RMessage2& aMessage ); |
|
122 void SetDirtyL( const RMessage2& aMessage ); |
|
123 void SetQualityL( const RMessage2& aMessage ); |
|
124 void QualityL( const RMessage2& aMessage ); |
|
125 void SetUseDepthL( const RMessage2& aMessage ); |
|
126 void SetUsageL( const RMessage2& aMessage ); |
|
127 void SetBackgroundItemsL( const RMessage2& aMessage ); |
|
128 void HandlePointerEventL( const RMessage2& aMessage ); |
|
129 void SuppressAutomaticFadingL( const RMessage2& aMessage ); |
|
130 void SetClientWindowForDrawingL( const RMessage2& aMessage ); |
|
131 |
|
132 /** |
|
133 * Updates non fading to container. |
|
134 */ |
|
135 void UpdateAutomaticFading(); |
|
136 |
|
137 // from subsessionbase |
|
138 CHuiDisplay* AsHuiDisplay(); |
|
139 |
|
140 TBool UseVisualAreaClipping(); |
|
141 |
|
142 private: // data |
|
143 |
|
144 CHuiDisplay* iDisplay; |
|
145 |
|
146 TInt iDisplayType; |
|
147 TUid iScreenBufferUid; |
|
148 TRect iRect; |
|
149 TInt iDisplayClearBackground; |
|
150 TInt iDisplayRenderingQuality; |
|
151 TBool iDisplayUseDepthTest; |
|
152 TUint iDisplayUsage; |
|
153 RArray<THuiDisplayBackgroundItem> iBackgroundItems; |
|
154 TBool iAutomaticFadingSuppressed; |
|
155 }; |
|
156 |
|
157 #endif // C_ALFSRVDISPLAYSUBSESSION_H |