|
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: Class definition that monitors tv window visibility |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 * @internal reviewed 24/08/2007 by D Holland |
|
22 */ |
|
23 |
|
24 #ifndef __GLXWINVISIBILITYMONITOR_H__ |
|
25 #define __GLXWINVISIBILITYMONITOR_H__ |
|
26 |
|
27 // External Includes |
|
28 #include <e32base.h> // for CBase |
|
29 #include <AknWsEventObserver.h> // for MAknWsEventObserver |
|
30 |
|
31 |
|
32 // Forward Declarations |
|
33 class MGlxWindowVisibilityObserver; |
|
34 |
|
35 |
|
36 |
|
37 /** |
|
38 * Class Description |
|
39 * An Active object derived class is used to monitor the visibility of the |
|
40 * TV out window. |
|
41 * @author Loughlin |
|
42 */ |
|
43 NONSHARABLE_CLASS(CGlxWindowVisibilityMonitor) : public CBase, |
|
44 public MAknWsEventObserver |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * Static Symbian 2 stage constructor. |
|
49 */ |
|
50 static CGlxWindowVisibilityMonitor* NewL( |
|
51 MGlxWindowVisibilityObserver& aVisibilityObserver ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CGlxWindowVisibilityMonitor(); |
|
57 |
|
58 |
|
59 /** |
|
60 * Close. |
|
61 */ |
|
62 void Close(); |
|
63 |
|
64 private: |
|
65 |
|
66 /** |
|
67 * Standard C++ constructor |
|
68 */ |
|
69 CGlxWindowVisibilityMonitor( |
|
70 MGlxWindowVisibilityObserver& aVisibilityObserver ); |
|
71 |
|
72 /* |
|
73 * Symbian second stage construction |
|
74 */ |
|
75 void ConstructL(); |
|
76 |
|
77 public: // class member functions |
|
78 |
|
79 /* |
|
80 * Provides the caller with the current visible state |
|
81 * @return ETrue if the window is visible or false otherwise |
|
82 */ |
|
83 TBool IsVisible() const; |
|
84 |
|
85 public: // from MAknWsEventObserver |
|
86 |
|
87 void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ); |
|
88 |
|
89 private: // class member data |
|
90 // Not ownded: The Akn event monitor |
|
91 CAknWsEventMonitor* iAknEventMonitor; |
|
92 |
|
93 // Not owned: Window visibility observer |
|
94 MGlxWindowVisibilityObserver& iVisibilityObserver; |
|
95 |
|
96 // The visible state |
|
97 TBool iIsVisible; |
|
98 }; |
|
99 |
|
100 |
|
101 |
|
102 #endif // __GLXWINVISIBILITYMONITOR_H__ |