stifui/avkon/uitestserverstarter/src/AknUiEnvProxy.cpp
branchRCL_3
changeset 11 454d022d514b
parent 9 404ad6c9bc20
equal deleted inserted replaced
9:404ad6c9bc20 11:454d022d514b
   210 	TInt wgId = CCoeEnv::Static()->RootWin().Identifier();	
   210 	TInt wgId = CCoeEnv::Static()->RootWin().Identifier();	
   211 	// Send key event
   211 	// Send key event
   212 	TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
   212 	TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
   213 	User::LeaveIfError( ret );
   213 	User::LeaveIfError( ret );
   214 	
   214 	
       
   215 	wsSession.Flush();
       
   216 	
   215 	// Request notification when key press is handled
   217 	// Request notification when key press is handled
   216 	*aStatus = KRequestPending;
   218 	*aStatus = KRequestPending;
   217 	iAppUi->NotifyAboutHandledKeyPress( aStatus );
   219 	iAppUi->NotifyAboutHandledKeyPress( aStatus );
   218 	}
   220 	}
   219 
   221 
   255 		
   257 		
   256 	RWsSession& wsSession = CCoeEnv::Static()->WsSession();	
   258 	RWsSession& wsSession = CCoeEnv::Static()->WsSession();	
   257 	TInt wgId = wsSession.GetFocusWindowGroup();	
   259 	TInt wgId = wsSession.GetFocusWindowGroup();	
   258 	TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );	
   260 	TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );	
   259 	User::LeaveIfError( ret );
   261 	User::LeaveIfError( ret );
       
   262 	wsSession.Flush();
   260 	}
   263 	}
   261 
   264 
   262 
   265 
   263 /*
   266 /*
   264 -------------------------------------------------------------------------------
   267 -------------------------------------------------------------------------------
   307 		keyEvent->iRepeats = 0;
   310 		keyEvent->iRepeats = 0;
   308 		
   311 		
   309 		// Send single character from text to UI component
   312 		// Send single character from text to UI component
   310 		TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
   313 		TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
   311 		User::LeaveIfError( ret );
   314 		User::LeaveIfError( ret );
       
   315 		wsSession.Flush();
   312 		}
   316 		}
   313 		
   317 		
   314 	// Request notification when send text is recived
   318 	// Request notification when send text is recived
   315 	*aStatus = KRequestPending;
   319 	*aStatus = KRequestPending;
   316 	iAppUi->NotifyAboutHandledTextType( aStatus );	
   320 	iAppUi->NotifyAboutHandledTextType( aStatus );	
   357 		keyEvent->iRepeats = 0;
   361 		keyEvent->iRepeats = 0;
   358 		
   362 		
   359 		// Send single character from text to UI component
   363 		// Send single character from text to UI component
   360 		TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );			
   364 		TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );			
   361 		User::LeaveIfError( ret );
   365 		User::LeaveIfError( ret );
       
   366 		wsSession.Flush();
   362 		}
   367 		}
   363 	}
   368 	}
   364 
   369 
   365 /*
   370 /*
   366 -------------------------------------------------------------------------------
   371 -------------------------------------------------------------------------------
   420 				break;
   425 				break;
   421 			default:
   426 			default:
   422 				User::Leave( KErrArgument );
   427 				User::Leave( KErrArgument );
   423 			}
   428 			}
   424 		wsSession.SimulateRawEvent( pointerEventDown );
   429 		wsSession.SimulateRawEvent( pointerEventDown );
       
   430 		wsSession.Flush();
   425 		wsSession.SimulateRawEvent( pointerEventUp );
   431 		wsSession.SimulateRawEvent( pointerEventUp );
       
   432 		wsSession.Flush();
   426 		}
   433 		}
   427 	else
   434 	else
   428 		{
   435 		{
   429 		User::Leave( KErrArgument );
   436 		User::Leave( KErrArgument );
   430 		}	
   437 		}	
   495 			default:
   502 			default:
   496 				User::Leave( KErrArgument );
   503 				User::Leave( KErrArgument );
   497 			}
   504 			}
   498 		
   505 		
   499 			CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventDown );
   506 			CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventDown );
       
   507 			wsSession.Flush();
   500 			
   508 			
   501 			// Send info to AppUi that we are going to send key event
   509 			// Send info to AppUi that we are going to send key event
   502 			iAppUi->PrepareToPointerEvent();
   510 			iAppUi->PrepareToPointerEvent();
   503 	
   511 	
   504 			CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventUp );
   512 			CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventUp );
       
   513 			wsSession.Flush();
   505 	
   514 	
   506 			// Request notification when key press is handled
   515 			// Request notification when key press is handled
   507 			*aStatus = KRequestPending;
   516 			*aStatus = KRequestPending;
   508 			iAppUi->NotifyAboutHandledPointerEvent( aStatus );	
   517 			iAppUi->NotifyAboutHandledPointerEvent( aStatus );	
   509 		} 
   518 		}