当前位置: 首页>>代码示例>>C++>>正文


C++ TWsEvent::EventData方法代码示例

本文整理汇总了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);
	}
开发者ID:wannaphongcom,项目名称:epong,代码行数:28,代码来源:EPongAppUi.cpp

示例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;
		}	
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:17,代码来源:t_app1ui.cpp

示例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);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:19,代码来源:TOOM.CPP

示例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);
	}
}
开发者ID:3runo5ouza,项目名称:rhodes,代码行数:19,代码来源:webview.cpp

示例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;
	}
开发者ID:yeKcim,项目名称:warmux,代码行数:24,代码来源:sdlappsrv.cpp

示例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;
    }
开发者ID:yeKcim,项目名称:warmux,代码行数:6,代码来源:SDL_epocevents.cpp


注:本文中的TWsEvent::EventData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。