Update contrib.
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Window server priority key queue handling
21 CPriorityKey::CPriorityKey(CWsClient *aOwner) : CEventBase(aOwner)
23 __DECLARE_NAME(_S("CPriorityKey"));
26 void CPriorityKey::PriorityKey(TInt aHandle, const TKeyData &aKey, TInt aScanCode)
28 // Called when a priority key is pressed
31 if (!iEventMsg.IsNull())
33 iPriorityKeyHandle=aHandle;
40 void CPriorityKey::GetData()
42 // If there is an outstanding abort event in the queue, reply with it's data, else send a null abort event
45 TWsPriorityKeyEvent event;
46 TKeyEvent *key=event.Key();
47 key->iScanCode=iScanCode;
48 key->iCode=iPriorityKey.iKeyCode;
49 key->iModifiers=iPriorityKey.iModifiers;
51 event.SetHandle(iPriorityKeyHandle);
52 CEventBase::GetData(&event,sizeof(event));
56 TPriorityKey::TPriorityKey(TUint aKeycode,TUint aModifierMask,TUint aModifiers,TPriorityKey *aPriorityKeys) :
59 iModifiers(aModifiers),
60 iModifierMask(aModifierMask)
63 TInt TPriorityKey::Equals(TUint aKeycode,TUint aModifierMask,TUint aModifiers)
65 return(iKeyCode==aKeycode && iModifierMask==aModifierMask && iModifiers==aModifiers);
68 TInt TPriorityKey::KeyMatches(const TKeyData &aKey)
70 return(iKeyCode==aKey.iKeyCode && (iModifierMask&aKey.iModifiers)==iModifiers);