|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 #include <coeview.h> // class MCoeView |
|
18 |
|
19 // |
|
20 // MCoeView |
|
21 // |
|
22 |
|
23 EXPORT_C MCoeView::MCoeView() |
|
24 { |
|
25 } |
|
26 |
|
27 /** |
|
28 * Handles a change to the screen device returning the value of the TVwsViewIdAndMessage object that describes what |
|
29 * the view arcitecture should do next. Returns the id of the active view by default. |
|
30 * @publishedAll |
|
31 * @released |
|
32 */ |
|
33 EXPORT_C TVwsViewIdAndMessage MCoeView::ViewScreenDeviceChangedL() |
|
34 { |
|
35 CCoeScreenDeviceChangeDefaultHandler* screenChangeHandler=CCoeScreenDeviceChangeDefaultHandler::Self(); |
|
36 if (screenChangeHandler) |
|
37 { |
|
38 return screenChangeHandler->DefaultViewOnScreenDeviceChanged(); |
|
39 } |
|
40 return TVwsViewIdAndMessage(); |
|
41 } |
|
42 |
|
43 |
|
44 /** |
|
45 * Constructs the view. The view architecture can construct registered views in the background or on first activation. |
|
46 * Empty by default. |
|
47 * @publishedAll |
|
48 * @released |
|
49 */ |
|
50 EXPORT_C void MCoeView::ViewConstructL() |
|
51 {} |
|
52 |
|
53 /** |
|
54 * By default, Views are compatible with all screen modes. |
|
55 * @publishedAll |
|
56 * @released |
|
57 */ |
|
58 EXPORT_C TBool MCoeView::ViewScreenModeCompatible(TInt /*aScreenMode*/) |
|
59 { |
|
60 return ETrue; |
|
61 } |
|
62 |
|
63 /** |
|
64 * Checks whether the view being activated has the preferred screen mode or not. |
|
65 * Empty by default. |
|
66 * @publishedAll |
|
67 * @released |
|
68 */ |
|
69 EXPORT_C void MCoeView::PrepareForViewActivation() |
|
70 { |
|
71 } |
|
72 |
|
73 EXPORT_C void MCoeView::MCoeView_Reserved_2() |
|
74 {} |
|
75 |
|
76 EXPORT_C void MCoeView::MCoeView_Reserved_3() |
|
77 {} |
|
78 |
|
79 |
|
80 // |
|
81 // MCoeViewDeactivationObserver |
|
82 // |
|
83 EXPORT_C MCoeViewDeactivationObserver::MCoeViewDeactivationObserver() |
|
84 {} |
|
85 |
|
86 EXPORT_C void MCoeViewDeactivationObserver::MCoeViewDeactivationObserver_Reserved_1() |
|
87 {} |
|
88 |
|
89 EXPORT_C void MCoeViewDeactivationObserver::MCoeViewDeactivationObserver_Reserved_2() |
|
90 {} |
|
91 |
|
92 |
|
93 // |
|
94 // MCoeViewActivationObserver |
|
95 // |
|
96 EXPORT_C MCoeViewActivationObserver::MCoeViewActivationObserver() |
|
97 {} |
|
98 |
|
99 EXPORT_C void MCoeViewActivationObserver::MCoeViewActivationObserver_Reserved_1() |
|
100 {} |
|
101 |
|
102 EXPORT_C void MCoeViewActivationObserver::MCoeViewActivationObserver_Reserved_2() |
|
103 {} |
|
104 |
|
105 // |
|
106 // MCoeViewObserver |
|
107 // |
|
108 EXPORT_C MCoeViewObserver::MCoeViewObserver() |
|
109 {} |
|
110 |
|
111 EXPORT_C void MCoeViewObserver::MCoeViewObserver_Reserved1() |
|
112 {} |
|
113 |
|
114 EXPORT_C void MCoeViewObserver::MCoeViewObserver_Reserved2() |
|
115 {} |
|
116 |
|
117 |
|
118 // |
|
119 // CCoeScreenDeviceChangeDefaultHandler |
|
120 // |
|
121 |
|
122 const TUid KScreenChangedHandlerUid={0x10005FC2}; |
|
123 |
|
124 /** Destructor. */ |
|
125 EXPORT_C CCoeScreenDeviceChangeDefaultHandler::~CCoeScreenDeviceChangeDefaultHandler() |
|
126 { |
|
127 } |
|
128 |
|
129 /* |
|
130 * Return a pointer to the screen mode change handler for this thread or NULL if there is |
|
131 * not one installed. Doesn't pass ownership |
|
132 * |
|
133 * @since 7.0 |
|
134 */ |
|
135 EXPORT_C CCoeScreenDeviceChangeDefaultHandler* CCoeScreenDeviceChangeDefaultHandler::Self() |
|
136 { // static |
|
137 return static_cast<CCoeScreenDeviceChangeDefaultHandler*>(CCoeEnv::Static(KScreenChangedHandlerUid)); |
|
138 } |
|
139 |
|
140 EXPORT_C CCoeScreenDeviceChangeDefaultHandler::CCoeScreenDeviceChangeDefaultHandler() |
|
141 : CCoeStatic(KScreenChangedHandlerUid) |
|
142 /** Default constructor. */ |
|
143 {} |
|
144 |
|
145 /** Constructor specifying the destruction priority of the object. |
|
146 |
|
147 @param aDestructionPriority Priority determining the order of destruction relative to other |
|
148 CCoeStatic-derived objects. The higher the destruction-priority of the object, the earlier that |
|
149 object is deleted. Objects with a positive destruction-priority are destroyed before the CCoeAppUi |
|
150 object is destroyed. Objects with a negative destruction-priority are destroyed after the CCoeAppUi |
|
151 object is destroyed. */ |
|
152 EXPORT_C CCoeScreenDeviceChangeDefaultHandler::CCoeScreenDeviceChangeDefaultHandler(TInt aDestructionPriority) |
|
153 : CCoeStatic(KScreenChangedHandlerUid, aDestructionPriority) |
|
154 {} |
|
155 |
|
156 EXPORT_C void CCoeScreenDeviceChangeDefaultHandler::CCoeStatic_Reserved1() |
|
157 {} |
|
158 |
|
159 EXPORT_C void CCoeScreenDeviceChangeDefaultHandler::CCoeStatic_Reserved2() |
|
160 {} |
|
161 |
|
162 EXPORT_C void CCoeScreenDeviceChangeDefaultHandler::CCoeScreenDeviceChangeDefaultHandler_Reserved1() |
|
163 {} |
|
164 |
|
165 EXPORT_C void CCoeScreenDeviceChangeDefaultHandler::CCoeScreenDeviceChangeDefaultHandler_Reserved2() |
|
166 {} |