uifw/AknGlobalUI/AknCapServer/inc/AknEikSgcs.h
changeset 0 2f259fa3e83a
child 5 aabf2c525e0f
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  System Graphics Coordination Server.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef EIKSGCS_H
       
    19 #define EIKSGCS_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <eikdef.h>
       
    23 #include <w32std.h>
       
    24 #include <babitflags.h>
       
    25 #include <AknSgcc.h>
       
    26 #include <ecompluginnotifier.h>
       
    27 
       
    28 class CEikServStatusPane;
       
    29 class CLayoutChangeCallBack;
       
    30 class CAknCapAppServerAppUi;
       
    31 class CWindowChangeMonitor;
       
    32 class CAknCompaIf;
       
    33 
       
    34 class CEikSgcServer : public CBase
       
    35     {
       
    36 public:
       
    37     static CEikSgcServer* NewL();
       
    38     ~CEikSgcServer();
       
    39 
       
    40     void SetStatusPane(CEikServStatusPane* aSp);
       
    41     void SetAknCapAppServerAppUi(CAknCapAppServerAppUi* aAknCapAppServerAppUi);
       
    42 
       
    43     void HandleWindowGroupListChangeL();
       
    44     
       
    45     void HandleWindowGroupParamChangeL(
       
    46         TInt aWgId, 
       
    47         TBitFlags aAppFlags, 
       
    48         TInt aSpLayout, 
       
    49         TInt aSpFlags, 
       
    50         TInt aAppScreenMode);
       
    51         
       
    52     void PrepareForAppExitL(TInt aWgId);
       
    53 
       
    54     void HandleLayoutChangeCallBackL();
       
    55     void RelinquishPriorityToForegroundAppL(const RMessage2& aMessage);
       
    56 
       
    57     void RotateScreenL();
       
    58 
       
    59     void UpdateNotificationsInIdleAllowedKey();
       
    60 	void FadeBitmapGenerationL();   
       
    61 	void FadeColorGenerationL(); 
       
    62 	
       
    63 	void MoveAppL(TInt aAppWindowGroupId, TSgcMoveAppToWhere aWhere);
       
    64 
       
    65     static TInt LayoutInstallationCallBack(TAny* aPtr);
       
    66     
       
    67 private:
       
    68     class TWgState
       
    69         {
       
    70     public:
       
    71         TWgState();
       
    72         TWgState(TInt aWgId);
       
    73         
       
    74         inline TInt WgId() const;
       
    75         inline void SetWgId(TInt aWgId);
       
    76         inline TInt SpLayout() const;
       
    77         inline void SetSpLayout(TInt aSpLayout);
       
    78         inline TInt SpFlags() const;
       
    79         inline void SetSpFlags(TInt aSpFlags);
       
    80         inline TBool IsFullScreen() const;
       
    81         inline void SetFullScreen(TBool aFullScreen);
       
    82         inline TBool IsPartialForeground() const;
       
    83         inline void SetPartialForeground(TBool aPartialForeground);
       
    84         inline TBool UnderstandsPartialForeground() const;
       
    85         inline void SetUnderstandsPartialForeground(TBool aPartialForeground);
       
    86         inline TBool IsLegacyLayout() const;
       
    87         inline void SetLegacyLayout(TBool aLegacyLayout);
       
    88         inline TBool IsOrientationSpecified() const;
       
    89         inline void SetOrientationSpecified(TBool aOrientationSpecified);
       
    90         inline TBool IsOrientationLandscape() const;
       
    91         inline void SetOrientationLandscape(TBool aOrientationLandscape);
       
    92         inline TInt AppScreenMode() const;
       
    93         inline void SetAppScreenMode(TInt aAppScreenMode);
       
    94 
       
    95     private:
       
    96         TInt iWgId;
       
    97         TBitFlags iFlags;
       
    98         TInt iSpLayout;
       
    99         TInt iSpFlags;
       
   100         TInt iAppScreenMode;
       
   101         };
       
   102 
       
   103     typedef CArrayFixFlat<TWgState> CWgStates;
       
   104     typedef CArrayFixFlat<TInt> CWgIds;
       
   105 
       
   106     enum TConstants { KStartAtTheTop = -1 };
       
   107 
       
   108 private:
       
   109     CEikSgcServer();
       
   110     void ConstructL();
       
   111 
       
   112     TInt WgStateIndex(TInt aWgId) const;
       
   113     CWgIds* CreateWgIdListLC() const;
       
   114     void ReOrderWgStatesL(CWgIds* aWgIds);
       
   115     void SetStatusPaneShapeAndFlagsL(TInt aSpIndex);
       
   116     void SetPartialForegroundStatusesL();
       
   117     void PostChangeRecalcL();
       
   118     TWgState& GetWgStateL(TInt aWgId);
       
   119     TBool TestWgListOrderOk(CWgIds* aWgIds) const;
       
   120     TInt FocusWgIndex() const;
       
   121     void SetWgPartialFg(TWgState& aWgState);
       
   122     void ClearWgPartialFg(TWgState& aWgState);
       
   123     TInt TopSpIndex(TInt aAfter = KStartAtTheTop) const;
       
   124     void SetLayoutL(TInt aSpIndex);
       
   125     static TInt RemoveBlankCallBack(TAny* aThis);
       
   126     void DoRemoveBlank();
       
   127     static TInt CEikSgcServer::RestoreThreadPriorities(TAny* aThis);
       
   128     void DoRestoreThreadPriorities();
       
   129     void ActivateEffectL();
       
   130     void SetLayoutBlankScreenL(TBool aBlank, TInt aStep);
       
   131     void SetLayoutBlankScreenL(TBool aBlank, TInt aStep, TInt aCnt);
       
   132     TBool IsGlobalNoteForeground();
       
   133     void DoMoveApp();
       
   134     TInt RefreshLayoutIfRequiredL();
       
   135     
       
   136 private:
       
   137     CWgStates* iWgStates;
       
   138     RWsSession& iWs;
       
   139     CEikServStatusPane* iSp;
       
   140     RWindowGroup* iSpWg;
       
   141     TInt iLayout;
       
   142     TInt iFlags;
       
   143     TInt iLastTopSpWg;
       
   144     TInt iLastScreenModeSet;
       
   145     CLayoutChangeCallBack* iLayoutChangeCallBack;
       
   146     struct SRelinquishedThread
       
   147         {
       
   148         RThread iThread;
       
   149         TThreadId iId;
       
   150         TProcessPriority iPriority;
       
   151         };
       
   152     typedef RArray<SRelinquishedThread> RRelinquishedThreadList;
       
   153     RRelinquishedThreadList iRelinquishedThreads;
       
   154     CPeriodic* iRelinquishedThreadCallBack;
       
   155     CAknCapAppServerAppUi* iAknCapAppServerAppUi;
       
   156     TInt iFirstFullScreenWg; // Not sure if iLastTopSpWg could be used directly.
       
   157     TInt iBlankCount;
       
   158     CPeriodic* iRemoveBlankCallBack;
       
   159     TInt iRemoveBlankCount;
       
   160 private:
       
   161     CWindowChangeMonitor* iWinChange;
       
   162     TBool iNotificationsInIdleAllowed;
       
   163 private:
       
   164     CFbsBitmap *iFadeBitmap;
       
   165     CFbsBitmap *iFadeMask;
       
   166     TInt iSetLayoutBlankStep;
       
   167    	TInt iMoveAppWdId;
       
   168 	TSgcMoveAppToWhere iMoveAppWhere;
       
   169     // Touch compatibility mode interface and screen mode
       
   170 	CAknCompaIf* iTouchCompaModeIf;
       
   171 	TInt iTouchCompaScreenMode;
       
   172     CEComPluginNotifier* iLayoutNotifier; // Owned
       
   173     REComPluginInfoArray iPrevPluginInfo;
       
   174     };
       
   175 
       
   176 #endif // EIKSGCS_H