30 |
30 |
31 class CPeninputServerObserver; |
31 class CPeninputServerObserver; |
32 class MPenUiActivationHandler; |
32 class MPenUiActivationHandler; |
33 class CPenUiBackgroundWnd; |
33 class CPenUiBackgroundWnd; |
34 |
34 |
|
35 NONSHARABLE_CLASS(CPeninputServerWaiter) : public CBase |
|
36 { |
|
37 public: |
|
38 static CPeninputServerWaiter* NewL(); |
|
39 void Start(); |
|
40 void Stop(TInt aFlag); |
|
41 TBool IsStarted() |
|
42 { |
|
43 return iWaitScheduler->IsStarted(); |
|
44 } |
|
45 TInt Error() |
|
46 { |
|
47 return iError; |
|
48 } |
|
49 ~CPeninputServerWaiter(); |
|
50 protected: |
|
51 private: |
|
52 //CPeninputServerWaiter(); |
|
53 void ConstructL(); |
|
54 TInt iError; |
|
55 CActiveSchedulerWait* iWaitScheduler; |
|
56 }; |
|
57 |
35 NONSHARABLE_CLASS(TUiNotificationHandler) |
58 NONSHARABLE_CLASS(TUiNotificationHandler) |
36 { |
59 { |
37 public: |
60 public: |
38 TUiNotificationHandler(MPenUiActivationHandler* aHandler,TInt aType); |
61 TUiNotificationHandler(MPenUiActivationHandler* aHandler,TInt aType); |
39 public: |
62 public: |
40 MPenUiActivationHandler* iHandler; |
63 MPenUiActivationHandler* iHandler; |
41 TInt iType; |
64 TInt iType; |
42 }; |
65 }; |
43 |
66 |
44 |
|
45 class CWaitingServerAo; |
|
46 /** |
67 /** |
47 * Client side interface to PeninputSingletonServer. |
68 * Client side interface to PeninputSingletonServer. |
48 * |
69 * |
49 * |
70 * |
50 * @lib peninputclient.lib |
71 * @lib peninputclient.lib |
129 TBool IsDimmed(); |
150 TBool IsDimmed(); |
130 |
151 |
131 /** |
152 /** |
132 * Get the all support input mode |
153 * Get the all support input mode |
133 * |
154 * |
134 * @param aLanguage: The specific language |
155 * @since S60 v4.0 |
135 * @return input mode |
156 * @return input mode |
136 */ |
157 */ |
137 TInt SupportInputMode( TInt aLanguage ); |
158 TInt SupportInputMode(); |
138 |
159 |
139 /** |
|
140 * Set input language Id |
|
141 * |
|
142 * @since S60 v4.0 |
|
143 * @param aLanguage The input language Id |
|
144 * @return The operation result code.KErrNone if successfully. |
|
145 */ |
|
146 TInt SetInputLanguage( TInt aLanguage ); |
|
147 |
|
148 /** |
160 /** |
149 * 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 |
150 * |
162 * |
151 * @since S60 v4.0 |
163 * @since S60 v4.0 |
152 * @param aId The layout Id |
164 * @param aId The layout Id |
401 * @param aType The information type |
413 * @param aType The information type |
402 */ |
414 */ |
403 void UpdateAppInfo(const TDesC& aInfo, TPeninputAppInfo aType); |
415 void UpdateAppInfo(const TDesC& aInfo, TPeninputAppInfo aType); |
404 |
416 |
405 void HandleServerExit(); |
417 void HandleServerExit(); |
406 //void OnServerReady(TBool aFlag = ETrue); |
418 void OnServerReady(TBool aFlag = ETrue); |
407 TBool IsForegroundSession(); |
419 TBool IsForegroundSession(); |
408 //void SetForegroundFlag(TBool aFlag); |
420 //void SetForegroundFlag(TBool aFlag); |
409 void FinalClose(); |
421 void FinalClose(); |
410 /* |
422 /* |
411 * Enable/disable the auto open feature. When auto open feature is on, Focus change event |
423 * Enable/disable the auto open feature. When auto open feature is on, Focus change event |
446 void SetInternalPopUp(TBool aFlag); |
458 void SetInternalPopUp(TBool aFlag); |
447 void SetEditorPriority(TInt aFlag); |
459 void SetEditorPriority(TInt aFlag); |
448 |
460 |
449 void ClearTouchUI(); |
461 void ClearTouchUI(); |
450 void SetResourceChange(TBool aFlag); |
462 void SetResourceChange(TBool aFlag); |
451 |
|
452 void SetDataQueryPopped(TBool aFlag); |
|
453 |
|
454 void EnablePriorityChangeOnOriChange(TBool aEnabled); |
|
455 /** |
|
456 * Starts the server thread |
|
457 * |
|
458 * @since S60 v4.0 |
|
459 *@return KErrNone if server was created successfully |
|
460 * KErrAlreadyExists if the server is already running |
|
461 * otherwise one of the system wide error codes |
|
462 */ |
|
463 TInt StartThreadL(); |
|
464 |
|
465 //TInt ConnectAsync(TRequestStatus& status); |
|
466 TInt StartThreadAsyncL(); |
|
467 void AddObserver(); |
|
468 TBool ServerReady(); |
|
469 void OnServerStarted(TInt aErr); |
|
470 |
463 |
471 private: |
464 private: |
472 /** |
465 /** |
473 * Constructor |
466 * Constructor |
474 * |
467 * |
475 * @since S60 v4.0 |
468 * @since S60 v4.0 |
476 */ |
469 */ |
477 RPeninputServerImpl(); |
470 RPeninputServerImpl(); |
478 |
471 |
479 void ConstructL(const TUid& aUid,TRequestStatus* aStatus); |
472 void ConstructL(const TUid& aUid); |
480 |
473 |
481 TInt DoConnectL(); |
474 TInt DoConnectL(); |
482 TInt DoConnectL(TRequestStatus* aStatus); |
|
483 |
475 |
484 void GetUiLayoutPosAndSize(); |
476 void GetUiLayoutPosAndSize(); |
485 |
477 |
486 void DimUiLayoutL(TBool aFlag); |
478 void DimUiLayoutL(TBool aFlag); |
487 |
479 |
488 private: // New functions |
480 private: // New functions |
489 |
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(); |
490 |
491 |
491 void ReadIntArrayFromBufL(const TDesC8& aBuf, RArray<TInt>& aResult); |
492 void ReadIntArrayFromBufL(const TDesC8& aBuf, RArray<TInt>& aResult); |
492 |
493 |
493 void DoAddPenUiActivationHandler(); |
494 void DoAddPenUiActivationHandler(); |
494 private: // Data |
495 private: // Data |
531 TSize iSize; |
535 TSize iSize; |
532 TBool iGlobalNotes; |
536 TBool iGlobalNotes; |
533 TBool iInternalPopup; |
537 TBool iInternalPopup; |
534 TInt iPriority; |
538 TInt iPriority; |
535 TBool iResourceChange; |
539 TBool iResourceChange; |
536 TBool iStartServerOver; |
|
537 CWaitingServerAo* iWaiterAo; |
|
538 TRequestStatus* iPendingRequest; |
|
539 TBool iServerReady; |
|
540 TBool iDataQueryIsPopped; |
|
541 }; |
540 }; |
542 |
|
543 |
|
544 NONSHARABLE_CLASS(CWaitingServerAo) : public CActive |
|
545 { |
|
546 public: |
|
547 |
|
548 CWaitingServerAo(RPeninputServerImpl* aClient); |
|
549 |
|
550 /** |
|
551 * From CActive |
|
552 * will be called when stroke timer ends |
|
553 * |
|
554 * @since S60 v4.0 |
|
555 */ |
|
556 void RunL(); |
|
557 |
|
558 /** |
|
559 * From CActive |
|
560 * will be called if RunL leaves |
|
561 * |
|
562 * @since S60 v4.0 |
|
563 */ |
|
564 TInt RunError(TInt aError); |
|
565 |
|
566 /** |
|
567 * From CActive |
|
568 * will be called when stroke timer has been cancelled |
|
569 * |
|
570 * @since S60 v4.0 |
|
571 */ |
|
572 void DoCancel(); |
|
573 |
|
574 TRequestStatus& RequestStatus(); |
|
575 |
|
576 RPeninputServerImpl* iClient; |
|
577 }; |
|
578 |
541 |
579 |
542 |
580 NONSHARABLE_CLASS(CPenInputSingletonClient) : public CCoeStatic |
543 NONSHARABLE_CLASS(CPenInputSingletonClient) : public CCoeStatic |
581 { |
544 { |
582 public: |
545 public: |
631 |
594 |
632 /** |
595 /** |
633 * Show pen UI with priority. |
596 * Show pen UI with priority. |
634 */ |
597 */ |
635 void Show(const TRect& aRect, TBool aGlobalNotes, |
598 void Show(const TRect& aRect, TBool aGlobalNotes, |
636 TBool aInternal, TInt aPriority, TBool aResource, TBool aDataQueryPopped); |
599 TBool aInternal, TInt aPriority, TBool aResource); |
637 |
600 |
638 /** |
601 /** |
639 * Called from akncapserver appui to close fastswap. |
602 * Called from akncapserver appui to close fastswap. |
640 */ |
603 */ |
641 void Hide(); |
604 void Hide(); |