129 iBackupTactileControl.Close(); |
129 iBackupTactileControl.Close(); |
130 #endif // RD_TACTILE_FEEDBACK |
130 #endif // RD_TACTILE_FEEDBACK |
131 // Modify for bug ETMA-7X2C5Y begin |
131 // Modify for bug ETMA-7X2C5Y begin |
132 delete iPointerEventSuppressor; |
132 delete iPointerEventSuppressor; |
133 // Modify for bug ETMA-7X2C5Y end |
133 // Modify for bug ETMA-7X2C5Y end |
134 if (iDiscreetPopSubscriber) |
|
135 { |
|
136 iDiscreetPopSubscriber->StopSubscribe(); |
|
137 } |
|
138 iDiscreetPopProperty.Close(); |
|
139 delete iDiscreetPopSubscriber; |
|
140 iAknUiSrv.Close(); |
|
141 } |
134 } |
142 |
135 |
143 // --------------------------------------------------------------------------- |
136 // --------------------------------------------------------------------------- |
144 // CPeninputAnim::ConstructL |
137 // CPeninputAnim::ConstructL |
145 // Second phase constructor |
138 // Second phase constructor |
153 |
146 |
154 iFunctions->RegisterForNotifications(EDirectScreenAccess); |
147 iFunctions->RegisterForNotifications(EDirectScreenAccess); |
155 // Modify for bug ETMA-7X2C5Y begin |
148 // Modify for bug ETMA-7X2C5Y begin |
156 iPointerEventSuppressor = CPenPointerEventSuppressor::NewL(); |
149 iPointerEventSuppressor = CPenPointerEventSuppressor::NewL(); |
157 // Modify for bug ETMA-7X2C5Y end |
150 // Modify for bug ETMA-7X2C5Y end |
158 User::LeaveIfError(iDiscreetPopProperty.Attach(KPSUidAvkonDomain, |
|
159 KAknGlobalDiscreetPopupNumChanged)); |
|
160 iDiscreetPopSubscriber = new (ELeave) CSubscriber( |
|
161 TCallBack( DiscreetPopChangeNotification, this), |
|
162 iDiscreetPopProperty); |
|
163 iDiscreetPopSubscriber->SubscribeL(); |
|
164 |
|
165 User::LeaveIfError(iAknUiSrv.Connect()); |
|
166 iDiscreetPopArea = iAknUiSrv.GetInUseGlobalDiscreetPopupRect(); |
|
167 if(iDiscreetPopArea.Size().iWidth > 0) |
|
168 { |
|
169 iDiscreetPoped = ETrue; |
|
170 } |
|
171 } |
151 } |
172 |
152 |
173 |
153 |
174 // --------------------------------------------------------------------------- |
154 // --------------------------------------------------------------------------- |
175 // CPeninputAnim::Animate |
155 // CPeninputAnim::Animate |
702 |
682 |
703 msg->WriteL(KMsgSlot1,flagMsg); |
683 msg->WriteL(KMsgSlot1,flagMsg); |
704 |
684 |
705 } |
685 } |
706 break; |
686 break; |
|
687 case EPeninputOpSetDiscreeptPop: |
|
688 { |
|
689 TRect area; |
|
690 TPckg<TRect> msgData(area); |
|
691 msg->ReadL(KMsgSlot1,msgData); |
|
692 SetDiscreeptPop(area); |
|
693 } |
|
694 break; |
707 default: |
695 default: |
708 // unsupported opcode, panic the client |
696 // unsupported opcode, panic the client |
709 { |
697 { |
710 iFunctions->Panic(); |
698 iFunctions->Panic(); |
711 retValue = KErrNotSupported; |
699 retValue = KErrNotSupported; |
1139 if ((aFirst.iId == aSecond.iId) && (aFirst.iArea == aSecond.iArea)) |
1123 if ((aFirst.iId == aSecond.iId) && (aFirst.iArea == aSecond.iArea)) |
1140 return ETrue; |
1124 return ETrue; |
1141 return EFalse; |
1125 return EFalse; |
1142 } |
1126 } |
1143 #endif // RD_TACTILE_FEEDBACK |
1127 #endif // RD_TACTILE_FEEDBACK |
1144 TInt CPeninputAnim::DiscreetPopChangeNotification(TAny* aObj) |
1128 |
1145 { |
1129 void CPeninputAnim::SetDiscreeptPop(TRect aArea) |
1146 if (aObj) |
1130 { |
1147 { |
1131 iDiscreetPopArea = aArea; |
1148 static_cast<CPeninputAnim*>(aObj)->HandleDiscreetPopNotification(); |
|
1149 return KErrNone; |
|
1150 } |
|
1151 else |
|
1152 { |
|
1153 return KErrArgument; |
|
1154 } |
|
1155 } |
|
1156 |
|
1157 void CPeninputAnim::Refresh() |
|
1158 { |
|
1159 iDiscreetPopArea = iAknUiSrv.GetInUseGlobalDiscreetPopupRect(); |
|
1160 if(iDiscreetPopArea.Size().iWidth > 0) |
1132 if(iDiscreetPopArea.Size().iWidth > 0) |
1161 { |
1133 { |
1162 iDiscreetPoped = ETrue; |
1134 iDiscreetPoped = ETrue; |
1163 } |
1135 } |
1164 else |
1136 else |
1165 { |
1137 { |
1166 iDiscreetPoped = EFalse; |
1138 iDiscreetPoped = EFalse; |
1167 iDiscreetPopedCapture = EFalse; |
1139 iDiscreetPopedCapture = EFalse; |
1168 } |
1140 } |
1169 iDirty = EFalse; |
1141 } |
1170 } |
|
1171 |
|
1172 void CPeninputAnim::HandleDiscreetPopNotification() |
|
1173 { |
|
1174 iDirty = ETrue; |
|
1175 } |
|
1176 |
|
1177 CSubscriber::CSubscriber(TCallBack aCallBack, RProperty& aProperty) |
|
1178 : |
|
1179 CActive(EPriorityNormal), iCallBack(aCallBack), iProperty(aProperty) |
|
1180 { |
|
1181 CActiveScheduler::Add(this); |
|
1182 } |
|
1183 |
|
1184 CSubscriber::~CSubscriber() |
|
1185 { |
|
1186 Cancel(); |
|
1187 } |
|
1188 |
|
1189 void CSubscriber::SubscribeL() |
|
1190 { |
|
1191 if (!IsActive()) |
|
1192 { |
|
1193 iProperty.Subscribe(iStatus); |
|
1194 SetActive(); |
|
1195 } |
|
1196 } |
|
1197 |
|
1198 void CSubscriber::StopSubscribe() |
|
1199 { |
|
1200 Cancel(); |
|
1201 } |
|
1202 |
|
1203 void CSubscriber::RunL() |
|
1204 { |
|
1205 if (iStatus.Int() == KErrNone) |
|
1206 { |
|
1207 iCallBack.CallBack(); |
|
1208 SubscribeL(); |
|
1209 } |
|
1210 } |
|
1211 |
|
1212 void CSubscriber::DoCancel() |
|
1213 { |
|
1214 iProperty.Cancel(); |
|
1215 } |
|
1216 // End of File |
1142 // End of File |