|
1 #ifndef __ALFWINDOWSTRUCTS_H__ |
|
2 #define __ALFWINDOWSTRUCTS_H__/* |
|
3 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #include <graphics/wsgraphicdrawer.h> |
|
22 |
|
23 class RMemWriteStream; |
|
24 class RMemReadStream; |
|
25 |
|
26 /** |
|
27 * Set of Integers that can be used to idnetify all window server windows in system |
|
28 */ |
|
29 NONSHARABLE_STRUCT(TWindowIdentifier) |
|
30 { |
|
31 /** |
|
32 * Constructor, for convenience |
|
33 **/ |
|
34 //Default constructor |
|
35 TWindowIdentifier() {} |
|
36 |
|
37 TWindowIdentifier(TInt aWindowGroupId, TInt aWindowIdentifer ): |
|
38 iWindowGroupId(aWindowGroupId), iWindowIdentifer(aWindowIdentifer){} |
|
39 |
|
40 TBool IsNull() const |
|
41 { |
|
42 return (!(iWindowGroupId || iWindowIdentifer)); |
|
43 } |
|
44 |
|
45 TBool Equals(const TWindowIdentifier& aId) const |
|
46 { |
|
47 return ((iWindowGroupId == aId.iWindowGroupId)&&(iWindowIdentifer==aId.iWindowIdentifer)); |
|
48 } |
|
49 |
|
50 TInt iWindowGroupId; |
|
51 TInt iWindowIdentifer; |
|
52 }; |
|
53 |
|
54 enum TAlfWServFlags |
|
55 { |
|
56 EAlfWservFlagNone, |
|
57 EAlfWservFlagDeleted = 0x1 /** Window was already deleted from wserv scene **/ |
|
58 }; |
|
59 |
|
60 |
|
61 |
|
62 enum TAlfWindovEvents |
|
63 { |
|
64 EAlfWindowDestroyed = 0x1, /** Specific window was destroyed in wserv scene **/ |
|
65 EAlfWindowPosChanged = 0x2, /** Window Position in wserv scene was changed **/ |
|
66 EAlfWindowSizeChanged = 0x4, /** Window Size in wserv scene was changed **/ |
|
67 EAlfWindowNewContent = 0x8, /** New drawing commands to InBuffer() **/ |
|
68 EAlfWindowVisibile = 0x10, /** window changed to visible in wserv scene **/ |
|
69 EAlfWindowNotVisibile = 0x20, /** window was hidden in wserv scene **/ |
|
70 EAlfWindowIndexChanged = 0x40, /** z-order of window changed on server **/ |
|
71 }; |
|
72 |
|
73 /** |
|
74 * @struct TAlfWServInfo |
|
75 * |
|
76 * The struct provides encapsulation for specific wserv window data |
|
77 * Usually this data is for reference only, e.g. effects plugin must |
|
78 * not alter the data |
|
79 **/ |
|
80 NONSHARABLE_STRUCT(TAlfWServInfo) |
|
81 { |
|
82 /** |
|
83 * Constructors, for convenience |
|
84 **/ |
|
85 TAlfWServInfo(): |
|
86 iPosition(TPoint(0,0)), |
|
87 iSize(TSize(0,0)), |
|
88 iRefId(TWindowIdentifier(0,0)), |
|
89 iClientSideId(TWindowIdentifier(0,0)), |
|
90 iFlags(EAlfWservFlagNone), |
|
91 iScreenNumber(0), |
|
92 iParentRefId(TWindowIdentifier(0,0)){} |
|
93 |
|
94 |
|
95 TAlfWServInfo(const TPoint& aPosition, const TSize& aSize, TInt aWgNodeId, |
|
96 TInt aWsNodeId, TInt aWsClientHandle, TInt aWgClientHandle, TUint8 aScreenNumber = 0 ): |
|
97 iPosition(aPosition), |
|
98 iSize(aSize), |
|
99 iRefId(TWindowIdentifier(aWgNodeId, aWsNodeId)), |
|
100 iClientSideId(TWindowIdentifier(aWsClientHandle, aWgClientHandle)), |
|
101 iFlags(EAlfWservFlagNone), |
|
102 iScreenNumber( aScreenNumber ){} |
|
103 |
|
104 TPoint iPosition; /** Window position in WServ scene **/ |
|
105 TSize iSize; /** Window Size in WServ scene **/ |
|
106 TWindowIdentifier iRefId; /** Unique node ids between wserv and alf **/ |
|
107 TWindowIdentifier iClientSideId; /** RWindow::ClientHandle(), RWindowGroup::Identifier() **/ |
|
108 TUint iFlags; |
|
109 MWsWindowTreeNode::TType iNodeType; |
|
110 TUint8 iScreenNumber; |
|
111 TWindowIdentifier iParentRefId; /** Unique node ids between wserv and alf **/ |
|
112 |
|
113 #ifdef ALF_DEBUG_TRACK_DRAWING |
|
114 TBool iTrackWindow; |
|
115 #endif |
|
116 |
|
117 /** |
|
118 * For convenience. |
|
119 * @return Indicates whether the window still exists in WServ scene |
|
120 **/ |
|
121 TBool ExistsInWServ() const |
|
122 { |
|
123 return !((iRefId.IsNull()) ||(iFlags & EAlfWservFlagDeleted)); |
|
124 } |
|
125 }; |
|
126 |
|
127 |
|
128 NONSHARABLE_STRUCT(TChunkHeader) |
|
129 { |
|
130 TChunkHeader( ):iReadOffset(0), iWriteOffset(0),iMemWriteStream(NULL),iMemWriteStreamUsers(0),iMemReadStream(NULL){}; |
|
131 |
|
132 TUint32 iReadOffset; |
|
133 TUint32 iWriteOffset; |
|
134 TUint32 iCommittedWriteOffset; |
|
135 RMemWriteStream* iMemWriteStream; |
|
136 TUint8 iMemWriteStreamUsers; |
|
137 RMemReadStream* iMemReadStream; |
|
138 }; |
|
139 |
|
140 #endif |