|
1 /* |
|
2 * Copyright (c) 2002 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 // EIKSHUT.H |
|
19 // |
|
20 // Copyright (c) 1997-2001 Symbian Ltd. All rights reserved. |
|
21 // |
|
22 |
|
23 #if !defined(__AKNSHUT_H__) |
|
24 #define __AKNSHUT_H__ |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <w32std.h> |
|
28 |
|
29 class CEikonEnv; |
|
30 class CAknView; |
|
31 class CAknAppUi; |
|
32 |
|
33 NONSHARABLE_CLASS(CAknShutter) : public CActive |
|
34 { |
|
35 public: |
|
36 void DeleteSelfWhenReady(); |
|
37 protected: |
|
38 CAknShutter(CEikonEnv& aEikEnv, CAknAppUi* aBaseAppUi); |
|
39 ~CAknShutter(); |
|
40 void Queue(); |
|
41 static TInt StartLevel(); |
|
42 private: // virtual from CActive |
|
43 void DoCancel(); |
|
44 void RunL(); |
|
45 TInt RunError(TInt aError); |
|
46 private: |
|
47 virtual TBool IsDisplayingMenuOrDialog() const = 0; |
|
48 virtual void SimulateKeyEventL(const TKeyEvent& aKeyEvent) = 0; |
|
49 virtual void StopDisplayingMenuBar() = 0; |
|
50 virtual void ExitL() = 0; |
|
51 virtual void Stop() = 0; |
|
52 void DeleteSelfIfSelfOwned(); |
|
53 private: |
|
54 enum TFlags |
|
55 {ETriedDismissMenu=0x01}; |
|
56 protected: |
|
57 CEikonEnv& iEikEnv; |
|
58 CAknAppUi* iBaseAppUi; |
|
59 TInt iStartLevel; |
|
60 TInt iCount; |
|
61 TBool iSelfOwned; |
|
62 }; |
|
63 |
|
64 |
|
65 NONSHARABLE_CLASS(CAknAppShutter) : public CAknShutter |
|
66 { |
|
67 public: |
|
68 static CAknAppShutter* NewL(CEikonEnv& aEikEnv, CAknAppUi* aBaseAppUi, CAknAppShutter** aSelfPtr); // aSelfPtr must be the address of a CAknAppShutter* in the heap |
|
69 void Start(); |
|
70 private: |
|
71 CAknAppShutter(CEikonEnv& aEikEnv, CAknAppUi* aBaseAppUi, CAknAppShutter** aSelfPtr); |
|
72 TBool IsDisplayingMenuOrDialog() const; |
|
73 void SimulateKeyEventL(const TKeyEvent& aKeyEvent); |
|
74 void StopDisplayingMenuBar(); |
|
75 void ExitL(); |
|
76 void Stop(); |
|
77 void StopDisplayingToolbar(); |
|
78 private: |
|
79 CAknAppShutter** iSelfPtr; |
|
80 }; |
|
81 |
|
82 |
|
83 NONSHARABLE_CLASS(CAknViewShutter) : public CAknShutter |
|
84 { |
|
85 public: |
|
86 ~CAknViewShutter(); |
|
87 static CAknViewShutter* NewL(CEikonEnv& aEikEnv, CAknAppUi* aBaseAppUi); |
|
88 void Start( const RPointerArray<CAknView>& aViews ); |
|
89 private: |
|
90 CAknViewShutter(CEikonEnv& aEikEnv, CAknAppUi* aBaseAppUi); |
|
91 TBool IsDisplayingMenuOrDialog() const; |
|
92 void SimulateKeyEventL(const TKeyEvent& aKeyEvent); |
|
93 void StopDisplayingMenuBar(); |
|
94 void ExitL(); |
|
95 void Stop(); |
|
96 private: |
|
97 RPointerArray<CAknView> iViews; |
|
98 }; |
|
99 |
|
100 #endif |
|
101 |