author | hgs |
Tue, 08 Jun 2010 13:16:48 +0300 | |
changeset 31 | 1b6909418757 |
parent 29 | ac3859d43844 |
permissions | -rw-r--r-- |
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/** |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* @see alfmoduletest.h for class implementations that these defines use. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
*/ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
#ifndef ALF_MODULE_TEST_DEFINES_H |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
#define ALF_MODULE_TEST_DEFINES_H |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
// Informs if module test hooks have been set on. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
#include "alfmoduletestconf.h" |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
#ifndef USE_MODULE_TEST_HOOKS_FOR_ALF |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
// Use empty defines if module test hook is not set. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
#define AMT_DATA() |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
#define AMT_FUNC(func) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
#define AMT_FUNC_EXC(func) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#define AMT_FUNC_EXC_RET(ret, func) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#define AMT_FUNC_EXC_IF(cond, func) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#define AMT_FUNC_EXC_IF_RET(cond, ret, func) |
29 | 22 |
#define AMT_MAP_PTR_TO_KEY_CAST(keyPtr) |
23 |
#define AMT_MAP_CANVAS_WS_PAINTER_SELECT_GC() |
|
24 |
#define AMT_MAP_GCE_SET_LAYER_POSITIONS() |
|
31 | 25 |
#define AMT_SET_TLS() |
26 |
#define AMT_FREE_TLS() |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
#else |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
// Module test hook has been set. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#ifndef AMT_CONTROL |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#error "Error: you need to define AMT_CONTROL macro in your code to be able to use ALF module test system!" |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
// The user have to define AMT_CONTROL, e.g. like this: |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
// #define AMT_CONTROL() static_cast<CAlfModuleTestDataControl*>(Dll::Tls()) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
// or |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
// #define AMT_CONTROL() iMyModuleTestDataControl |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
// etc. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#endif // AMT_CONTROL |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
|
29 | 41 |
// *** General test variable defines |
42 |
||
43 |
// Text cursor handle is defined as constant because correct handle is not provided |
|
44 |
// from the window server for render stage. |
|
45 |
#define AMT_MAP_TEXT_CURSOR_HANDLE 0 |
|
46 |
||
47 |
#define AMT_MAP_FORCE_SW_HANDLE 0 |
|
48 |
#define AMT_MAP_SW_ENABLED_HANDLE 1 |
|
49 |
#define AMT_MAP_LOW_MEMORY_MODE_HANDLE 2 |
|
50 |
||
51 |
#define AMT_MAP_CANVAS_WS_GC_TYPE 0 |
|
52 |
#define AMT_MAP_TEXTURE_CACHE_MEMORY_LEVEL 1 |
|
53 |
#define AMT_MAP_CACHED_IMAGES_COUNT 2 |
|
54 |
#define AMT_MAP_CACHED_TEXTS_COUNT 3 |
|
55 |
#define AMT_MAP_CACHED_RENDER_BUFFERS_COUNT 4 |
|
56 |
||
57 |
||
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
// *** Use these macros to access global memory chunk |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
// Note: If you read/write a large block of data members, it is advisable not use the AMT_FUNC_EXC() based macros below. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
// Use Lock() and Unlock() around the block explicitely, and use AMT_FUNC() macro. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
// That is to avoid unnecessary nested lock-unlock sequences (even if nested locks are working ok). |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
// Note: Be careful not to lock the the mutex for a long time as it will halt other processes if they are using the lock during that time! |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
|
29 | 67 |
// *** Generic macros |
68 |
||
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
#define AMT_DATA() AMT_CONTROL()->iModuleTestData |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
#define AMT_FUNC(func) if (AMT_DATA()->iIsEnabled) {func;} |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
#define AMT_FUNC_EXC(func) {AMT_CONTROL()->Lock(); if (AMT_DATA()->iIsEnabled) {func;} AMT_CONTROL()->Unlock();} |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
#define AMT_FUNC_EXC_RET(ret, func) {AMT_CONTROL()->Lock(); if (AMT_DATA()->iIsEnabled) {ret = func;} AMT_CONTROL()->Unlock();} |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
#define AMT_FUNC_EXC_IF(cond, func) {AMT_CONTROL()->Lock(); if (AMT_DATA()->iIsEnabled && (cond)) {func;} AMT_CONTROL()->Unlock();} |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
#define AMT_FUNC_EXC_IF_RET(cond, ret, func) {AMT_CONTROL()->Lock(); if (AMT_DATA()->iIsEnabled && (cond)) {ret = func;} AMT_CONTROL()->Unlock();} |
29 | 75 |
#define AMT_MAP_PTR_TO_KEY_CAST(keyPtr) reinterpret_cast< TInt >( keyPtr ) |
76 |
||
77 |
||
78 |
// *** Macros to define function content |
|
79 |
||
80 |
#define AMT_MAP_CANVAS_WS_PAINTER_SELECT_GC() \ |
|
81 |
if ( iCanvasWsGc ) \ |
|
82 |
{ \ |
|
83 |
AMT_MAP_SET_VALUE( \ |
|
84 |
iIntMap, \ |
|
85 |
AMT_MAP_CANVAS_WS_GC_TYPE, \ |
|
86 |
iCanvasWsGc->Type(), \ |
|
87 |
EAlfModuleTestTypeCoreToolkitGoom ); \ |
|
88 |
} \ |
|
89 |
else \ |
|
90 |
{ \ |
|
91 |
AMT_MAP_SET_VALUE( \ |
|
92 |
iIntMap, \ |
|
93 |
AMT_MAP_CANVAS_WS_GC_TYPE, \ |
|
94 |
KErrNotFound, \ |
|
95 |
EAlfModuleTestTypeCoreToolkitGoom ); \ |
|
96 |
} |
|
97 |
||
98 |
// Sets the position of the layer into the map. |
|
99 |
// Zero means the bottom and the top layer has the greates position value. |
|
100 |
#define AMT_MAP_GCE_SET_LAYER_POSITIONS() \ |
|
101 |
TInt gceLayerPosition( -1 ); \ |
|
102 |
const MWsLayer* gceLayer( iBottomLayer ); \ |
|
103 |
while( gceLayer ) \ |
|
104 |
{ \ |
|
105 |
++gceLayerPosition; \ |
|
106 |
AMT_MAP_SET_VALUE( \ |
|
107 |
iIntMap, AMT_MAP_PTR_TO_KEY_CAST( gceLayer ), \ |
|
108 |
gceLayerPosition, EAlfModuleTestTypeGceLayerPosition ); \ |
|
109 |
gceLayer = gceLayer->Above(); \ |
|
110 |
} |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
|
31 | 112 |
// Setup TLS and open global module testing chunk and mutex. |
113 |
// Create only for the first object! |
|
114 |
#define AMT_SET_TLS() \ |
|
115 |
if (!Dll::Tls()) \ |
|
116 |
{ \ |
|
117 |
User::LeaveIfError(Dll::SetTls(new(ELeave) CAlfModuleTestDataControl())); \ |
|
118 |
User::LeaveIfError(AMT_CONTROL()->OpenGlobalObjects()); \ |
|
119 |
} |
|
120 |
||
121 |
#define AMT_FREE_TLS() \ |
|
122 |
if (Dll::Tls()) \ |
|
123 |
{ \ |
|
124 |
delete AMT_CONTROL(); \ |
|
125 |
Dll::FreeTls(); \ |
|
126 |
} |
|
127 |
||
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
#endif // USE_MODULE_TEST_HOOKS_FOR_ALF |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
// Notice: |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
// Defines below will be empty if module test hook is not set. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
// If module test hook is set on, then these defines also use functionality defined above. |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
|
29 | 136 |
// Single operation macros, that will do lock/unlock. |
137 |
#define AMT_PRINT_STATE() AMT_FUNC_EXC(AMT_DATA()->PrintState()) |
|
138 |
#define AMT_INC_COUNTER(member) AMT_FUNC_EXC(AMT_DATA()->member++) |
|
139 |
#define AMT_DEC_COUNTER(member) AMT_FUNC_EXC(AMT_DATA()->member--) |
|
140 |
#define AMT_SET_VALUE(member, val) AMT_FUNC_EXC(AMT_DATA()->member=(val)) |
|
141 |
#define AMT_GET_VALUE(x, member) AMT_FUNC_EXC((x) = AMT_DATA()->member) |
|
142 |
||
143 |
// Conditional single operation macros, that will do lock/unlock. |
|
144 |
#define AMT_INC_COUNTER_IF(cond, member) AMT_FUNC_EXC_IF((cond), AMT_DATA()->member++) |
|
145 |
#define AMT_DEC_COUNTER_IF(cond, member) AMT_FUNC_EXC_IF((cond), AMT_DATA()->member--) |
|
146 |
#define AMT_SET_VALUE_IF(cond, member, val) AMT_FUNC_EXC_IF((cond), AMT_DATA()->member=(val)) |
|
147 |
#define AMT_GET_VALUE_IF(cond, x, member) AMT_FUNC_EXC_IF((cond), (x) = AMT_DATA()->member) |
|
148 |
||
149 |
#define AMT_ADD_TIME(handle, member, effects) AMT_FUNC_EXC(TInt timemapIndex = 0; while(timemapIndex < 10){ if (AMT_DATA()->iTimeMap[timemapIndex].iHandle == handle){ TInt nextFreeIndex = AMT_DATA()->iTimeMap[timemapIndex].iCounter; AMT_DATA()->iTimeMap[timemapIndex].iTimeStamp[nextFreeIndex] = member; AMT_DATA()->iTimeMap[timemapIndex].iCounter++; timemapIndex = 100; break;} timemapIndex++; } if (timemapIndex == 10) { if (AMT_DATA()->iNextFreeMap == 10) { AMT_DATA()->iNextFreeMap = 0;} TInt nextFreeMap = AMT_DATA()->iNextFreeMap; AMT_DATA()->iTimeMap[nextFreeMap].iCounter = 1; AMT_DATA()->iTimeMap[nextFreeMap].iHandle = handle; AMT_DATA()->iTimeMap[nextFreeMap].iTimeStamp[0] = member; AMT_DATA()->iTimeMap[nextFreeMap].iEffects = effects; AMT_DATA()->iNextFreeMap++; /*RDebug::Printf("Handle: %d, %d %d %d", handle, timemapIndex, AMT_DATA()->iNextFreeMap, member)*/;}) |
|
150 |
#define AMT_GET_TIME(x, handle, index, effects) AMT_FUNC_EXC(TInt timemapIndex = 0; while(timemapIndex < 10){ if (AMT_DATA()->iTimeMap[timemapIndex].iHandle == handle){ (x) = AMT_DATA()->iTimeMap[timemapIndex].iTimeStamp[index];(effects) = AMT_DATA()->iTimeMap[timemapIndex].iEffects;break;}timemapIndex++;}if(timemapIndex == 10){(x) = KErrNotFound;(effects) = EFalse;}) |
|
151 |
#define AMT_GET_TIME_POINT_COUNT(handle, x) AMT_FUNC_EXC(TInt timemapIndex = 0; while(timemapIndex < 10){ if (AMT_DATA()->iTimeMap[timemapIndex].iHandle == handle){ (x) = AMT_DATA()->iTimeMap[timemapIndex].iCounter;timemapIndex = 100;}timemapIndex++;}if(timemapIndex == 10){(x) = KErrNotFound;}) |
|
152 |
#define AMT_RESET_TIME(handle) AMT_FUNC_EXC(TInt timemapIndex = 0; while(timemapIndex < 10){ if (AMT_DATA()->iTimeMap[timemapIndex].iHandle == handle){ AMT_DATA()->iTimeMap[timemapIndex].iHandle = 0; AMT_DATA()->iTimeMap[timemapIndex].iCounter = 0;AMT_DATA()->iTimeMap[timemapIndex].iEffects = 0;break;}timemapIndex++;}) |
|
153 |
||
154 |
// Map operation macros, that will do lock/unlock |
|
155 |
#define AMT_MAP_CPTR_TO_KEY_CAST(keyCPtr) AMT_MAP_PTR_TO_KEY_CAST( static_cast< const CBase* >( keyCPtr ) ) |
|
156 |
#define AMT_MAP_APPEND_IF(cond, memberMap, key, defaultValue, type) AMT_FUNC_EXC_IF((cond), AMT_DATA()->memberMap.Append(type, key, defaultValue)) |
|
157 |
#define AMT_MAP_APPEND(memberMap, key, defaultValue, type) AMT_MAP_APPEND_IF(ETrue, memberMap, key, defaultValue, type) |
|
158 |
#define AMT_MAP_APPEND_LINK_IF(cond, memberMap, linkKey, targetKey, type) AMT_FUNC_EXC_IF((cond), AMT_DATA()->memberMap.AppendLink(type, linkKey, targetKey)) |
|
159 |
#define AMT_MAP_APPEND_LINK(memberMap, linkKey, targetKey, type) AMT_MAP_APPEND_LINK_IF(ETrue, memberMap, linkKey, targetKey, type) |
|
160 |
#define AMT_MAP_APPEND_AND_LINK_IF(cond, memberMap, linkKey, actualKey, defaultValue, type) AMT_MAP_APPEND_IF(cond, memberMap, actualKey, defaultValue, type ); AMT_MAP_APPEND_LINK_IF(cond, memberMap, linkKey, actualKey, type) |
|
161 |
#define AMT_MAP_APPEND_AND_LINK(memberMap, linkKey, actualKey, defaultValue, type) AMT_MAP_APPEND_AND_LINK_IF(ETrue, memberMap, linkKey, actualKey, defaultValue, type) |
|
162 |
#define AMT_MAP_SET_VALUE_IF(cond, memberMap, key, value, type) AMT_FUNC_EXC_IF((cond), AMT_DATA()->memberMap.SetActualValue(type, key, value)) |
|
163 |
#define AMT_MAP_INC_VALUE_IF(cond, memberMap, key, type) AMT_FUNC_EXC_IF((cond && AMT_DATA()->memberMap.FindActual(type, key)), AMT_DATA()->memberMap.SetActualValue(type, key, AMT_DATA()->memberMap.FindActual(type, key)->Value() + 1)) |
|
164 |
#define AMT_MAP_DEC_VALUE_IF(cond, memberMap, key, type) AMT_FUNC_EXC_IF((cond && AMT_DATA()->memberMap.FindActual(type, key)), AMT_DATA()->memberMap.SetActualValue(type, key, AMT_DATA()->memberMap.FindActual(type, key)->Value() - 1)) |
|
165 |
#define AMT_MAP_SET_VALUE(memberMap, key, value, type) AMT_FUNC_EXC_IF(ETrue, AMT_DATA()->memberMap.SetActualValue(type, key, value)) |
|
166 |
#define AMT_MAP_INC_VALUE(memberMap, key, type) AMT_MAP_INC_VALUE_IF(ETrue, memberMap, key, type) |
|
167 |
#define AMT_MAP_DEC_VALUE(memberMap, key, type) AMT_MAP_DEC_VALUE_IF(ETrue, memberMap, key, type) |
|
168 |
#define AMT_MAP_APPEND_ACCEPT_IF(cond, memberMap, testType) AMT_FUNC_EXC_IF((cond), AMT_DATA()->memberMap.AppendAccept(testType)) |
|
169 |
#define AMT_MAP_APPEND_ACCEPT(memberMap, testType) AMT_MAP_APPEND_ACCEPT_IF(ETrue, memberMap, testType) |
|
170 |
#define AMT_MAP_RESET_ITEMS(memberMap, defaultValue, type) AMT_FUNC_EXC(AMT_DATA()->memberMap.ResetItems(type, defaultValue)) |
|
171 |
#define AMT_MAP_RESET(memberMap) AMT_FUNC_EXC(AMT_DATA()->memberMap.Reset()) |
|
172 |
||
173 |
||
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
// Render stage defines |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
#define AMT_MAP_RENDER_STAGE_NODE_CREATED() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iIntMap, aWindowTreeNode.Window()->Handle(), 0, EAlfModuleTestTypeRenderStageCreateWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iIntMap, aWindowTreeNode.Window()->Handle(), 0, EAlfModuleTestTypeRenderStageReleaseWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iBoolMap, aWindowTreeNode.Window()->Handle(), EFalse, EAlfModuleTestTypeRenderStageActiveWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iSizeMap, aWindowTreeNode.Window()->Handle(), TSize(), EAlfModuleTestTypeRenderStageChangeWindowSize ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iPositionMap, aWindowTreeNode.Window()->Handle(), TPoint(), EAlfModuleTestTypeRenderStageChangeWindowPosition ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iBoolMap, aWindowTreeNode.Window()->Handle(), EFalse, EAlfModuleTestTypeRenderStageChangeWindowVisibility ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeGroup == nodeType && aWindowTreeNode.WindowGroup() ), iIntMap, aWindowTreeNode.WindowGroup()->Identifier(), 0, EAlfModuleTestTypeRenderStageCreateWindowGroup ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeGroup == nodeType && aWindowTreeNode.WindowGroup() ), iIntMap, aWindowTreeNode.WindowGroup()->Identifier(), 0, EAlfModuleTestTypeRenderStageReleaseWindowGroup ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeStandardTextCursor == nodeType ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeRenderStageChangeTextCursorType ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeStandardTextCursor == nodeType ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeRenderStageChangeTextCursorClipRect ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeStandardTextCursor == nodeType ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeRenderStageChangeTextCursorFlag ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
AMT_MAP_APPEND_IF( ( MWsWindowTreeNode::EWinTreeNodeStandardTextCursor == nodeType ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeRenderStageChangeTextCursorColor ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
\ |
31 | 190 |
AMT_MAP_APPEND_AND_LINK_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iSurfaceMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), TSurfaceId::CreateNullId(), EAlfModuleTestTypeCreateLayer ); \ |
191 |
AMT_MAP_APPEND_AND_LINK_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iSurfaceMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), TSurfaceId::CreateNullId(), EAlfModuleTestTypeReleaseLayer ); \ |
|
192 |
AMT_MAP_APPEND_AND_LINK_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iIntMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), 0, EAlfModuleTestTypeLayerOrdinalPosition ); \ |
|
193 |
AMT_MAP_APPEND_AND_LINK_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iIntMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), 0, EAlfModuleTestTypeLayerNodeOrdinalPosition ); \ |
|
194 |
\ |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
AMT_MAP_INC_VALUE_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iIntMap, aWindowTreeNode.Window()->Handle(), EAlfModuleTestTypeRenderStageCreateWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
AMT_MAP_INC_VALUE_IF( ( MWsWindowTreeNode::EWinTreeNodeGroup == nodeType && aWindowTreeNode.WindowGroup() ), iIntMap, aWindowTreeNode.WindowGroup()->Identifier(), EAlfModuleTestTypeRenderStageCreateWindowGroup ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
|
31 | 198 |
#define AMT_MAP_RENDER_STAGE_NODE_RELEASED() \ |
199 |
AMT_MAP_INC_VALUE_IF( ( MWsWindowTreeNode::EWinTreeNodeClient == nodeType && aWindowTreeNode.Window() ), iIntMap, aWindowTreeNode.Window()->Handle(), EAlfModuleTestTypeRenderStageReleaseWindow ); \ |
|
200 |
AMT_MAP_INC_VALUE_IF( ( MWsWindowTreeNode::EWinTreeNodeGroup == nodeType && aWindowTreeNode.WindowGroup() ), iIntMap, aWindowTreeNode.WindowGroup()->Identifier(), EAlfModuleTestTypeRenderStageReleaseWindowGroup ) |
|
201 |
||
202 |
#define AMT_MAP_RENDER_STAGE_NODE_ACTIVATED() \ |
|
203 |
AMT_MAP_SET_VALUE_IF( nodeType == MWsWindowTreeNode::EWinTreeNodeClient, iBoolMap, aWindowTreeNode.Window()->Handle(), ETrue, EAlfModuleTestTypeRenderStageActiveWindow ) |
|
204 |
||
205 |
#define AMT_MAP_RENDER_STAGE_NODE_EXTENT_CHANGED() \ |
|
206 |
AMT_MAP_SET_VALUE_IF( ( aWindowTreeNode.Window() ), iSizeMap, aWindowTreeNode.Window()->Handle(), aRect.Size(), EAlfModuleTestTypeRenderStageChangeWindowSize ); \ |
|
207 |
AMT_MAP_SET_VALUE_IF( ( aWindowTreeNode.Window() ), iPositionMap, aWindowTreeNode.Window()->Handle(), aRect.iTl, EAlfModuleTestTypeRenderStageChangeWindowPosition ) |
|
208 |
||
209 |
#define AMT_MAP_RENDER_STAGE_FLAG_CHANGED() \ |
|
210 |
AMT_MAP_SET_VALUE_IF( ( aWindowTreeNode.Window() && MWsWindowTreeObserver::EVisible == aFlag ), iBoolMap, aWindowTreeNode.Window()->Handle(), aNewValue, EAlfModuleTestTypeRenderStageChangeWindowVisibility ) |
|
211 |
||
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
#define AMT_MAP_RENDER_STAGE_TEXT_CURSOR_CHANGE() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
AMT_MAP_INC_VALUE_IF( ( aWindowTreeNode.NodeType() == MWsWindowTreeNode::EWinTreeNodeStandardTextCursor && aAttribute == ECursorType ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeRenderStageChangeTextCursorType ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
AMT_MAP_INC_VALUE_IF( ( aWindowTreeNode.NodeType() == MWsWindowTreeNode::EWinTreeNodeStandardTextCursor && aAttribute == ECursorClipRect ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeRenderStageChangeTextCursorClipRect ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
AMT_MAP_INC_VALUE_IF( ( aWindowTreeNode.NodeType() == MWsWindowTreeNode::EWinTreeNodeStandardTextCursor && aAttribute == ECursorFlags ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeRenderStageChangeTextCursorFlag ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
AMT_MAP_INC_VALUE_IF( ( aWindowTreeNode.NodeType() == MWsWindowTreeNode::EWinTreeNodeStandardTextCursor && aAttribute == ECursorColor ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeRenderStageChangeTextCursorColor ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
|
31 | 218 |
#define AMT_MAP_RENDER_STAGE_LAYER_ADDED() \ |
219 |
AMT_MAP_APPEND_LINK( iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), EAlfModuleTestTypeCreateLayer ); \ |
|
220 |
AMT_MAP_APPEND_LINK( iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), EAlfModuleTestTypeReleaseLayer ); \ |
|
221 |
AMT_MAP_APPEND_LINK( iIntMap, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), EAlfModuleTestTypeLayerOrdinalPosition ); \ |
|
222 |
AMT_MAP_APPEND_LINK( iIntMap, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), AMT_MAP_PTR_TO_KEY_CAST( &aWindowTreeNode ), EAlfModuleTestTypeLayerNodeOrdinalPosition ); \ |
|
223 |
AMT_MAP_APPEND_LINK( iSurfaceMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeGceCreateLayer ); \ |
|
224 |
AMT_MAP_APPEND_LINK( iSurfaceMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeGceReleaseLayer ); \ |
|
225 |
AMT_MAP_APPEND_LINK( iIntMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeGceLayerPosition ); \ |
|
226 |
AMT_MAP_APPEND_LINK( iIntMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeGceLayerOpacity ); \ |
|
227 |
AMT_MAP_APPEND_LINK( iRectMap, aWindowTreeNode.Window()->Handle(), AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeGceLayerExtent ); \ |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
\ |
31 | 229 |
AMT_MAP_SET_VALUE( iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), aLayer.Surface(), EAlfModuleTestTypeCreateLayer ) |
27 | 230 |
|
231 |
#define AMT_MAP_RENDER_STAGE_REMOVE_LAYER() \ |
|
232 |
AMT_MAP_SET_VALUE_IF( aLayer, iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), aLayer->Surface(), EAlfModuleTestTypeReleaseLayer ) |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
// Streamer defines |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
#define AMT_MAP_STREAMER_NODE_WINDOW_CONSTRUCT() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
AMT_MAP_APPEND_AND_LINK( iIntMap, iId, iNodeWindowConstructionStruct.iWindowHandle, 0, EAlfModuleTestTypeHierarchyModelCreateWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
AMT_MAP_APPEND_AND_LINK( iIntMap, iId, iNodeWindowConstructionStruct.iWindowHandle, 0, EAlfModuleTestTypeHierarchyModelReleaseWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
AMT_MAP_APPEND_AND_LINK( iBoolMap, iId, iNodeWindowConstructionStruct.iWindowHandle, EFalse, EAlfModuleTestTypeHierarchyModelActiveWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
AMT_MAP_APPEND_AND_LINK( iSizeMap, iId, iNodeWindowConstructionStruct.iWindowHandle, TSize(), EAlfModuleTestTypeHierarchyModelChangeWindowSize ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
AMT_MAP_APPEND_AND_LINK( iPositionMap, iId, iNodeWindowConstructionStruct.iWindowHandle, TPoint(), EAlfModuleTestTypeHierarchyModelChangeWindowPosition ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
AMT_MAP_APPEND_AND_LINK( iBoolMap, iId, iNodeWindowConstructionStruct.iWindowHandle, EFalse, EAlfModuleTestTypeHierarchyModelChangeWindowVisibility ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
#define AMT_MAP_STREAMER_NODE_GROUP_CONSTRUCT() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
AMT_MAP_APPEND_AND_LINK( iIntMap, iId, clientHandle, 0, EAlfModuleTestTypeHierarchyModelCreateWindowGroup ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
AMT_MAP_APPEND_AND_LINK( iIntMap, iId, clientHandle, 0, EAlfModuleTestTypeHierarchyModelReleaseWindowGroup ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
#define AMT_MAP_STREAMER_TEXT_CURSOR_CONSTRUCT() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeHierarchyModelChangeTextCursorType ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeHierarchyModelChangeTextCursorClipRect ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeHierarchyModelChangeTextCursorFlag ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeHierarchyModelChangeTextCursorColor ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
#define AMT_MAP_STREAMER_TEXT_CURSOR_CHANGE() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
AMT_MAP_INC_VALUE_IF( ( attribute == MWsWindowTreeObserver::ECursorType ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeHierarchyModelChangeTextCursorType ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
AMT_MAP_INC_VALUE_IF( ( attribute == MWsWindowTreeObserver::ECursorClipRect ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeHierarchyModelChangeTextCursorClipRect ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
AMT_MAP_INC_VALUE_IF( ( attribute == MWsWindowTreeObserver::ECursorFlags ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeHierarchyModelChangeTextCursorFlag ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
AMT_MAP_INC_VALUE_IF( ( attribute == MWsWindowTreeObserver::ECursorColor ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeHierarchyModelChangeTextCursorColor ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
|
31 | 261 |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
262 |
// Alfserver defines |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
263 |
|
31 | 264 |
#define AMT_MAP_NODE_CREATED() \ |
265 |
AMT_MAP_INC_VALUE_IF( node && nodeType == MWsWindowTreeNode::EWinTreeNodeClient, iIntMap, node->iId, EAlfModuleTestTypeHierarchyModelCreateWindow ); \ |
|
266 |
AMT_MAP_INC_VALUE_IF( node && nodeType == MWsWindowTreeNode::EWinTreeNodeGroup, iIntMap, node->iId, EAlfModuleTestTypeHierarchyModelCreateWindowGroup ) |
|
267 |
||
268 |
#define AMT_MAP_NODE_RELEASED() \ |
|
269 |
AMT_MAP_INC_VALUE_IF( node && nodeType == MWsWindowTreeNode::EWinTreeNodeClient, iIntMap, nodeId, EAlfModuleTestTypeHierarchyModelReleaseWindow ); \ |
|
270 |
AMT_MAP_INC_VALUE_IF( node && nodeType == MWsWindowTreeNode::EWinTreeNodeGroup, iIntMap, nodeId, EAlfModuleTestTypeHierarchyModelReleaseWindowGroup ) |
|
271 |
||
272 |
#define AMT_MAP_NODE_ACTIVATED() \ |
|
273 |
AMT_MAP_SET_VALUE_IF( node && nodeType == MWsWindowTreeNode::EWinTreeNodeClient, iBoolMap, nodeId, ETrue, EAlfModuleTestTypeHierarchyModelActiveWindow ) |
|
274 |
||
275 |
#define AMT_MAP_NODE_EXTENT_CHANGED() \ |
|
276 |
AMT_MAP_SET_VALUE_IF( node && node->iWindow, iSizeMap, node->iWindow->WsInfo().iClientSideId.iWindowIdentifer, rect.Size(), EAlfModuleTestTypeHierarchyModelChangeWindowSize ); \ |
|
277 |
AMT_MAP_SET_VALUE_IF( node && node->iWindow, iPositionMap, node->iWindow->WsInfo().iClientSideId.iWindowIdentifer, rect.iTl, EAlfModuleTestTypeHierarchyModelChangeWindowPosition ) |
|
278 |
||
279 |
#define AMT_MAP_NODE_FLAG_CHANGED() \ |
|
280 |
AMT_MAP_SET_VALUE_IF( node && node->iWindow && MWsWindowTreeObserver::EVisible == flag, iBoolMap, node->iWindow->WsInfo().iClientSideId.iWindowIdentifer, newValue, EAlfModuleTestTypeHierarchyModelChangeWindowVisibility ) |
|
281 |
||
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
282 |
#define AMT_MAP_BRIDGE_ADD_VISUAL() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
283 |
AMT_MAP_APPEND_AND_LINK( iIntMap, aWindowNodeId, aClientSideId, 0, EAlfModuleTestTypeBridgeCreateWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
284 |
AMT_MAP_APPEND_AND_LINK( iIntMap, aWindowNodeId, aClientSideId, 0, EAlfModuleTestTypeBridgeReleaseWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
AMT_MAP_APPEND_AND_LINK( iBoolMap, aWindowNodeId, aClientSideId, EFalse, EAlfModuleTestTypeBridgeActiveWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
AMT_MAP_APPEND_AND_LINK( iSizeMap, aWindowNodeId, aClientSideId, TSize(), EAlfModuleTestTypeBridgeChangeWindowSize ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
AMT_MAP_APPEND_AND_LINK( iPositionMap, aWindowNodeId, aClientSideId, TPoint(), EAlfModuleTestTypeBridgeChangeWindowPosition ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
288 |
AMT_MAP_APPEND_AND_LINK( iBoolMap, aWindowNodeId, aClientSideId, EFalse, EAlfModuleTestTypeBridgeChangeWindowVisibility ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
289 |
\ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
290 |
AMT_MAP_APPEND_AND_LINK_IF( aVisual, iRectMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, TRect(), EAlfModuleTestTypeCoreToolkitDrawWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
291 |
AMT_MAP_APPEND_AND_LINK_IF( aVisual, iRectMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, TRect(), EAlfModuleTestTypeCoreToolkitDrawFromRenderBuffer ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
292 |
\ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
293 |
AMT_MAP_APPEND( iBoolMap, aClientSideId, ETrue, EAlfModuleTestTypeBridgeCreateWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
294 |
AMT_MAP_APPEND( iBoolMap, aClientSideId, EFalse, EAlfModuleTestTypeBridgeVisualVisibility ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
AMT_MAP_APPEND_LINK_IF( aVisual, iBoolMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, EAlfModuleTestTypeBridgeVisualVisibility ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
AMT_MAP_APPEND( iBoolMap, aClientSideId, EFalse, EAlfModuleTestTypeBridgeReleaseWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
297 |
AMT_MAP_APPEND_LINK( iBoolMap, aWindowNodeId, aClientSideId, EAlfModuleTestTypeBridgeReleaseWindow ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
298 |
\ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
299 |
AMT_MAP_INC_VALUE( iIntMap, aClientSideId, EAlfModuleTestTypeBridgeCreateWindow ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
300 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
301 |
#define AMT_MAP_BRIDGE_CREATE_CONTROL_GROUP() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
302 |
AMT_MAP_APPEND_AND_LINK( iIntMap, aWindowGroupNodeId, aClientWindowGroupId, 0, EAlfModuleTestTypeBridgeCreateWindowGroup ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
303 |
AMT_MAP_APPEND_AND_LINK( iIntMap, aWindowGroupNodeId, aClientWindowGroupId, 0, EAlfModuleTestTypeBridgeReleaseWindowGroup ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
304 |
\ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
305 |
AMT_MAP_INC_VALUE( iIntMap, aClientWindowGroupId, EAlfModuleTestTypeBridgeCreateWindowGroup ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
306 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
307 |
#define AMT_MAP_BRIDGE_ADD_TEXT_CURSOR() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
308 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeBridgeChangeTextCursorType ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
309 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeBridgeChangeTextCursorClipRect ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
310 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeBridgeChangeTextCursorFlag ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
311 |
AMT_MAP_APPEND( iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, 0, EAlfModuleTestTypeBridgeChangeTextCursorColor ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
312 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
313 |
#define AMT_MAP_BRIDGE_TEXT_CURSOR_CHANGE() \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
314 |
AMT_MAP_INC_VALUE_IF( viz, iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeBridgeChangeTextCursorType ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
315 |
AMT_MAP_INC_VALUE_IF( viz, iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeBridgeChangeTextCursorClipRect ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
316 |
AMT_MAP_INC_VALUE_IF( viz, iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeBridgeChangeTextCursorFlag ); \ |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
317 |
AMT_MAP_INC_VALUE_IF( viz, iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeBridgeChangeTextCursorColor ) |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
318 |
|
27 | 319 |
#define AMT_MAP_BRIDGE_SET_ORDINAL_POSITION() \ |
320 |
AMT_MAP_SET_VALUE_IF( windowAttributes, iIntMap, windowNodeId, windowAttributes->iOrdinalPosition, EAlfModuleTestTypeLayerOrdinalPosition ) |
|
321 |
||
29 | 322 |
#define AMT_MAP_NODE_SET_ORDINAL_POSITION() \ |
323 |
AMT_MAP_SET_VALUE( iIntMap, iId, ordinal, EAlfModuleTestTypeLayerNodeOrdinalPosition ) |
|
324 |
||
325 |
||
326 |
// GCE defines |
|
327 |
||
328 |
#define AMT_MAP_GCE_ADD_LAYER() \ |
|
329 |
AMT_MAP_APPEND_IF( aLayer, iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), TSurfaceId::CreateNullId(), EAlfModuleTestTypeGceCreateLayer ); \ |
|
330 |
AMT_MAP_APPEND_IF( aLayer, iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), TSurfaceId::CreateNullId(), EAlfModuleTestTypeGceReleaseLayer ); \ |
|
331 |
AMT_MAP_APPEND_IF( aLayer, iIntMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), 0, EAlfModuleTestTypeGceLayerPosition ); \ |
|
332 |
AMT_MAP_APPEND_IF( aLayer, iIntMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), 0, EAlfModuleTestTypeGceLayerOpacity ); \ |
|
333 |
AMT_MAP_APPEND_IF( aLayer, iRectMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), TRect(), EAlfModuleTestTypeGceLayerExtent ) |
|
334 |
||
335 |
#define AMT_MAP_GCE_SET_SURFACE() \ |
|
336 |
AMT_MAP_SET_VALUE( iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( static_cast< MWsLayer* >( this ) ), aSurface, EAlfModuleTestTypeGceCreateLayer ) |
|
337 |
||
338 |
#define AMT_MAP_GCE_REMOVE_LAYER() \ |
|
339 |
AMT_MAP_SET_VALUE_IF( aLayer, iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), aLayer->Surface(), EAlfModuleTestTypeGceReleaseLayer ) |
|
340 |
||
341 |
#define AMT_MAP_GCE_SET_LAYER_OPACITY() \ |
|
31 | 342 |
AMT_MAP_SET_VALUE( iIntMap, AMT_MAP_PTR_TO_KEY_CAST( static_cast< MWsLayer* >( this ) ), iLayer->Opacity(), EAlfModuleTestTypeGceLayerOpacity ) |
29 | 343 |
|
344 |
#define AMT_MAP_GCE_SET_LAYER_EXTENT() \ |
|
345 |
AMT_MAP_SET_VALUE( iRectMap, AMT_MAP_PTR_TO_KEY_CAST( static_cast< MWsLayer* >( this ) ), aExtent, EAlfModuleTestTypeGceLayerExtent ) |
|
346 |
||
347 |
||
348 |
// Goom defines |
|
349 |
||
350 |
#define AMT_MAP_CANVAS_TEXTURE_CACHE_SET_MEMORY_LEVEL() \ |
|
351 |
AMT_MAP_SET_VALUE( iIntMap, AMT_MAP_TEXTURE_CACHE_MEMORY_LEVEL, iMemoryLevel, EAlfModuleTestTypeCoreToolkitGoom ); \ |
|
352 |
AMT_MAP_SET_VALUE( iIntMap, AMT_MAP_CACHED_IMAGES_COUNT, iCachedImages.Count(), EAlfModuleTestTypeCoreToolkitGoom ); \ |
|
353 |
AMT_MAP_SET_VALUE( iIntMap, AMT_MAP_CACHED_TEXTS_COUNT, iCachedTexts.Count(), EAlfModuleTestTypeCoreToolkitGoom ); \ |
|
354 |
AMT_MAP_SET_VALUE( iIntMap, AMT_MAP_CACHED_RENDER_BUFFERS_COUNT, iCachedRenderBuffers.Count(), EAlfModuleTestTypeCoreToolkitGoom ) |
|
355 |
||
27 | 356 |
|
19
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
357 |
#endif // ALF_MODULE_TEST_DEFINES_H |
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
358 |
|
f5bac0badc7e
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
359 |
// End of File |