os/graphics/windowing/windowserver/nga/SERVER/debughelper.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
#include "debughelper.h"
sl@0
     2
sl@0
     3
const TDesC& RawEventName(const TRawEvent& aEvent) 
sl@0
     4
	{
sl@0
     5
	switch(aEvent.Type())
sl@0
     6
		{	
sl@0
     7
		case TRawEvent::ENone:
sl@0
     8
			_LIT(ENone,"ENone");
sl@0
     9
			return ENone;
sl@0
    10
			
sl@0
    11
		case TRawEvent::EPointerMove:
sl@0
    12
			_LIT(EPointerMove,"EPointerMove");
sl@0
    13
			return EPointerMove;	
sl@0
    14
			
sl@0
    15
		case TRawEvent::EPointerSwitchOn:
sl@0
    16
			_LIT(EPointerSwitchOn,"EPointerSwitchOn");
sl@0
    17
			return EPointerSwitchOn;	
sl@0
    18
			
sl@0
    19
		case TRawEvent::EKeyDown:
sl@0
    20
			_LIT(EKeyDown,"EKeyDown");
sl@0
    21
			return EKeyDown;	
sl@0
    22
			
sl@0
    23
		case TRawEvent::EKeyUp:
sl@0
    24
			_LIT(EKeyUp,"EKeyUp");
sl@0
    25
			return EKeyUp;		
sl@0
    26
			
sl@0
    27
		case TRawEvent::ERedraw:
sl@0
    28
			_LIT(ERedraw,"ERedraw");
sl@0
    29
			return ERedraw;		
sl@0
    30
			
sl@0
    31
		case TRawEvent::ESwitchOn:
sl@0
    32
			_LIT(ESwitchOn,"ESwitchOn");
sl@0
    33
			return ESwitchOn;		
sl@0
    34
			
sl@0
    35
		case TRawEvent::EActive:
sl@0
    36
			_LIT(EActive,"EActive");
sl@0
    37
			return EActive;			
sl@0
    38
			
sl@0
    39
		case TRawEvent::EInactive:
sl@0
    40
			_LIT(EInactive,"EInactive");
sl@0
    41
		    return EInactive;		    
sl@0
    42
		    
sl@0
    43
		case TRawEvent::EUpdateModifiers:
sl@0
    44
			_LIT(EUpdateModifiers,"EUpdateModifiers");
sl@0
    45
			return EUpdateModifiers;		
sl@0
    46
			
sl@0
    47
		case TRawEvent::EButton1Down:
sl@0
    48
			_LIT(EButton1Down,"EButton1Down");
sl@0
    49
			return EButton1Down;		
sl@0
    50
			
sl@0
    51
		case TRawEvent::EButton1Up:
sl@0
    52
			_LIT(EButton1Up,"EButton1Up");
sl@0
    53
			return EButton1Up;			
sl@0
    54
			
sl@0
    55
		case TRawEvent::EButton2Down:
sl@0
    56
			_LIT(EButton2Down,"EButton2Down");
sl@0
    57
			return EButton2Down;		
sl@0
    58
			
sl@0
    59
		case TRawEvent::EButton2Up:
sl@0
    60
			_LIT(EButton2Up,"EButton2Up");
sl@0
    61
			return EButton2Up;			
sl@0
    62
			
sl@0
    63
		case TRawEvent::EButton3Down:
sl@0
    64
			_LIT(EButton3Down,"EButton3Down");
sl@0
    65
			return EButton3Down;	
sl@0
    66
			
sl@0
    67
		case TRawEvent::EButton3Up:
sl@0
    68
			_LIT(EButton3Up,"EButton3Up");
sl@0
    69
			return EButton3Up;		
sl@0
    70
			
sl@0
    71
		case TRawEvent::ESwitchOff:
sl@0
    72
			_LIT(ESwitchOff,"ESwitchOff");
sl@0
    73
			return ESwitchOff;		
sl@0
    74
			
sl@0
    75
		case TRawEvent::EKeyRepeat:
sl@0
    76
			_LIT(EKeyRepeat,"EKeyRepeat");
sl@0
    77
			return EKeyRepeat;	
sl@0
    78
			
sl@0
    79
		case TRawEvent::ECaseOpen:
sl@0
    80
			_LIT(ECaseOpen,"ECaseOpen");
sl@0
    81
			return ECaseOpen;			
sl@0
    82
			
sl@0
    83
		case TRawEvent::ECaseClose:
sl@0
    84
			_LIT(ECaseClose,"ECaseClose");
sl@0
    85
			return ECaseClose;		
sl@0
    86
			
sl@0
    87
		case TRawEvent::EPointer3DInRange:
sl@0
    88
			_LIT(EPointer3DInRange,"EPointer3DInRange");
sl@0
    89
			return EPointer3DInRange;	
sl@0
    90
			
sl@0
    91
		case TRawEvent::EPointer3DOutOfRange:
sl@0
    92
			_LIT(EPointer3DOutOfRange,"EPointer3DOutOfRange");
sl@0
    93
			return EPointer3DOutOfRange;	
sl@0
    94
			
sl@0
    95
		case TRawEvent::EPointer3DTilt:
sl@0
    96
			_LIT(EPointer3DTilt,"EPointer3DTilt");
sl@0
    97
			return EPointer3DTilt;	
sl@0
    98
			
sl@0
    99
		case TRawEvent::EPointer3DRotation:
sl@0
   100
			_LIT(EPointer3DRotation,"EPointer3DRotation");
sl@0
   101
			return EPointer3DRotation;	
sl@0
   102
			
sl@0
   103
		case TRawEvent::EPointer3DTiltAndMove:
sl@0
   104
			_LIT(EPointer3DTiltAndMove,"EPointer3DTiltAndMove");
sl@0
   105
			return EPointer3DTiltAndMove;	
sl@0
   106
			
sl@0
   107
		case TRawEvent::EButton4Down:
sl@0
   108
			_LIT(EButton4Down,"EButton4Down");
sl@0
   109
			return EButton4Down;	
sl@0
   110
			
sl@0
   111
		case TRawEvent::EButton4Up:
sl@0
   112
			_LIT(EButton4Up,"EButton4Up");
sl@0
   113
			return EButton4Up;		
sl@0
   114
			
sl@0
   115
		case TRawEvent::EButton5Down:
sl@0
   116
			_LIT(EButton5Down,"EButton5Down");
sl@0
   117
			return EButton5Down;	
sl@0
   118
			
sl@0
   119
		case TRawEvent::EButton5Up:
sl@0
   120
			_LIT(EButton5Up,"EButton5Up");
sl@0
   121
			return EButton5Up;	
sl@0
   122
			
sl@0
   123
		case TRawEvent::EButton6Down:
sl@0
   124
			_LIT(EButton6Down,"EButton6Down");
sl@0
   125
			return EButton6Down;	
sl@0
   126
			
sl@0
   127
		case TRawEvent::EButton6Up:
sl@0
   128
			_LIT(EButton6Up,"EButton6Up");
sl@0
   129
			return EButton6Up;		
sl@0
   130
			
sl@0
   131
		case TRawEvent::ERestartSystem:
sl@0
   132
			_LIT(ERestartSystem,"ERestartSystem");
sl@0
   133
			return ERestartSystem;
sl@0
   134
			
sl@0
   135
		default:
sl@0
   136
			_LIT(KUndef,"User Defined Event");
sl@0
   137
			return KUndef;
sl@0
   138
		}
sl@0
   139
	}
sl@0
   140
sl@0
   141
const TDesC& WsEventName(const TWsEvent& aEvent) 
sl@0
   142
	{
sl@0
   143
	switch(aEvent.Type())
sl@0
   144
		{
sl@0
   145
		case EEventNull:
sl@0
   146
			_LIT(EEventNull,"EEventNull");
sl@0
   147
			return EEventNull;
sl@0
   148
			
sl@0
   149
		case EEventKey:
sl@0
   150
			_LIT(EEventKey,"EEventKey");
sl@0
   151
			return EEventKey;
sl@0
   152
			
sl@0
   153
		case EEventKeyUp:
sl@0
   154
			_LIT(EEventKeyUp,"EEventKeyUp");
sl@0
   155
			return EEventKeyUp;
sl@0
   156
			
sl@0
   157
		case EEventKeyDown:
sl@0
   158
			_LIT(EEventKeyDown,"EEventKeyDown");
sl@0
   159
			return EEventKeyDown;
sl@0
   160
			
sl@0
   161
		case EEventModifiersChanged:
sl@0
   162
			_LIT(EEventModifiersChanged,"EEventModifiersChanged");
sl@0
   163
			return EEventModifiersChanged;
sl@0
   164
			
sl@0
   165
		case EEventPointer:
sl@0
   166
			_LIT(EEventPointer,"EEventPointer");
sl@0
   167
			return EEventPointer;
sl@0
   168
			
sl@0
   169
		case EEventPointerEnter:
sl@0
   170
			_LIT(EEventPointerEnter,"EEventPointerEnter");
sl@0
   171
			return EEventPointerEnter;
sl@0
   172
			
sl@0
   173
		case EEventPointerExit:
sl@0
   174
			_LIT(EEventPointerExit,"EEventPointerExit");
sl@0
   175
			return EEventPointerExit;
sl@0
   176
			
sl@0
   177
		case EEventPointerBufferReady:
sl@0
   178
			_LIT(EEventPointerBufferReady,"EEventPointerBufferReady");
sl@0
   179
			return EEventPointerBufferReady;
sl@0
   180
			
sl@0
   181
		case EEventDragDrop:
sl@0
   182
			_LIT(EEventDragDrop,"EEventDragDrop");
sl@0
   183
			return EEventDragDrop;
sl@0
   184
			
sl@0
   185
		case EEventFocusLost:
sl@0
   186
			_LIT(EEventFocusLost,"EEventFocusLost");
sl@0
   187
			return EEventFocusLost;
sl@0
   188
			
sl@0
   189
		case EEventFocusGained:
sl@0
   190
			_LIT(EEventFocusGained,"EEventFocusGained");
sl@0
   191
			return EEventFocusGained;
sl@0
   192
			
sl@0
   193
		case EEventSwitchOn:
sl@0
   194
			_LIT(EEventSwitchOn,"EEventSwitchOn");
sl@0
   195
			return EEventSwitchOn;
sl@0
   196
			
sl@0
   197
		case EEventPassword:
sl@0
   198
			_LIT(EEventPassword,"EEventPassword");
sl@0
   199
			return EEventPassword;
sl@0
   200
			
sl@0
   201
		case EEventWindowGroupsChanged:
sl@0
   202
			_LIT(EEventWindowGroupsChanged,"EEventWindowGroupsChanged");
sl@0
   203
			return EEventWindowGroupsChanged;
sl@0
   204
			
sl@0
   205
		case EEventErrorMessage:
sl@0
   206
			_LIT(EEventErrorMessage,"EEventErrorMessage");
sl@0
   207
			return EEventErrorMessage;
sl@0
   208
			
sl@0
   209
		case EEventMessageReady:
sl@0
   210
			_LIT(EEventMessageReady,"EEventMessageReady");
sl@0
   211
			return EEventMessageReady;
sl@0
   212
			
sl@0
   213
		case EEventMarkInvalid:
sl@0
   214
			_LIT(EEventMarkInvalid,"EEventMarkInvalid");
sl@0
   215
			return EEventMarkInvalid;
sl@0
   216
			
sl@0
   217
		case EEventSwitchOff:
sl@0
   218
			_LIT(EEventSwitchOff,"EEventSwitchOff");
sl@0
   219
			return EEventSwitchOff;
sl@0
   220
			
sl@0
   221
		case EEventKeySwitchOff:
sl@0
   222
			_LIT(EEventKeySwitchOff,"EEventKeySwitchOff");
sl@0
   223
			return EEventKeySwitchOff;
sl@0
   224
			
sl@0
   225
		case EEventScreenDeviceChanged:
sl@0
   226
			_LIT(EEventScreenDeviceChanged,"EEventScreenDeviceChanged");
sl@0
   227
			return EEventScreenDeviceChanged;
sl@0
   228
			
sl@0
   229
		case EEventFocusGroupChanged:
sl@0
   230
			_LIT(EEventFocusGroupChanged,"EEventFocusGroupChanged");
sl@0
   231
			return EEventFocusGroupChanged;
sl@0
   232
				
sl@0
   233
		case EEventCaseOpened:
sl@0
   234
			_LIT(EEventCaseOpened,"EEventCaseOpened");
sl@0
   235
			return EEventCaseOpened;
sl@0
   236
			
sl@0
   237
		case EEventCaseClosed:
sl@0
   238
			_LIT(EEventCaseClosed,"EEventCaseClosed");
sl@0
   239
			return EEventCaseClosed;
sl@0
   240
			
sl@0
   241
		case EEventWindowGroupListChanged:
sl@0
   242
			_LIT(EEventWindowGroupListChanged,"EEventWindowGroupListChanged");
sl@0
   243
			return EEventWindowGroupListChanged;
sl@0
   244
			
sl@0
   245
		case EEventWindowVisibilityChanged:
sl@0
   246
			_LIT(EEventWindowVisibilityChanged,"EEventWindowVisibilityChanged");
sl@0
   247
			return EEventWindowVisibilityChanged;
sl@0
   248
			
sl@0
   249
		case EEventRestartSystem:
sl@0
   250
			_LIT(EEventRestartSystem,"EEventRestartSystem");
sl@0
   251
			return EEventRestartSystem;
sl@0
   252
		case EEventDisplayChanged:
sl@0
   253
			_LIT(EEventDisplayChanged,"EEventDisplayChanged");
sl@0
   254
			return EEventDisplayChanged;
sl@0
   255
			
sl@0
   256
		case EEventKeyRepeat:
sl@0
   257
			_LIT(EEventKeyRepeat,"EEventKeyRepeat");
sl@0
   258
			return EEventKeyRepeat;
sl@0
   259
			
sl@0
   260
		case EEventGroupWindowOpen:
sl@0
   261
			_LIT(EEventGroupWindowOpen,"EEventGroupWindowOpen");
sl@0
   262
			return EEventGroupWindowOpen;
sl@0
   263
			
sl@0
   264
		case EEventGroupWindowClose:
sl@0
   265
			_LIT(EEventGroupWindowClose,"EEventGroupWindowClose");
sl@0
   266
			return EEventGroupWindowClose;
sl@0
   267
			
sl@0
   268
		case EEventWindowClose:
sl@0
   269
			_LIT(EEventWindowClose,"EEventWindowClose");
sl@0
   270
			return EEventWindowClose;
sl@0
   271
			
sl@0
   272
		case EEventDirectScreenAccessBegin:
sl@0
   273
			_LIT(EEventDirectScreenAccessBegin,"EEventDirectScreenAccessBegin");
sl@0
   274
			return EEventDirectScreenAccessBegin;
sl@0
   275
			
sl@0
   276
		case EEventDirectScreenAccessEnd:
sl@0
   277
			_LIT(EEventDirectScreenAccessEnd,"EEventDirectScreenAccessEnd");
sl@0
   278
			return EEventDirectScreenAccessEnd;
sl@0
   279
			
sl@0
   280
		case EEventHeartbeatTimerStateChange:
sl@0
   281
			_LIT(EEventHeartbeatTimerStateChange,"EEventHeartbeatTimerStateChange");
sl@0
   282
			return EEventHeartbeatTimerStateChange;
sl@0
   283
			
sl@0
   284
		case EEventPowerMgmt:
sl@0
   285
			_LIT(EEventPowerMgmt,"EEventPowerMgmt");
sl@0
   286
			return EEventPowerMgmt;
sl@0
   287
			
sl@0
   288
		case EEventReserved:
sl@0
   289
			_LIT(EEventReserved,"EEventReserved");
sl@0
   290
			return EEventReserved;
sl@0
   291
			
sl@0
   292
		case EEventUser:
sl@0
   293
			_LIT(EEventUser,"EEventUser");
sl@0
   294
			return EEventUser;
sl@0
   295
sl@0
   296
		default:
sl@0
   297
			_LIT(KUndef,"User Defined Event");
sl@0
   298
			return KUndef;						
sl@0
   299
		}
sl@0
   300
	}
sl@0
   301
sl@0
   302