os/graphics/windowing/windowserver/inc/W32STD.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/inc/W32STD.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,3059 @@
     1.4 +// Copyright (c) 1994-2010 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Standard window server header file
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __W32STD_H__
    1.22 +#define __W32STD_H__
    1.23 +
    1.24 +#ifndef __FNTSTORE_H__
    1.25 +#include <fntstore.h>
    1.26 +#endif
    1.27 +#ifndef __BITDEV_H__
    1.28 +#include <bitdev.h>
    1.29 +#endif
    1.30 +#ifndef __BITSTD_H__
    1.31 +#include <bitstd.h>
    1.32 +#endif
    1.33 +#include <e32keys.h>
    1.34 +#include <textcursor.h>
    1.35 +#include <pointerevent.h>
    1.36 +#include <advancedpointerevent.h>
    1.37 +#include <sizemode.h>
    1.38 +#include <babitflags.h>
    1.39 +#include <wspublishandsubscribedata.h>
    1.40 +
    1.41 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.42 +#include <graphics/windowserverconstants.h>
    1.43 +#include <graphics/pointereventdata.h>
    1.44 +#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
    1.45 +
    1.46 +_LIT(KWSERVThreadName,"Wserv");
    1.47 +
    1.48 +class RWindowBase;
    1.49 +class RWindow;
    1.50 +class RWsBuffer;
    1.51 +class MWsObjectProvider;
    1.52 +class RWsDrawableSource;
    1.53 +class TSizeMode;
    1.54 +
    1.55 +/** Screen mode enforcement flags.
    1.56 +
    1.57 +Screen mode enforcement ensures that windows must meet certain requirements
    1.58 +if they are to be displayed. When the screen mode changes, window groups that
    1.59 +are incorrectly set up, according to these requirements, are locked out. The
    1.60 +windows are notified of the change, and will be displayed if they are updated
    1.61 +(according to the current enforcement requirement) to match the new screen
    1.62 +mode.
    1.63 +
    1.64 +@publishedAll
    1.65 +@released
    1.66 +@see CWsScreenDevice::ScreenModeEnforcement()
    1.67 +@see CWsScreenDevice::SetScreenModeEnforcement() */
    1.68 +enum TScreenModeEnforcement
    1.69 +	{
    1.70 +	/** No enforcement.
    1.71 +
    1.72 +	All windows that are the children of window groups will be displayed, irrespective
    1.73 +	of the screen mode.
    1.74 +
    1.75 +	This is not properly supported and is provided for testing purposes. */
    1.76 +	ESizeEnforcementNone,
    1.77 +	/** Pixels and rotation enforcement.
    1.78 +
    1.79 +	Group windows must be set up for the correct rotation and be working in the
    1.80 +	correct size in pixels to be displayed. */
    1.81 +	ESizeEnforcementPixelsAndRotation,
    1.82 +	/** Pixels and Twips enforcement.
    1.83 +
    1.84 +	Group windows must have the correct rotation and be working in the correct
    1.85 +	size in pixels and twips to be displayed.
    1.86 +
    1.87 +	This setting might be used if the display pixels are not square, and would
    1.88 +	distort fonts when rotated. */
    1.89 +	ESizeEnforcementPixelsTwipsAndRotation,
    1.90 +	};
    1.91 +
    1.92 +struct TPixelsAndRotation
    1.93 +/** Pixels and rotation struct.
    1.94 +
    1.95 +This is used to define a particular screen mode's screen size in pixels,
    1.96 +and its rotation.
    1.97 +
    1.98 +@publishedAll
    1.99 +@released
   1.100 +@see CWsScreenDevice::GetScreenModeSizeAndRotation() */
   1.101 +	{
   1.102 +	/** The screen size, for a given screen mode, in pixels. */
   1.103 +	TSize iPixelSize;
   1.104 +	/** The current screen orientation. */
   1.105 +	CFbsBitGc::TGraphicsOrientation iRotation;
   1.106 +	};
   1.107 +
   1.108 +struct TPixelsTwipsAndRotation
   1.109 +/** Pixels, twips and rotation struct.
   1.110 +
   1.111 +This is used to define a particular screen mode's screen size in twips
   1.112 +and pixels, and its rotation.
   1.113 +
   1.114 +@publishedAll
   1.115 +@released
   1.116 +@see CWsScreenDevice::GetScreenModeSizeAndRotation() */
   1.117 +	{
   1.118 +	/** The screen size, for a given screen mode, in pixels. */
   1.119 +	TSize iPixelSize;
   1.120 +	/** The screen size, for a given screen mode, in twips. */
   1.121 +	TSize iTwipsSize;
   1.122 +	/** The screen rotation. */
   1.123 +	CFbsBitGc::TGraphicsOrientation iRotation;
   1.124 +	};
   1.125 +
   1.126 +/** Log message text length.
   1.127 +
   1.128 +This defines the length of the log text message buffer TLogMessageText,
   1.129 +which is used in RWsSession::LogMessage().
   1.130 +
   1.131 +@publishedAll
   1.132 +@released */
   1.133 +enum {
   1.134 +	/** The length of the log message text buffer in characters. */
   1.135 +	KLogMessageLength=0x80
   1.136 +	};
   1.137 +
   1.138 +/** Log message text buffer.
   1.139 +
   1.140 +This is used in RWsSession::LogMessage().
   1.141 +
   1.142 +@publishedAll
   1.143 +@released */
   1.144 +typedef TBuf<KLogMessageLength> TLogMessageText;
   1.145 +
   1.146 +/** Password window group priority.
   1.147 +
   1.148 +This priority is assigned to the password window group when the window server is displaying the password window.
   1.149 +This is the highest priority, which ensures that the machine password window is in front of all other windows -
   1.150 +hence password tests cannot be bypassed.
   1.151 +
   1.152 +@publishedAll
   1.153 +@deprecated */
   1.154 +enum
   1.155 +	{
   1.156 +	 /** Password window group priority. */
   1.157 +	KPasswordWindowGroupPriority=1000
   1.158 +	};
   1.159 +
   1.160 +/** Switch ordinal position to owning window.
   1.161 +
   1.162 +This enum can be specified as the 2nd parameter to RWsSession::SetWindowGroupOrdinalPosition()
   1.163 +or as the 1st parameter to RWindowTreeNode::SetOrdinalPosition() (if this is being called on an
   1.164 +RWindowGroup).
   1.165 +
   1.166 +When called with this value, the functions don't change the ordinal position of the group window
   1.167 +in question, but rather bring to the front the window that would come to the front if that group
   1.168 +window were to die with keyboard focus.
   1.169 +
   1.170 +@publishedAll
   1.171 +@released
   1.172 +@see RWsSession::SetWindowGroupOrdinalPosition()
   1.173 +@see RWindowTreeNode::SetOrdinalPosition() */
   1.174 +enum {
   1.175 +	/** Switch ordinal position to owning window. */
   1.176 +	KOrdinalPositionSwitchToOwningWindow=0x80000000
   1.177 +	};
   1.178 +
   1.179 +/** Window corner types.
   1.180 +
   1.181 +Corners may be specified square or stepped, with varying numbers of pixels
   1.182 +removed to make the stepping. Picturing a corner as the top left corner of
   1.183 +a window, the numbers denote the number of pixels removed from the top row
   1.184 +to give corners.
   1.185 +
   1.186 +@publishedAll
   1.187 +@released
   1.188 +@see TCornerFlags
   1.189 +@see RWindowBase::SetCornerType() */
   1.190 +enum TCornerType
   1.191 +// Bottom 16 bits available for corner type
   1.192 +	{
   1.193 +	/** Square corner. */
   1.194 +	EWindowCornerSquare,
   1.195 +	/** Corner pixel removed. */
   1.196 +	EWindowCorner1,
   1.197 +	/** Two pixel step.
   1.198 +
   1.199 +	3 pixels are removed: the corner pixel and a single pixel from each side. */
   1.200 +	EWindowCorner2,
   1.201 +	/** Three pixel step.
   1.202 +
   1.203 +	5 pixels are removed: the corner pixel, the two pixels next to it and the
   1.204 +	2 pixels above or below it. */
   1.205 +	EWindowCorner3,
   1.206 +	/** Five pixel step.
   1.207 +
   1.208 +	12 pixels are removed: the corner pixel, the four pixels next to it, the
   1.209 +	four pixels above or below it, the pixel which was diagonal to the corner
   1.210 +	pixel, and the pixels to both sides of that pixel. */
   1.211 +	EWindowCorner5,
   1.212 +	EWindowCornerRegion,		// Private
   1.213 +	/** Corner type mask.
   1.214 +
   1.215 +	This value is used by the window server, and may be used by developers, to
   1.216 +	separate TCornerType and TCornerFlags values from a TInt which contains both
   1.217 +	types. */
   1.218 +	ECornerTypeMask=0xFFFF
   1.219 +	};
   1.220 +
   1.221 +/** Corner flags.
   1.222 +
   1.223 +These are used by RWindowBase::SetCornerType() to set which corners of a window
   1.224 +are not to have corner types applied to them.
   1.225 +
   1.226 +@publishedAll
   1.227 +@released
   1.228 +@see TCornerType */
   1.229 +enum TCornerFlags
   1.230 +// Top 16 bits available for corner flags
   1.231 +	{
   1.232 +	/** Do not apply corner shape to top left corner. */
   1.233 +	EWindowCornerNotTL=0x10000,
   1.234 +	/** Do not apply corner shape to top right corner. */
   1.235 +	EWindowCornerNotTR=0x20000,
   1.236 +	/** Do not apply corner shape to bottom left corner. */
   1.237 +	EWindowCornerNotBL=0x40000,
   1.238 +	/** Do not apply corner shape to bottom right corner. */
   1.239 +	EWindowCornerNotBR=0x80000,
   1.240 +	};
   1.241 +
   1.242 +/** Window backup type flags.
   1.243 +
   1.244 +@publishedAll
   1.245 +@released
   1.246 +@see RWindowBase::EnableBackup() */
   1.247 +enum TWindowBackupType
   1.248 +	{
   1.249 +	/** Backup the area behind the current window only.
   1.250 +
   1.251 +	This is the default behaviour for the RWindowBase::EnableBackup() function. */
   1.252 +	EWindowBackupAreaBehind=0x0001,
   1.253 +	/** Backup the entire screen.
   1.254 +
   1.255 +	This is provided for windows that require the rest
   1.256 +	of the screen to fade when they are displayed. When the rest of the screen
   1.257 +	should become unfaded, the window server redraws the whole screen from the
   1.258 +	backed up bitmap. */
   1.259 +	EWindowBackupFullScreen=0x0002,
   1.260 +	};
   1.261 +
   1.262 +/** Types of standard events.
   1.263 +
   1.264 +These are events that the window server passes to its clients, as opposed
   1.265 +to events that the base passes to the window server.
   1.266 +
   1.267 +@publishedAll
   1.268 +@released
   1.269 +@see CClickMaker */
   1.270 +enum TEventCode
   1.271 +	{
   1.272 +	/** Null event.
   1.273 +
   1.274 +	This can be sent, but should be ignored by clients. */
   1.275 +	EEventNull,
   1.276 +	/** Key event.
   1.277 +
   1.278 +	This is the event that is sent when a character has been received from the
   1.279 +	keyboard.
   1.280 +
   1.281 +	If an EEventKey event is associated with an EEventKeyDown or EEventKeyUp
   1.282 +	event (typically EEventKeyDown), the EEventKey event occurs after the
   1.283 +	EEventKeyDown/EEventKeyUp event.
   1.284 +
   1.285 +	In practice, the only keys potentially likely to have their EEventKey event
   1.286 +	generated on the up rather than the down are modifier keys. */
   1.287 +	EEventKey,
   1.288 +	/** Key up event.
   1.289 +
   1.290 +	If an EEventKey event is associated with an EEventKeyUp event (which is
   1.291 +	rarely the case), the EEventKey event occurs after the EEventKeyUp event. */
   1.292 +	EEventKeyUp,
   1.293 +	/** Key down event.
   1.294 +
   1.295 +	If an EEventKey event is associated with an EEventKeyDown event (which
   1.296 +	is typically the case), the EEventKey event occurs after the EEventKeyDown event. */
   1.297 +	EEventKeyDown,
   1.298 +	/** Modifier changed event.
   1.299 +
   1.300 +	This is an event generated by the window server when
   1.301 +	the state of one of the modifier keys changes.
   1.302 +	It is not reported unless explicitly requested by a window.
   1.303 +
   1.304 +	@see RWindowTreeNode::EnableModifierChangedEvents(). */
   1.305 +	EEventModifiersChanged,
   1.306 +	/** Pointer event.
   1.307 +
   1.308 +	This event is sent when the user presses or releases a pointer button (or
   1.309 +	the equivalent action, depending on the type of pointing device), drags the
   1.310 +	pointer, moves it or uses the pointer to switch on the device. */
   1.311 +	EEventPointer,			//5
   1.312 +	/** Pointer enter event.
   1.313 +
   1.314 +	This occurs when the user moves the pointer into a window with a pointer button
   1.315 +	pressed (or equivalent action depending on the type of pointing device). If
   1.316 +	move events are being generated, this event also occurs when the user moves
   1.317 +	the pointer into the window. */
   1.318 +	EEventPointerEnter,
   1.319 +	/** Pointer exit event.
   1.320 +
   1.321 +	Occurs when the user moves the pointer out of a window with a pointer button
   1.322 +	pressed (or equivalent action depending on the type of pointing device). If
   1.323 +	move events are being generated, this event also occurs when the user moves
   1.324 +	the pointer out of the window. */
   1.325 +	EEventPointerExit,
   1.326 +	/** Pointer move buffer ready event.
   1.327 +
   1.328 +	Occurs when the pointer move buffer is ready to be retrieved by the client. */
   1.329 +	EEventPointerBufferReady,
   1.330 +	/** Occurs as a duplicate of each pointer event if a window sets pointer capture
   1.331 +	with the TCaptureFlagDragDrop flag set. */
   1.332 +	EEventDragDrop,
   1.333 +	/** Focus lost event.
   1.334 +
   1.335 +	Occurs when a window group loses keyboard focus. */
   1.336 +	EEventFocusLost,		//10
   1.337 +	/** Focus gained event.
   1.338 +
   1.339 +	Occurs when a window group gains keyboard focus. */
   1.340 +	EEventFocusGained,
   1.341 +	/** On event.
   1.342 +
   1.343 +	This event type is not reported unless explicitly requested by a window.
   1.344 +
   1.345 +	@see RWindowTreeNode::EnableOnEvents(). */
   1.346 +	EEventSwitchOn,
   1.347 +	/** Password event.
   1.348 +
   1.349 +	Occurs when the window server enters password mode. It is sent to the group
   1.350 +	window of the currently active password window.
   1.351 +
   1.352 +	This is the window server mode where the user is required to enter a password
   1.353 +	before any further actions can be performed.
   1.354 +
   1.355 +	@deprecated	*/
   1.356 +	EEventPassword,
   1.357 +	/** Window group changed event. This occurs whenever a window group is destroyed,
   1.358 +	and whenever a window group's name changes
   1.359 +
   1.360 +	This event type is not reported unless explicitly requested by a window.
   1.361 +
   1.362 +	@see RWindowTreeNode::EnableGroupChangeEvents(). */
   1.363 +	EEventWindowGroupsChanged,
   1.364 +	/** Error event.
   1.365 +
   1.366 +	Occurs when an error occurs. See TWsErrorMessage::TErrorCategory for the types
   1.367 +	of errors.
   1.368 +
   1.369 +	This event type is not reported unless explicitly requested by a window.
   1.370 +
   1.371 +	@see RWindowTreeNode::EnableErrorMessages(). */
   1.372 +	EEventErrorMessage,		//15
   1.373 +	/** Message ready event.
   1.374 +
   1.375 +	Occurs when a session sends a message to this window group using RWsSession::SendMessageToWindowGroup(). */
   1.376 +	EEventMessageReady,
   1.377 +	EEventMarkInvalid,	// For internal use only
   1.378 +	/** Off event.
   1.379 +
   1.380 +	This is issued when an off event is received by the window server from the
   1.381 +	base.
   1.382 +
   1.383 +	If for some reason the event can't be delivered, or there is no-one to deliver
   1.384 +	it to, then a call to the base is made to power down the processor.
   1.385 +
   1.386 +	This event is only delivered if explicitly requested using RWsSession:RequestOffEvent(). */
   1.387 +	EEventSwitchOff,
   1.388 +	/** Event issued to off-event requesting windows when the off key is pressed. */
   1.389 +	EEventKeySwitchOff,
   1.390 +	/** Screen size mode change event.
   1.391 +
   1.392 +	This is issued when the screen size mode has changed, for instance when
   1.393 +	the cover on a phone that supports screen flipping is opened or closed. */
   1.394 +	EEventScreenDeviceChanged, //20
   1.395 +	/** Event sent whenever the window group with focus changes.
   1.396 +
   1.397 +	Requested by RWindowTreeNode::EnableFocusChangeEvents(). */
   1.398 +	EEventFocusGroupChanged,
   1.399 +	/** Case opened event.
   1.400 +
   1.401 +	This event is sent to those windows that have requested EEventSwitchOn
   1.402 +	events. Unlike with EEventSwitchOn events, the screen will not be switched
   1.403 +	on first. */
   1.404 +	EEventCaseOpened,
   1.405 +	/** Case closed event.
   1.406 +
   1.407 +	This event is sent to those windows that have requested EEventSwitchOff
   1.408 +	events.
   1.409 +
   1.410 +	Unlike EEventSwitchOff events, which make a call to the base to power down
   1.411 +	the processor if for some reason the event can't be delivered (or there is
   1.412 +	no-one to deliver it to), failure to deliver case closed events has no repercussions. */
   1.413 +	EEventCaseClosed,
   1.414 +	/** Window group list change event.
   1.415 +
   1.416 +	The window group list is a list of all window groups and their z-order. This
   1.417 +	event indicates any change in the window group list: additions, removals and
   1.418 +	reorderings.
   1.419 +
   1.420 +	Notification of this event is requested by calling RWindowTreeNode::EnableGroupListChangeEvents(). */
   1.421 +	EEventWindowGroupListChanged,
   1.422 +	/** The visibility of a window has changed
   1.423 +
   1.424 +	This is sent to windows when they change from visible to invisible, or visa versa, usually due
   1.425 +	to another window obscuring them.
   1.426 +
   1.427 +	Notification of this event is requested by calling RWindowTreeNode::EnableVisibilityChangeEvents(). */
   1.428 +	EEventWindowVisibilityChanged,
   1.429 +#ifdef SYMBIAN_PROCESS_MONITORING_AND_STARTUP
   1.430 +	/** Restart event.
   1.431 +	
   1.432 +	This is issued when an restart event is received by the window server from the 
   1.433 +	base. This event is also an off event, because it might power-cycle the device.
   1.434 +	
   1.435 +	If for some reason the event can't be delivered, or there is no-one to deliver 
   1.436 +	it to, then a call to the base is made to power down the processor.
   1.437 +	
   1.438 +	This event is only delivered if explicitly requested using RWsSession:RequestOffEvent(). */
   1.439 +	EEventRestartSystem,
   1.440 +#endif
   1.441 +	/** The display state or configuration has changed
   1.442 +	
   1.443 +	Either change of the current resolution list (state change) or current resolution/background
   1.444 +	(mode change) will trigger this event.
   1.445 +	
   1.446 +	Notification of this event is requested by calling MDisplayControl::EnableDisplayChangeEvents() 
   1.447 +	 */
   1.448 +	EEventDisplayChanged = EEventWindowVisibilityChanged+2,
   1.449 +	//Codes for events only passed into Key Click DLL's
   1.450 +	/** Repeating key event.
   1.451 +
   1.452 +	This is only sent to a key click plug-in DLL (if one is present) to indicate
   1.453 +	a repeating key event.
   1.454 +
   1.455 +	@see CClickMaker */
   1.456 +	EEventKeyRepeat=100,
   1.457 +	EEventGroupWindowOpen,
   1.458 +	EEventGroupWindowClose,
   1.459 +	EEventWindowClose,
   1.460 +	//Codes for events only passed into anim dlls
   1.461 +	/** Direct screen access begin
   1.462 +	This is only sent to anim dlls (if they register to be notified). It indicates that
   1.463 +	the number of direct screen access sessions has increased from zero to one.*/
   1.464 +	EEventDirectScreenAccessBegin=200,
   1.465 +	/** Direct screen access end
   1.466 +	This is only sent to anim dlls (if they register to be notified). It indicates that
   1.467 +	the number of direct screen access sessions has decreased from one to zero.*/
   1.468 +	EEventDirectScreenAccessEnd,
   1.469 +	/** Event to signal the starting or stopping of the wserv heartbeat timer
   1.470 +	This is only sent to anim dlls (if they register to be notified). */
   1.471 +	EEventHeartbeatTimerStateChange,
   1.472 +
   1.473 +	//The range 900-999 is reserved for UI Framework events
   1.474 +	/** 900-909 WSERV protects with PowerMgmt */
   1.475 +	EEventPowerMgmt = 900,
   1.476 +	EEventReserved = 910,
   1.477 +
   1.478 +	//Event codes from EEventUser upwards may be used for non-wserv events.
   1.479 +	//No event codes below this should be defined except by the window server
   1.480 +
   1.481 +	/** User defined event.
   1.482 +
   1.483 +	The client can use this and all higher values to define their own
   1.484 +	events. These events can be sent between windows of the same client or windows
   1.485 +	of different clients.
   1.486 +
   1.487 +	@see RWs::SendEventToWindowGroup(). */
   1.488 +	EEventUser=1000,
   1.489 +
   1.490 +	};
   1.491 +
   1.492 +
   1.493 +/** Window server hot keys.
   1.494 +
   1.495 +@publishedAll
   1.496 +@released
   1.497 +@see RWsSession::SetHotKey() */
   1.498 +enum THotKey
   1.499 +	{
   1.500 +	/** Enables logging of all messages to and from the window server.
   1.501 +
   1.502 +	Note that the required type of logging must have been specified in the wsini.ini
   1.503 +	file (using the LOG keyword), and the appropriate logging DLL must be available.
   1.504 +
   1.505 +	Default key mapping: \<Ctrl\>\<Alt\>\<Shift\>E */
   1.506 +	EHotKeyEnableLogging,
   1.507 +	/** Always disables window server logging, if active. Does nothing otherwise.
   1.508 +
   1.509 +	Default key mapping: \<Ctrl\>\<Alt\>\<Shift\>D */
   1.510 +	EHotKeyDisableLogging,
   1.511 +	/** Dumps a list of all windows to the log. (If logging is disabled, it is temporarily
   1.512 +	enabled in order to do this.)
   1.513 +
   1.514 +	Default key mapping: \<Ctrl\>\<Alt\>\<Shift\>W */
   1.515 +	EHotKeyStateDump,
   1.516 +	/** Kills the foreground application.
   1.517 +
   1.518 +	Default key mapping: \<Ctrl\>\<Alt\>\<Shift\>K */
   1.519 +	EHotKeyOfDeath,
   1.520 +	/** Shuts down the window server.
   1.521 +
   1.522 +	Be cautious! This may mean resetting the machine to re-start the window server.
   1.523 +
   1.524 +	Default key mapping: release (not available), debug (\<Ctrl\>\<Alt\>\<Shift\>X). */
   1.525 +	EHotKeyShutDown,
   1.526 +	/** Dumps a list of cells allocated on the window server's heap to the log. (If
   1.527 +	logging is disabled, it is temporarily enabled in order to do this.)
   1.528 +
   1.529 +	Note that logging requires that the type of logging has been set up in the
   1.530 +	wsini.ini file, and that the appropriate logging DLL is available.
   1.531 +
   1.532 +	Default key mapping: \<Ctrl\>\<Alt\>\<Shift\>H */
   1.533 +	EHotKeyHeapDump,
   1.534 +	/** Increases the LCD contrast.
   1.535 +
   1.536 +	Default key mapping: EKeyIncContrast. Note that this value is from an enum
   1.537 +	in e32keys.h. The contrast wraps around when it reaches the maximum. */
   1.538 +	EHotKeyIncContrast,
   1.539 +	/** Decreases the LCD contrast.
   1.540 +
   1.541 +	Default key mapping: EKeyDecContrast. Note that this value is from an enum
   1.542 +	in e32keys.h. The contrast wraps around when it reaches the minimum. */
   1.543 +	EHotKeyDecContrast,
   1.544 +	/** Switches the machine off.
   1.545 +
   1.546 +	Default key mapping: EKeyOff. Note that this value is from an enum in e32keys.h. */
   1.547 +	EHotKeyOff,
   1.548 +	/** Switches the backlight on.
   1.549 +
   1.550 +	Default key mapping: EKeyBacklightOn. Note that this value is from an enum
   1.551 +	in e32keys.h. */
   1.552 +	EHotKeyBacklightOn,
   1.553 +	/** Switches the backlight off.
   1.554 +
   1.555 +	Default key mapping: EKeyBacklightOff. Note that this value is from an enum
   1.556 +	in e32keys.h. */
   1.557 +	EHotKeyBacklightOff,
   1.558 +	/** Toggles the backlight.
   1.559 +
   1.560 +	Default key mapping: EKeyBacklightToggle. Note that this value is from an
   1.561 +	enum in e32keys.h. */
   1.562 +	EHotKeyBacklightToggle,
   1.563 +	/** Switches to screen size 0.
   1.564 +
   1.565 +	This, and the following 3 keys are used to switch screen sizes on real hardware,
   1.566 +	for instance when the cover is closed on a phone that supports screen flipping. */
   1.567 +	EHotKeyScreenDimension0,
   1.568 +	/** Switches to screen size 1.
   1.569 +
   1.570 +	This might be generated when the cover is opened on a phone that supports screen
   1.571 +	flipping. */
   1.572 +	EHotKeyScreenDimension1,
   1.573 +	/** Switches to screen size 2. */
   1.574 +	EHotKeyScreenDimension2,
   1.575 +	/** Switches to screen size 3. */
   1.576 +	EHotKeyScreenDimension3,
   1.577 +	/** Cycles the display though its possible sizes.
   1.578 +
   1.579 +	This is used only for debugging.
   1.580 +
   1.581 +	A device may have several screen sizes, each with a default orientation. For
   1.582 +	example a phone that supports screen flipping will have different display
   1.583 +	sizes when the cover is opened and closed.
   1.584 +
   1.585 +	Default key mapping: debug : \<Ctrl\>\<Alt\>\<Shift\> U. Release : none. */
   1.586 +	EHotKeyCycleDisplaySize,
   1.587 +	/** Cycles the screen orientation through the specified rotations for the particular
   1.588 +	size mode you are in.
   1.589 +
   1.590 +	For example, phones that support screen flipping may
   1.591 +	use this feature for changing between right and left handed use.
   1.592 +
   1.593 +	For rectangular display modes you can only specify 2 orientations, 180 degrees
   1.594 +	apart. For square modes you can specify 4 rotations (90 degrees) or however
   1.595 +	many you want.
   1.596 +
   1.597 +	Specification of the list of rotations takes place in the WSINI.INI file.
   1.598 +
   1.599 +	Default key mapping: debug : \<Ctrl\>\<Alt\>\<Shift\> O. Release : none. */
   1.600 +	EHotKeyCycleOrientation,
   1.601 +	/** Increases the screen's brightness.
   1.602 +
   1.603 +	The brightness wraps around to the minimum
   1.604 +	value after it has reached the maximum. */
   1.605 +	EHotKeyIncBrightness,
   1.606 +	/** Decreases the screen's brightness.
   1.607 +
   1.608 +	The brightness wraps around to the maximum value after it has reached the minimum. */
   1.609 +	EHotKeyDecBrightness,
   1.610 +
   1.611 +	/** Cycle focus screen from one to another in multiple screen environment. Start
   1.612 +	from current focused screen, switch to next the screen, and wraps around when it
   1.613 +	reaches the last screen.
   1.614 +
   1.615 +	Default key mapping: \<Ctrl\>\<Alt\>\<Shift\> I. */
   1.616 +	EHotKeyCycleFocusScreen,
   1.617 +
   1.618 +	/** Value for first hot key.
   1.619 +
   1.620 +	Used with EHotKeyLastKeyType to make it easy to write a for loop that steps
   1.621 +	through all the different key values. */
   1.622 +	EHotKeyFirstKeyType=EHotKeyEnableLogging,		//Must always be set to the first one
   1.623 +	/** Value for last hot key.
   1.624 +
   1.625 +	Used with EHotKeyFirstKeyType to make it easy to write a for loop that steps
   1.626 +	through all the different key values. */
   1.627 +	EHotKeyLastKeyType=EHotKeyCycleFocusScreen,		//Must always be set to the last one
   1.628 +	};
   1.629 +
   1.630 +
   1.631 +/** Password mode flags.
   1.632 +
   1.633 +@publishedAll
   1.634 +@deprecated */
   1.635 +enum TPasswordMode
   1.636 +	{
   1.637 +	/** Releases ownership of password handling.
   1.638 +
   1.639 +	This allows another window to become the password window. A client will be
   1.640 +	panicked with code 46 if it sets this mode when it is not the current password
   1.641 +	window. */
   1.642 +	EPasswordCancel,
   1.643 +	/** No password handling is performed by this window, but no other window
   1.644 +	can become the password window. */
   1.645 +	EPasswordNone,
   1.646 +	/** Password mode is enabled only once a day.
   1.647 +
   1.648 +	When enabled, password mode requires the user to enter a password
   1.649 +	before any further actions can be performed. */
   1.650 +	EPasswordOnceADay,
   1.651 +	/** Password mode is enabled every time the machine is switched on. */
   1.652 +	EPasswordAlways,
   1.653 +	/** Equivalent to setting the password mode to EPasswordAlways and triggering an
   1.654 +	instant password check. */
   1.655 +	EPasswordAlwaysTriggerNow,
   1.656 +	/** Equivalent to setting the password mode to EPasswordOnceADay and triggering
   1.657 +	an instant password check. */
   1.658 +	EPasswordOnceADayTriggerNow,
   1.659 +	};
   1.660 +enum TPriorities {
   1.661 +           /**
   1.662 +           Defines the value EAllPriorities.
   1.663 +           */
   1.664 +           EAllPriorities=KMinTInt,
   1.665 +           };
   1.666 +
   1.667 +/** Sprite flags.
   1.668 +
   1.669 +These can be combined using a bit-wise OR operation.
   1.670 +
   1.671 +@publishedAll
   1.672 +@released
   1.673 +@see RWsPointerCursor::Construct()
   1.674 +@see RWsSprite::Construct() */
   1.675 +enum TSpriteFlags
   1.676 +	{
   1.677 +	/** Flash sprite on and off.
   1.678 +
   1.679 +	All flashing is done on the same timer, including the text cursor. */
   1.680 +	ESpriteFlash=0x1,
   1.681 +	/** This flag no longer has any effect.
   1.682 +	
   1.683 +	If you want a sprite to appear on top of all windows, you can create a floating sprite
   1.684 +	by specifying a RWindowGroup as parent to the sprite.  */
   1.685 +	ESpriteNoChildClip=0x2,
   1.686 +	/** The sprite's appearance will not change when it is on a shadowed part of the
   1.687 +	screen.
   1.688 +
   1.689 +	(Typically this is used for sprites attached to window groups so that
   1.690 +	they are perceived to be floating above the windows). */
   1.691 +	ESpriteNoShadows=0x4
   1.692 +	};
   1.693 +
   1.694 +struct TSpriteMember
   1.695 +/** Sprite member.
   1.696 +
   1.697 +This structure is used to define the parameters of a sprite member, which
   1.698 +can be added to a sprite or pointer cursor.
   1.699 +@publishedAll
   1.700 +@released */
   1.701 +	{
   1.702 +	/** The bitmap to be displayed in the sprite or pointer cursor during the time
   1.703 +	interval specified by iInterval.
   1.704 +
   1.705 +	If NULL, the sprite or pointer cursor will be invisible for the time specified
   1.706 +	by iInterval. */
   1.707 +	CFbsBitmap *iBitmap;
   1.708 +	/** The bitmap mask.
   1.709 +
   1.710 +	This defines which areas of iBitmap are drawn to the screen.
   1.711 +	It enables the bitmap to have a non-rectangular shape on the screen. Areas
   1.712 +	which are not drawn to, retain the appearance of the window underneath the
   1.713 +	sprite or cursor.
   1.714 +
   1.715 +	The bits in iBitmap are AND'ed with those in iMaskBitmap before being drawn
   1.716 +	to the screen. In practice, the mask bitmap is normally white in those areas
   1.717 +	drawn to by iBitmap, and black in all other areas.
   1.718 +
   1.719 +	Note:
   1.720 +
   1.721 +	This bitmap should be in the same mode as iBitmap, otherwise the masking
   1.722 +	out operation becomes inefficient. */
   1.723 +	CFbsBitmap *iMaskBitmap;
   1.724 +	/** EFalse if the mask bitmap is not to be inverted (the default) or ETrue if it
   1.725 +	is to be inverted. */
   1.726 +	TBool iInvertMask;
   1.727 +	/** Specifies the drawing mode to use when drawing iBitmap if the mask is NULL. */
   1.728 +	CGraphicsContext::TDrawMode iDrawMode;
   1.729 +	/** Offset from the sprite's central position.
   1.730 +
   1.731 +	Specifies an offset between the origin of iBitmap and the sprite or pointer
   1.732 +	cursor's origin. (The origin is the top left corner of the bitmap.) */
   1.733 +	TPoint iOffset;
   1.734 +	/** Time interval for which iBitmap is displayed.
   1.735 +
   1.736 +	Note that if only one sprite member is added to a sprite or pointer cursor,
   1.737 +	it will be displayed continuously, regardless of the value of iInterval. */
   1.738 +	TTimeIntervalMicroSeconds32 iInterval;
   1.739 +	};
   1.740 +
   1.741 +/** Event reporting control.
   1.742 +
   1.743 +This enumeration defines flags which can be used to control how events are
   1.744 +reported.
   1.745 +
   1.746 +@publishedAll
   1.747 +@released
   1.748 +@see RWindowTreeNode::EnableOnEvents()
   1.749 +@see RWindowTreeNode::EnableModifierChangedEvents()
   1.750 +@see RWindowTreeNode::EnableErrorMessages() */
   1.751 +enum TEventControl
   1.752 +	{
   1.753 +	/** Requested events are sent in all circumstances. */
   1.754 +	EEventControlAlways,
   1.755 +	/** Events are delivered only when the requesting window's window group has keyboard
   1.756 +	focus. */
   1.757 +	EEventControlOnlyWithKeyboardFocus,
   1.758 +	/** Events are delivered only when the requesting window or any of its children
   1.759 +	are visible on the screen. */
   1.760 +	EEventControlOnlyWhenVisible
   1.761 +	};
   1.762 +
   1.763 +/** Pointer event filter types.
   1.764 +
   1.765 +These flags are used by RWindowBase::PointerFilter() to define which pointer
   1.766 +events are filtered out by the window server and not sent to the client session.
   1.767 +They also allow the window server to simulate a move event prior to each pen
   1.768 +down event.
   1.769 +
   1.770 +@publishedAll
   1.771 +@released
   1.772 +@see RWindowBase::PointerFilter() */
   1.773 +enum TPointerFilter
   1.774 +	{
   1.775 +	//Basic Types
   1.776 +	/** Filters out both pointer enter and pointer exit events for this window. */
   1.777 +	EPointerFilterEnterExit=0x1,
   1.778 +	/** Filters out pointer-move events for this window. */
   1.779 +	EPointerFilterMove=0x2,
   1.780 +	/** Filters out pointer-drag events for this window. */
   1.781 +	EPointerFilterDrag=0x4,
   1.782 +	/** Simulates a pointer move event before each pen down event.
   1.783 +
   1.784 +	This makes the pen appear more like a mouse, with simulated movement between
   1.785 +	two pointer events. You can only get these events while you are in pen mode. */
   1.786 +	EPointerGenerateSimulatedMove=0x8,
   1.787 +	//Combinations of the above
   1.788 +	/** Filters move and drag-pointer events from the event stream and simulates the
   1.789 +	move event before each pen down event.
   1.790 +
   1.791 +	This enum is useful when you want to get simulated move events. Use it as shown
   1.792 +	below to turn on simulated moves:
   1.793 +
   1.794 +	@code
   1.795 +	win->PointerFilter(EPointerMoveEvents, EPointerGenerateSimulateMoves)
   1.796 +	@endcode
   1.797 +	@see RWindowBase::PointerFilter() */
   1.798 +	EPointerMoveEvents=EPointerFilterMove|EPointerGenerateSimulatedMove,
   1.799 +	};
   1.800 +
   1.801 +struct TKeyEvent
   1.802 +/** Key event details.
   1.803 +
   1.804 +When processing a TKeyEvent, the TStdScanCode in iScanCode should usually
   1.805 +be ignored in favour of the TKeyCode in iCode. Using iScanCode would bypass
   1.806 +the keyboard mapping and any FEP that happens to be installed. The exceptions
   1.807 +to this general rule are games where the positions of the keys are more important
   1.808 +than their translations, and FEPs that are implementing keyboard maps themselves.
   1.809 +In these cases, if the iCode is used rather than iScanCode to determine the
   1.810 +key pressed, there will be two unfortunate consequences. Firstly, the low-level
   1.811 +keyboard mapping might re-arrange the mapping that you are trying to impose.
   1.812 +Secondly, you will subvert the CTRL+number method of entering Unicode literals.
   1.813 +
   1.814 +@publishedAll
   1.815 +@released */
   1.816 +	{
   1.817 +	/** The character code generated for an EEventKey, or 0 for a down or up event.
   1.818 +
   1.819 +	Key codes for special keys are defined in TKeyCode. */
   1.820 +	TUint iCode;
   1.821 +	/** The scan code of the key that caused the event.
   1.822 +
   1.823 +	Standard scan codes are defined in TStdScanCode. */
   1.824 +	TInt iScanCode;
   1.825 +	/** State of modifier keys and pointing device. Modifier keys are defined in TEventModifier. */
   1.826 +	TUint iModifiers;
   1.827 +	/** Count of auto repeats generated.
   1.828 +
   1.829 +	0 means an event without repeats. 1 or more means "this many auto repeat events".
   1.830 +	It is normal to ignore this value and treat it as a single event. */
   1.831 +	TInt iRepeats;
   1.832 +	};
   1.833 +
   1.834 +struct TModifiersChangedEvent
   1.835 +/** Details of changed modifier keys.
   1.836 +
   1.837 +@publishedAll
   1.838 +@released
   1.839 +@see TWsEvent::ModifiersChanged() */
   1.840 +	{
   1.841 +	/** Contains a set bit for any modifier which has changed. Modifiers are defined
   1.842 +	in TEventModifier. */
   1.843 +	TUint iChangedModifiers;
   1.844 +	/** Current state of all modifiers, combined using a bitwise-OR. Modifiers are
   1.845 +	defined in TEventModifier. */
   1.846 +	TUint iModifiers;
   1.847 +	};
   1.848 +
   1.849 +struct TWsVisibilityChangedEvent
   1.850 +/** Visibility changed events.
   1.851 +
   1.852 +These events are generated in response to a window being obscured, or being fully or partially
   1.853 +revealed after being obscured.
   1.854 +@publishedAll
   1.855 +@released
   1.856 +@see RWindowTreeNode::EnableVisibilityChangeEvents() */
   1.857 +		{
   1.858 +	enum
   1.859 +		{
   1.860 +		/** Some or all of the window is visible, either directly or through a transparent window.
   1.861 +		@deprecated Use EPartiallyVisible instead. */
   1.862 +		ECanBeSeen = 0x01,
   1.863 +		/** None of the window is visible, either directly or through a transparent window.
   1.864 +		@deprecated Use ENotVisible instead. */
   1.865 +		ECantBeSeen = 0x02,
   1.866 +		};
   1.867 +	enum
   1.868 +		{
   1.869 +		/** Some (or all) of the window is visible, either directly or through a transparent window. */
   1.870 +		EPartiallyVisible = 0x01,
   1.871 +		/** None of the window is visible, either directly or through a transparent window. */
   1.872 +		ENotVisible = 0x02,
   1.873 +		/** All of the window is directly visible. */
   1.874 +		EFullyVisible = 0x04,
   1.875 +		};
   1.876 +	/** A combination of one or more visibility event flags. */
   1.877 +	TUint iFlags;
   1.878 +	};
   1.879 +
   1.880 +struct TWsDisplayChangedEvent
   1.881 +/** Display changed events.
   1.882 +
   1.883 +These events are generated by attaching, detaching the display device, changing the resolution list or change
   1.884 +current resolution or backgound (change the current configuration).
   1.885 +@publishedAll
   1.886 +@released
   1.887 +@see MDisplayControl::EnableDisplayChangeEvents() */
   1.888 +	{
   1.889 +	/**
   1.890 +	 Number of display that has changed, causing this event. This is
   1.891 +	 also known as the screen number, and is zero-based.
   1.892 +	
   1.893 +	 @see CWsScreenDevice::Construct(TInt)
   1.894 +	 */
   1.895 +	TInt iDisplayNumber;
   1.896 +	/**
   1.897 +	 Opaque value that changes when the current display configuration
   1.898 +	 has changed.
   1.899 +	 
   1.900 +	 Compare values in subsequent events to determine whether the
   1.901 +	 current resolution has changed since the last event.
   1.902 +	 */
   1.903 +	TInt iConfigurationChangeId;
   1.904 +	/**
   1.905 +	 Opaque value that changes when the resolution list has changed.
   1.906 +	 
   1.907 +	 Compare values in subsequent events to determine whether the list
   1.908 +	 of available resolutions has changed since the last event.
   1.909 +	 
   1.910 +	 @see MDisplayControlBase::GetResolutions
   1.911 +	 */
   1.912 +	TInt iResolutionListChangeId;	
   1.913 +	};
   1.914 +
   1.915 +struct TWsErrorMessage
   1.916 +/** Error event details.
   1.917 +
   1.918 +@publishedAll
   1.919 +@released
   1.920 +@see RWindowTreeNode::EnableErrorMessages() */
   1.921 +	{
   1.922 +	/** Error event types */
   1.923 +	enum TErrorCategory
   1.924 +		{
   1.925 +		/** An error that occurs while the window server is calculating a drawing region
   1.926 +		for a particular window.
   1.927 +
   1.928 +		When the window server can't calculate a drawing region due to lack of memory
   1.929 +		it goes into a mode where it draws the whole of a window. Any window that
   1.930 +		is covering this window is also told to redraw. */
   1.931 +		EDrawingRegion,
   1.932 +		/** An error occured while trying to turn the backlight on or off.
   1.933 +
   1.934 +		This would usually only happen when the batteries are low. */
   1.935 +		EBackLight,
   1.936 +		/** An error occured while trying to enable logging. */
   1.937 +		ELogging,
   1.938 +		/** An error that occured while trying to change the contrast. */
   1.939 +		EContrast,
   1.940 +		};
   1.941 +	/** The error category. */
   1.942 +	TErrorCategory iErrorCategory;
   1.943 +	/** The error code */
   1.944 +	TUint iError;
   1.945 +	};
   1.946 +
   1.947 +class TWsRedrawEvent
   1.948 +/** Window server redraw event.
   1.949 +
   1.950 +All redraw events generated by the window server are delivered to the client
   1.951 +in an object of this type. The class provides a handle to the window which
   1.952 +generated the redraw event, and the rectangle which should be redrawn.
   1.953 +
   1.954 +@publishedAll
   1.955 +@released
   1.956 +@see RWsSession::GetRedraw() */
   1.957 +	{
   1.958 +public:
   1.959 +	inline TUint Handle() const;
   1.960 +	inline TRect Rect() const;
   1.961 +public:
   1.962 +	void SetHandle(TUint aHandle);
   1.963 +	void SetRect(TRect aRect);
   1.964 +protected:
   1.965 +	TUint iHandle;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
   1.966 +	TRect iRect;	/**< Rectangle to redraw.  WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
   1.967 +	};
   1.968 +
   1.969 +class TWsPriorityKeyEvent
   1.970 +/** Priority key events.
   1.971 +
   1.972 +These events are configured using RWindowGroup::AddPriorityKey(), and obtained
   1.973 +by the client using the functions RWsSession::PriorityKeyReady() and RWsSession::GetPriorityKey().
   1.974 +
   1.975 +@publishedAll
   1.976 +@released */
   1.977 +	{
   1.978 +public:
   1.979 +	inline TKeyEvent *Key() const;
   1.980 +	inline TUint Handle() const;
   1.981 +	inline void SetHandle(TUint aHandle);
   1.982 +protected:
   1.983 +	TUint iHandle;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
   1.984 +	TUint8 iEventData[sizeof(TKeyEvent)];	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
   1.985 +	};
   1.986 +
   1.987 +class TWsEvent
   1.988 +/** Window server event.
   1.989 +
   1.990 +All events generated by the window server, except redraw events and priority
   1.991 +key events, are delivered to the client in a TWsEvent. The client obtains
   1.992 +the TWsEvent by calling RWsSession::GetEvent(). The type of data contained
   1.993 +in the TWsEvent depends on the type of event. The client can inquire the event
   1.994 +type using Type(), and then retrieve the appropriate type of data.
   1.995 +
   1.996 +@publishedAll
   1.997 +@released */
   1.998 +	{
   1.999 +public:
  1.1000 +	/** Event data size. */
  1.1001 +	enum
  1.1002 +		{
  1.1003 +		/**
  1.1004 +		This is the maximum number of bytes of data that can be returned by EventData().
  1.1005 +		Note: this value is 32 bytes.*/
  1.1006 +		EWsEventDataSize=sizeof(TAdvancedPointerEvent)
  1.1007 +		};
  1.1008 +public:
  1.1009 +	inline TWsEvent();
  1.1010 +	inline TAdvancedPointerEvent* Pointer() const;
  1.1011 +	inline TKeyEvent* Key() const;
  1.1012 +	inline TModifiersChangedEvent* ModifiersChanged() const;
  1.1013 +	inline TWsVisibilityChangedEvent* VisibilityChanged();
  1.1014 +	inline const TWsVisibilityChangedEvent* VisibilityChanged() const;
  1.1015 +	inline TWsDisplayChangedEvent* DisplayChanged();
  1.1016 +	inline const TWsDisplayChangedEvent* DisplayChanged() const;
  1.1017 +	inline TWsErrorMessage* ErrorMessage() const;
  1.1018 +	inline TUint8* EventData() const;
  1.1019 +	inline TInt Type() const;
  1.1020 +	inline TUint Handle() const;
  1.1021 +	inline TTime Time() const;
  1.1022 +	inline void SetType(TInt aType);
  1.1023 +	inline void SetHandle(TUint aHandle);
  1.1024 +	inline void SetTimeNow();
  1.1025 +	inline TInt* Int() const;
  1.1026 +	IMPORT_C void InitAdvancedPointerEvent(TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, TUint8 aPointerNumber);
  1.1027 +	IMPORT_C void SetPointerNumber(TUint8 aPointerNumber);
  1.1028 +	IMPORT_C void SetPointerZ(TInt aZ);
  1.1029 +protected:
  1.1030 +	TInt iType;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
  1.1031 +	TUint iHandle;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
  1.1032 +	TTime iTime;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
  1.1033 +	TUint8 iEventData[EWsEventDataSize];	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */	
  1.1034 +	};
  1.1035 +
  1.1036 +
  1.1037 +class RWsPointerCursor;
  1.1038 +
  1.1039 +/** Pointer cursor mode flags.
  1.1040 +
  1.1041 +These flags define the current cursor mode, and hence which sprite to use
  1.1042 +for the pointer cursor.
  1.1043 +
  1.1044 +@publishedAll
  1.1045 +@released
  1.1046 +@see RWsSession::SetPointerCursorMode()
  1.1047 +@see RWsSession::PointerCursorMode() */
  1.1048 +enum TPointerCursorMode
  1.1049 +	{
  1.1050 +	/** Don't have a pointer cursor. */
  1.1051 +	EPointerCursorNone,
  1.1052 +	/** The default system pointer cursor is used whenever there is a pointer cursor. */
  1.1053 +	EPointerCursorFixed,
  1.1054 +	/** The default system pointer cursor is used unless the window the pointer cursor
  1.1055 +	is above specifies one, in which case that cursor is used. */
  1.1056 +	EPointerCursorNormal,
  1.1057 +	/** There is no pointer cursor unless the pointer is above a window that has specified
  1.1058 +	one. */
  1.1059 +	EPointerCursorWindow,
  1.1060 +	/** First pointer cursor mode.
  1.1061 +
  1.1062 +	This is used in test code for iterating though available modes. */
  1.1063 +	EPointerCursorFirstMode=EPointerCursorNone,
  1.1064 +	/** The final pointer cursor mode.
  1.1065 +
  1.1066 +	This is used in test code for iterating though available modes. It will be
  1.1067 +	updated if more modes are added. */
  1.1068 +	EPointerCursorLastMode=EPointerCursorWindow,
  1.1069 +	};
  1.1070 +
  1.1071 +/** Flags which customise a long key press capture request made by a window group.
  1.1072 +
  1.1073 +These flags are passed to RWindowGroup::CaptureLongKey().
  1.1074 +
  1.1075 +Two things can be configured using this enum: the normal key event that is
  1.1076 +generated immediately, and the long key event that is generated after a short
  1.1077 +time interval. The normal key event can be sent immediately (on key down)
  1.1078 +to the application with keyboard focus, or, if the key is not held down long
  1.1079 +enough to generate a long key event, when the key is released. The long key
  1.1080 +event can be customised to generate a single key event only, or to auto repeat.
  1.1081 +
  1.1082 +@publishedAll
  1.1083 +@released
  1.1084 +@see RWindowGroup::CaptureLongKey() */
  1.1085 +enum TLongCaptureFlags
  1.1086 +	{
  1.1087 +	/** If specified, the normal ("short") key event is sent immediately (on key down)
  1.1088 +	to the application with keyboard focus. If not specified, the normal key event
  1.1089 +	is sent when the key is released (if the key is not held down long enough
  1.1090 +	to generate a long key event). */
  1.1091 +	ELongCaptureShortEventImmediately=0x01,
  1.1092 +	/** If specified, causes the long key press to automatically repeat. If not specified,
  1.1093 +	the long key press will generate a single key event only. */
  1.1094 +	ELongCaptureRepeatEvents=0x02,
  1.1095 +	/** Equivalent to ELongCaptureShortEventImmediately being set and the other flags
  1.1096 +	unset. */
  1.1097 +	ELongCaptureNormal=ELongCaptureShortEventImmediately,
  1.1098 +	/** Equivalent to the first two values being unset. */
  1.1099 +	ELongCaptureWaitShort=0,
  1.1100 +	};
  1.1101 +
  1.1102 +
  1.1103 +class TIpcArgs;
  1.1104 +class TReadDescriptorType;
  1.1105 +class TWriteDescriptorType;
  1.1106 +class CWindowGc;
  1.1107 +class RWsSession;
  1.1108 +
  1.1109 +class TWsGraphicId
  1.1110 +/** Identifies an abstract artwork
  1.1111 +
  1.1112 +This is a piece of artwork that might be owned and authored by another process.
  1.1113 +A client can draw a piece of artwork, but that doesn't confer the ability to
  1.1114 +access the pixel representation of that artwork directly.
  1.1115 +
  1.1116 +@publishedAll
  1.1117 +@released */
  1.1118 +	{
  1.1119 +public:
  1.1120 +	enum TUninitialized
  1.1121 +		{
  1.1122 +		EUninitialized
  1.1123 +		};
  1.1124 +	TWsGraphicId(TUninitialized): iFlags(0) {}
  1.1125 +	IMPORT_C TWsGraphicId(TUid aUid);
  1.1126 +	IMPORT_C TWsGraphicId(TInt aId);
  1.1127 +	IMPORT_C TWsGraphicId(const TWsGraphicId& aCopy);
  1.1128 +	IMPORT_C TUid Uid() const;
  1.1129 +	IMPORT_C TBool IsUid() const;
  1.1130 +	IMPORT_C void Set(TUid aUid);
  1.1131 +	IMPORT_C TInt Id() const;
  1.1132 +	IMPORT_C TBool IsId() const;
  1.1133 +	IMPORT_C void Set(TInt aId);
  1.1134 +	IMPORT_C TInt Compare(const TWsGraphicId& aOther) const;
  1.1135 +private:
  1.1136 +	friend class CWsGraphic;
  1.1137 +	TUint iFlags;
  1.1138 +	TInt iId;
  1.1139 +	TInt iWsGraphicIdSpare[2];
  1.1140 +	};
  1.1141 +
  1.1142 +class CWsGraphic: public CBase
  1.1143 +/** Client representation of a window-server-side piece of artwork owned by this Client
  1.1144 +
  1.1145 +@publishedAll
  1.1146 +@released
  1.1147 +*/
  1.1148 +	{
  1.1149 +protected:
  1.1150 +	IMPORT_C CWsGraphic();
  1.1151 +public:
  1.1152 +	IMPORT_C ~CWsGraphic();
  1.1153 +protected:
  1.1154 +	// 2nd phase construction
  1.1155 +	IMPORT_C void BaseConstructL(TUid aUid,TUid aType,const TDesC8& aData);
  1.1156 +	IMPORT_C void BaseConstructL(TUid aType,const TDesC8& aData);
  1.1157 +	IMPORT_C void BaseConstructL(const TWsGraphicId& aReplace,TUid aType,const TDesC8& aData);
  1.1158 +	// sharing between clients
  1.1159 +	IMPORT_C virtual TInt ShareGlobally();
  1.1160 +	IMPORT_C virtual TInt Share(TSecureId aClientId);
  1.1161 +	IMPORT_C virtual TInt UnShare(TSecureId aClientId);
  1.1162 +	IMPORT_C virtual TInt UnShareGlobally();
  1.1163 +public:
  1.1164 +	IMPORT_C const TWsGraphicId& Id() const;
  1.1165 +	IMPORT_C TBool IsActive() const;
  1.1166 +	IMPORT_C void Destroy();
  1.1167 +protected:
  1.1168 +	IMPORT_C void SendMessage(const TDesC8& aData) const;
  1.1169 +	IMPORT_C TInt SendSynchronMessage(const TDesC8& aData) const;
  1.1170 +	IMPORT_C TInt Flush() const;
  1.1171 +	IMPORT_C void SetGraphicExtension(MWsObjectProvider* aExt);
  1.1172 +	IMPORT_C RWsSession& Session();
  1.1173 +	
  1.1174 +private:
  1.1175 +	// events from wserv, to be implemented by derived classes
  1.1176 +	/**
  1.1177 +	Handles message from this graphic artwork peer on the server.
  1.1178 +	@param aData Message from peer CWsGraphicDrawer.
  1.1179 +	*/
  1.1180 +	virtual void HandleMessage(const TDesC8& aData) = 0;
  1.1181 +	
  1.1182 +	/**
  1.1183 +	Handles custom operation when this graphic artwork is replaced. When this method
  1.1184 +	is invoked, the replaced peer CWsGraphicDrawer on the server has been destroyed.	
  1.1185 +	*/
  1.1186 +	virtual void OnReplace() = 0;
  1.1187 +	IMPORT_C virtual void OnClientClose();
  1.1188 +private:
  1.1189 +	void BaseConstructL();
  1.1190 +	IMPORT_C virtual TInt CWsGraphic_Reserved1();
  1.1191 +	IMPORT_C virtual TInt CWsGraphic_Reserved2();
  1.1192 +	IMPORT_C virtual TInt CWsGraphic_Reserved3();
  1.1193 +public:
  1.1194 +	class CManager;
  1.1195 +private:
  1.1196 +	friend class CManager;
  1.1197 +	class CPimpl;
  1.1198 +	friend class CPimpl;
  1.1199 +	CPimpl* iPimpl;
  1.1200 +	TInt iWsGraphicSpare[2];
  1.1201 +};
  1.1202 +
  1.1203 +class MWsClientClass
  1.1204 +/** Base class for all classes whose objects are clients of the window server.
  1.1205 +
  1.1206 +@publishedAll
  1.1207 +@released */
  1.1208 +	{
  1.1209 +	friend class RTFXEffect;
  1.1210 +public:
  1.1211 +	MWsClientClass();
  1.1212 +	MWsClientClass(RWsBuffer *aBuffer);
  1.1213 +	inline TInt WsHandle() const;
  1.1214 +protected:
  1.1215 +	void Write(const TAny *aData1,TInt aLength1,TInt aLength2,TUint aOpcode) const;
  1.1216 +	void Write(const TAny *aData, TInt aLength,const TAny *aData2, TInt aLength2,TUint aOpcode,const TIpcArgs* aIpcArgs=NULL) const;
  1.1217 +	void Write(const TAny *aBuf, TInt aBufLen,TUint aOpcode,const TIpcArgs* aIpcArgs=NULL) const;
  1.1218 +	void Write(TUint aOpcode) const;
  1.1219 +	void WriteInt(TInt aInt, TUint aOpcode) const;
  1.1220 +	void WriteRect(const TRect &aRect, TUint aOpcode) const;
  1.1221 +	void WritePoint(const TPoint &aPoint, TUint aOpcode) const;
  1.1222 +	void WriteSize(const TSize &aSize, TUint aOpcode) const;
  1.1223 +	TInt WriteReply(TUint aOpcode,const TIpcArgs* aIpcArgs=NULL) const;
  1.1224 +	TInt WriteReplyInt(TInt aInt, TUint aOpcode,const TIpcArgs* aIpcArgs=NULL) const;
  1.1225 +	TInt WriteReply(const TAny *aBuf, TInt aBufLen,TUint aOpcode,const TIpcArgs* aIpcArgs=NULL) const;
  1.1226 +	TInt WriteReply(const TAny *aBuf, TInt aBufLen,const TAny *aBuf2, TInt aBuflen2,TUint aOpcode,const TIpcArgs* aIpcArgs=NULL) const;
  1.1227 +	TInt WriteReplyP(const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
  1.1228 +	TInt WriteReplyIntP(TInt aInt, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
  1.1229 +	TInt WriteReplyP(const TAny *aBuf, TInt aBufLen, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
  1.1230 +	TInt WriteReplyP(const TAny *aBuf, TInt aBufLen,const TAny *aBuf2, TInt aBuflen2, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const;
  1.1231 +	TInt WriteReplyByProvidingRemoteReadAccess(const TAny* aBuf, TInt aBufLen,const TReadDescriptorType& aRemoteReadBuffer,TUint aOpcode) const;
  1.1232 +	void AddToBitmapArray(const TInt aBitmapHandle)const;
  1.1233 +	void AsyncRequest(TRequestStatus& aStatus, TUint aOpcode) const;
  1.1234 +
  1.1235 +    TBool WindowSizeCacheEnabled() const;
  1.1236 +    void MarkWindowSizeCacheDirty();
  1.1237 +    void RefreshWindowSizeCache(const TSize& aNewSize) const;
  1.1238 +    TInt CachedWindowSize(TSize& aSize) const;
  1.1239 +    void DestroyWindowSizeCacheEntry();
  1.1240 +
  1.1241 +private:
  1.1242 +    void AppendData(const TAny *aData,TInt aLength,TBool aFinished);
  1.1243 +	
  1.1244 +protected:
  1.1245 +	TInt32 iWsHandle;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
  1.1246 +	RWsBuffer *iBuffer;	/**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */
  1.1247 +	};
  1.1248 +
  1.1249 +
  1.1250 +class RWindowTreeNode;
  1.1251 +class CWsScreenDevice;
  1.1252 +class CWsBitmap;
  1.1253 +class RAnimDll;
  1.1254 +class RWsSpriteBase;
  1.1255 +class RDirectScreenAccess;
  1.1256 +class RSoundPlugIn;
  1.1257 +
  1.1258 +
  1.1259 +class RWsSession : public MWsClientClass, public RSessionBase
  1.1260 +/** Window server session.
  1.1261 +
  1.1262 +The session between the client and the window server can be used to mediate
  1.1263 +asynchronous events, for client interface control and for system control.
  1.1264 +A description of each of these capabilities is given below.
  1.1265 +
  1.1266 +Mediating asynchronous events:
  1.1267 +
  1.1268 +Primarily, the session mediates asynchronous events to the user. Three event
  1.1269 +streams are available: the standard event stream which all applications must
  1.1270 +use; the redraw event stream which must be used by all applications except
  1.1271 +those which exclusively use backed-up windows; and the priority key event
  1.1272 +stream which may be used for abort keys and the like for specialist applications.
  1.1273 +
  1.1274 +All these events are mediated as standard asynchronous services. Typical window
  1.1275 +server client programs encapsulate each service they require in an active
  1.1276 +object whose RunL() identifies the event and calls the appropriate member
  1.1277 +function of a class associated with an application framework, or a window.
  1.1278 +
  1.1279 +Client interface control:
  1.1280 +
  1.1281 +The client's interface with the window server has several aspects, each of
  1.1282 +which is controlled through the window server session.
  1.1283 +
  1.1284 +Flushing defines how requests to the window server are handled.
  1.1285 +
  1.1286 +System control:
  1.1287 +
  1.1288 +Many system-wide settings may be controlled through the window server session.
  1.1289 +Typically, these functions are only used by the system shell and its associated
  1.1290 +sessions/applications. They include: auto-repeat and double-click, querying
  1.1291 +all window groups in the system, setting the default shadow vector, setting
  1.1292 +the system pointer cursors, counting resources used by the window server
  1.1293 +(this is only useful for debugging checks), getting and setting the state of
  1.1294 +the modifier keys (for instance Shift and Ctrl), setting the window server
  1.1295 +background colour, getting and setting thresholds for window server generated
  1.1296 +pointer events.
  1.1297 +
  1.1298 +@publishedAll
  1.1299 +@released */
  1.1300 +	{
  1.1301 +	friend class RWsBuffer;
  1.1302 +	friend class RWindowTreeNode;
  1.1303 +	friend class CWsScreenDevice;
  1.1304 +	friend class CWsBitmap;
  1.1305 +	friend class RAnimDll;
  1.1306 +	friend class RWsSpriteBase;
  1.1307 +	friend class RDirectScreenAccess;
  1.1308 +	friend class RSoundPlugIn;
  1.1309 +	friend class CWsGraphic;
  1.1310 +	friend class RWsDrawableSource;
  1.1311 +public:
  1.1312 +	/** Compute mode flags.
  1.1313 +
  1.1314 +	When a window group takes focus or loses it, the window server can boost its
  1.1315 +	client's thread or process priority to provide a better response to the user.
  1.1316 +	How it alters the priority is determined by the current compute mode of the
  1.1317 +	client.
  1.1318 +
  1.1319 +	@see ComputeMode() */
  1.1320 +	enum TComputeMode
  1.1321 +		{
  1.1322 +		/** Client priority is permanently set to its current level. It is not altered
  1.1323 +		or set by the windowing system if the focus changes.
  1.1324 +
  1.1325 +		Thus if ComputeMode() is called with this flag when a client is in the foreground,
  1.1326 +		it will subsequently have foreground priority even if it is in the background. */
  1.1327 +		EPriorityControlDisabled,
  1.1328 +		/** Client process's priority is always set to EPriorityBackground. */
  1.1329 +		EPriorityControlComputeOn,
  1.1330 +		/** Client process's priority is set to EPriorityForeground when the window group
  1.1331 +		takes focus, and set to EPriorityBackground when it loses focus.
  1.1332 +
  1.1333 +		This is the default behaviour. */
  1.1334 +		EPriorityControlComputeOff
  1.1335 +		};
  1.1336 +	enum {ESystemInfoArraySize=16};
  1.1337 +	/** Window server logging commands passed to LogCommand().
  1.1338 +
  1.1339 +	@see RWsSession::LogCommand() */
  1.1340 +	enum TLoggingCommand
  1.1341 +		{
  1.1342 +		/** Enables logging. */
  1.1343 +		ELoggingEnable,
  1.1344 +		/** Disables logging. */
  1.1345 +		ELoggingDisable,
  1.1346 +		/** Logs the current status of all the windows in the tree, even if logging is
  1.1347 +		not currently enabled. */
  1.1348 +		ELoggingStatusDump,		//Window Tree Dump
  1.1349 +		/** Logs information about the window server's heap size and usage, even if logging
  1.1350 +		is not currently enabled. */
  1.1351 +		ELoggingHeapDump,
  1.1352 +		};
  1.1353 +
  1.1354 +	struct TWindowGroupChainInfo
  1.1355 +		{
  1.1356 +		/*Stores id and Parent id window group
  1.1357 +
  1.1358 +		This is used to define chained window groups's id and it's parent id.
  1.1359 +		An array of these structures is returned by some of the varients of the function WindowGroupList.
  1.1360 +		@publishedAll
  1.1361 +		@released */
  1.1362 +		TInt iId;
  1.1363 +		TInt iParentId;
  1.1364 +		};
  1.1365 +
  1.1366 +	struct SSystemInfo
  1.1367 +	/** WARNING: Struct for internal use ONLY.  Compatibility is not guaranteed in future releases. */ 
  1.1368 +		{
  1.1369 +		TInt iInfo[ESystemInfoArraySize];
  1.1370 +		};
  1.1371 +	/** The vertical alignment of a custom text cursor sprite.
  1.1372 +
  1.1373 +	One of these values must be set, see SetCustomTextCursor(). This value also
  1.1374 +	determines which part of each sprite member bitmap is clipped when the cursor's
  1.1375 +	TTextCursor::EFlagClipVertical flag is set. */
  1.1376 +	enum TCustomTextCursorAlignment
  1.1377 +		{
  1.1378 +		/** The y-origin of each sprite member bitmap is aligned with the top of the line. */
  1.1379 +		ECustomTextCursorAlignTop,
  1.1380 +		/** The y-origin of each sprite member bitmap is aligned with the baseline of the
  1.1381 +		line. */
  1.1382 +		ECustomTextCursorAlignBaseline,
  1.1383 +		/** The y-origin of each sprite member bitmap is aligned with the bottom of the
  1.1384 +		line. */
  1.1385 +		ECustomTextCursorAlignBottom
  1.1386 +		};
  1.1387 +	
  1.1388 +//
  1.1389 +public:
  1.1390 +	IMPORT_C RWsSession();
  1.1391 +	IMPORT_C TInt Connect();
  1.1392 +	IMPORT_C TInt Connect(RFs& aFileServer);
  1.1393 +	IMPORT_C void Close();
  1.1394 +	IMPORT_C TVersion Version() const;
  1.1395 +
  1.1396 +	IMPORT_C TInt SetHotKey(THotKey aType, TUint aKeyCode, TUint aModifierMask, TUint aModifier);
  1.1397 +	IMPORT_C TInt ClearHotKeys(THotKey aType);
  1.1398 +	IMPORT_C TInt RestoreDefaultHotKey(THotKey aType);
  1.1399 +//
  1.1400 +	IMPORT_C void EventReady(TRequestStatus *aStat);
  1.1401 +	IMPORT_C void EventReadyCancel();
  1.1402 +	IMPORT_C void GetEvent(TWsEvent &aEvent) const;
  1.1403 +	IMPORT_C void PurgePointerEvents();
  1.1404 +//
  1.1405 +	IMPORT_C void RedrawReady(TRequestStatus *aStat);
  1.1406 +	IMPORT_C void RedrawReadyCancel();
  1.1407 +	IMPORT_C void GetRedraw(TWsRedrawEvent &aEvent);
  1.1408 +//
  1.1409 +	IMPORT_C void PriorityKeyReady(TRequestStatus *aStat);
  1.1410 +	IMPORT_C void PriorityKeyReadyCancel();
  1.1411 +	IMPORT_C void GetPriorityKey(TWsPriorityKeyEvent &aEvent) const;
  1.1412 +//
  1.1413 +	IMPORT_C void Flush();
  1.1414 +	IMPORT_C TBool SetAutoFlush(TBool aState);
  1.1415 +	IMPORT_C TInt SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime);
  1.1416 +	IMPORT_C void GetKeyboardRepeatRate(TTimeIntervalMicroSeconds32 &aInitialTime, TTimeIntervalMicroSeconds32 &aTime) const;
  1.1417 +	IMPORT_C void GetDoubleClickSettings(TTimeIntervalMicroSeconds32 &aInterval, TInt &aDistance) const;
  1.1418 +	IMPORT_C TInt SetDoubleClick(const TTimeIntervalMicroSeconds32 &aInterval, TInt aDistance);
  1.1419 +//
  1.1420 +	IMPORT_C TInt NumWindowGroups() const;
  1.1421 +	IMPORT_C TInt WindowGroupList(CArrayFixFlat<TInt> *aWindowList) const;
  1.1422 +	IMPORT_C TInt WindowGroupList(RArray<TWindowGroupChainInfo>* aWindowList) const;
  1.1423 +	IMPORT_C TInt NumWindowGroups(TInt aPriority) const;
  1.1424 +	IMPORT_C TInt WindowGroupList(TInt aPriority, CArrayFixFlat<TInt> *aWindowList) const;
  1.1425 +	IMPORT_C TInt WindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo>* aWindowList) const;
  1.1426 +	IMPORT_C TInt GetFocusWindowGroup() const;
  1.1427 +	IMPORT_C TInt GetDefaultOwningWindow() const;
  1.1428 +	IMPORT_C TInt SetWindowGroupOrdinalPosition(TInt aIdentifier, TInt aPosition);
  1.1429 +	IMPORT_C TInt GetWindowGroupClientThreadId(TInt aIdentifier, TThreadId &aThreadId) const;
  1.1430 +	IMPORT_C TInt GetWindowGroupHandle(TInt aIdentifier) const;
  1.1431 +	IMPORT_C TInt GetWindowGroupOrdinalPriority(TInt aIdentifier) const;
  1.1432 +	IMPORT_C TInt SendEventToWindowGroup(TInt aIdentifier, const TWsEvent &aEvent);
  1.1433 +	IMPORT_C TInt SendEventToAllWindowGroups(const TWsEvent &aEvent);
  1.1434 +	IMPORT_C TInt SendEventToAllWindowGroups(TInt aPriority, const TWsEvent &aEvent);
  1.1435 +	IMPORT_C TInt SendEventToOneWindowGroupsPerClient(const TWsEvent &aEvent);
  1.1436 +	IMPORT_C TInt GetWindowGroupNameFromIdentifier(TInt aIdentifier, TDes &aWindowName) const;
  1.1437 +	IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,const TDesC& aMatch,TInt aOffset=0) const;
  1.1438 +	IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,TThreadId aThreadId) const;
  1.1439 +	IMPORT_C TInt SendMessageToWindowGroup(TInt aIdentifier, TUid aUid, const TDesC8 &aParams);
  1.1440 +	IMPORT_C TInt SendMessageToAllWindowGroups(TUid aUid, const TDesC8& aParams);
  1.1441 +	IMPORT_C TInt SendMessageToAllWindowGroups(TInt aPriority, TUid aUid, const TDesC8& aParams);
  1.1442 +	IMPORT_C TInt FetchMessage(TUid &aUid, TPtr8 &aParams, const TWsEvent& aMessageEvent) const;
  1.1443 +//
  1.1444 +	IMPORT_C void SetShadowVector(const TPoint &aVector);
  1.1445 +	IMPORT_C TPoint ShadowVector() const;
  1.1446 +//
  1.1447 +	IMPORT_C void SetBackgroundColor(TRgb aColor);
  1.1448 +	IMPORT_C TRgb GetBackgroundColor() const;
  1.1449 +//
  1.1450 +	IMPORT_C TInt RegisterSurface(TInt aScreenNumber, const TSurfaceId& aSurface);
  1.1451 +	IMPORT_C void UnregisterSurface(TInt aScreenNumber, const TSurfaceId& aSurface);
  1.1452 +	IMPORT_C TInt PreferredSurfaceConfigurationSize() const;
  1.1453 +//
  1.1454 +	IMPORT_C TInt SetSystemPointerCursor(const RWsPointerCursor &aPointerCursor,TInt aCursorNumber);
  1.1455 +	IMPORT_C void ClearSystemPointerCursor(TInt aCursorNumber);
  1.1456 +	IMPORT_C TInt ClaimSystemPointerCursorList();
  1.1457 +	IMPORT_C void FreeSystemPointerCursorList();
  1.1458 +//
  1.1459 +	IMPORT_C TInt SetCustomTextCursor(TInt aIdentifier, const TArray<TSpriteMember>& aSpriteMemberArray, TUint aSpriteFlags, TCustomTextCursorAlignment aAlignment);
  1.1460 +//
  1.1461 +	IMPORT_C TInt ResourceCount() const;
  1.1462 +	IMPORT_C void PasswordEntered();
  1.1463 +	IMPORT_C void ComputeMode(TComputeMode aMode);
  1.1464 +//
  1.1465 +	IMPORT_C TInt HeapCount() const;
  1.1466 +	IMPORT_C TInt DebugInfo(TInt aFunction, TInt aParam=0) const;
  1.1467 +	IMPORT_C TInt DebugInfo(TInt aFunction, TDes8& aReturnBuf, TInt aParam=0) const;
  1.1468 +	IMPORT_C void HeapSetFail(TInt aTAllocFail,TInt aValue);
  1.1469 +	IMPORT_C void HeapSetBurstFail(TInt aTAllocFail,TInt aRate,TInt aBurst);
  1.1470 +	IMPORT_C TInt SetModifierState(TEventModifier aModifier,TModifierState aState);
  1.1471 +	IMPORT_C TInt GetModifierState() const;
  1.1472 +//
  1.1473 +	IMPORT_C TInt RequestOffEvents(TBool aOn,RWindowTreeNode *aWin=NULL);
  1.1474 +	IMPORT_C TDisplayMode GetDefModeMaxNumColors(TInt& aColor,TInt& aGray) const;
  1.1475 +	IMPORT_C TInt GetColorModeList(CArrayFixFlat<TInt> *aModeList) const;
  1.1476 +//
  1.1477 +	IMPORT_C void SetPointerCursorArea(const TRect& aArea);
  1.1478 +	IMPORT_C void SetPointerCursorArea(TInt aScreenSizeMode,const TRect& aArea);
  1.1479 +	IMPORT_C TRect PointerCursorArea() const;
  1.1480 +	IMPORT_C TRect PointerCursorArea(TInt aScreenSizeMode) const;
  1.1481 +	IMPORT_C void SetPointerCursorMode(TPointerCursorMode aMode);
  1.1482 +	IMPORT_C TInt SetClientCursorMode(TPointerCursorMode aMode);
  1.1483 +	IMPORT_C TPointerCursorMode PointerCursorMode() const;
  1.1484 +	IMPORT_C void SetDefaultSystemPointerCursor(TInt aCursorNumber);
  1.1485 +	IMPORT_C void ClearDefaultSystemPointerCursor();
  1.1486 +	IMPORT_C TInt SetPointerCursorPosition(const TPoint& aPosition);
  1.1487 +	IMPORT_C TPoint PointerCursorPosition() const;
  1.1488 +
  1.1489 +	IMPORT_C void SetDefaultFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap);
  1.1490 +	IMPORT_C void PrepareForSwitchOff();
  1.1491 +	IMPORT_C void SetBufferSizeL(TInt aBufSize);
  1.1492 +	IMPORT_C void SetMaxBufferSizeL(TInt aMaxBufSize);
  1.1493 +	IMPORT_C TInt SetSystemFaded(TBool aFaded);
  1.1494 +	IMPORT_C TInt SetSystemFaded(TBool aFaded,TUint8 aBlackMap,TUint8 aWhiteMap);
  1.1495 +
  1.1496 +// Functions for multiple screens
  1.1497 +	IMPORT_C TInt SetFocusScreen(TInt aScreenNumber);
  1.1498 +	IMPORT_C TInt GetFocusScreen() const;
  1.1499 +	IMPORT_C void ClearAllRedrawStores();
  1.1500 +	IMPORT_C TInt NumWindowGroups(TInt aScreenNumber,TInt aPriority) const;
  1.1501 +	IMPORT_C TInt NumberOfScreens() const;
  1.1502 +	IMPORT_C TInt WindowGroupList(CArrayFixFlat<TInt>* aWindowList,TInt aScreenNumber,TInt aPriority=EAllPriorities) const;
  1.1503 +	IMPORT_C TInt GetFocusWindowGroup(TInt aScreenNumber) const;
  1.1504 +	IMPORT_C TInt GetDefaultOwningWindow(TInt aScreenNumber) const;
  1.1505 +	IMPORT_C TDisplayMode GetDefModeMaxNumColors(TInt aScreenNumber,TInt& aColor,TInt& aGray) const;
  1.1506 +	IMPORT_C TInt GetColorModeList(TInt aScreenNumber,CArrayFixFlat<TInt>* aModeList) const;
  1.1507 +#if defined(__WINS__)
  1.1508 +// Function for WINS behaviour only
  1.1509 +	IMPORT_C void SetRemoveKeyCode(TBool aRemove);
  1.1510 +	IMPORT_C void SimulateXyInputType(TInt aInputType);		//Only for testing WSERV
  1.1511 +#endif
  1.1512 +//
  1.1513 +	IMPORT_C void SimulateRawEvent(TRawEvent aEvent);
  1.1514 +	IMPORT_C void SimulateKeyEvent(TKeyEvent aEvent);
  1.1515 +	IMPORT_C void LogCommand(TLoggingCommand aCommand);
  1.1516 +	IMPORT_C void LogMessage(const TLogMessageText &aMessage);
  1.1517 +
  1.1518 +// Functions for test code use only
  1.1519 +	IMPORT_C void SystemInfo(TInt &aSystemInfoNumber, SSystemInfo &aSystemInfo);
  1.1520 +	IMPORT_C void TestWrite(TInt aHandle,TInt aOpcode,const TAny *aData, TInt aLength);
  1.1521 +	IMPORT_C void TestWriteReply(TInt aHandle,TInt aOpcode,const TAny *aData, TInt aLength);
  1.1522 +	IMPORT_C void TestWriteReplyP(TInt aHandle,TInt aOpcode,const TAny *aData,TInt aLength,TDes8 *aReplyPackage);
  1.1523 +	IMPORT_C TInt TestWriteReplyByProvidingRemoteReadAccess(TInt aHandle,TInt aOpcode,const TDesC8& aData,const TDesC8& aRemoteReadBuffer);
  1.1524 +	IMPORT_C TInt TestWriteReplyByProvidingRemoteReadAccess(TInt aHandle,TInt aOpcode,const TDesC8& aData,const TDesC16& aRemoteReadBuffer);
  1.1525 +	
  1.1526 +	IMPORT_C TInt Finish();
  1.1527 +	IMPORT_C void SyncMsgBuf();
  1.1528 +
  1.1529 +// Getters and setters for pointer event's thresholds
  1.1530 +	IMPORT_C TInt SetCloseProximityThresholds(TInt aEnterCloseProximityThreshold, TInt aExitCloseProximityThreshold);
  1.1531 +	IMPORT_C TInt GetEnterCloseProximityThreshold() const;
  1.1532 +	IMPORT_C TInt GetExitCloseProximityThreshold() const;
  1.1533 +	IMPORT_C TInt SetHighPressureThresholds(TInt aEnterHighPressureThreshold, TInt aExitHighPressureThreshold);
  1.1534 +	IMPORT_C TInt GetEnterHighPressureThreshold() const;
  1.1535 +	IMPORT_C TInt GetExitHighPressureThreshold() const;
  1.1536 +//
  1.1537 +    IMPORT_C void EnableWindowSizeCacheL();
  1.1538 +	IMPORT_C void SendEffectCommand(TInt aTfxCmd, const TDesC8& aTfxCmdData=KNullDesC8);
  1.1539 +
  1.1540 +// Registering/Unregistering of TFX effect, to allow animations to be associated with each transition
  1.1541 +	IMPORT_C void RegisterEffect(TInt aAction, TInt aPurpose, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TUint aAppUid=0, TBitFlags aFlags=0);
  1.1542 +	IMPORT_C void UnregisterEffect(TInt aAction, TInt aPurpose, TUint aAppUid=0);
  1.1543 +	IMPORT_C void UnregisterAllEffects();
  1.1544 +	IMPORT_C void OverrideEffects(TInt aAction, TInt aPurpose, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TBitFlags aFlags=0);
  1.1545 +	
  1.1546 +//Application tells the window server the orientation of rendering it intends to use
  1.1547 +	IMPORT_C void IndicateAppOrientation(TRenderOrientation aOrientation);
  1.1548 +	
  1.1549 +// functions not exported, used by CWsGraphic
  1.1550 +	void GraphicMessageReady(TRequestStatus *aStat);
  1.1551 +	void GetGraphicMessage(TDes8& aData) const;
  1.1552 +	void GraphicMessageCancel();
  1.1553 +	void GraphicAbortMessage(TInt aError);
  1.1554 +	TInt GraphicFetchHeaderMessage();
  1.1555 +private:
  1.1556 +	TInt doWindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo>* aWindowListCh, TInt aNumOpcode, TInt aListOpcode) const;
  1.1557 +	TInt doWindowGroupList(TInt aScreenNumber, TInt aPriority, CArrayFixFlat<TInt>* aWindowListId, TInt aNumOpcode, TInt aListOpcode) const;
  1.1558 +	TInt doSetHotKey(TInt aOpcode, TInt aType, TUint aKeycode, TUint aModifierMask, TUint aModifiers);
  1.1559 +	void doReadEvent(TRequestStatus *aStat, TInt aOpcode);
  1.1560 +
  1.1561 +private:
  1.1562 +	void connectL();
  1.1563 +	TInt DoFlush(const TIpcArgs& aIpcArgs);
  1.1564 +	TInt DoSyncMsgBuf(const TIpcArgs& aIpcArgs);
  1.1565 +	void DirectAcessActivation(TBool aIsNowActive);
  1.1566 +	};
  1.1567 +
  1.1568 +class RWindowGroup;
  1.1569 +class RWsSprite;
  1.1570 +
  1.1571 +
  1.1572 +class RWindowTreeNode : public MWsClientClass
  1.1573 +/** A handle to a node in the server-side window tree.
  1.1574 +
  1.1575 +This handle class is used as the base for both window groups and the windows
  1.1576 +within them; it is not intended for user derivation, and may not be directly
  1.1577 +constructed: use one of the standard derived classes instead.
  1.1578 +
  1.1579 +@publishedAll
  1.1580 +@released */
  1.1581 +	{
  1.1582 +	friend class RWindowGroup;
  1.1583 +	friend class RWindowBase;
  1.1584 +	friend class CWindowGc;
  1.1585 +	friend class RAnimDll;
  1.1586 +	friend class RWsSprite;
  1.1587 +public:
  1.1588 +	/** Fade control flags.
  1.1589 +
  1.1590 +	These flags define whether fading is applied to all child windows when SetFaded()
  1.1591 +	is called on a window. */
  1.1592 +	enum TFadeControl
  1.1593 +		{
  1.1594 +		/** Include all child windows when fading/un-fading. */
  1.1595 +		EFadeIncludeChildren=ETrue,
  1.1596 +		/** Fade only the parent window.
  1.1597 +
  1.1598 +		Note that a panic will occur if this value is used when SetFaded() is called
  1.1599 +		on a window group. */
  1.1600 +		EFadeWindowOnly=EFalse,
  1.1601 +		};
  1.1602 +protected:
  1.1603 +	RWindowTreeNode();
  1.1604 +	RWindowTreeNode(RWsSession &aWs);
  1.1605 +public:
  1.1606 +	IMPORT_C void Close();
  1.1607 +	IMPORT_C void Destroy();
  1.1608 +	IMPORT_C TUint32 ClientHandle() const;
  1.1609 +	IMPORT_C TUint32 Parent() const;
  1.1610 +	IMPORT_C TUint32 PrevSibling() const;
  1.1611 +	IMPORT_C TUint32 NextSibling() const;
  1.1612 +	IMPORT_C TUint32 Child() const;
  1.1613 +	IMPORT_C TInt OrdinalPriority() const;
  1.1614 +	IMPORT_C TInt OrdinalPosition() const;
  1.1615 +	IMPORT_C TInt FullOrdinalPosition() const;
  1.1616 +	IMPORT_C void SetOrdinalPosition(TInt aPos);
  1.1617 +	IMPORT_C void SetOrdinalPosition(TInt aPos,TInt aOrdinalPriority);
  1.1618 +	IMPORT_C TInt ScreenNumber() const;	
  1.1619 +	IMPORT_C TInt WindowGroupId() const;
  1.1620 +	IMPORT_C TInt SetPointerCursor(TInt aCursorNumber);
  1.1621 +	IMPORT_C void SetCustomPointerCursor(const RWsPointerCursor &aPointerCursor);
  1.1622 +	IMPORT_C TInt EnableOnEvents(TEventControl aCircumstances=EEventControlOnlyWithKeyboardFocus);
  1.1623 +	IMPORT_C void DisableOnEvents();
  1.1624 +	IMPORT_C TInt EnableGroupChangeEvents();
  1.1625 +	IMPORT_C void DisableGroupChangeEvents();
  1.1626 +	IMPORT_C TInt EnableFocusChangeEvents();
  1.1627 +	IMPORT_C void DisableFocusChangeEvents();
  1.1628 +	IMPORT_C TInt EnableGroupListChangeEvents();
  1.1629 +	IMPORT_C void DisableGroupListChangeEvents();
  1.1630 +	IMPORT_C TInt EnableVisibilityChangeEvents();
  1.1631 +	IMPORT_C void DisableVisibilityChangeEvents();
  1.1632 +	IMPORT_C TInt EnableErrorMessages(TEventControl aCircumstances);
  1.1633 +	IMPORT_C void DisableErrorMessages();
  1.1634 +	IMPORT_C TInt EnableModifierChangedEvents(TUint aModifierMask, TEventControl aCircumstances);
  1.1635 +	IMPORT_C void DisableModifierChangedEvents();
  1.1636 +	IMPORT_C void SetNonFading(TBool aNonFading);
  1.1637 +	IMPORT_C void SetFaded(TBool aFaded,TFadeControl aIncludeChildren);
  1.1638 +	IMPORT_C void SetFaded(TBool aFaded,TFadeControl aIncludeChildren,TUint8 aBlackMap,TUint8 aWhiteMap);
  1.1639 +	IMPORT_C void ClearPointerCursor();
  1.1640 +	IMPORT_C RWsSession* Session() const;
  1.1641 +protected:
  1.1642 +	__DECLARE_TEST;
  1.1643 +	};
  1.1644 +
  1.1645 +
  1.1646 +class TSurfaceId;
  1.1647 +class TSurfaceConfiguration;
  1.1648 +
  1.1649 +class RWindowBase : public RWindowTreeNode
  1.1650 +/** Client-side handle to a server-side window.
  1.1651 +
  1.1652 +The server-side windows of handles derived from this class can be displayed
  1.1653 +on the device's screen, and associated with pointer events.
  1.1654 +
  1.1655 +This class is not for user derivation; however derived classes form part of
  1.1656 +the Window Server API.
  1.1657 +
  1.1658 +@publishedAll
  1.1659 +@released */
  1.1660 +	{
  1.1661 +public:
  1.1662 +	/** Capture behaviour flags.
  1.1663 +
  1.1664 +	@see SetPointerCapture()
  1.1665 +	@see EEventDragDrop */
  1.1666 +	enum TCaptureFlags
  1.1667 +		{
  1.1668 +// Flags, these can be combined to customise pointer capture
  1.1669 +		/** If set, capture is enabled, disabled otherwise. */
  1.1670 +		TCaptureFlagEnabled=0x01,
  1.1671 +		/** If set, drag-drop events are sent to the window in which the pointer was lifted.
  1.1672 +		Drag-drop is a tap-drag-lift sequence. */
  1.1673 +		TCaptureFlagDragDrop=0x02,
  1.1674 +		/** Capture events from windows belonging to any group, not just the group of the
  1.1675 +		window on which the flag was set */
  1.1676 +		TCaptureFlagAllGroups=0x04,
  1.1677 +// States, made up of a set of flags
  1.1678 +		/** Equivalent to disabling all the above flags. */
  1.1679 +		TCaptureDisabled=0,
  1.1680 +		/** Equivalent to TCaptureFlagEnabled. */
  1.1681 +		TCaptureEnabled=TCaptureFlagEnabled,
  1.1682 +		/** Equivalent to the OR of the first three flags. */
  1.1683 +		TCaptureDragDrop=TCaptureFlagEnabled|TCaptureFlagDragDrop|TCaptureFlagAllGroups,
  1.1684 +		};
  1.1685 +protected:
  1.1686 +	RWindowBase();
  1.1687 +	RWindowBase(RWsSession &aWs);
  1.1688 +public:
  1.1689 +	IMPORT_C void Activate();
  1.1690 +	IMPORT_C void SetPosition(const TPoint &point);
  1.1691 +	IMPORT_C TInt SetSizeErr(const TSize &size);
  1.1692 +	IMPORT_C TInt SetExtentErr(const TPoint &point,const TSize &size);
  1.1693 +	IMPORT_C TSize Size() const;
  1.1694 +	IMPORT_C TPoint InquireOffset(const RWindowTreeNode &aWindow) const;
  1.1695 +	IMPORT_C void PointerFilter(TUint32 aFilterMask, TUint32 aFilter);
  1.1696 +	IMPORT_C void SetPointerGrab(TBool aState);
  1.1697 +	IMPORT_C void ClaimPointerGrab(TBool aSendUpEvent=ETrue);
  1.1698 +	IMPORT_C TInt ClaimPointerGrab(const TUint8 aPointerNumber, const TBool aSendUpEvent=ETrue);
  1.1699 +	IMPORT_C void SetPointerCapture(TInt aFlags);
  1.1700 +	IMPORT_C void SetPointerCapturePriority(TInt aPriority);
  1.1701 +	IMPORT_C TInt GetPointerCapturePriority() const;
  1.1702 +	IMPORT_C void SetVisible(TBool aState);
  1.1703 +	IMPORT_C void SetShadowHeight(TInt aHeight);
  1.1704 +	IMPORT_C void SetShadowDisabled(TBool aState);
  1.1705 +	IMPORT_C TPoint Position() const;
  1.1706 +	IMPORT_C TPoint AbsPosition() const;
  1.1707 +	IMPORT_C TInt SetCornerType(TCornerType aCornerType, TInt aCornerFlags=0);
  1.1708 +	IMPORT_C TInt SetShape(const TRegion &aRegion);
  1.1709 +	IMPORT_C TInt SetRequiredDisplayMode(TDisplayMode aMode);
  1.1710 +	IMPORT_C TDisplayMode DisplayMode() const;
  1.1711 +	IMPORT_C void EnableBackup(TUint aBackupType=EWindowBackupAreaBehind);
  1.1712 +	IMPORT_C void RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32 aTime,const TRect &aRect);
  1.1713 +	IMPORT_C void CancelPointerRepeatEventRequest();
  1.1714 +	IMPORT_C TInt RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32 aTime,const TRect &aRect, const TUint8 aPointerNumber);	//< @prototype
  1.1715 +	IMPORT_C TInt CancelPointerRepeatEventRequest(const TUint8 aPointerNumber);	//< @prototype
  1.1716 +	IMPORT_C TInt AllocPointerMoveBuffer(TInt aMaxPoints, TUint aFlags);
  1.1717 +	IMPORT_C void FreePointerMoveBuffer();
  1.1718 +	IMPORT_C void EnablePointerMoveBuffer();
  1.1719 +	IMPORT_C void DisablePointerMoveBuffer();
  1.1720 +	IMPORT_C TInt RetrievePointerMoveBuffer(TDes8 &aBuf) const;
  1.1721 +	IMPORT_C void DiscardPointerMoveBuffer();
  1.1722 +	IMPORT_C TInt AddKeyRect(const TRect &aRect, TInt aScanCode, TBool aActivatedByPointerSwitchOn);
  1.1723 +	IMPORT_C void RemoveAllKeyRects();
  1.1724 +	IMPORT_C TInt PasswordWindow(TPasswordMode aPasswordMode);
  1.1725 +	IMPORT_C void FadeBehind(TBool aFade);
  1.1726 +	IMPORT_C TBool IsFaded() const;
  1.1727 +	IMPORT_C TBool IsNonFading() const;
  1.1728 +	IMPORT_C TInt MoveToGroup(TInt aIdentifier);
  1.1729 +	IMPORT_C TInt SetBackgroundSurface(const TSurfaceId& aSurface);
  1.1730 +	IMPORT_C TInt SetBackgroundSurface(const TSurfaceConfiguration& aConfiguration, TBool aTriggerRedraw);
  1.1731 +	IMPORT_C void RemoveBackgroundSurface(TBool aTriggerRedraw);
  1.1732 +	IMPORT_C TInt GetBackgroundSurface(TSurfaceConfiguration& aConfiguration) const;
  1.1733 +	IMPORT_C void SetSurfaceTransparency(TBool aSurfaceTransparency);
  1.1734 +	IMPORT_C TRgb KeyColor() const;
  1.1735 +	IMPORT_C void EnableAdvancedPointers();
  1.1736 +	IMPORT_C void SetPurpose(TInt aPurpose);
  1.1737 +	IMPORT_C void SendEffectCommand(TInt aTfxCmd, const TDesC8& aTfxCmdData=KNullDesC8);
  1.1738 +	IMPORT_C void OverrideEffects(TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TBitFlags aFlags=0);
  1.1739 +    IMPORT_C TInt FixNativeOrientation();
  1.1740 +    IMPORT_C TSize SizeForEgl() const;
  1.1741 +protected:
  1.1742 +	TInt construct(const RWindowTreeNode &parent,TUint32 aHandle, TInt aType, TDisplayMode aDisplayMode);
  1.1743 +	};
  1.1744 +
  1.1745 +
  1.1746 +class RBlankWindow : public RWindowBase
  1.1747 +/** Blank window.
  1.1748 +
  1.1749 +A blank window may have its extent and colour changed, but nothing else may
  1.1750 +be drawn to it. Blank windows provide no functionality that is not provided
  1.1751 +by the RWindow class. However, they are useful when the application requires
  1.1752 +a window that cannot be drawn to, for example a container window.
  1.1753 +
  1.1754 +@publishedAll
  1.1755 +@released */
  1.1756 +	{
  1.1757 +public:
  1.1758 +	IMPORT_C RBlankWindow();
  1.1759 +	IMPORT_C RBlankWindow(RWsSession &aWs);
  1.1760 +	IMPORT_C TInt Construct(const RWindowTreeNode &parent, TUint32 aHandle);
  1.1761 +	IMPORT_C void SetColor(TRgb aColor);
  1.1762 +	IMPORT_C void SetColor();
  1.1763 +	IMPORT_C void SetSize(const TSize &size);
  1.1764 +	IMPORT_C void SetExtent(const TPoint &point,const TSize &size);
  1.1765 +	};
  1.1766 +
  1.1767 +
  1.1768 +class RDrawableWindow : public RWindowBase
  1.1769 +/** Handle to a drawable window.
  1.1770 +
  1.1771 +This class cannot be constructed directly.
  1.1772 +The two concrete derived classes, RWindow and RBackedUpWindow, allow
  1.1773 +drawing but use different protocols because RWindow relies on the client to
  1.1774 +redraw invalid areas.
  1.1775 +
  1.1776 +@publishedAll
  1.1777 +@released */
  1.1778 +	{
  1.1779 +protected:
  1.1780 +	RDrawableWindow();
  1.1781 +	RDrawableWindow(RWsSession &aWs);
  1.1782 +public:
  1.1783 +	IMPORT_C void Scroll(const TPoint &aOffset);
  1.1784 +	IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset);
  1.1785 +	IMPORT_C void Scroll(const TPoint &aOffset, const TRect &aRect);
  1.1786 +	IMPORT_C void Scroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect);
  1.1787 +	IMPORT_C TRect GetDrawRect() const;
  1.1788 +protected:
  1.1789 +	void SetDrawRect(const TRect &aRect);
  1.1790 +private:
  1.1791 +	void doScroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect, TInt aOpcode);
  1.1792 +
  1.1793 +	TRect iDrawRect;
  1.1794 +	};
  1.1795 +
  1.1796 +/** Transparency policies
  1.1797 +
  1.1798 +These policies are to control the behaviour of a transparent window.
  1.1799 +@publishedAll
  1.1800 +@released
  1.1801 +@see RWindow::SetTransparencyPolicy() */
  1.1802 +enum TWsTransparencyPolicy {
  1.1803 +	/** Default behaviour. */
  1.1804 +	ETransparencyDefault,
  1.1805 +	/** Freeze the content of underneath the transparent window to prevent redraw everytime
  1.1806 +	the overlying window changes. */
  1.1807 +	ETransparencyFreezeUnder,
  1.1808 +	};
  1.1809 +
  1.1810 +class RWindow : public RDrawableWindow
  1.1811 +/** Handle to a standard window.
  1.1812 +
  1.1813 +An RWindow is a handle to a server-side window which can be displayed and
  1.1814 +drawn to, and whose redraws are performed by the application.
  1.1815 +
  1.1816 +@publishedAll
  1.1817 +@released */
  1.1818 +	{
  1.1819 +public:
  1.1820 +	IMPORT_C RWindow();
  1.1821 +	IMPORT_C RWindow(RWsSession &aWs);
  1.1822 +	IMPORT_C TInt Construct(const RWindowTreeNode &parent,TUint32 aHandle);
  1.1823 +	IMPORT_C void BeginRedraw();
  1.1824 +	IMPORT_C void BeginRedraw(const TRect &aRect);
  1.1825 +	IMPORT_C void EndRedraw();
  1.1826 +	IMPORT_C void Invalidate();
  1.1827 +	IMPORT_C void Invalidate(const TRect &aRect);
  1.1828 +	IMPORT_C void GetInvalidRegion(RRegion &aRegion) const;
  1.1829 +	IMPORT_C void SetBackgroundColor(TRgb aColor);
  1.1830 +	IMPORT_C void SetBackgroundColor();
  1.1831 +	IMPORT_C void SetSize(const TSize &size);
  1.1832 +	IMPORT_C void SetExtent(const TPoint &point,const TSize &size);
  1.1833 +	IMPORT_C void HandleTransparencyUpdate();
  1.1834 +	IMPORT_C TInt SetTransparencyFactor(const TRgb& aTransparencyFactor);
  1.1835 +	IMPORT_C TInt SetTransparencyBitmap(const CFbsBitmap& aTransparencyBitmap);
  1.1836 +	IMPORT_C TInt SetTransparencyWsBitmap(const CWsBitmap& aTransparencyBitmap);
  1.1837 +	IMPORT_C void SetNonTransparent();
  1.1838 +	IMPORT_C void EnableRedrawStore(TBool aEnabled);
  1.1839 +	IMPORT_C TInt SetTransparencyAlphaChannel();
  1.1840 +	IMPORT_C TInt SetTransparentRegion(const TRegion& aRegion);
  1.1841 +	IMPORT_C TInt SetTransparencyPolicy(TWsTransparencyPolicy aPolicy);
  1.1842 +	IMPORT_C TBool IsRedrawStoreEnabled() const;
  1.1843 +	IMPORT_C void EnableOSB(TBool);
  1.1844 +	IMPORT_C void ClearRedrawStore();
  1.1845 +	};
  1.1846 +
  1.1847 +
  1.1848 +class RBackedUpWindow : public RDrawableWindow
  1.1849 +/** Client-side handle to a drawable window with a backup bitmap.
  1.1850 +
  1.1851 +A backed-up window is associated with a backup bitmap which retains the contents
  1.1852 +of the window. When an area of the window is invalidated, the window server
  1.1853 +uses the bitmap directly to update the window without requiring an application
  1.1854 +redraw. The backup bitmap is owned by the font and bitmap server and resides
  1.1855 +on the font and bitmap server's shared heap, which is accessible to all client
  1.1856 +programs: functions are provided to allow the client application to access
  1.1857 +this bitmap directly and perform updates to the window under application control.
  1.1858 +
  1.1859 +@publishedAll
  1.1860 +@deprecated
  1.1861 +*/
  1.1862 +	{
  1.1863 +public:
  1.1864 +	IMPORT_C RBackedUpWindow();
  1.1865 +	IMPORT_C RBackedUpWindow(RWsSession &aWs);
  1.1866 +	IMPORT_C TInt Construct(const RWindowTreeNode &parent,TDisplayMode aDisplayMode, TUint32 aHandle);
  1.1867 +	IMPORT_C TInt BitmapHandle() const;
  1.1868 +	IMPORT_C void UpdateScreen();
  1.1869 +	IMPORT_C void UpdateScreen(const TRegion &aRegion);
  1.1870 +	IMPORT_C void UpdateBackupBitmap();
  1.1871 +	IMPORT_C void MaintainBackup();
  1.1872 +	};
  1.1873 +
  1.1874 +
  1.1875 +class RWindowGroup : public RWindowTreeNode
  1.1876 +/** Client-side handle to a server-side window group.
  1.1877 +
  1.1878 +@publishedAll
  1.1879 +@released */
  1.1880 +	{
  1.1881 +public:
  1.1882 +	IMPORT_C RWindowGroup();
  1.1883 +	IMPORT_C RWindowGroup(RWsSession &aWs);
  1.1884 +	IMPORT_C TInt Construct(TUint32 aClientHandle);
  1.1885 +	IMPORT_C TInt Construct(TUint32 aClientHandle,CWsScreenDevice* aScreenDevice);
  1.1886 +	IMPORT_C TInt Construct(TUint32 aClientHandle,TBool aIsFocusable,CWsScreenDevice* aScreenDevice);
  1.1887 +	IMPORT_C TInt Construct(TUint32 aClientHandle,TBool aIsFocusable);
  1.1888 +	IMPORT_C TInt ConstructChildApp(TInt aIdOfParentWindowGroup,TUint32 aClientHandle);
  1.1889 +	IMPORT_C TInt ConstructChildApp(TInt aIdOfParentWindowGroup,TUint32 aClientHandle,TBool aIsFocusable);
  1.1890 +	IMPORT_C void AllowProcessToCreateChildWindowGroups(TUid aProcessSID);
  1.1891 +	IMPORT_C void EnableReceiptOfFocus(TBool aState);
  1.1892 +	IMPORT_C void AutoForeground(TBool aState);
  1.1893 +	IMPORT_C void SetOrdinalPriorityAdjust(TInt aAdjust);
  1.1894 +	IMPORT_C TInt SetOrdinalPositionErr(TInt aPos,TInt aOrdinalPriority);
  1.1895 +	IMPORT_C TInt32 CaptureKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);
  1.1896 +	IMPORT_C TInt32 CaptureKey(TUint aKeycode, TUint aModifierMask, TUint aModifier, TInt aPriority);
  1.1897 +	IMPORT_C void CancelCaptureKey(TInt32 aCaptureKey);
  1.1898 +	IMPORT_C TInt32 CaptureKeyUpAndDowns(TUint aScanCode, TUint aModifierMask, TUint aModifier);
  1.1899 +	IMPORT_C TInt32 CaptureKeyUpAndDowns(TUint aScanCode, TUint aModifierMask, TUint aModifier, TInt aPriority);
  1.1900 +	IMPORT_C void CancelCaptureKeyUpAndDowns(TInt32 aCaptureKey);
  1.1901 +	IMPORT_C TInt32 CaptureLongKey(TUint aInputKeyCode,TUint aOutputKeyCode,TUint aModifierMask,TUint aModifier
  1.1902 +																										,TInt aPriority,TUint aFlags);
  1.1903 +	IMPORT_C TInt32 CaptureLongKey(TTimeIntervalMicroSeconds32 aRepeatTime,TUint aInputKeyCode,TUint aOutputKeyCode
  1.1904 +																	,TUint aModifierMask,TUint aModifier,TInt aPriority,TUint aFlags);
  1.1905 +	IMPORT_C void CancelCaptureLongKey(TInt32 aCaptureKey);
  1.1906 +	IMPORT_C TInt AddPriorityKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);
  1.1907 +	IMPORT_C void RemovePriorityKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);
  1.1908 +	IMPORT_C void SetTextCursor(RWindowBase &aWin, const TPoint &aPos, const TTextCursor &aCursor);
  1.1909 +	IMPORT_C void SetTextCursor(RWindowBase &aWin, const TPoint &aPos, const TTextCursor &aCursor, const TRect &aClipRect);
  1.1910 +	IMPORT_C void CancelTextCursor();
  1.1911 +	IMPORT_C void SetOwningWindowGroup(TInt aIdentifier);
  1.1912 +	IMPORT_C void DefaultOwningWindow();
  1.1913 +	IMPORT_C TInt SetName(const TDesC &aName);
  1.1914 +	IMPORT_C TInt Name(TDes &aWindowName) const;
  1.1915 +	IMPORT_C TInt Identifier() const;
  1.1916 +	IMPORT_C void DisableKeyClick(TBool aState);
  1.1917 +	IMPORT_C TInt EnableScreenChangeEvents();
  1.1918 +	IMPORT_C void DisableScreenChangeEvents();
  1.1919 +	IMPORT_C void SimulatePointerEvent(TRawEvent aEvent);
  1.1920 +	IMPORT_C void SimulateAdvancedPointerEvent(TRawEvent aEvent);
  1.1921 +	IMPORT_C TInt ClearChildGroup();
  1.1922 +	IMPORT_C TInt SetChildGroup(TInt aId);
  1.1923 +private:
  1.1924 +	TInt32 doCaptureKey(TUint aKey, TUint aModifierMask, TUint aModifiers, TInt aPriority, TInt aOpcode);
  1.1925 +	void doCancelCaptureKey(TInt32 aCaptureKeyHandle, TInt aOpcode);
  1.1926 +	TInt Construct(TInt aIdOfParentWindowGroup, TUint32 aClientHandle, TBool aIsFocusable, CWsScreenDevice* aScreenDevice);
  1.1927 +	};
  1.1928 +
  1.1929 +
  1.1930 +class CWsBitmap : public CFbsBitmap, public MWsClientClass
  1.1931 +/** Window server bitmap.
  1.1932 +
  1.1933 +This is a bitmap to which the window server already has a handle. Functions
  1.1934 +which take a window server bitmap are faster than equivalent functions which
  1.1935 +take a CFbsBitmap.
  1.1936 +
  1.1937 +@publishedAll
  1.1938 +@released */
  1.1939 +	{
  1.1940 +public:
  1.1941 +	IMPORT_C CWsBitmap();
  1.1942 +	IMPORT_C CWsBitmap(RWsSession &aWs);
  1.1943 +	IMPORT_C ~CWsBitmap();
  1.1944 +	IMPORT_C TInt Create(const TSize& aSizeInPixels,TDisplayMode aDispMode);
  1.1945 +	IMPORT_C TInt Duplicate(TInt aHandle);
  1.1946 +	IMPORT_C TInt Load(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded=ETrue);
  1.1947 +	IMPORT_C void InternalizeL(RReadStream& aStream);
  1.1948 +	IMPORT_C void Reset();
  1.1949 +private:
  1.1950 +	TInt createWsBitmap(TInt aErr);
  1.1951 +	};
  1.1952 +
  1.1953 +class RWsGraphicMsgBuf;
  1.1954 +
  1.1955 +class TWsGraphicMsgFixedBase
  1.1956 +/** Base class for fixed-size messages to be attached to CWindowGc::DrawWsGraphic commands
  1.1957 +@publishedAll
  1.1958 +@released
  1.1959 +*/	{
  1.1960 +public:
  1.1961 +	IMPORT_C TPtrC8 Pckg() const;
  1.1962 +	IMPORT_C TUid TypeId() const;
  1.1963 +	IMPORT_C TInt Size() const;
  1.1964 +protected:
  1.1965 +	IMPORT_C TWsGraphicMsgFixedBase(TUid aTypeId,TInt aSizeOfDerived);
  1.1966 +private:
  1.1967 +	const TUid iTypeId;
  1.1968 +	const TInt iSize;
  1.1969 +	};
  1.1970 +
  1.1971 +class RWsGraphicMsgBuf: private RBuf8
  1.1972 +/** Utility class for building data buffers to be attached to CWindowGc::DrawWsGraphic commands
  1.1973 +Useful when there is more than one piece of data to be attached to the draw command
  1.1974 +@publishedAll
  1.1975 +@released */
  1.1976 +	{
  1.1977 +public:
  1.1978 +	IMPORT_C RWsGraphicMsgBuf();
  1.1979 +	using RBuf8::Close;
  1.1980 +	using RBuf8::CleanupClosePushL;
  1.1981 +	IMPORT_C TInt Append(TUid aTypeId,const TDesC8& aData);
  1.1982 +	IMPORT_C TInt Append(TUid aTypeId,const TDesC16& aData);
  1.1983 +	IMPORT_C TInt Append(TUid aTypeId,TInt aLen,TPtr8& aPtr);
  1.1984 +	IMPORT_C TInt Append(const TWsGraphicMsgFixedBase& aMsg);
  1.1985 +	IMPORT_C void Remove(TInt aIndex);
  1.1986 +	IMPORT_C TInt Count() const;
  1.1987 +	IMPORT_C TUid TypeId(TInt aIndex) const;
  1.1988 +	IMPORT_C TPtrC8 Data(TInt aIndex) const;
  1.1989 +	IMPORT_C TPtr8 Data(TInt aIndex);
  1.1990 +	IMPORT_C void GetFixedMsg(TWsGraphicMsgFixedBase& aMsg,TInt aIndex) const;
  1.1991 +	IMPORT_C const TDesC8& Pckg() const;
  1.1992 +private:
  1.1993 +	TInt ExpandForAppend(TInt aDataLen);
  1.1994 +	void WriteHeader(TUid aUid,TInt aLen);
  1.1995 +	TInt IntAt(TInt aOfs) const;
  1.1996 +private:
  1.1997 +	TInt iRMsgBufSpare[2];
  1.1998 +	};
  1.1999 +
  1.2000 +
  1.2001 +class CWindowGc : public CBitmapContext, public MWsClientClass
  1.2002 +/** Window graphics context.
  1.2003 +
  1.2004 +Most window graphics context drawing functions map to equivalent CFbsBitGc
  1.2005 +functions. They are implemented on the screen with any co-ordinates being
  1.2006 +relative to the top left corner of the window. However extra clipping is applied.
  1.2007 +The drawing will always be clipped to the visible part of the window. In addition
  1.2008 +it will be clipped to the non-invalid part if you are not doing a redraw and
  1.2009 +to the region being validated if you are doing a redraw.
  1.2010 +
  1.2011 +Note:
  1.2012 +
  1.2013 +In general, server side functions which encounter conditions which would normally
  1.2014 +cause a leave, do not leave but instead return an error value indicating the
  1.2015 +leave condition. In this way the leave can be handled on the appropriate side
  1.2016 +of the client/server boundary. For example, a client can choose to wrap server
  1.2017 +calls with User::LeaveIfError(), which causes a leave with the specified
  1.2018 +error.
  1.2019 +
  1.2020 +The above advice is true of many functions in this class, and in its derived
  1.2021 +classes.
  1.2022 +
  1.2023 +@publishedAll
  1.2024 +@released
  1.2025 +@see CGraphicsContext */
  1.2026 +	{
  1.2027 +	friend class CWsScreenDevice;
  1.2028 +public:
  1.2029 +	/** Defines possible clockwise rotation values.
  1.2030 +	
  1.2031 +	WARNING: Enum for internal and partner use ONLY.  Compatibility is not guaranteed in future releases.
  1.2032 +
  1.2033 +	@prototype
  1.2034 +	*/
  1.2035 +	enum TGraphicsRotation
  1.2036 +		{
  1.2037 +		/** No rotation. */
  1.2038 +		EGraphicsRotationNone,
  1.2039 +		/** A 90 degree rotation. */
  1.2040 +		EGraphicsRotation90,
  1.2041 +		/** A 180 degree rotation. */
  1.2042 +		EGraphicsRotation180,
  1.2043 +		/** A 270 degree rotation. */
  1.2044 +		EGraphicsRotation270
  1.2045 +		};	
  1.2046 +
  1.2047 +	IMPORT_C CWindowGc(CWsScreenDevice *aDevice);
  1.2048 +	IMPORT_C virtual ~CWindowGc();
  1.2049 +	IMPORT_C virtual TInt Construct();
  1.2050 +	IMPORT_C virtual void Activate(RDrawableWindow &aDevice);
  1.2051 +	IMPORT_C virtual void Deactivate();
  1.2052 +//====================FROM CGraphicsContext.H===============================
  1.2053 +	IMPORT_C virtual CGraphicsDevice* Device() const;
  1.2054 +	IMPORT_C virtual void SetOrigin(const TPoint &aPoint=TPoint(0,0));
  1.2055 +	IMPORT_C virtual void SetDrawMode(TDrawMode aDrawingMode);
  1.2056 +	IMPORT_C virtual void SetClippingRect(const TRect& aRect);
  1.2057 +	IMPORT_C virtual void CancelClippingRect();
  1.2058 +	IMPORT_C virtual void Reset();
  1.2059 +
  1.2060 +	IMPORT_C virtual void UseFont(const CFont *aFont);
  1.2061 +	IMPORT_C virtual void DiscardFont();
  1.2062 +	IMPORT_C virtual void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
  1.2063 +	IMPORT_C virtual void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
  1.2064 +// Used to do justified text properly
  1.2065 +	IMPORT_C virtual void SetWordJustification(TInt aExcessWidth,TInt aNumGaps);
  1.2066 +// Used primarily to get accurate WYSIWYG
  1.2067 +	IMPORT_C virtual void SetCharJustification(TInt aExcessWidth,TInt aNumChars);
  1.2068 +
  1.2069 +	IMPORT_C virtual void SetPenColor(const TRgb &aColor);
  1.2070 +	IMPORT_C virtual void SetPenStyle(TPenStyle aPenStyle);
  1.2071 +	IMPORT_C virtual void SetPenSize(const TSize& aSize);
  1.2072 +
  1.2073 +	IMPORT_C virtual void SetBrushColor(const TRgb &aColor);
  1.2074 +	IMPORT_C virtual void SetBrushStyle(TBrushStyle aBrushStyle);
  1.2075 +	IMPORT_C virtual void SetBrushOrigin(const TPoint &aOrigin);
  1.2076 +	IMPORT_C virtual void UseBrushPattern(const CFbsBitmap *aDevice);
  1.2077 +	IMPORT_C virtual void DiscardBrushPattern();
  1.2078 +//
  1.2079 +// Move the internal position, as used by DrawLineTo & DrawLineBy, and set by MoveTo,
  1.2080 +// MoveBy, DrawLine, DrawLineTo, DrawLineBy and DrawPolyline
  1.2081 +	IMPORT_C virtual void MoveTo(const TPoint &aPoint);
  1.2082 +	IMPORT_C virtual void MoveBy(const TPoint &aPoint);
  1.2083 +	IMPORT_C virtual void Plot(const TPoint &aPoint);
  1.2084 +//
  1.2085 +//  Line drawing subject to pen color, width and style and draw mode
  1.2086 +	IMPORT_C virtual void DrawArc(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd);
  1.2087 +	IMPORT_C virtual void DrawLine(const TPoint &aPoint1,const TPoint &aPoint2);
  1.2088 +	IMPORT_C virtual void DrawLineTo(const TPoint &aPoint);
  1.2089 +	IMPORT_C virtual void DrawLineBy(const TPoint &aPoint);
  1.2090 +	IMPORT_C virtual void DrawPolyLine(const CArrayFix<TPoint> *aPointList);
  1.2091 +	IMPORT_C virtual void DrawPolyLine(const TPoint* aPointList,TInt aNumPoints);
  1.2092 +//
  1.2093 +// Filled outlines
  1.2094 +// Outlines subject to pen color, width and style and draw mode
  1.2095 +// (set pen to ENullPen for no outline)
  1.2096 +// Fill subject to brush style (color, hash or pattern) and origin and
  1.2097 +// drawing mode (set brush to ENullBrush for no fill)
  1.2098 +	IMPORT_C virtual void DrawPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd);
  1.2099 +	IMPORT_C virtual void DrawEllipse(const TRect &aRect);
  1.2100 +	IMPORT_C virtual void DrawRect(const TRect &aRect);
  1.2101 +	IMPORT_C virtual void DrawRoundRect(const TRect &aRect,const TSize &aEllipse);
  1.2102 +	IMPORT_C virtual TInt DrawPolygon(const CArrayFix<TPoint> *aPointList,TFillRule aFillRule=EAlternate);
  1.2103 +	IMPORT_C virtual TInt DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule=EAlternate);
  1.2104 +//
  1.2105 +// Uses the bitmap's Twips size and does a "stretch" blit in general
  1.2106 +	IMPORT_C virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aDevice);
  1.2107 +	IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice);
  1.2108 +	IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice, const TRect &aSourceRect);
  1.2109 +	IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap* aBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap, TBool aInvertMask);
  1.2110 +	IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CWsBitmap* aBitmap, const TRect& aSourceRect, const CWsBitmap* aMaskBitmap, TBool aInvertMask);
  1.2111 +
  1.2112 +// Required as not all DrawText and DrawTextVertical functions are implemented in CWindowGc
  1.2113 +	using CBitmapContext::DrawText;
  1.2114 +	using CBitmapContext::DrawTextVertical;
  1.2115 +//
  1.2116 +// Text drawing subject to drawing mode
  1.2117 +// Subject to used font, pen color, drawing mode,
  1.2118 +// word and char justification
  1.2119 +	IMPORT_C virtual void DrawText(const TDesC &aBuf,const TPoint &aPos);
  1.2120 +//
  1.2121 +// Subject to same as above plus brush for background
  1.2122 +// (set brush to ENullBrush for no effect on background)
  1.2123 +	IMPORT_C virtual void DrawText(const TDesC &aBuf,const TRect &aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0);
  1.2124 +//================Extra functions from CBitmapContext==============
  1.2125 +	IMPORT_C virtual void Clear();
  1.2126 +	IMPORT_C virtual void Clear(const TRect &aRect);
  1.2127 +	IMPORT_C virtual void CopyRect(const TPoint &anOffset,const TRect &aRect);
  1.2128 +	IMPORT_C virtual void BitBlt(const TPoint &aPos, const CFbsBitmap *aBitmap);
  1.2129 +	IMPORT_C virtual void BitBlt(const TPoint &aDestination, const CFbsBitmap *aBitmap, const TRect &aSource);
  1.2130 +	IMPORT_C virtual void BitBltMasked(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aSourceRect,const CFbsBitmap* aMaskBitmap,TBool aInvertMask);
  1.2131 +	IMPORT_C virtual void BitBlt(const TPoint &aPoint, const CWsBitmap *aBitmap);
  1.2132 +	IMPORT_C virtual void BitBlt(const TPoint &aDestination, const CWsBitmap *aBitmap, const TRect &aSource);
  1.2133 +	IMPORT_C virtual void BitBltMasked(const TPoint& aPoint,const CWsBitmap *aBitmap,const TRect& aSourceRect,const CWsBitmap *aMaskBitmap,TBool aInvertMask);
  1.2134 +	IMPORT_C virtual void MapColors(const TRect& aRect,const TRgb* aColors,TInt aNumPairs=2,TBool aMapForwards=ETrue);
  1.2135 +
  1.2136 +	IMPORT_C virtual void DrawTextVertical(const TDesC& aText,const TPoint& aPos,TBool aUp);
  1.2137 +	IMPORT_C virtual void DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
  1.2138 +//=================Extra functions specific to wserv GDI==============
  1.2139 +	IMPORT_C virtual void SetDitherOrigin(const TPoint& aPoint);
  1.2140 +	IMPORT_C virtual TInt SetClippingRegion(const TRegion &aRegion);
  1.2141 +	IMPORT_C virtual void CancelClippingRegion();
  1.2142 +	IMPORT_C virtual void SetOpaque(TBool aDrawOpaque=ETrue);
  1.2143 +//=================Functions also supplied by CFbsBitGc==============
  1.2144 +	IMPORT_C virtual void SetFaded(TBool aFaded);
  1.2145 +	IMPORT_C virtual void SetFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap);
  1.2146 +	IMPORT_C virtual TInt AlphaBlendBitmaps(const TPoint& aDestPt, const CFbsBitmap* aSrcBmp, const TRect& aSrcRect, const CFbsBitmap* aAlphaBmp, const TPoint& aAlphaPt);
  1.2147 +	IMPORT_C virtual TInt AlphaBlendBitmaps(const TPoint& aDestPt, const CWsBitmap* aSrcBmp, const TRect& aSrcRect, const CWsBitmap* aAlphaBmp, const TPoint& aAlphaPt);
  1.2148 +//
  1.2149 +	IMPORT_C TAny* Interface(TUid aInterfaceId);
  1.2150 +	IMPORT_C const TAny* Interface(TUid aInterfaceId) const;
  1.2151 +	
  1.2152 +protected:	
  1.2153 +	IMPORT_C TInt APIExtension(TUid aUid, TAny*& aOutput, TAny* aInput);
  1.2154 +	
  1.2155 +private:	
  1.2156 +
  1.2157 +	IMPORT_C void Reserved_CGraphicsContext_2();
  1.2158 +
  1.2159 +	IMPORT_C void Reserved_CBitmapContext_1();
  1.2160 +	IMPORT_C void Reserved_CBitmapContext_2();
  1.2161 +	IMPORT_C void Reserved_CBitmapContext_3();
  1.2162 +
  1.2163 +public:
  1.2164 +	IMPORT_C virtual void DrawWsGraphic(const TWsGraphicId& aId,const TRect& aDestRect);
  1.2165 +	IMPORT_C virtual void DrawWsGraphic(const TWsGraphicId& aId,const TRect& aDestRect,const TDesC8& aData);
  1.2166 +private:
  1.2167 +	IMPORT_C virtual void Reserved_CWindowGc_3();
  1.2168 +	IMPORT_C virtual void Reserved_CWindowGc_4();
  1.2169 +	IMPORT_C virtual void Reserved_CWindowGc_5();
  1.2170 +
  1.2171 +//=============================================================
  1.2172 +private: // Private code
  1.2173 +	TRgb Color(TInt aOpcode)const;
  1.2174 +	void SetJustification(TInt aExcessWidth,TInt aNumGaps, TInt aOpcode);
  1.2175 +	void DrawArcOrPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd, TInt aOpcode);
  1.2176 +	void doDrawPolyLine(const CArrayFix<TPoint> *aPointArray, const TPoint* aPointList,TInt aNumPoints);
  1.2177 +	TInt doDrawPolygon(const CArrayFix<TPoint> *aPointArray,const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule);
  1.2178 +	void WriteTextPos(TInt aOpcode,TInt aOpcodePtr,const TPoint &aPos,const TDesC &aBuf) const;
  1.2179 +	void WriteTextCommand(TAny *aCmd, TInt aLen,const TDesC &aBuf,TInt aOpcode,TInt aOpcodePtr) const;
  1.2180 +	void WriteTextCommand(TAny *aCmd, TInt aLen,const TDesC8 &aBuf,TInt aOpcode,TInt aOpcodePtr) const;
  1.2181 +	TInt APIExGetUnderlineMetrics(TAny*& aOutput);
  1.2182 +	TInt APIExSetShadowColor(TAny* aShadowColor);
  1.2183 +	TInt APIExGetShadowColor(TAny*& aOutput);
  1.2184 +	// New DrawText API's that take in context
  1.2185 +	TInt APIExDrawText(const TDesC &aBuf,const TTextParameters* aParam,const TPoint &aPos);
  1.2186 +	TInt APIExDrawText(const TDesC &aBuf,const TTextParameters* aParam,const TRect &aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0);
  1.2187 +	TInt APIExDrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TPoint& aPos,TBool aUp);
  1.2188 +	TInt APIExDrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0);
  1.2189 +	TInt APIExInterface(TAny*& aInterface, TUid aInterfaceId);
  1.2190 +
  1.2191 +	void DrawResource(const TPoint& aPos, const RWsDrawableSource& aSource, TGraphicsRotation aRotation=EGraphicsRotationNone);
  1.2192 +	void DrawResource(const TRect& aDestRect, const RWsDrawableSource& aSource, TGraphicsRotation aRotation=EGraphicsRotationNone);
  1.2193 +	void DrawResource(const TRect& aDestRect, const RWsDrawableSource& aSource, const TRect& aSrcRect, TGraphicsRotation aRotation=EGraphicsRotationNone);
  1.2194 +	void DrawResource(const TRect& aDestRect, const RWsDrawableSource& aSource, const TDesC8& aParam);
  1.2195 +	
  1.2196 +private: // Private data
  1.2197 +	class CPimpl;
  1.2198 +	CPimpl* iPimpl;
  1.2199 +	CWsScreenDevice *iDevice;
  1.2200 +	};
  1.2201 +
  1.2202 +
  1.2203 +class CWsScreenDevice : public CBitmapDevice, public MWsClientClass
  1.2204 +/** Software device screen.
  1.2205 +
  1.2206 +An object of this class can be used to enquire or set parameters of the software
  1.2207 +screen, and determine the physical limits of the device.
  1.2208 +
  1.2209 +CWsScreenDevice gives access to the list of screen modes. These are the combinations
  1.2210 +of screen rotation and screen size supported by the device. One of them is
  1.2211 +selected as the current screen mode. The possible screen modes are initialised
  1.2212 +in wsini.ini.
  1.2213 +
  1.2214 +@publishedAll
  1.2215 +@released
  1.2216 +@see CFbsScreenDevice */
  1.2217 +	{
  1.2218 +public:
  1.2219 +	/**	Whether or not to include sprites when comparing areas of the screen*/
  1.2220 +	enum TSpriteInCompare
  1.2221 +		{
  1.2222 +		/** This enum can be specified as the 3rd parameter to CWsScreenDevice::RectCompare(const TRect &aRect1,
  1.2223 +		const TRect &aRect2,TUint aFlags).
  1.2224 +		When called with the value ERemoveSprite if there are any sprites visible in the areas of the screen being compared then these
  1.2225 +		will not be included in the comparison.
  1.2226 +		The function CWsScreenDevice::RectCompare(const TRect &aRect1,const TRect &aRect2) will not include
  1.2227 +		sprites in the comparison.
  1.2228 +		*/
  1.2229 +		ERemoveSprite=0,
  1.2230 +		/**	This enum can be specified as the 3rd parameter to CWsScreenDevice::RectCompare(const TRect &aRect1,
  1.2231 +		const TRect &aRect2,TUint aFlags).
  1.2232 +		When called with the value EIncludeSprite if there are any sprites visible in the areas of the screen being compared then these
  1.2233 +		will be included in the comparison.*/
  1.2234 +		EIncludeSprite=1,
  1.2235 +		/**	This enum can be specified as the 3rd parameter to CWsScreenDevice::RectCompare(const TRect &aRect1,
  1.2236 +		const TRect &aRect2,TUint aFlags). 
  1.2237 +		When called with the value EIncludeTextCursor if there are any text cursors visible in the areas of the screen being compared then these 
  1.2238 +		will be included in the comparison.*/
  1.2239 +		EIncludeTextCursor=2
  1.2240 +		};
  1.2241 +public:
  1.2242 +	IMPORT_C CWsScreenDevice();
  1.2243 +	IMPORT_C CWsScreenDevice(RWsSession &aWs);
  1.2244 +	IMPORT_C ~CWsScreenDevice();
  1.2245 +	IMPORT_C TInt Construct();
  1.2246 +	IMPORT_C TInt Construct( TInt aDefaultScreenNumber ) ;
  1.2247 +	IMPORT_C TAny* GetInterface(TUint aInterfaceId);
  1.2248 +	inline const TAny* GetInterface(TUint aInterfaceId) const;
  1.2249 +	IMPORT_C TBool IsModeDynamic(TInt aSizeMode) const;
  1.2250 +	IMPORT_C TBool IsCurrentModeDynamic() const;
  1.2251 +//==== From CGraphicsDevice ====//
  1.2252 +	IMPORT_C TDisplayMode DisplayMode() const;
  1.2253 +	IMPORT_C TSize SizeInPixels() const;
  1.2254 +	IMPORT_C TSize SizeInTwips() const;
  1.2255 +	IMPORT_C TInt HorizontalTwipsToPixels(TInt aTwips) const;
  1.2256 +	IMPORT_C TInt VerticalTwipsToPixels(TInt aTwips) const;
  1.2257 +	IMPORT_C TInt HorizontalPixelsToTwips(TInt aPixels) const;
  1.2258 +	IMPORT_C TInt VerticalPixelsToTwips(TInt aPixels) const;
  1.2259 +	IMPORT_C TRect PointerRect() const;
  1.2260 +	IMPORT_C TInt CreateContext(CGraphicsContext *&aGc);
  1.2261 +	inline TInt CreateContext(CWindowGc*& aGc);
  1.2262 +	IMPORT_C virtual TInt GetNearestFontInTwips(CFont*& aFont,const TFontSpec& aFontSpec);
  1.2263 +	IMPORT_C virtual TInt GetNearestFontToDesignHeightInTwips(CFont*& aFont,const TFontSpec& aFontSpec);
  1.2264 +	IMPORT_C virtual TInt GetNearestFontToMaxHeightInTwips(CFont*& aFont,const TFontSpec& aFontSpec,TInt aMaxHeight);
  1.2265 +	IMPORT_C TInt NumTypefaces() const;
  1.2266 +	IMPORT_C void TypefaceSupport(TTypefaceSupport& aTypefaceSupport,TInt aTypefaceIndex) const;
  1.2267 +	IMPORT_C TInt FontHeightInTwips(TInt aTypefaceIndex,TInt aHeightIndex) const;
  1.2268 +// ==== From CBitmapDevice ====//
  1.2269 +	IMPORT_C void GetPixel(TRgb& aColor,const TPoint& aPixel) const;
  1.2270 +	IMPORT_C void GetScanLine(TDes8& aScanLine,const TPoint& aStartPixel,TInt aPixelLength, TDisplayMode aDispMode) const;
  1.2271 +	IMPORT_C TInt AddFile(const TDesC& aName,TInt& aId);
  1.2272 +	IMPORT_C void RemoveFile(TInt aId=0);
  1.2273 +	IMPORT_C virtual TInt GetNearestFontInPixels(CFont*& aFont,const TFontSpec& aFontSpec);
  1.2274 +	IMPORT_C virtual TInt GetNearestFontToDesignHeightInPixels(CFont*& aFont,const TFontSpec& aFontSpec);
  1.2275 +	IMPORT_C virtual TInt GetNearestFontToMaxHeightInPixels(CFont*& aFont,const TFontSpec& aFontSpec,TInt aMaxHeight);
  1.2276 +	IMPORT_C TInt FontHeightInPixels(TInt aTypefaceIndex,TInt aHeightIndex) const;
  1.2277 +	IMPORT_C void ReleaseFont(CFont* aFont);
  1.2278 +//===== From CFbsScreenDevice ====//
  1.2279 +	IMPORT_C void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;
  1.2280 +	IMPORT_C void SetPalette(CPalette* aPalette);
  1.2281 +	IMPORT_C TInt GetPalette(CPalette*& aPalette) const;
  1.2282 +//===== Extra functions ====//
  1.2283 +	IMPORT_C TInt SetCustomPalette(const CPalette* aPalette);
  1.2284 +	IMPORT_C TInt GetFontById(CFont*& aFont,TUid aUid,const TAlgStyle& aAlgStyle);
  1.2285 +	IMPORT_C TBool RectCompare(const TRect &aRect1,const TRect &aRect2) const;
  1.2286 +	IMPORT_C TBool RectCompare(const TRect& aRect1,const TRect &aRect2,TUint aFlags) const;
  1.2287 +	IMPORT_C TInt CopyScreenToBitmap(const CFbsBitmap *aBitmap) const;
  1.2288 +	IMPORT_C TInt CopyScreenToBitmap(const CFbsBitmap *aBitmap, const TRect &aRect) const;
  1.2289 +	IMPORT_C TInt SetBackLight(TBool aBackLight);
  1.2290 +//===== Screen Rotation functions ====//
  1.2291 +	IMPORT_C void SetScreenSizeAndRotation(const TPixelsTwipsAndRotation &aSizeAndRotation);
  1.2292 +	IMPORT_C void GetDefaultScreenSizeAndRotation(TPixelsTwipsAndRotation &aSizeAndRotation) const;
  1.2293 +	IMPORT_C void SetScreenSizeAndRotation(const TPixelsAndRotation &aSizeAndRotation);
  1.2294 +	IMPORT_C void GetDefaultScreenSizeAndRotation(TPixelsAndRotation &aSizeAndRotation) const;
  1.2295 +	IMPORT_C TScreenModeEnforcement ScreenModeEnforcement() const;
  1.2296 +	IMPORT_C void SetScreenModeEnforcement(TScreenModeEnforcement aMode) const;
  1.2297 +	IMPORT_C void GetScreenModeSizeAndRotation(TInt aMode, TPixelsTwipsAndRotation &aSizeAndRotation) const;
  1.2298 +	IMPORT_C void GetScreenModeSizeAndRotation(TInt aMode, TPixelsAndRotation &aSizeAndRotation) const;
  1.2299 +	IMPORT_C void SetCurrentRotations(TInt aMode, CFbsBitGc::TGraphicsOrientation aRotation) const;
  1.2300 +	IMPORT_C TInt GetRotationsList(TInt aMode, CArrayFixFlat<TInt> *aRotationList) const;
  1.2301 +	IMPORT_C TInt NumScreenModes() const;
  1.2302 +	IMPORT_C void SetScreenMode(TInt aMode);
  1.2303 +	IMPORT_C TInt CurrentScreenMode() const;
  1.2304 +	IMPORT_C void SetAppScreenMode(TInt aMode);
  1.2305 +	IMPORT_C TPoint GetDefaultScreenModeOrigin() const;
  1.2306 +	IMPORT_C TPoint GetScreenModeOrigin(TInt aMode) const;
  1.2307 +	IMPORT_C TSize GetCurrentScreenModeScale() const;
  1.2308 +	IMPORT_C TSize GetScreenModeScale(TInt aMode) const;
  1.2309 +	IMPORT_C TPoint GetCurrentScreenModeScaledOrigin() const;
  1.2310 +	IMPORT_C TPoint GetScreenModeScaledOrigin(TInt aMode) const;
  1.2311 +	IMPORT_C TInt GetScreenSizeModeList(RArray<TInt>* aModeList) const;
  1.2312 +	IMPORT_C TDisplayMode GetScreenModeDisplayMode(const TInt &aMode) const;
  1.2313 +//===== Used for testing purpose only ====//
  1.2314 +	IMPORT_C TSizeMode GetCurrentScreenModeAttributes() const;
  1.2315 +	IMPORT_C void SetCurrentScreenModeAttributes(const TSizeMode &aModeAtt);
  1.2316 +	IMPORT_C TInt GetScreenNumber() const;
  1.2317 +private:
  1.2318 +	CFbsTypefaceStore* TypeFaceStore()const;
  1.2319 +	TSize DisplaySizeInPixels()const;
  1.2320 +	TSize PhysicalScreenSizeInTwips()const;
  1.2321 +private: // Private data
  1.2322 +	class CScrDevExtension;				//Implements extension interfaces, including and replacing typeface store
  1.2323 +	CScrDevExtension* iExtension;
  1.2324 +	TSize iPhysicalScreenSizeInTwips;
  1.2325 +	TSize iDisplaySizeInPixels;
  1.2326 +	friend class CWindowGc;
  1.2327 +	};
  1.2328 +
  1.2329 +
  1.2330 +class RWsSpriteBase : public MWsClientClass
  1.2331 +// Client side class base class for sprites and pointer cursors
  1.2332 +/** Sprite base class.
  1.2333 +
  1.2334 +Unless stated otherwise, references to sprites in the documentation for this class also
  1.2335 +apply to pointer cursors.
  1.2336 +
  1.2337 +@publishedAll
  1.2338 +@released
  1.2339 +@see RWsSprite
  1.2340 +@see RWsPointerCursor */
  1.2341 +	{
  1.2342 +protected:
  1.2343 +	IMPORT_C RWsSpriteBase();
  1.2344 +	IMPORT_C RWsSpriteBase(RWsSession &aWs);
  1.2345 +public:
  1.2346 +	IMPORT_C TInt Activate();
  1.2347 +	IMPORT_C TInt AppendMember(const TSpriteMember &aMemberData);
  1.2348 +	IMPORT_C void UpdateMember(TInt aIndex);
  1.2349 +	IMPORT_C TInt UpdateMember(TInt aIndex, const TSpriteMember &aMemberData);
  1.2350 +	IMPORT_C void Close();
  1.2351 +	};
  1.2352 +
  1.2353 +
  1.2354 +class RWsSprite : public RWsSpriteBase
  1.2355 +/** Sprite.
  1.2356 +
  1.2357 +This class defines functions to create and initialise a sprite, and to set
  1.2358 +its position.
  1.2359 +
  1.2360 +@publishedAll
  1.2361 +@released */
  1.2362 +	{
  1.2363 +public:
  1.2364 +	IMPORT_C RWsSprite();
  1.2365 +	IMPORT_C RWsSprite(RWsSession &aWs);
  1.2366 +	IMPORT_C TInt Construct(RWindowTreeNode &aWindow, const TPoint &aPos, TInt aFlags);
  1.2367 +	IMPORT_C void SetPosition(const TPoint &aPos);
  1.2368 +	};
  1.2369 +
  1.2370 +
  1.2371 +class RWsPointerCursor : public RWsSpriteBase
  1.2372 +/** Pointer cursor.
  1.2373 +
  1.2374 +The pointer cursor is created in a similar way to a sprite. After creating it,
  1.2375 +one or more sprite members containing the bitmaps to be displayed are added.
  1.2376 +
  1.2377 +After a pointer cursor has been created and activated, it does not become
  1.2378 +visible until the application calls RWindowTreeNode::SetPointerCursor() or
  1.2379 +RWindowTreeNode::SetCustomPointerCursor(). The pointer cursor's origin automatically
  1.2380 +tracks the position of the pointing device, or position of emulated single pointer if there
  1.2381 +are more pointers in the system (see documentation of RWindowBase::EnableAdvancedPointers()
  1.2382 +for more details), and the origin forms the pointer cursor's "hot spot", i.e., the point 
  1.2383 +whose co-ordinates are sent to the client if a pointer event occurs. 
  1.2384 +If the pointer cursor's bitmap needs to extend to the left or upwards from the pointer 
  1.2385 +position, its sprite member should be given a negative offset in TSpriteMember::iOffset.
  1.2386 +
  1.2387 +Note:
  1.2388 +
  1.2389 +Pointer cursors are rarely used in pure pen architectures, but they are supported
  1.2390 +for mouse or tablet use.
  1.2391 +
  1.2392 +@see RWindowBase::EnableAdvancedPointers()
  1.2393 +
  1.2394 +@publishedAll
  1.2395 +@released */
  1.2396 +	{
  1.2397 +public:
  1.2398 +	IMPORT_C RWsPointerCursor();
  1.2399 +	IMPORT_C RWsPointerCursor(RWsSession &aWs);
  1.2400 +	IMPORT_C TInt Construct(TInt aFlags);
  1.2401 +	};
  1.2402 +
  1.2403 +
  1.2404 +class RAnim;
  1.2405 +
  1.2406 +
  1.2407 +class RAnimDll : public MWsClientClass
  1.2408 +/** Client-side interface to the server-side animation DLL.
  1.2409 +
  1.2410 +This is the client side class matching the server side CAnimDLL class. It
  1.2411 +provides functions to create, load, close and destroy a server-side CAnimDll
  1.2412 +object.
  1.2413 +
  1.2414 +@publishedAll
  1.2415 +@released
  1.2416 +@see CreateCAnimDllL()
  1.2417 +@see CAnimDll */
  1.2418 +	{
  1.2419 +public:
  1.2420 +	IMPORT_C RAnimDll();
  1.2421 +	IMPORT_C virtual ~RAnimDll();
  1.2422 +	IMPORT_C RAnimDll(RWsSession &aWs);
  1.2423 +	IMPORT_C TInt Load(const TDesC &aFileName);
  1.2424 +	IMPORT_C void Destroy();
  1.2425 +	IMPORT_C virtual void Close();
  1.2426 +private:
  1.2427 +	TInt CommandReply(TInt aHandle, TInt aOpcode, const TIpcArgs* aIpcArgs=NULL);
  1.2428 +	TInt CommandReply(TInt aHandle, TInt aOpcode, const TDesC8& aArgs, const TIpcArgs* aIpcArgs=NULL);
  1.2429 +	void Command(TInt aHandle, TInt aOpcode, const TPtrC8 &aArgs);
  1.2430 +	void Command(TInt aHandle, TInt aOpcode);
  1.2431 +	void AsyncCommandReply(TRequestStatus& aStatus, TInt aOpcode, TIpcArgs& aIpcArgs);
  1.2432 +	TInt CreateInstance(TInt32& aHandle, const MWsClientClass &aDevice, TInt aType, const TDesC8 &aArgs, TInt aOpcode, const TIpcArgs* aIpcArgs);
  1.2433 +	void DestroyInstance(TInt aHandle);
  1.2434 +private:
  1.2435 +	friend class RAnim;
  1.2436 +	};
  1.2437 +
  1.2438 +
  1.2439 +class RAnim
  1.2440 +/** Client-side handle to a server-side animation class.
  1.2441 +
  1.2442 +This class should be sub-classed to provide a client side interface to the
  1.2443 +server side animation DLL. The server side animation DLL is derived from CAnim.
  1.2444 +
  1.2445 +@publishedAll
  1.2446 +@released */
  1.2447 +	{
  1.2448 +public:
  1.2449 +	IMPORT_C virtual ~RAnim();
  1.2450 +	IMPORT_C virtual void Close();
  1.2451 +	IMPORT_C void Destroy();
  1.2452 +protected:
  1.2453 +	IMPORT_C RAnim();
  1.2454 +	IMPORT_C RAnim(RAnimDll &aDll);
  1.2455 +	IMPORT_C TInt Construct(const RWindowBase &aDevice, TInt aType, const TDesC8 &aParams);
  1.2456 +	IMPORT_C TInt Construct(const RWindowBase &aDevice, TInt aType, const TDesC8 &aParams, const TIpcArgs& aIpcArgs);
  1.2457 +	IMPORT_C TInt Construct(const RWsSprite &aDevice, TInt aType, const TDesC8 &aParams);
  1.2458 +	IMPORT_C TInt Construct(const RWsSprite &aDevice, TInt aType, const TDesC8 &aParams, const TIpcArgs& aIpcArgs);
  1.2459 +	IMPORT_C TInt CommandReply(TInt aOpcode);
  1.2460 +	IMPORT_C TInt CommandReply(TInt aOpcode, const TPtrC8 &aArgs);
  1.2461 +	IMPORT_C TInt CommandReply(TInt aOpcode, const TDesC8& aArgs, const TIpcArgs& aIpcArgs);
  1.2462 +	IMPORT_C void Command(TInt aOpcode, const TPtrC8 &aArgs);
  1.2463 +	IMPORT_C void Command(TInt aOpcode);
  1.2464 +	IMPORT_C void AsyncCommandReply(TRequestStatus& aRequestStatus,TInt aOpcode, const TIpcArgs& aIpcArgs);
  1.2465 +private:
  1.2466 +	TInt32 iHandle;
  1.2467 +	RAnimDll *iAnimDll;
  1.2468 +	};
  1.2469 +
  1.2470 +class CDsaMsgQueue;
  1.2471 +
  1.2472 +class RDirectScreenAccess : public MWsClientClass
  1.2473 +/** The interface between an application that directly accesses the screen and
  1.2474 +the window server.
  1.2475 +
  1.2476 +Note that most applications that need to access the screen directly should
  1.2477 +use CDirectScreenAccess instead. RDirectScreenAccess only needs to be used
  1.2478 +directly by applications without access to an active scheduler.
  1.2479 +
  1.2480 +@publishedAll
  1.2481 +@released */
  1.2482 +	{
  1.2483 +public:
  1.2484 +	/** Provides the reason why direct screen access must terminate. This enum is used
  1.2485 +	in the MAbortDirectScreenAccess::AbortNow() and MDirectScreenAccess::Restart()
  1.2486 +	functions.
  1.2487 +
  1.2488 +	The first value (ETerminateCancel) indicates that direct screen access is
  1.2489 +	being terminated by the application. The final three values indicate that
  1.2490 +	direct screen access is being terminated by the window server. Note that
  1.2491 +	for users of CDirectScreenAccess, the termination code is not important
  1.2492 +	because these issues are dealt with by CDirectScreenAccess::StartL(). */
  1.2493 +	enum TTerminationReasons
  1.2494 +		{
  1.2495 +		/** The application has finished direct screen access. */
  1.2496 +		ETerminateCancel,
  1.2497 +		/** A window is about to come in front of a part of the area that is being used
  1.2498 +		for direct screen access. */
  1.2499 +		ETerminateRegion,
  1.2500 +		/** The screen's color depth (as enumerated by TDisplayMode) is about to change. */
  1.2501 +		ETerminateScreenMode,
  1.2502 +		/** The current screen mode (the combination of screen rotation and screen size)
  1.2503 +		is about to change. */
  1.2504 +		ETerminateRotation,
  1.2505 +		};
  1.2506 +	/** The priority of the active object that responds to notification that direct
  1.2507 +	screen access must stop. */
  1.2508 +	enum TPriority
  1.2509 +		{
  1.2510 +		/** A suggested value for the priority of the active object that responds to notification
  1.2511 +		from the window server that direct screen access must stop. This is also the
  1.2512 +		value used by CDirectScreenAccess for this purpose. */
  1.2513 +		EPriorityVeryHigh=2000,
  1.2514 +		};
  1.2515 +public:
  1.2516 +	IMPORT_C RDirectScreenAccess();
  1.2517 +	IMPORT_C RDirectScreenAccess(RWsSession& aWs);
  1.2518 +	IMPORT_C TInt Construct();
  1.2519 +	IMPORT_C TInt Construct(TBool aRegionTrackingOnly);
  1.2520 +	IMPORT_C TInt Request(RRegion*& aRegion,TRequestStatus& aStatus,const RWindowBase& aWindow);
  1.2521 +	IMPORT_C void Completed();
  1.2522 +	IMPORT_C void Cancel();
  1.2523 +	IMPORT_C void Close();
  1.2524 +private:
  1.2525 +	RWsSession* iWs;
  1.2526 +	CDsaMsgQueue* iMsgQueue;
  1.2527 +	// To maintain BC we need the following
  1.2528 +	RThread iWsThread;
  1.2529 +	TRequestStatus* iDummyRequest;
  1.2530 +	};
  1.2531 +
  1.2532 +
  1.2533 +class MAbortDirectScreenAccess
  1.2534 +/** The interface for terminating direct screen access.
  1.2535 +
  1.2536 +An object of a class which implements this interface should be passed to CDirectScreenAccess::NewL().
  1.2537 +
  1.2538 +@publishedAll
  1.2539 +@released
  1.2540 +@see MDirectScreenAccess */
  1.2541 +	{
  1.2542 +public:
  1.2543 +	/** This function is called by the window server when direct screen access must
  1.2544 +	stop (for example because a dialogue is moved in front of the area where direct
  1.2545 +	screen access is taking place).
  1.2546 +
  1.2547 +	In response to this, direct screen access must stop immediately. In simple cases,
  1.2548 +	this will involve cancelling the active object that is driving the drawing to the
  1.2549 +	screen.
  1.2550 +
  1.2551 +	No attempt to call a Window Server API function can be made from
  1.2552 +	AbortNow(), because then a temporary deadlock will occur. This is because WSERV
  1.2553 +	is waiting to receive the client's acknowledgment that it has aborted, and so will
  1.2554 +	not be able to service the call. As soon as the restriction no longer applies,
  1.2555 +	the function Restart() will be called.
  1.2556 +
  1.2557 +	@param aReason The reason why direct screen access was terminated. */
  1.2558 +	virtual void AbortNow(RDirectScreenAccess::TTerminationReasons aReason)=0;
  1.2559 +	};
  1.2560 +
  1.2561 +
  1.2562 +class MDirectScreenAccess : public MAbortDirectScreenAccess
  1.2563 +/** The interface for restarting direct screen access.
  1.2564 +
  1.2565 +The Restart() function is called by the window server as soon as direct screen
  1.2566 +access can resume. It is called after the window server has called AbortNow().
  1.2567 +
  1.2568 +An object of the derived class is passed to CDirectScreenAccess::NewL().
  1.2569 +
  1.2570 +@publishedAll
  1.2571 +@released
  1.2572 +@see CDirectScreenAccess::NewL() */
  1.2573 +	{
  1.2574 +public:
  1.2575 +	/** This function is called by the window server as soon as direct screen access
  1.2576 +	can resume.
  1.2577 +
  1.2578 +	This function should call CDirectScreenAccess::StartL() within a trap harness.
  1.2579 +	If this leaves, e.g. through lack of memory, direct screen access cannot be
  1.2580 +	restarted. StartL() re-calculates the clipping region, so that if direct screen
  1.2581 +	access was aborted because another window appeared in front of it, that window
  1.2582 +	will not be overwritten when direct screen access resumes.
  1.2583 +
  1.2584 +	In this function, you can resume calls to Window Server Client Side API functions.
  1.2585 +
  1.2586 +	@param aReason Provides the reason why direct screen access was terminated. */
  1.2587 +	virtual void Restart(RDirectScreenAccess::TTerminationReasons aReason)=0;
  1.2588 +	};
  1.2589 +
  1.2590 +
  1.2591 +class CDirectScreenAccess : public CActive
  1.2592 +/** An active object used to start direct screen access.
  1.2593 +
  1.2594 +Direct screen access is a way of drawing to the screen without using the window
  1.2595 +server. As this avoids client-server communication, it is much faster, and
  1.2596 +may be useful for games and video. Note that some interaction with the window
  1.2597 +server is needed in order to prevent the application from drawing over other
  1.2598 +application's data.
  1.2599 +
  1.2600 +The object's (private) RunL() function is called by the window server in order
  1.2601 +to abort direct screen access. This might occur when another window needs
  1.2602 +to be displayed in front or when the window with direct screen access is moved.
  1.2603 +The active object's priority is RDirectScreenAccess::EPriorityVeryHigh so
  1.2604 +that direct screen access will be aborted as quickly as possible.
  1.2605 +
  1.2606 +@publishedAll
  1.2607 +@released */
  1.2608 +	{
  1.2609 +public:
  1.2610 +	IMPORT_C static CDirectScreenAccess* NewL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWin,MDirectScreenAccess& aAbort);
  1.2611 +	IMPORT_C static CDirectScreenAccess* NewL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWin,MDirectScreenAccess& aAbort,TBool aRegionTrackingOnly);
  1.2612 +	~CDirectScreenAccess();
  1.2613 +	IMPORT_C void StartL();
  1.2614 +	inline CFbsBitGc* Gc();
  1.2615 +	inline CFbsScreenDevice*& ScreenDevice();
  1.2616 +	inline RRegion* DrawingRegion();
  1.2617 +private:
  1.2618 +	enum TFlags
  1.2619 +		{
  1.2620 +		EDirectCheckModeChange		=	0x01,
  1.2621 +		EDirectCheckSizeModeChange	=	0x02,
  1.2622 +		EDirectRegionTrackingOnly	=	0x04,
  1.2623 +		};
  1.2624 +private:
  1.2625 +	inline CDirectScreenAccess(RWsSession& aWs,CWsScreenDevice* aScreenDevice,RWindowBase& aWindow,MDirectScreenAccess& aAbort);
  1.2626 +	void ConstructL(RWsSession& aWs,TBool aRegionTrackingOnly);
  1.2627 +	void CreateScreenObjectsL(TDisplayMode aCurrentMode);
  1.2628 +	void UpdateSizeAndRotation(CFbsBitGc* aGc);
  1.2629 +	static TInt Restart(TAny* aDirect);
  1.2630 +	void Restart();
  1.2631 +	//Pure virtual functions from CActive
  1.2632 +	void DoCancel();
  1.2633 +	void RunL();
  1.2634 +private:
  1.2635 +	CFbsBitGc* iGc;
  1.2636 +	CFbsScreenDevice* iScreenDevice;
  1.2637 +	RRegion* iDrawingRegion;
  1.2638 +	RWindowBase& iWindow;
  1.2639 +	CWsScreenDevice* iWsScreenDevice;
  1.2640 +	MDirectScreenAccess& iAbort;
  1.2641 +	RDirectScreenAccess iDirectAccess;
  1.2642 +	RDirectScreenAccess::TTerminationReasons iReason;
  1.2643 +	CIdle* iRestart;
  1.2644 +	TSize iScreenSize;
  1.2645 +	TBool iAborting;
  1.2646 +	TUint iFlags;
  1.2647 +	TInt iScreenNumber;
  1.2648 +	};
  1.2649 +
  1.2650 +
  1.2651 +class RSoundPlugIn : public MWsClientClass
  1.2652 +/** Client interface to the key or pointer click plug-in DLL.
  1.2653 +
  1.2654 +The plug-in DLL implements the CClickMaker class.
  1.2655 +
  1.2656 +@publishedAll
  1.2657 +@released
  1.2658 +@see CClickMaker */
  1.2659 +	{
  1.2660 +public:
  1.2661 +	/** A possible return value for CommandReply(). */
  1.2662 +	enum
  1.2663 +		{
  1.2664 +		/** The value returned by CommandReply() if no plug-in is loaded,
  1.2665 +		or if the plug-in identified by the aUid parameter in Construct() is not loaded.
  1.2666 +		Its value is set to KMinTInt so that it should not clash with any other expected
  1.2667 +		return value from this function. */
  1.2668 +		ESoundWrongPlugIn=KMinTInt
  1.2669 +		};
  1.2670 +public:
  1.2671 +	IMPORT_C RSoundPlugIn();
  1.2672 +	IMPORT_C RSoundPlugIn(RWsSession &aWs);
  1.2673 +	IMPORT_C TInt Construct(TUid aUid=KNullUid);
  1.2674 +	IMPORT_C void Close();
  1.2675 +	IMPORT_C void Destroy();
  1.2676 +	IMPORT_C TBool IsLoaded(TBool& aIsChangeable) const;
  1.2677 +	IMPORT_C TInt Unload();
  1.2678 +	IMPORT_C TInt Load(const TDesC &aFileName);
  1.2679 +	IMPORT_C void SetKeyClick(TBool aEnabled);
  1.2680 +	IMPORT_C void SetPenClick(TBool aEnabled);
  1.2681 +	IMPORT_C TBool KeyClickEnabled() const;
  1.2682 +	IMPORT_C TBool PenClickEnabled() const;
  1.2683 +	IMPORT_C TInt CommandReply(TInt aOpcode, const TPtrC8 &aArgs);
  1.2684 +	};
  1.2685 +
  1.2686 +inline TInt MWsClientClass::WsHandle() const
  1.2687 +	/** Gets the server side handle for the object.
  1.2688 +
  1.2689 +	@return The server-side handle for the object. */
  1.2690 +	{return(iWsHandle);}
  1.2691 +
  1.2692 +inline const TAny* CWsScreenDevice::GetInterface(TUint aInterfaceId) const
  1.2693 +	{
  1.2694 +	return const_cast<CWsScreenDevice*>(this)->GetInterface(aInterfaceId);
  1.2695 +	}
  1.2696 +
  1.2697 +inline TInt CWsScreenDevice::CreateContext(CWindowGc *&aGc)
  1.2698 +	/** Creates a graphics context for this device.
  1.2699 +
  1.2700 +	This function always causes a flush of the window server buffer.
  1.2701 +
  1.2702 +	@param aGc On successful return, contains a new graphics context referring
  1.2703 +	to this screen device.
  1.2704 +	@return KErrNone if successful, otherwise one of the system-wide error codes.
  1.2705 +	@see CGraphicsDevice::CreateContext() */
  1.2706 +	{return(CreateContext((CGraphicsContext *&)aGc));}
  1.2707 +
  1.2708 +inline TUint TWsRedrawEvent::Handle() const
  1.2709 +	/** Gets the handle of the window which is the target of the redraw event.
  1.2710 +
  1.2711 +	This is the handle that was passed to the window's Construct() function: typically
  1.2712 +	it will be a pointer to the object owning the window, providing access to
  1.2713 +	its member functions.
  1.2714 +
  1.2715 +	@return The window's handle. */
  1.2716 +	{return(iHandle);}
  1.2717 +
  1.2718 +inline TRect TWsRedrawEvent::Rect() const
  1.2719 +	/** Gets the rectangle to redraw.
  1.2720 +
  1.2721 +	@return The rectangle that needs redrawing. Co-ordinates are relative to
  1.2722 +	the window whose handle is given by Handle(). */
  1.2723 +	{return(iRect);}
  1.2724 +
  1.2725 +inline TWsEvent::TWsEvent()
  1.2726 +	/** Constructor.  Zero Initialise Data
  1.2727 +	@publishedAll
  1.2728 +	@released */
  1.2729 +	{
  1.2730 +	iType=0;
  1.2731 +	iHandle=0;
  1.2732 +	iTime=0;
  1.2733 +	Mem::FillZ(iEventData,EWsEventDataSize);
  1.2734 +	}
  1.2735 +
  1.2736 +inline TAdvancedPointerEvent* TWsEvent::Pointer() const
  1.2737 +	/** Gets the pointer event.
  1.2738 +	
  1.2739 +	This method can be used to get information about the pointer event if Type()
  1.2740 +	returns an event of type EEventPointer or EEventDragDrop.
  1.2741 +	
  1.2742 +	If the event has been received by the window without advanced pointer events enabled,
  1.2743 +	this method will return a pointer to TPointerEvent with additional fields of
  1.2744 +	TAdvancedPointerEvent being cleared to 0.
  1.2745 +	
  1.2746 +	@return Structure containing advanced pointer event data.
  1.2747 +	@see TPointerEvent::AdvancedPointerEvent()
  1.2748 +	@see RWindowBase::EnableAdvancedPointers() */
  1.2749 +	{return((TAdvancedPointerEvent *)&iEventData);}
  1.2750 +
  1.2751 +inline TInt TAdvancedPointerEvent::PointerNumber() const
  1.2752 +/** Gets the pointer number of the pointer whose state change is described by this event.
  1.2753 +
  1.2754 +  As soon as the pointer (for example a finger) is detected by the device's sensors,
  1.2755 +  it is assigned a pointer number. Then all events related to this pointer always
  1.2756 +  use the same pointer number. When the device loses track of the pointer,
  1.2757 +  TPointerEvent::EOutOfRange is sent with its pointer number and the number is released
  1.2758 +  - from this time it may be re-used to identify another pointer coming into range.  
  1.2759 +  
  1.2760 +  On a particular device, the pointer number is always an integer in the range 0 to 
  1.2761 +  HALData::EPointerNumberOfPointers - 1. If the device doesn't provide value for
  1.2762 +  this attribute, it is assumed to be 1.
  1.2763 +  
  1.2764 +  Please note that in order to receive events from multiple pointers in a window, the method
  1.2765 +  RWindowBase::EnableAdvancedPointers() has to be called for this window's instance
  1.2766 +  before it is activated. Otherwise this window will only receive TPointerEvents from one
  1.2767 +  emulated pointer, which will always have pointer number 0.
  1.2768 +  
  1.2769 +  @return Pointer number of the pointer whose state change is described by this event.
  1.2770 +  @see RWindowBase::EnableAdvancedPointers()
  1.2771 +  @see HALData::EPointerNumberOfPointers */
  1.2772 +	{
  1.2773 +	return IsAdvancedPointerEvent() ? DoGetPointerNumber() : ENonAdvancedPointerPointerNumber;
  1.2774 +	}
  1.2775 +
  1.2776 +inline TInt TAdvancedPointerEvent::Proximity() const
  1.2777 +/** Gets the proximity of the pointer to the screen's surface.
  1.2778 +  Proximity units may vary between devices and may be non-linear.
  1.2779 +  Returned value will be a negative integer as the maximum supported proximity
  1.2780 +  range in Symbian OS is from KMinTInt to 0, where KMinTInt means the highest
  1.2781 +  proximity that Symbian OS can support and 0 means touching the screen. 
  1.2782 +  HALData attributes provide more information about proximity support on particular 
  1.2783 +  device.
  1.2784 +  
  1.2785 +  On platforms without pointer proximity support, proximity is always assumed to be 0.
  1.2786 +  
  1.2787 +  @return Proximity of the pointer to the screen's surface.
  1.2788 +  @see TAdvancedPointerEvent::Position3D()
  1.2789 +  @see TAdvancedPointerEvent::ProximityAndPressure()
  1.2790 +  @see HALData::EPointer3DMaxProximity
  1.2791 +  @see HALData::EPointer3DProximityStep */
  1.2792 +	{
  1.2793 +	return IsAdvancedPointerEvent() ? DoGetProximity() : ENonAdvancedPointerZCoordinate;
  1.2794 +	}
  1.2795 +
  1.2796 +inline TInt TAdvancedPointerEvent::Pressure() const
  1.2797 +/** Gets the pressure applied by the pointer to the screen. 
  1.2798 +  Pressure units may vary between devices and may be non-linear.
  1.2799 +  Returned value will be a positive integer as the maximum supported pressure range
  1.2800 +  in Symbian OS is from 0 to KMaxTInt. HALData attributes provide more information
  1.2801 +  about pressure support on particular device.
  1.2802 +  
  1.2803 +  On platforms without pointer pressure support, pressure is always assumed to be 0.
  1.2804 +  
  1.2805 +  @return Pressure applied by the pointer to the screen.
  1.2806 +  @see TAdvancedPointerEvent::Pressure3D()
  1.2807 +  @see TAdvancedPointerEvent::ProximityAndPressure()
  1.2808 +  @see HALData::EPointer3DMaxPressure
  1.2809 +  @see HALData::EPointer3DPressureStep */
  1.2810 +	{
  1.2811 +	return IsAdvancedPointerEvent() ? DoGetPressure() : ENonAdvancedPointerZCoordinate;
  1.2812 +	}
  1.2813 +
  1.2814 +inline TInt TAdvancedPointerEvent::ProximityAndPressure() const
  1.2815 +/** Gets pressure applied by the pointer to the screen and proximity of the pointer
  1.2816 +  to the screen as one value. This is possible because the pointer is never in proximity
  1.2817 +  to the screen and pressing the screen at the same time.
  1.2818 +  
  1.2819 +  @return The value of proximity if the pointer is in proximity to the screen; proximity
  1.2820 +          is always represented as negative TInt. The value of pressure if the pointer
  1.2821 +          is touching the screen; pressure is always represented as positive TInt.
  1.2822 +  @see TAdvancedPointerEvent::Proximity()
  1.2823 +  @see TAdvancedPointerEvent::Pressure()
  1.2824 +  @see TAdvancedPointerEvent::PositionAndPressure3D() */
  1.2825 +	{return IsAdvancedPointerEvent() ? DoGetProximityAndPressure() : ENonAdvancedPointerZCoordinate;}
  1.2826 +
  1.2827 +inline TPoint3D TAdvancedPointerEvent::PositionAndPressure3D() const
  1.2828 +/**
  1.2829 +  @return Pointer's X and Y coordinates plus combined proximity and pressure as
  1.2830 +          Z coordinate. 
  1.2831 +  @see TAdvancedPointerEvent::ProximityAndPressure() */
  1.2832 +	{
  1.2833 +	TPoint3D point3D;
  1.2834 +	point3D.iX=iPosition.iX;
  1.2835 +	point3D.iY=iPosition.iY;
  1.2836 +	point3D.iZ=ProximityAndPressure();
  1.2837 +	return point3D;
  1.2838 +	}
  1.2839 +
  1.2840 +inline TPoint3D TAdvancedPointerEvent::Position3D() const
  1.2841 +/**
  1.2842 +  @return Pointer's X and Y coordinates plus pointer's proximity to the screen as
  1.2843 +          Z coordinate. Please note that returned Z coordinate will be always negative or 0.
  1.2844 +  @see TAdvancedPointerEvent::Proximity() */
  1.2845 +	{
  1.2846 +	TPoint3D point3D;
  1.2847 +	point3D.iX=iPosition.iX;
  1.2848 +	point3D.iY=iPosition.iY;
  1.2849 +	point3D.iZ=IsAdvancedPointerEvent() ? DoGetProximity() : ENonAdvancedPointerZCoordinate;
  1.2850 +	return point3D;
  1.2851 +	}
  1.2852 +
  1.2853 +inline TPoint3D TAdvancedPointerEvent::Pressure3D() const
  1.2854 +/**  
  1.2855 +  @return Pointer's X and Y coordinates plus pressure applied by the pointer to the screen
  1.2856 +          as Z coordinate. 
  1.2857 +  @see TAdvancedPointerEvent::Pressure() */
  1.2858 +	{
  1.2859 +	TPoint3D point3D;
  1.2860 +	point3D.iX=iPosition.iX;
  1.2861 +	point3D.iY=iPosition.iY;
  1.2862 +	point3D.iZ=IsAdvancedPointerEvent() ? DoGetPressure() : ENonAdvancedPointerZCoordinate;
  1.2863 +	return point3D;
  1.2864 +	}
  1.2865 +
  1.2866 +inline TKeyEvent *TWsEvent::Key() const
  1.2867 +	/** Gets the key event.
  1.2868 +
  1.2869 +	This function can be used to get information about the key event if Type()
  1.2870 +	returns an event of type EEventKey, EEventKeyUp or EEventKeyDown.
  1.2871 +
  1.2872 +	@return Structure containing key event data */
  1.2873 +	{return((TKeyEvent *)&iEventData);}
  1.2874 +
  1.2875 +inline TWsVisibilityChangedEvent* TWsEvent::VisibilityChanged()
  1.2876 +	/** Gets information about the visibility changed event.
  1.2877 +
  1.2878 +	This function can be used to get information about the visibility changed event
  1.2879 +	if Type() returns an event of type EEventWindowVisibilityChanged.
  1.2880 +
  1.2881 +	@return Structure containing visibility changed event data */
  1.2882 +	{ return reinterpret_cast<TWsVisibilityChangedEvent*>(iEventData); }
  1.2883 +
  1.2884 +inline const TWsVisibilityChangedEvent* TWsEvent::VisibilityChanged() const
  1.2885 +	/** Gets information about the visibility changed event.
  1.2886 +
  1.2887 +	This function can be used to get information about the visibility changed event
  1.2888 +	if Type() returns an event of type EEventWindowVisibilityChanged.
  1.2889 +
  1.2890 +	@return Structure containing visibility changed event data */
  1.2891 +	{ return reinterpret_cast<const TWsVisibilityChangedEvent*>(iEventData); }
  1.2892 +
  1.2893 +inline TWsDisplayChangedEvent* TWsEvent::DisplayChanged()
  1.2894 +	/** Gets information about the display changed event.
  1.2895 +
  1.2896 +	This function can be used to get information about the display changed event
  1.2897 +	if Type() returns an event of type EEventDisplayChanged.
  1.2898 +
  1.2899 +	@return Structure containing display changed event data */
  1.2900 +	{ return reinterpret_cast<TWsDisplayChangedEvent*>(iEventData); }
  1.2901 +
  1.2902 +inline const TWsDisplayChangedEvent* TWsEvent::DisplayChanged() const
  1.2903 +	/** Gets information about the display changed event.
  1.2904 +
  1.2905 +	This function can be used to get information about the display changed event
  1.2906 +	if Type() returns an event of type EEventDisplayChanged.
  1.2907 +
  1.2908 +	@return Structure containing display changed event data */
  1.2909 +	{ return reinterpret_cast<const TWsDisplayChangedEvent*>(iEventData); }
  1.2910 +
  1.2911 +inline TModifiersChangedEvent *TWsEvent::ModifiersChanged() const
  1.2912 +	/** Gets information about the modifier changed event.
  1.2913 +
  1.2914 +	This function can be used to get information about the modifier changed event
  1.2915 +	if Type() returns an event of type EEventModifiersChanged.
  1.2916 +
  1.2917 +	@return Structure containing modifier changed event data */
  1.2918 +	{return((TModifiersChangedEvent *)&iEventData);}
  1.2919 +
  1.2920 +inline TWsErrorMessage *TWsEvent::ErrorMessage() const
  1.2921 +	/** Gets an error event.
  1.2922 +
  1.2923 +	This function can be used to get information about the error event if Type()
  1.2924 +	returns an event of type EEventErrorMessage.
  1.2925 +
  1.2926 +	@return The error event. */
  1.2927 +	{return((TWsErrorMessage *)&iEventData);}
  1.2928 +
  1.2929 +inline TUint8 *TWsEvent::EventData() const
  1.2930 +	/** Gets information about the event.
  1.2931 +
  1.2932 +	This function gives you direct access to the event data as a whole. The event
  1.2933 +	can be a key or pointer event or it could be a new special event that only
  1.2934 +	you and another application know about. You are limited to EWsEventDataSize
  1.2935 +	bytes worth of data.
  1.2936 +
  1.2937 +	@return A pointer to the event data. */
  1.2938 +	{return((TUint8 *)&iEventData);}
  1.2939 +
  1.2940 +inline TInt TWsEvent::Type() const
  1.2941 +	/** Gets the type of event that occurred.
  1.2942 +
  1.2943 +	@return The event type. Event types are defined in TEventCode. */
  1.2944 +	{return(iType);}
  1.2945 +
  1.2946 +inline TUint TWsEvent::Handle() const
  1.2947 +	/** Gets the window handle.
  1.2948 +
  1.2949 +	This is the handle that was passed to the window's Construct() function: typically
  1.2950 +	it will be a pointer to the client-side object owning the window, providing
  1.2951 +	access to its member functions.
  1.2952 +
  1.2953 +	@return The window handle. */
  1.2954 +	{return(iHandle);}
  1.2955 +
  1.2956 +inline TTime TWsEvent::Time() const
  1.2957 +	/** Gets the time when the event occurred.
  1.2958 +
  1.2959 +	@return The time when the event occurred. */
  1.2960 +	{return(iTime);}
  1.2961 +
  1.2962 +inline void TWsEvent::SetType(TInt aType)
  1.2963 +	/** Sets the event type.
  1.2964 +
  1.2965 +	@param aType The event type. Event types are defined in TEventCode. */
  1.2966 +	{iType=aType;}
  1.2967 +
  1.2968 +inline void TWsEvent::SetHandle(TUint aHandle)
  1.2969 +	/** Sets the event handle.
  1.2970 +
  1.2971 +	This is the client handle of the window that is being sent the event.
  1.2972 +
  1.2973 +	@param aHandle The event handle. */
  1.2974 +	{iHandle=aHandle;}
  1.2975 +
  1.2976 +inline void TWsEvent::SetTimeNow()
  1.2977 +	/** Sets the event time to the current time. */
  1.2978 +	{iTime.UniversalTime();}
  1.2979 +
  1.2980 +inline TInt *TWsEvent::Int() const
  1.2981 +	/** Gets the event data as a TInt.
  1.2982 +	 
  1.2983 +	 For TWsEvents of type EEventPointerEnter and EEventPointerExit this is the pointer number
  1.2984 +	 of the pointer that entered/exited the window. Please note that on platforms that 
  1.2985 +	 use the older Symbian OS, without multipointer support, pointer number is not initialized 
  1.2986 +	 for EEventPointerEnter and EEventPointerExit and thus it is random.
  1.2987 +	 
  1.2988 +	 If the value of the attribute returned from HALData::EPointerNumberOfPointers is greater than 1,
  1.2989 +	 then the system has multipointer support. 
  1.2990 +	 
  1.2991 +	 @see HALData::EPointerNumberOfPointers
  1.2992 +	 @see HAL::Get(TAttribute,TInt&)
  1.2993 +	*/
  1.2994 +	{ return (TInt*)&iEventData; }
  1.2995 +
  1.2996 +inline TUint TWsPriorityKeyEvent::Handle() const
  1.2997 +	/** Gets the handle for the window group which added the priority key.
  1.2998 +
  1.2999 +	This is the handle that was passed to the window group's Construct() function.
  1.3000 +	Since most applications have only one window group, however, this function
  1.3001 +	is rarely used.
  1.3002 +
  1.3003 +	@return The window group handle. */
  1.3004 +	{return(iHandle);}
  1.3005 +
  1.3006 +inline TKeyEvent *TWsPriorityKeyEvent::Key() const
  1.3007 +	/** Gets the priority key event.
  1.3008 +
  1.3009 +	@return Structure containing priority key event data */
  1.3010 +	{return((TKeyEvent *)&iEventData);}
  1.3011 +
  1.3012 +inline void TWsPriorityKeyEvent::SetHandle(TUint aHandle)
  1.3013 +	/** Sets the window group event handle.
  1.3014 +
  1.3015 +	This is the client handle of the window that is being sent the event.
  1.3016 +
  1.3017 +	@param aHandle The event handle. */
  1.3018 +	{iHandle=aHandle;}
  1.3019 +
  1.3020 +inline CDirectScreenAccess::CDirectScreenAccess(RWsSession& aWs,CWsScreenDevice* aScreenDevice,RWindowBase& aWindow,MDirectScreenAccess& aAbort)
  1.3021 +		:CActive(RDirectScreenAccess::EPriorityVeryHigh), iWindow(aWindow), iAbort(aAbort), iDirectAccess(aWs)
  1.3022 +		{iWsScreenDevice=aScreenDevice;}
  1.3023 +
  1.3024 +inline CFbsBitGc* CDirectScreenAccess::Gc()
  1.3025 +	/** Gets the graphics context for drawing to the screen.
  1.3026 +
  1.3027 +	This is set up by calling StartL(). Its origin is set so that you should use
  1.3028 +	window coordinates to specify which part of the screen to draw to and its
  1.3029 +	clipping region is set to the visible part of the window.
  1.3030 +
  1.3031 +	Code built to run on the Emulator must call CFbsScreenDevice::Update() in
  1.3032 +	order to see the results of drawing to this graphics context, but this may
  1.3033 +	not be required on all target hardware.
  1.3034 +
  1.3035 +	@return The graphics context for drawing to the screen. */
  1.3036 +	{ return iGc; }
  1.3037 +
  1.3038 +inline CFbsScreenDevice*& CDirectScreenAccess::ScreenDevice()
  1.3039 +	/** Gets the screen device to draw to.
  1.3040 +
  1.3041 +	You should not use this screen device to create fonts because the object is
  1.3042 +	deleted and recreated when direct screen access is aborted and restarted.
  1.3043 +	Instead, create and use your own CFbsScreenDevice object to create fonts.
  1.3044 +
  1.3045 +	@return The target screen device. */
  1.3046 +	{ return iScreenDevice; }
  1.3047 +
  1.3048 +inline RRegion* CDirectScreenAccess::DrawingRegion()
  1.3049 +	/** Gets the clipping region to draw to.
  1.3050 +
  1.3051 +	You must not draw outside of this region.
  1.3052 +
  1.3053 +	The clipping region is calculated when StartL() is called, and is only updated
  1.3054 +	if StartL() is called again.
  1.3055 +
  1.3056 +	The region is specified in screen coordinates. This can be useful if you need
  1.3057 +	to reapply the clipping region to the graphics context (CFbsBitGc::SetClippingRegion()).
  1.3058 +
  1.3059 +	@return The clipping region to draw to. */
  1.3060 +	{ return iDrawingRegion; }
  1.3061 +
  1.3062 +#endif //__W32STD_H__