本文整理汇总了C++中TWsEvent::EventData方法的典型用法代码示例。如果您正苦于以下问题:C++ TWsEvent::EventData方法的具体用法?C++ TWsEvent::EventData怎么用?C++ TWsEvent::EventData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TWsEvent
的用法示例。
在下文中一共展示了TWsEvent::EventData方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleWsEventL
void CEPongAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
{
if (aEvent.Type() == EEventUser)
{
TApaSystemEvent* eventData = reinterpret_cast<TApaSystemEvent*> (aEvent.EventData());
if ((*eventData) == EApaSystemEventShutdown)
{
eventData++;
if ((*eventData) == KGoomMemoryLowEvent)
{
return; // skip default handling
}
}
}
if (aEvent.Type() == EEventFocusGained)
{
if (iAppView)
iAppView->startEngine();
}
else if (aEvent.Type() == EEventFocusLost)
{
if (iAppView)
iAppView->stopEngine(ETrue);
}
CAknAppUi::HandleWsEventL(aEvent, aDestination);
}
示例2:
/**
* Handles system events
* @param aEvent - event that has to be handled by the function
*
*/
void CTApp1Ui::HandleSystemEventL(const TWsEvent& aEvent)
{
switch (*(TApaSystemEvent*)(aEvent.EventData()))
{
case EApaSystemEventBroughtToForeground:
RProcess::Rendezvous(KErrNone);
break;
default:
User::Leave(KErrAbort);
break;
}
}
示例3: Fail
/** Fetches a message
*/
TInt COomMessageFetch::Fail()
{
TWsEvent event;
TPtr8 ptr(NULL,0);
TUid uid;
event.SetType(EEventMessageReady);
event.SetHandle(CLIENT_HANDLE);
event.SetTimeNow();
SEventMessageReady& eventMessageReady=*(SEventMessageReady*)event.EventData();
eventMessageReady.iWindowGroupIdentifier=iWinGroup2.Identifier();
eventMessageReady.iMessageUid=TUid::Uid(UID_VALUE);
eventMessageReady.iMessageParametersSize=MESSAGE_LEN;
TInt ret=TheClient->iWs.FetchMessage(uid,ptr,event);
if (ret==KErrNone)
User::Free((TAny *)ptr.Ptr());
return(ret);
}
示例4: SendWindowEvent
void SendWindowEvent(TInt aEvent, const char* data)
{
// Create a window server event
RWsSession wsSession;
TWsEvent event;
if ( wsSession.Connect() == KErrNone )
{
// Set event data. eventType.data = KData;
event.SetType(EEventUser + aEvent); // set event type
event.SetTimeNow(); // set the event time
event.SetHandle(wsSession.WsHandle()); // set window server handle
if ( data )
((char**)event.EventData())[0] = strdup(data);
// Send the created event
wsSession.SendEventToAllWindowGroups(event);
}
}
示例5: ObserverEvent
TInt CSdlAppServ::ObserverEvent(TInt aEvent, TInt aParam)
{
if(iObserver != NULL)
{
if(RThread().Id() == iMainId)
{
return iObserver->SdlEvent(aEvent, aParam);
}
else if(RThread().Id() == gEpocEnv->iId && EnvUtils::IsOwnThreaded())
{
return iObserver->SdlThreadEvent(aEvent, aParam);
}
else
{
TWsEvent event;
event.SetType(ESDLWsEvent);
TInt load[] = {aEvent, aParam};
Mem::Copy(event.EventData(), load, sizeof(TInt) * 2);
event.SetTimeNow();
EpocSdlEnv::EventQueue().Append(event);
}
}
return 0;
}
示例6: InternalEvent
LOCAL_C TInt InternalEvent(const TWsEvent& aWsEvent)
{
const TInt* load = reinterpret_cast<const TInt*>(aWsEvent.EventData());
EpocSdlEnv::ObserverEvent(load[0], load[1]);
return 0;
}