本文整理汇总了C++中TRawEvent::Pos方法的典型用法代码示例。如果您正苦于以下问题:C++ TRawEvent::Pos方法的具体用法?C++ TRawEvent::Pos怎么用?C++ TRawEvent::Pos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRawEvent
的用法示例。
在下文中一共展示了TRawEvent::Pos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Command
// -----------------------------------------------------------------------------
// CImage::Command()
// Function for buffered commands and commands that cannot fail/leave.
// -----------------------------------------------------------------------------
//
void CImage::Command( TInt aOpcode, TAny* aArgs )
{
DBG(RDebug::Print(_L("CImage::Command %d"), aOpcode ));
switch ( aOpcode )
{
case KStartBTCursorAnim:
{
iSpriteFunctions->Activate(ETrue);
}
break;
case KStopBTCursorAnim:
{
iSpriteFunctions->Activate(EFalse);
}
break;
case KRedrawBTCursorAnim:
{
iSpriteFunctions->Activate(EFalse);
iSpriteGc->Reset();
DBG(RDebug::Print(
_L("[BTHID]\tCImage::Command iLastUsedPoint (%d, %d)"), iLastUsedPoint.iX, iLastUsedPoint.iY));
iSpriteFunctions->SetPosition(iLastUsedPoint);
iSpriteFunctions->SizeChangedL();
iSpriteFunctions->Activate(ETrue);
}
break;
case KResetBTCursorAnim:
{
iSpriteFunctions->Activate(EFalse);
iSpriteGc->Reset();
DBG(RDebug::Print(_L("[BTHID]\tCImage::Command KResetBTCursorAnim") ));
iLastUsedPoint.iX = 0;
iLastUsedPoint.iY = 0;
iSpriteFunctions->SetPosition(iLastUsedPoint);
iSpriteFunctions->SizeChangedL();
iSpriteFunctions->Activate(ETrue);
}
break;
case KChangeCursor:
{
iLastUsedPoint = *(TPoint *)aArgs;
DBG(RDebug::Print(
_L("[BTHID]\tCImage::Command KChangeCursor *(TPoint *)aArgs (%d, %d)"), iLastUsedPoint.iX, iLastUsedPoint.iY));
iSpriteFunctions->SetPosition(iLastUsedPoint);
}
break;
case KSendRawEvent:
{
TRawEvent rawEvent = *(TRawEvent *)aArgs;
iLastUsedPoint = rawEvent.Pos();
DBG(RDebug::Print(
_L("[BTHID]\tCImage::Command KSendRawEvent rawEvent.Pos() (%d, %d)"), iLastUsedPoint.iX, iLastUsedPoint.iY));
iSpriteFunctions->SetPosition(iLastUsedPoint);
iFunctions->PostRawEvent( rawEvent );
}
break;
default:
User::Panic( KAnimation, EPanicAnimationServer );
break;
}
}