|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of the vkb ui state machine (Standby State) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System includes |
|
20 #include <peninputlayoutcontext.h> |
|
21 #include <peninputdataconverter.h> |
|
22 |
|
23 // user includes |
|
24 #include "peninputvkb.hrh" // EPeninputLayoutVkbEventResetShift |
|
25 #include "peninputvkbuistatestandby.h" |
|
26 |
|
27 // ======== MEMBER FUNCTIONS ======== |
|
28 |
|
29 // Implementation of Class CPeninputVkbUiStateStandby |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CPeninputVkbUiStateStandby::NewL |
|
33 // (other items were commented in a header). |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 CPeninputVkbUiStateStandby* CPeninputVkbUiStateStandby::NewL(MPeninputUiStateMgr* aUiStateMgr, |
|
37 MPeninputLayoutContext* aContext) |
|
38 { |
|
39 CPeninputVkbUiStateStandby* self = new ( ELeave ) CPeninputVkbUiStateStandby(aUiStateMgr,aContext); |
|
40 CleanupStack::PushL(self); |
|
41 self->Construct(); |
|
42 CleanupStack::Pop(self); |
|
43 return self; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CPeninputVkbUiStateStandby::~CPeninputVkbUiStateStandby |
|
48 // (other items were commented in a header). |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CPeninputVkbUiStateStandby::~CPeninputVkbUiStateStandby() |
|
52 { |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CPeninputVkbUiStateStandby::HandleKeyEventL |
|
57 // (other items were commented in a header). |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 TBool CPeninputVkbUiStateStandby::HandleKeyEventL(const TRawEvent& /*aData*/) |
|
61 { |
|
62 return EFalse; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CPeninputVkbUiStateStandby::CPeninputVkbUiStateStandby |
|
67 // (other items were commented in a header). |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 CPeninputVkbUiStateStandby::CPeninputVkbUiStateStandby(MPeninputUiStateMgr* aUiStateMgr, |
|
71 MPeninputLayoutContext* aContext) |
|
72 :CPeninputVkbUiState(aUiStateMgr,aContext) |
|
73 { |
|
74 } |
|
75 |
|
76 // ----------------------------------------------------------------------------- |
|
77 // CPeninputVkbUiStateStandby::HandleVkbEvent |
|
78 // (other items were commented in a header). |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 TBool CPeninputVkbUiStateStandby::HandleVkbEvent(TInt /*aEventType*/, const TDesC& aEventData) |
|
82 { |
|
83 TBool rs = SendKey(aEventData); |
|
84 // If shift button is down |
|
85 TInt shiftDown = CPeninputDataConverter::AnyToInt |
|
86 ( iContext->RequestData( EPeninputDataTypeShiftDown ) ); |
|
87 |
|
88 if ( shiftDown ) |
|
89 { |
|
90 iContext->SendEventToWindow( EPeninputLayoutVkbEventResetShift, |
|
91 NULL ); |
|
92 } |
|
93 return rs; |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CPeninputVkbUiStateStandby::HandleBackEvent |
|
98 // (other items were commented in a header). |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 TBool CPeninputVkbUiStateStandby::HandleBackEvent(TInt /*aEventType*/, const TDesC& aEventData) |
|
102 { |
|
103 return SendKey(aEventData); |
|
104 } |
|
105 |
|
106 // ----------------------------------------------------------------------------- |
|
107 // CPeninputVkbUiStateStandby::HandleEnterSpaceTabEvent |
|
108 // (other items were commented in a header). |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 TBool CPeninputVkbUiStateStandby::HandleEnterSpaceTabEvent(TInt /*aEventType*/, const TDesC& aEventData) |
|
112 { |
|
113 return SendKey(aEventData); |
|
114 } |
|
115 |
|
116 // End Of File |