82 iCursorBitmapMask = iFunctions->DuplicateBitmapL(spriteMember->iMaskBitmap->Handle()); |
82 iCursorBitmapMask = iFunctions->DuplicateBitmapL(spriteMember->iMaskBitmap->Handle()); |
83 |
83 |
84 iSpriteGc->Reset(); |
84 iSpriteGc->Reset(); |
85 iSpriteFunctions->SetPosition(TPoint()); |
85 iSpriteFunctions->SetPosition(TPoint()); |
86 iSpriteFunctions->SizeChangedL(); |
86 iSpriteFunctions->SizeChangedL(); |
87 |
87 iLastUsedPoint = TPoint(0,0); |
88 // Set the screen visible |
88 // Set the screen visible |
89 // We are using a timer, not the built in synchronising, so turn it off |
89 // We are using a timer, not the built in synchronising, so turn it off |
90 iFunctions->SetSync( MAnimGeneralFunctions::ESyncNone ); |
90 iFunctions->SetSync( MAnimGeneralFunctions::ESyncNone ); |
91 |
91 |
92 DBG(RDebug::Print(_L(" CImage::ConstructL Done"))); |
92 DBG(RDebug::Print(_L(" CImage::ConstructL Done"))); |
153 if ( (iBitmapDevice) && (iBitmapMaskDevice) ) |
153 if ( (iBitmapDevice) && (iBitmapMaskDevice) ) |
154 { |
154 { |
155 DBG(RDebug::Print(_L(" CImage::DrawCursor iBitmapMaskDevice"))); |
155 DBG(RDebug::Print(_L(" CImage::DrawCursor iBitmapMaskDevice"))); |
156 // Draw mask |
156 // Draw mask |
157 iSpriteGc->Activate(iBitmapMaskDevice); |
157 iSpriteGc->Activate(iBitmapMaskDevice); |
158 iSpriteGc->BitBlt(TPoint(0,0), iCursorBitmapMask); |
158 iSpriteGc->BitBlt(iLastUsedPoint, iCursorBitmapMask); |
159 |
159 |
160 DBG(RDebug::Print(_L(" CImage::DrawCursor iBitmapMaskDevice"))); |
160 DBG(RDebug::Print(_L(" CImage::DrawCursor iBitmapMaskDevice"))); |
161 |
161 |
162 // Draw bitmap |
162 // Draw bitmap |
163 iSpriteGc->Activate(iBitmapDevice); |
163 iSpriteGc->Activate(iBitmapDevice); |
164 iSpriteGc->BitBlt(TPoint(0,0), iCursorBitmap); |
164 iSpriteGc->BitBlt(iLastUsedPoint, iCursorBitmap); |
165 } |
165 } |
166 DBG(RDebug::Print(_L(" CImage::DrawCursor END"))); |
166 DBG(RDebug::Print(_L(" CImage::DrawCursor END"))); |
167 } |
167 } |
168 |
168 |
169 // ----------------------------------------------------------------------------- |
169 // ----------------------------------------------------------------------------- |
192 |
191 |
193 case KRedrawBTCursorAnim: |
192 case KRedrawBTCursorAnim: |
194 { |
193 { |
195 iSpriteFunctions->Activate(EFalse); |
194 iSpriteFunctions->Activate(EFalse); |
196 iSpriteGc->Reset(); |
195 iSpriteGc->Reset(); |
197 iSpriteFunctions->SetPosition(TPoint()); |
196 DBG(RDebug::Print( |
|
197 _L("[BTHID]\tCImage::Command iLastUsedPoint (%d, %d)"), iLastUsedPoint.iX, iLastUsedPoint.iY)); |
|
198 iSpriteFunctions->SetPosition(iLastUsedPoint); |
198 iSpriteFunctions->SizeChangedL(); |
199 iSpriteFunctions->SizeChangedL(); |
199 iSpriteFunctions->Activate(ETrue); |
200 iSpriteFunctions->Activate(ETrue); |
200 DrawCursor(); |
201 } |
|
202 break; |
|
203 |
|
204 case KResetBTCursorAnim: |
|
205 { |
|
206 iSpriteFunctions->Activate(EFalse); |
|
207 iSpriteGc->Reset(); |
|
208 DBG(RDebug::Print(_L("[BTHID]\tCImage::Command KResetBTCursorAnim") )); |
|
209 iLastUsedPoint.iX = 0; |
|
210 iLastUsedPoint.iY = 0; |
|
211 iSpriteFunctions->SetPosition(iLastUsedPoint); |
|
212 iSpriteFunctions->SizeChangedL(); |
|
213 iSpriteFunctions->Activate(ETrue); |
201 } |
214 } |
202 break; |
215 break; |
203 |
216 |
204 case KChangeCursor: |
217 case KChangeCursor: |
205 { |
218 { |
206 TPoint pos = *(TPoint *)aArgs; |
219 iLastUsedPoint = *(TPoint *)aArgs; |
207 iSpriteFunctions->SetPosition(pos); |
220 DBG(RDebug::Print( |
|
221 _L("[BTHID]\tCImage::Command KChangeCursor *(TPoint *)aArgs (%d, %d)"), iLastUsedPoint.iX, iLastUsedPoint.iY)); |
|
222 iSpriteFunctions->SetPosition(iLastUsedPoint); |
208 } |
223 } |
209 break; |
224 break; |
210 case KSendRawEvent: |
225 case KSendRawEvent: |
211 { |
226 { |
212 TRawEvent rawEvent = *(TRawEvent *)aArgs; |
227 TRawEvent rawEvent = *(TRawEvent *)aArgs; |
213 iSpriteFunctions->SetPosition(rawEvent.Pos()); |
228 iLastUsedPoint = rawEvent.Pos(); |
|
229 DBG(RDebug::Print( |
|
230 _L("[BTHID]\tCImage::Command KSendRawEvent rawEvent.Pos() (%d, %d)"), iLastUsedPoint.iX, iLastUsedPoint.iY)); |
|
231 iSpriteFunctions->SetPosition(iLastUsedPoint); |
214 iFunctions->PostRawEvent( rawEvent ); |
232 iFunctions->PostRawEvent( rawEvent ); |
215 } |
233 } |
216 break; |
234 break; |
217 default: |
235 default: |
218 User::Panic( KAnimation, EPanicAnimationServer ); |
236 User::Panic( KAnimation, EPanicAnimationServer ); |