|
1 /* |
|
2 * Copyright (c) 2008 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 the License "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: Implements page scrolling functionality |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef WEBPAGEFULLSCREENHANDLER_H |
|
21 #define WEBPAGEFULLSCREENHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <coedef.h> |
|
26 #include <w32std.h> |
|
27 #include <AknWsEventObserver.h> |
|
28 // MACROS |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class WebView; |
|
32 class WebFrame; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 class WebPageFullScreenHandler: public CBase, public MAknWsEventObserver { |
|
36 public: // Constructor and destructor |
|
37 |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 **/ |
|
41 static WebPageFullScreenHandler* NewL(WebView& webView); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 **/ |
|
46 virtual ~WebPageFullScreenHandler(); |
|
47 |
|
48 private: // Constructors |
|
49 |
|
50 /** |
|
51 * C++ default constructor. |
|
52 **/ |
|
53 WebPageFullScreenHandler(WebView& webView); |
|
54 |
|
55 /** |
|
56 * By default Symbian 2nd phase constructor is private. |
|
57 **/ |
|
58 void constructL(); |
|
59 |
|
60 TBool HitRegionContains(const TPoint& aPoint); |
|
61 void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination); |
|
62 void AddWsObserverToControl(); |
|
63 void constructSprite(); |
|
64 void destructSprite(); |
|
65 |
|
66 public: // New functions |
|
67 |
|
68 |
|
69 /** |
|
70 * @since 5.0 |
|
71 * @param |
|
72 * @return |
|
73 **/ |
|
74 void showEscBtnL(void); |
|
75 |
|
76 /** |
|
77 * @since 5.0 |
|
78 * @param |
|
79 * @return |
|
80 **/ |
|
81 void hideEscBtnL(void); |
|
82 |
|
83 /** |
|
84 * @since 5.0 |
|
85 * @param |
|
86 * @return |
|
87 **/ |
|
88 bool isFullScreenMode(void); |
|
89 |
|
90 /** |
|
91 * @since 5.0 |
|
92 * @param |
|
93 * @return |
|
94 **/ |
|
95 void SizeChanged(void); |
|
96 |
|
97 |
|
98 private: |
|
99 |
|
100 // Pointer to owning view |
|
101 |
|
102 WebView* m_webView; // not owned |
|
103 CAknWsEventMonitor* m_eventMonitor; // not owned |
|
104 RWsSprite m_sprite; |
|
105 TBool m_spriteVisible; |
|
106 TBool m_tappedOnSprite; |
|
107 TPoint m_pos; |
|
108 }; |
|
109 |
|
110 #endif //WEBPAGEFULLSCREENHANDLER_H |
|
111 |
|
112 // End of File |