本文整理汇总了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);
}
}
}
示例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);
}
示例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);
}
}
示例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);
}
}