windowing/windowserver/nga/SERVER/openwfc/server.h
changeset 188 1b081cb0800b
parent 45 36b2e23a8629
equal deleted inserted replaced
187:9f66f99ee56f 188:1b081cb0800b
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    25 #include <bitdev.h>
    25 #include <bitdev.h>
    26 #include <e32svr.h>
    26 #include <e32svr.h>
    27 #include "OBJECT.H"
    27 #include "OBJECT.H"
    28 #include "CLIENT.H"
    28 #include "CLIENT.H"
    29 #include "ScrDev.H"
    29 #include "ScrDev.H"
       
    30 #include <graphics/wskeyrouter.h>
    30 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H>
    31 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H>
       
    32 #include "Graphics/wsgraphicdrawerinternal.h"
    31 #include "WSGRAPHICDRAWERARRAY.H"
    33 #include "WSGRAPHICDRAWERARRAY.H"
    32 #include "panics.h"
    34 #include "panics.h"
    33 
    35 
    34 class CWsGc;
    36 class CWsGc;
    35 class CWsDirectScreenAccess;
    37 class CWsDirectScreenAccess;
   148 	void SetL(const TWsWinCmdCaptureKey &aCaptureKey);
   150 	void SetL(const TWsWinCmdCaptureKey &aCaptureKey);
   149 	void CommandL(TInt aOpcode, const TAny *aCmdData);
   151 	void CommandL(TInt aOpcode, const TAny *aCmdData);
   150 	inline CWsWindowGroup *WindowGroup();
   152 	inline CWsWindowGroup *WindowGroup();
   151 	inline const CWsWindowGroup *WindowGroup() const;
   153 	inline const CWsWindowGroup *WindowGroup() const;
   152 private:
   154 private:
   153 	void CmdToParams(const TWsWinCmdCaptureKey &aCaptureKey, TCaptureKey &aParams);
   155 	void CmdToRequest(const TWsWinCmdCaptureKey &aCaptureKey, TKeyCaptureRequest &aParams);
   154 private:
   156 private:
   155 	CWsWindowGroup *iWindowGroup;
   157 	CWsWindowGroup *iWindowGroup;
   156 	};
   158 	};
   157 
   159 
   158 class CWsHotKey : public CBase
   160 class CWsHotKey : public CBase
   179 public:
   181 public:
   180 	CWsCaptureKeyUpsAndDowns(CWsWindowGroup *owner);
   182 	CWsCaptureKeyUpsAndDowns(CWsWindowGroup *owner);
   181 	~CWsCaptureKeyUpsAndDowns();
   183 	~CWsCaptureKeyUpsAndDowns();
   182 	void ConstructL(const TWsWinCmdCaptureKey &aCaptureKey);
   184 	void ConstructL(const TWsWinCmdCaptureKey &aCaptureKey);
   183 	void CommandL(TInt aOpcode, const TAny *aCmdData);
   185 	void CommandL(TInt aOpcode, const TAny *aCmdData);
   184 	static CWsWindowGroup *CheckForCapture(TUint aScanCode, TUint aModifiers);
       
   185 	inline CWsWindowGroup *WindowGroup();
   186 	inline CWsWindowGroup *WindowGroup();
   186 	inline const CWsWindowGroup *WindowGroup() const;
   187 	inline const CWsWindowGroup *WindowGroup() const;
   187 private:
   188 private:
   188 	TUint iModifierValue;
       
   189 	TUint iModifierMask;
       
   190 	TUint iScanCode;
       
   191 	static TPriQue<CWsCaptureKeyUpsAndDowns> iCaptureKeysUpsAndDowns;
       
   192 	TPriQueLink iLink;
       
   193 	CWsWindowGroup *iWindowGroup;
   189 	CWsWindowGroup *iWindowGroup;
   194 	};
   190 	};
   195 
   191 
   196 class CWsCaptureLongKey : public CWsObject
   192 class CWsCaptureLongKey : public CWsObject
   197 	{
   193 	{
   198 	friend class CKeyboardRepeat;
   194 	friend class CKeyboardRepeat;
       
   195 	friend class TWindowServerEvent;
   199 public:
   196 public:
   200 	CWsCaptureLongKey(CWsWindowGroup *owner);
   197 	CWsCaptureLongKey(CWsWindowGroup *owner);
   201 	~CWsCaptureLongKey();
   198 	~CWsCaptureLongKey();
   202 	void ConstructL(const TWsWinCmdCaptureLongKey &aCaptureKey);
   199 	void ConstructL(const TWsWinCmdCaptureLongKey &aCaptureKey);
   203 	void CommandL(TInt aOpcode, const TAny *aCmdData);
   200 	void CommandL(TInt aOpcode, const TAny *aCmdData);
   204 	inline CWsWindowGroup *WindowGroup();
   201 	inline CWsWindowGroup *WindowGroup();
   205 	inline const CWsWindowGroup *WindowGroup() const;
   202 	inline const CWsWindowGroup *WindowGroup() const;
   206 	static CWsCaptureLongKey* CheckForCapture(TUint aKeyCode, TInt aModifiers);
   203 private:
   207 public:
   204 	TTimeIntervalMicroSeconds32 iDelay;
   208 	static TPriQue<CWsCaptureLongKey> iCaptureLongKeys;
   205 	TUint iFlags;
   209 private:
       
   210 	TPriQueLink iLink;
       
   211 	CWsWindowGroup *iWindowGroup;
   206 	CWsWindowGroup *iWindowGroup;
   212 	TWsWinCmdCaptureLongKey iData;
       
   213 	};
   207 	};
   214 
   208 
   215 //--------------------------------
   209 //--------------------------------
   216 // Owner of CWsGraphicDrawer
   210 // Owner of CWsGraphicDrawer
   217 //--------------------------------
   211 //--------------------------------
   338 	static CWindowServer *NewL();
   332 	static CWindowServer *NewL();
   339 	~CWindowServer();
   333 	~CWindowServer();
   340 	void StartL();
   334 	void StartL();
   341 	TInt SessionCount();
   335 	TInt SessionCount();
   342 	MWsAnimationScheduler* AnimationScheduler();
   336 	MWsAnimationScheduler* AnimationScheduler();
       
   337 	void PrepareShutdown();
   343 	TBool ReleaseMemory();
   338 	TBool ReleaseMemory();
   344 	void DestroySessionsForShutdown();
   339 	void DestroySessionsForShutdown();
   345 	void SetPinClientDescriptors(TBool aPin);
   340 	void SetPinClientDescriptors(TBool aPin);
   346 public:	// from MWsGraphicDrawerEnvironment
   341 public:	// from MWsGraphicDrawerEnvironment
   347 	const CWsGraphicDrawer* ResolveGraphic(const TGraphicDrawerId& aId) const;
   342 	const CWsGraphicDrawer* ResolveGraphic(const TGraphicDrawerId& aId) const;