153 } |
153 } |
154 |
154 |
155 iMouseInitialized = ETrue; |
155 iMouseInitialized = ETrue; |
156 } |
156 } |
157 |
157 |
|
158 void CPaintCursorAppView::RedrawCursor() |
|
159 { |
|
160 TRect mainPaneRect; |
|
161 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect ); |
|
162 SetRect( mainPaneRect ); |
|
163 DrawNow(); |
|
164 iClientCommander.ImageCommand( KRedrawBTCursorAnim ); |
|
165 iMouseInitialized = ETrue; |
|
166 } |
|
167 |
|
168 |
|
169 void CPaintCursorAppView::ResetCursor() |
|
170 { |
|
171 TRect mainPaneRect; |
|
172 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect ); |
|
173 SetRect( mainPaneRect ); |
|
174 DrawNow(); |
|
175 iClientCommander.ImageCommand( KResetBTCursorAnim ); |
|
176 iMouseInitialized = ETrue; |
|
177 } |
|
178 |
158 void CPaintCursorAppView::HandleResourceChange( TInt aType ) |
179 void CPaintCursorAppView::HandleResourceChange( TInt aType ) |
159 { |
180 { |
160 CCoeControl::HandleResourceChange( aType ); |
181 CCoeControl::HandleResourceChange( aType ); |
161 if ( aType == KEikDynamicLayoutVariantSwitch ) |
182 if ( aType == KEikDynamicLayoutVariantSwitch ) |
162 { |
183 { |
163 TRect mainPaneRect; |
184 ResetCursor(); |
164 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect ); |
|
165 SetRect( mainPaneRect ); |
|
166 DrawNow(); |
|
167 if (iMouseInitialized) |
|
168 { |
|
169 iClientCommander.ImageCommand( KRedrawBTCursorAnim ); |
|
170 } |
|
171 } |
185 } |
172 } |
186 } |
173 |
187 |
174 void CPaintCursorAppView::HandleControlEventL( |
188 void CPaintCursorAppView::HandleControlEventL( |
175 CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ ) |
189 CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ ) |