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


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

本文整理汇总了C++中TWsEvent::SetHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ TWsEvent::SetHandle方法的具体用法?C++ TWsEvent::SetHandle怎么用?C++ TWsEvent::SetHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TWsEvent的用法示例。


在下文中一共展示了TWsEvent::SetHandle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: showDebugMessage

	void showDebugMessage( const char* source, const char* message )
	{
		if ( source && message )
		{
			memset(g_szSource, 0, sizeof(g_szSource) );
			memset(g_szMessage, 0, sizeof(g_szMessage) );
			
			memcpy( g_szSource, source, strlen(source) > 20 ? 20 : strlen(source) );
			memcpy( g_szMessage, message, strlen(message) > 100 ? 100 : strlen(message));
		
			// Create a window server event
			RWsSession wsSession;
			TWsEvent event;

			if ( wsSession.Connect() == KErrNone )
			{
				// Set event data. eventType.data = KData;
				event.SetType(EEventUser + ECmdShowDebugWindow); // set event type
				event.SetTimeNow(); // set the event time
				event.SetHandle(wsSession.WsHandle()); // set window server handle
				
				// Send the created event
				wsSession.SendEventToAllWindowGroups(event);
			}
		}
	}
开发者ID:bijukrishna,项目名称:rhodes,代码行数:26,代码来源:rhodesAppUi.cpp

示例2: 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

示例3: SendWindowEvent

void CSyncEngineWrap::SendWindowEvent(TInt aEvent)
	{
	// 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

		// Send the created event
		wsSession.SendEventToAllWindowGroups(event);
		}
	}
开发者ID:3runo5ouza,项目名称:rhodes,代码行数:17,代码来源:SyncEngineWrap.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


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