equal
deleted
inserted
replaced
173 // |
173 // |
174 EXPORT_C void RImageCommander::ImageCommand( TInt aCommand ) |
174 EXPORT_C void RImageCommander::ImageCommand( TInt aCommand ) |
175 { |
175 { |
176 // Could optionally decode the commands here |
176 // Could optionally decode the commands here |
177 DBG(RDebug::Print(_L("RImageCommander::ImageCommand %d"), aCommand)); |
177 DBG(RDebug::Print(_L("RImageCommander::ImageCommand %d"), aCommand)); |
|
178 if ( aCommand == KRedrawBTCursorAnim ) |
|
179 { |
|
180 //reset the current location to avoid sudden jumping |
|
181 iCurrentPoint.SetXY(0,0); |
|
182 } |
178 |
183 |
179 RAnim::Command( aCommand ); |
184 RAnim::Command( aCommand ); |
180 |
185 |
181 DBG(RDebug::Print(_L("RImageCommander::ImageCommand OUT"))); |
186 DBG(RDebug::Print(_L("RImageCommander::ImageCommand OUT"))); |
182 |
187 |
228 TRawEventDataPckg rawEventPckg(rawEvent); |
233 TRawEventDataPckg rawEventPckg(rawEvent); |
229 RAnim::Command( KSendRawEvent, rawEventPckg ); |
234 RAnim::Command( KSendRawEvent, rawEventPckg ); |
230 return KErrNone; |
235 return KErrNone; |
231 } |
236 } |
232 |
237 |
233 |
|
234 TBool RImageCommander::RestrictPos() |
238 TBool RImageCommander::RestrictPos() |
235 { |
239 { |
236 TBool notInScreen(EFalse); |
240 TBool notInScreen(EFalse); |
237 TPixelsAndRotation sizeAndRotation; |
241 TPixelsAndRotation sizeAndRotation; |
238 sizeAndRotation.iPixelSize.SetSize(360,640); // Just a guess |
242 sizeAndRotation.iPixelSize.SetSize(360,640); // Just a guess |
240 if (screen) |
244 if (screen) |
241 { |
245 { |
242 TInt mode(screen->CurrentScreenMode()); |
246 TInt mode(screen->CurrentScreenMode()); |
243 screen->GetScreenModeSizeAndRotation(mode, sizeAndRotation); |
247 screen->GetScreenModeSizeAndRotation(mode, sizeAndRotation); |
244 } |
248 } |
|
249 |
|
250 DBG( |
|
251 RDebug::Print(_L("RImageCommander::RestrictPos sizeAndRotation.iPixelSize (%d,%d)"), sizeAndRotation.iPixelSize.iWidth, sizeAndRotation.iPixelSize.iHeight); |
|
252 RDebug::Print(_L("RImageCommander::RestrictPos sizeAndRotation.iRotation (%d)"), sizeAndRotation.iRotation); |
|
253 ) |
|
254 |
245 TRect validRect(sizeAndRotation.iPixelSize); |
255 TRect validRect(sizeAndRotation.iPixelSize); |
246 if (! validRect.Contains(iCurrentPoint)) |
256 if (! validRect.Contains(iCurrentPoint)) |
247 { |
257 { |
248 notInScreen = ETrue; |
258 notInScreen = ETrue; |
249 if (iCurrentPoint.iX<0) |
259 if (iCurrentPoint.iX<0) |
266 TBool outSide(RestrictPos()); |
276 TBool outSide(RestrictPos()); |
267 |
277 |
268 DBG( |
278 DBG( |
269 if (outSide) |
279 if (outSide) |
270 { |
280 { |
271 RDebug::Print(_L("RImageCommander::CheckCurrentPoint not in screen (%d,%d)"), pos.iX, pos.iY); |
281 RDebug::Print(_L("RImageCommander::CheckCurrentPoint NOT in screen (%d,%d)"), pos.iX, pos.iY); |
|
282 } |
|
283 else |
|
284 { |
|
285 RDebug::Print(_L("RImageCommander::CheckCurrentPoint DOES in screen (%d,%d)"), pos.iX, pos.iY); |
272 } |
286 } |
273 ) |
287 ) |
274 return outSide; |
288 return outSide; |
275 } |
289 } |
276 |
290 |