|
1 /** |
|
2 * Copyright (c) 2008-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 */ |
|
23 |
|
24 #ifndef WS_DISP_CHANGE_NOTIFY |
|
25 #define WS_DISP_CHANGE_NOTIFY |
|
26 |
|
27 |
|
28 #include <graphics/wsdisplaycontrol.h> |
|
29 #include <e32base.h> |
|
30 #include <e32cmn.h> |
|
31 #include "EVENT.H" |
|
32 |
|
33 class CWsDisplayChangeNotifier : public CActive |
|
34 { |
|
35 public: |
|
36 static CWsDisplayChangeNotifier* NewL(MWsDisplayControl* aNextLevelInterface, CScreen *aOwner); |
|
37 void IssueNotificationRequest(); |
|
38 void CancelNotificationRequest(); |
|
39 ~CWsDisplayChangeNotifier(); |
|
40 protected: |
|
41 void ConstructL(); |
|
42 virtual void RunL(); |
|
43 virtual void DoCancel(); |
|
44 private: |
|
45 CWsDisplayChangeNotifier(MWsDisplayControl* aNextLevelInterface, CScreen *aOwner); |
|
46 TBool IsResListEqual(RArray<MWsDisplayControl::TResolution>& aResListA, RArray<MWsDisplayControl::TResolution>& aResListB); |
|
47 |
|
48 TRequestStatus* iRsStatus; |
|
49 MWsDisplayControl* iNextLevelInterface; |
|
50 CScreen *iOwner; |
|
51 CEventQueueRetry *iRetry; |
|
52 |
|
53 RArray<MWsDisplayControl::TResolution> iLastResList; |
|
54 TInt iLastErr; |
|
55 }; |
|
56 |
|
57 class CWsConfigChangeNotifier : public CActive |
|
58 { |
|
59 public: |
|
60 static CWsConfigChangeNotifier* NewL(MWsDisplayControl* aNextLevelInterface, CScreen *aOwner); |
|
61 void IssueNotificationRequest(); |
|
62 void CancelNotificationRequest(); |
|
63 ~CWsConfigChangeNotifier(); |
|
64 protected: |
|
65 void ConstructL(); |
|
66 virtual void RunL(); |
|
67 virtual void DoCancel(); |
|
68 private: |
|
69 CWsConfigChangeNotifier(MWsDisplayControl* aNextLevelInterface, CScreen *aOwner); |
|
70 TBool IsConfigEqual(TDisplayConfiguration& aConfigA, TDisplayConfiguration& aConfigB); |
|
71 |
|
72 TRequestStatus* iRsStatus; |
|
73 MWsDisplayControl* iNextLevelInterface; |
|
74 CScreen *iOwner; |
|
75 CEventQueueRetry *iRetry; |
|
76 |
|
77 TDisplayConfiguration iLastConfig; |
|
78 }; |
|
79 |
|
80 #endif |