158 * @return input mode |
156 * @return input mode |
159 */ |
157 */ |
160 TInt SupportInputMode(); |
158 TInt SupportInputMode(); |
161 |
159 |
162 /** |
160 /** |
163 * Set input language Id |
|
164 * |
|
165 * @since S60 v4.0 |
|
166 * @param aLanguage The input language Id |
|
167 * @return The operation result code.KErrNone if successfully. |
|
168 */ |
|
169 TInt SetInputLanguage( TInt aLanguage ); |
|
170 |
|
171 /** |
|
172 * Set UI layout id. It will create the UI by the Id |
161 * Set UI layout id. It will create the UI by the Id |
173 * |
162 * |
174 * @since S60 v4.0 |
163 * @since S60 v4.0 |
175 * @param aId The layout Id |
164 * @param aId The layout Id |
176 * @return The operation result code.KErrNone if successfully. |
165 * @return The operation result code.KErrNone if successfully. |
470 void SetEditorPriority(TInt aFlag); |
459 void SetEditorPriority(TInt aFlag); |
471 |
460 |
472 void ClearTouchUI(); |
461 void ClearTouchUI(); |
473 void SetResourceChange(TBool aFlag); |
462 void SetResourceChange(TBool aFlag); |
474 |
463 |
475 /** |
|
476 * Starts the server thread |
|
477 * |
|
478 * @since S60 v4.0 |
|
479 *@return KErrNone if server was created successfully |
|
480 * KErrAlreadyExists if the server is already running |
|
481 * otherwise one of the system wide error codes |
|
482 */ |
|
483 TInt StartThreadL(); |
|
484 |
|
485 //TInt ConnectAsync(TRequestStatus& status); |
|
486 TInt StartThreadAsyncL(); |
|
487 void AddObserver(); |
|
488 TBool ServerReady(); |
|
489 void OnServerStarted(TInt); |
|
490 |
|
491 private: |
464 private: |
492 /** |
465 /** |
493 * Constructor |
466 * Constructor |
494 * |
467 * |
495 * @since S60 v4.0 |
468 * @since S60 v4.0 |
496 */ |
469 */ |
497 RPeninputServerImpl(); |
470 RPeninputServerImpl(); |
498 |
471 |
499 void ConstructL(const TUid& aUid,TRequestStatus* aStatus); |
472 void ConstructL(const TUid& aUid); |
500 |
473 |
501 TInt DoConnectL(); |
474 TInt DoConnectL(); |
502 TInt DoConnectL(TRequestStatus* aStatus); |
|
503 |
475 |
504 void GetUiLayoutPosAndSize(); |
476 void GetUiLayoutPosAndSize(); |
505 |
477 |
506 void DimUiLayoutL(TBool aFlag); |
478 void DimUiLayoutL(TBool aFlag); |
507 |
479 |
508 private: // New functions |
480 private: // New functions |
509 |
481 |
|
482 /** |
|
483 * Starts the server thread |
|
484 * |
|
485 * @since S60 v4.0 |
|
486 *@return KErrNone if server was created successfully |
|
487 * KErrAlreadyExists if the server is already running |
|
488 * otherwise one of the system wide error codes |
|
489 */ |
|
490 TInt StartThreadL(); |
510 |
491 |
511 void ReadIntArrayFromBufL(const TDesC8& aBuf, RArray<TInt>& aResult); |
492 void ReadIntArrayFromBufL(const TDesC8& aBuf, RArray<TInt>& aResult); |
512 |
493 |
513 void DoAddPenUiActivationHandler(); |
494 void DoAddPenUiActivationHandler(); |
514 private: // Data |
495 private: // Data |
554 TSize iSize; |
535 TSize iSize; |
555 TBool iGlobalNotes; |
536 TBool iGlobalNotes; |
556 TBool iInternalPopup; |
537 TBool iInternalPopup; |
557 TInt iPriority; |
538 TInt iPriority; |
558 TBool iResourceChange; |
539 TBool iResourceChange; |
559 TBool iStartServerOver; |
|
560 CWaitingServerAo* iWaiterAo; |
|
561 TRequestStatus* iPendingRequest; |
|
562 TBool iServerReady; |
|
563 }; |
540 }; |
564 |
|
565 |
|
566 class CWaitingServerAo : public CActive |
|
567 { |
|
568 public: |
|
569 |
|
570 CWaitingServerAo(RPeninputServerImpl* aClient); |
|
571 |
|
572 /** |
|
573 * From CActive |
|
574 * will be called when stroke timer ends |
|
575 * |
|
576 * @since S60 v4.0 |
|
577 */ |
|
578 void RunL(); |
|
579 |
|
580 /** |
|
581 * From CActive |
|
582 * will be called if RunL leaves |
|
583 * |
|
584 * @since S60 v4.0 |
|
585 */ |
|
586 TInt RunError(TInt aError); |
|
587 |
|
588 /** |
|
589 * From CActive |
|
590 * will be called when stroke timer has been cancelled |
|
591 * |
|
592 * @since S60 v4.0 |
|
593 */ |
|
594 void DoCancel(); |
|
595 |
|
596 TRequestStatus& RequestStatus(); |
|
597 |
|
598 RPeninputServerImpl* iClient; |
|
599 }; |
|
600 |
541 |
601 |
542 |
602 NONSHARABLE_CLASS(CPenInputSingletonClient) : public CCoeStatic |
543 NONSHARABLE_CLASS(CPenInputSingletonClient) : public CCoeStatic |
603 { |
544 { |
604 public: |
545 public: |