116
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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 :
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#ifndef TSWINDOWGROUPSOBSERVER_H
|
|
18 |
#define TSWINDOWGROUPSOBSERVER_H
|
|
19 |
|
|
20 |
#include "tsresourcemanager.h"
|
|
21 |
|
119
|
22 |
class MTsRunningApplication
|
|
23 |
{
|
|
24 |
public:
|
|
25 |
virtual TUid UidL()const =0;
|
|
26 |
virtual const TDesC& CaptionL() const =0;
|
|
27 |
virtual TBool IsHiddenL() const =0;
|
|
28 |
virtual TBool IsSystemL() const =0;
|
|
29 |
virtual TInt WindowGroupId() const =0;
|
|
30 |
virtual TInt ParentWindowGroupId() const =0;
|
|
31 |
virtual TBool IsEmbeded() const =0;
|
|
32 |
|
|
33 |
|
|
34 |
};
|
|
35 |
|
|
36 |
class MTsRunningApplicationStorage
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
virtual const MTsRunningApplication& operator[] (TInt aOffset) const=0;
|
|
40 |
virtual TInt Count() const =0;
|
|
41 |
virtual TInt ParentIndex( const MTsRunningApplication& aRaunningApp ) const =0;
|
|
42 |
virtual TArray<TInt> BlockedWindowGroups() const =0;
|
|
43 |
|
|
44 |
};
|
|
45 |
|
116
|
46 |
/**
|
|
47 |
* Interface declare mathods to notify about window server events
|
|
48 |
*/
|
|
49 |
class MTsWindowGroupsObserver
|
|
50 |
{
|
|
51 |
public:
|
|
52 |
/**
|
119
|
53 |
* Method notify about window group changes.
|
|
54 |
* @param aResources - resource manager
|
|
55 |
* @param aStorage - list of running applications
|
116
|
56 |
*/
|
119
|
57 |
virtual void HandleWindowGroupChanged(MTsResourceManager &aResources,
|
|
58 |
const MTsRunningApplicationStorage& aStorage) =0;
|
116
|
59 |
};
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Interface declare methods to subscribe windo server events
|
|
63 |
*/
|
|
64 |
class MTsWindowGroupsMonitor
|
|
65 |
{
|
|
66 |
public:
|
|
67 |
/**
|
|
68 |
* Method make subscription for window server events
|
|
69 |
* @param observer - events observer
|
|
70 |
*/
|
|
71 |
virtual void SubscribeL(MTsWindowGroupsObserver & observer) =0;
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Method cancel subscription for window server events
|
|
75 |
* @param observer - events observer
|
|
76 |
*/
|
|
77 |
virtual void Cancel(MTsWindowGroupsObserver &) =0;
|
|
78 |
};
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Window server observer implementation. Class automaticly subscribe / cancel subscription
|
|
82 |
* at construction / destruction level.
|
|
83 |
*
|
|
84 |
*/
|
|
85 |
class CTsWindowGroupsObserver: public CBase,
|
|
86 |
public MTsWindowGroupsObserver
|
|
87 |
{
|
|
88 |
public:
|
|
89 |
/**
|
|
90 |
* Destructor
|
|
91 |
* Function automaticly cancel subscrption to window server events
|
|
92 |
*/
|
|
93 |
~CTsWindowGroupsObserver();
|
|
94 |
|
|
95 |
protected:
|
|
96 |
/**
|
|
97 |
* First phase constructor
|
|
98 |
*/
|
|
99 |
CTsWindowGroupsObserver(MTsWindowGroupsMonitor &);
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Second phase constructor.
|
|
103 |
* Function automaticly subscribe window server events
|
|
104 |
*/
|
|
105 |
void BaseConstructL();
|
|
106 |
|
|
107 |
private:
|
|
108 |
MTsWindowGroupsMonitor & mMonitor;
|
|
109 |
};
|
|
110 |
|
|
111 |
#endif //TSWINDOWGROUPSOBSERVER_H
|