--- a/windowing/windowserver/nga/SERVER/EVENT.H Tue Aug 31 16:31:06 2010 +0300
+++ b/windowing/windowserver/nga/SERVER/EVENT.H Wed Sep 01 12:39:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -27,8 +27,7 @@
#include "w32cmd.h"
#include "EVQUEUE.H"
#include <w32adll.h>
-#include "graphics/WSGRAPHICDRAWER.H"
-#include <graphics/wskeyrouter.h>
+#include "Graphics/WSGRAPHICDRAWER.H"
class CWsClient;
class CWsWindowBase;
@@ -39,7 +38,7 @@
class CScreen;
class DWsScreenDevice;
-const TInt KRetryInitialDelay = 100000; //0.01 second
+const TInt KRetryInitialDelay = 100000; //0.1 second
struct TEventRequestItem
{
@@ -79,8 +78,8 @@
class TRepeatKey
{
public:
- TKeyEventRouterOutput iOutput;
- TInt iInputScanCode;
+ TKeyData iKey;
+ TInt iScanCode;
};
class CKeyboardRepeat : public CTimer
@@ -91,9 +90,9 @@
static void Destroy();
static void KeyDown();
static void KeyUp(TInt aScanCode);
- static void StartRepeat(TInt aInputScanCode, const TKeyEventRouterOutput& aShortEvent, const TKeyEventRouterOutput* aLongEvent);
+ static TBool StartRepeat(const TKeyData &aKey, TInt aScanCode, CWsWindowGroup *aRepeatFocus, CWsCaptureLongKey* longCapture);
static void CancelRepeat(CWsWindowGroup *aRepeatFocus);
- static void CancelRepeat(const TAny* aCaptureHandle, TBool aLongCaptureFlag);
+ static void CancelRepeat(CWsWindowGroup *aRepeatFocus,TUint aScanCode,TBool aLongCaptureFlag,TUint aModifiers=0);
static void SetRepeatTime(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime);
static void GetRepeatTime(TTimeIntervalMicroSeconds32 &aInitialTime, TTimeIntervalMicroSeconds32 &aTime);
static inline TBool IsAreadyActive();
@@ -109,13 +108,13 @@
static void doCancelRepeat();
void RunL();
private:
+ static CWsWindowGroup *iFocus;
static CKeyboardRepeat *iThis; // Needed as CTimer derived parts can't be static
static TTimeIntervalMicroSeconds32 iInitialTime;
static TTimeIntervalMicroSeconds32 iTime;
+ static TRepeatKey iCurrentRepeat;
static TRepeatType iRepeating;
- static TRepeatKey iCurrentRepeat;
static TRepeatKey iAlternateRepeat;
- static TRepeatKey iLongRepeat;
static TBool iAlternateRepeatExists;
static CWsCaptureLongKey* iLongCapture;
static TInt iRepeatRollover;
@@ -175,9 +174,9 @@
static CWsHotKey* ClearHotKeysL(TInt aHotKey);
static void ResetDefaultHotKeyL(TInt aHotKey);
static void SetHotKeyL(const TWsClCmdSetHotKey &aHotKey);
- static void AddCaptureKeyL(const TKeyCaptureRequest& aRequest);
- static void UpdateCaptureKeyL(const TKeyCaptureRequest& aRequest);
- static void CancelCaptureKey(TKeyCaptureType aType, TAny* aHandle);
+ static void AddCaptureKeyL(const TCaptureKey &aCaptureKey);
+ static void SetCaptureKey(TUint32 aHandle, const TCaptureKey &aCaptureKey);
+ static void CancelCaptureKey(TUint32 aHandle);
static void ClientDestroyed(CWsClient *aClient);
static inline void AddToSwitchOnEventListL(const CWsWindowBase &aWindow, TEventControl aCircumstances);
static inline void RemoveFromSwitchOnEventList(const CWsWindowBase &aWindow);
@@ -208,8 +207,7 @@
static void SendScreenDeviceChangedEvent(const CWsWindowBase *aWindow);
static TBool ProcessErrorMessages(TWsErrorMessage::TErrorCategory aCategory, TInt aError);
static void NotifyOom();
- static void ProcessKeyPress(const TKeyEvent& aKeyEvent, TBool aCheckRepeat,TInt aRepeats);
- static void QueueKeyPress(const TKeyEventRouterOutput& aOutput, TBool aIsRepeat, TInt aRepeats);
+ static void QueueKeyPress(const TKeyData& aKey, TInt aScanCode, CWsWindowGroup* aRepeatFocus, TBool aCheckRepeat,TInt aRepeats);
static void AddEventHandler(MEventHandler *aEventHandler, TBool aAdvancedPointersEnabled);
static void RemoveEventHandler(const MEventHandler *aEventHandler);
static void PotentialEventHandlerL(TInt aNum);
@@ -224,6 +222,9 @@
static void NotifyScreenDrawingEvent(const TRegion* aRegion);
static void NotifyScreenDrawingEvent(const TRect& aRect);
static inline const CRawEventReceiver* EventReceiver() {return iEventReceiver;}
+ static void PauseProcessRawEvents(TInt aPauseInterval);
+ static inline TInt GetConfigationPauseTime();
+
private:
class TRawEventHandler
{
@@ -252,8 +253,6 @@
static TEventRequestQueue iScreenDeviceChangedQueue;
static TTime iPrevOomMessageTime;
static CCaptureKeys *iCaptureKeys;
- static CKeyEventRouter *iKeyEventRouter;
- static RLibrary iKeyEventRouterLibrary;
static CWsHotKey *iHotKeys;
static TInt iModifierState;
static CRawEventReceiver *iEventReceiver;
@@ -264,6 +263,14 @@
static RArray<TWsEventHandler> iWsEventHandlers;
static TUint32 iBinaryFlags;
static TInt iEventHandlerCount;
+
+ // For supporting a pause in processing raw events after rotation.
+ // Pause in processing all raw pointer and key events (except processing by anim's dll plug-ins).
+ // All events will be ignored except for anim's dll plug-ins.
+ static TTimeIntervalMicroSeconds iPauseInterval;
+ static TTime iPauseStartTime;
+ // Filled from wsini.ini , example: SUPPRESSEVENTSTIMEAFTERROTATION 700000 //(0.7sec)
+ static TInt iConfigationPauseTime;
};
@@ -311,5 +318,7 @@
{iScreenDeviceChangedQueue.RemoveFromEventRequestListL(aWindow);}
inline TInt TWindowServerEvent::GetStoredModifierState()
{return(iModifierState);}
+inline TInt TWindowServerEvent::GetConfigationPauseTime()
+ {return(iConfigationPauseTime);}
#endif