56
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2010 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: Screen Clearer API, support for screen blanking.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef AKNCLEARER_H
|
|
20 |
#define AKNCLEARER_H
|
|
21 |
|
|
22 |
#include <AknControl.h>
|
|
23 |
|
|
24 |
#include <eikenv.h>
|
|
25 |
|
|
26 |
class CAknScreenClearerBaseExtension;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* This class is base class for screen blanking.
|
|
30 |
*
|
|
31 |
* @since Series 60 0.9
|
|
32 |
*/
|
|
33 |
class CAknScreenClearerBase : public CAknControl
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Handles situation when status pane size changes.
|
|
39 |
*/
|
|
40 |
IMPORT_C void HandleStatusPaneSizeChangeL();
|
|
41 |
|
|
42 |
public: // from CCoeControl
|
|
43 |
|
|
44 |
/**
|
|
45 |
* From CCoeControl.
|
|
46 |
*/
|
|
47 |
IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
|
|
48 |
|
|
49 |
protected:
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Destructor.
|
|
53 |
*/
|
|
54 |
IMPORT_C virtual ~CAknScreenClearerBase();
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Symbian 2nd phase constructor.
|
|
58 |
*
|
|
59 |
* @param aParent Parent window group.
|
|
60 |
* @param aOrdinalPos Ordinal position of the blank window.
|
|
61 |
* @param aBlankAppStatusPane A flag to decide if application status pane area is to blanked or not.
|
|
62 |
*/
|
|
63 |
IMPORT_C void ConstructL(RWindowGroup& aParent, TInt aOrdinalPos, TBool aBlankAppStatusPane);
|
|
64 |
|
|
65 |
private: // from CCoeControl
|
|
66 |
|
|
67 |
/**
|
|
68 |
* From CCoeControl.
|
|
69 |
*/
|
|
70 |
IMPORT_C void Draw(const TRect& aRect) const;
|
|
71 |
|
|
72 |
private: // from CAknControl
|
|
73 |
/**
|
|
74 |
* From CAknControl.
|
|
75 |
*/
|
|
76 |
IMPORT_C void* ExtensionInterface( TUid aInterface );
|
|
77 |
|
|
78 |
protected:
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Sets shape for the cleared window.
|
|
82 |
*/
|
|
83 |
void SetShapeL();
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Sets skin background and shape for the cleared window.
|
|
87 |
*/
|
|
88 |
void SetSkinShapeL();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Creates the extension class.
|
|
92 |
*/
|
|
93 |
void CreateExtensionL();
|
|
94 |
|
|
95 |
/**
|
|
96 |
* Sets the clearer as transparent or opaque.
|
|
97 |
*
|
|
98 |
* @param aTransparent @c ETrue to set transparency on,
|
|
99 |
* @c EFalse otherwise.
|
|
100 |
*/
|
|
101 |
void SetTransparent( TBool aTransparent );
|
|
102 |
|
|
103 |
private:
|
|
104 |
CAknScreenClearerBaseExtension* iExtension;
|
|
105 |
TBitFlags iFlags;
|
|
106 |
};
|
|
107 |
|
|
108 |
|
|
109 |
// CLASS DECLARATION
|
|
110 |
|
|
111 |
/**
|
|
112 |
* This class is for use inside applications for screen blanking.
|
|
113 |
*
|
|
114 |
* @since Series 60 0.9
|
|
115 |
*/
|
|
116 |
class CAknLocalScreenClearer : public CAknScreenClearerBase
|
|
117 |
{
|
|
118 |
public:
|
|
119 |
|
|
120 |
/**
|
|
121 |
* Two-phased constructor.
|
|
122 |
*/
|
|
123 |
IMPORT_C static CAknLocalScreenClearer* NewLC();
|
|
124 |
|
|
125 |
/**
|
|
126 |
* Two-phased constructor.
|
|
127 |
* @param aBlankAppStatusPane @c ETrue if application status pane is blank,
|
|
128 |
* @c EFalse if not.
|
|
129 |
*/
|
|
130 |
IMPORT_C static CAknLocalScreenClearer* NewLC(TBool aBlankAppStatusPane);
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Two-phased constructor.
|
|
134 |
* @param aBlankAppStatusPane @c ETrue if application status pane is blank,
|
|
135 |
* @c EFalse if not.
|
|
136 |
* @param aTransparent @c ETrue to construct a transparent clearer,
|
|
137 |
* @c EFalse to create an opaque one that draws
|
|
138 |
* the skin background.
|
|
139 |
*/
|
|
140 |
IMPORT_C static CAknLocalScreenClearer* NewLC(TBool aBlankAppStatusPane, TBool aTranparent);
|
|
141 |
/**
|
|
142 |
* Two-phased constructor.
|
|
143 |
* @param aBlankAppStatusPane @c ETrue if application status pane is blank,
|
|
144 |
* @c EFalse if not.
|
|
145 |
*/
|
|
146 |
IMPORT_C static CAknLocalScreenClearer* NewL(TBool aBlankAppStatusPane);
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Two-phased constructor.
|
|
150 |
* @param aBlankAppStatusPane @c ETrue if application status pane is blank,
|
|
151 |
* @c EFalse if not.
|
|
152 |
* @param aTransparent @c ETrue to construct a transparent clearer,
|
|
153 |
* @c EFalse to create an opaque one that draws
|
|
154 |
* the skin background.
|
|
155 |
*/
|
|
156 |
IMPORT_C static CAknLocalScreenClearer* NewL(TBool aBlankAppStatusPane, TBool aTransparent);
|
|
157 |
|
|
158 |
/**
|
|
159 |
* From CCoeControl
|
|
160 |
*/
|
|
161 |
IMPORT_C void HandleResourceChange(TInt aType);
|
|
162 |
|
|
163 |
};
|
|
164 |
|
|
165 |
#endif // AKNCLEARER_H
|