Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <W32STD.H>

Class RWsSession

class RWsSession : public MWsClientClass, public RSessionBase;

Description

Window server session.

The session between the client and the window server can be used to mediate asynchronous events, for client interface control and for system control. A description of each of these capabilities is given below.

Mediating asynchronous events:

Primarily, the session mediates asynchronous events to the user. Three event streams are available: the standard event stream which all applications must use; the redraw event stream which must be used by all applications except those which exclusively use backed-up windows; and the priority key event stream which may be used for abort keys and the like for specialist applications.

All these events are mediated as standard asynchronous services. Typical window server client programs encapsulate each service they require in an active object whose RunL() identifies the event and calls the appropriate member function of a class associated with an application framework, or a window.

Client interface control:

The client's interface with the window server has several aspects, each of which is controlled through the window server session.

Flushing defines how requests to the window server are handled.

System control:

Many system-wide settings may be controlled through the window server session. Typically, these functions are only used by the system shell and its associated sessions/applications. They include: auto-repeat and double-click, querying all window groups in the system, setting the default shadow vector, setting the system pointer cursors, counting resources used by the window server (this is only useful for debugging checks), getting and setting the state of the modifier keys (for instance Shift and Ctrl), and setting the window server background colour.

Derivation

Members

Defined in RWsSession:

Inherited from MWsClientClass:

Inherited from RHandleBase:

Inherited from RSessionBase:


Construction and destruction


RWsSession()

IMPORT_C RWsSession();

Description

Default C++ constructor.

Constructs an uninitialised window server session. Note that it does not establish a connection to the window server - this must be done explicitly by calling the session's RWsSession::Connect() function. Before RWsSession::Connect() is called, no corresponding session object exists in the server, and the RWsSession contains no meaningful handle.

[Top]


Member functions


Connect()

IMPORT_C TInt Connect();

Description

Connects the client session to the window server.

RWsSession::Connect() should be the first function called on an RWsSession object after it is created. The function establishes a connection to the window server, creating a corresponding session object in the server. Each session has one and only one connection to the server. Attempting to call RWsSession::Connect() when a connection has already been made will cause a panic.

After a connection has been successfully established, all events are delivered to the client application through the RWsSession object.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Connect(RFs &)

IMPORT_C TInt Connect(RFs &aFileServer);

Description

Connects the client session to the window server using pre constructed file server session.

RWsSession::Connect() should be the first function called on an RWsSession object after it is created. The function establishes a connection to the window server, creating a corresponding session object in the server. Each session has one and only one connection to the server. Attempting to call RWsSession::Connect() when a connection has already been made will cause a panic.

After a connection has been successfully established, all events are delivered to the client application through the RWsSession object.

Parameters

RFs &aFileServer

A fully constructed file server session

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Close()

IMPORT_C void Close();

Description

Closes the window server session.

This function cleans up all resources in the RWsSession and disconnects it from the server. Prior to disconnecting from the window server, the client-side window server buffer is destroyed without being flushed. This function should be called when the RWsSession is no longer needed - normally just before it is destroyed.


Version()

IMPORT_C TVersion Version();

Description

Gets the window server version.

Return value

TVersion

Window server version containing major and minor version numbers, and build number.


SetHotKey(THotKey,TUint,TUint,TUint)

Capability: SwEvent

IMPORT_C TInt SetHotKey(THotKey aType, TUint aKeyCode, TUint aModifierMask, TUint aModifier);

Description

Sets the hot keys.

Hot keys allow standard functions to be performed by application-defined key combinations.

This function maps any key press (with optional modifiers) to one of the hot keys defined in THotKey. More than one key combination may be mapped to each hot key: a new mapping is added each time the function is called.

Modifier key states are defined in TEventModifier. The modifiers that you want to be in a particular state should be specified in aModifierMask and the ones of these you want to be set should be specified in aModifiers. For example, if you want to capture FN-A and you want the SHIFT modifier unset, but you don't care about the state of the other modifiers then set both the flags for SHIFT and FN in aModiferMask and only set FN in aModifiers.

Note: default hotkey settings exist, but this function can be used for customisation. Typically it might be be used by a shell application or other application that controls system-wide settings.

This function always causes a flush of the window server buffer.

Parameters

THotKey aType

The hot key to be mapped

TUint aKeyCode

The keycode to be mapped to the hot key

TUint aModifierMask

Modifier keys to test for a match

TUint aModifier

Modifier keys to be tested for "on" state

Return value

TInt

KErrNone value if successful, otherwise another of the system-wide error codes.


ClearHotKeys(THotKey)

Capability: SwEvent

IMPORT_C TInt ClearHotKeys(THotKey aType);

Description

Clears all mappings for the specified hotkey, including the default mapping.

Hotkeys allow standard functions to be performed by application-defined key combinations.

This function always causes a flush of the window server buffer.

Parameters

THotKey aType

The hot key to be cleared

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.

See also:


RestoreDefaultHotKey(THotKey)

IMPORT_C TInt RestoreDefaultHotKey(THotKey aType);

Description

Restores the default mapping for a hot key.

The function clears current mappings for a hot key and restores the default mapping. See THotKey for the default.

This function always causes a flush of the window server buffer.

Parameters

THotKey aType

The hot key to restore to its default value

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also:


EventReady(TRequestStatus *)

IMPORT_C void EventReady(TRequestStatus *aStat);

Description

Requests standard events from the window server.

Standard events include all events except redraws and priority key events.

The client application will typically handle the completed request using the RunL() function of an active object, and in this case the request status aStat should be the iStatus member of that CActive object.

Notes:

The active object runs when an event is waiting. You should call RWsSession::GetEvent(TWsEvent &) in the RunL() function to get the event.

You should not call this function again until you've either called RWsSession::GetEvent(TWsEvent &) or RWsSession::EventReadyCancel().

Parameters

TRequestStatus *aStat

Request status. On successful completion contains KErrNone, otherwise another of the system-wide error codes.

See also:


EventReadyCancel()

IMPORT_C void EventReadyCancel();

Description

Cancels a request for standard events from the window server.

This request was made using RWsSession::EventReady(TRequestStatus *).

The client application will typically use an active object to handle standard events, and this function should be called from the active object's DoCancel() function.

This function always causes a flush of the window server buffer.

See also:


GetEvent(TWsEvent &)

IMPORT_C void GetEvent(TWsEvent &aEvent);

Description

Gets a standard event from the session for processing.

The type of event returned by RWsSession::GetEvent(TWsEvent &) may be any of those listed in TEventCode. To access the data within an event, the event should be converted to the appropriate type, using functions provided by the TWsEvent class. TWsEvent also provides a function to find out the type of the event.

Notes:

It is possible that the returned event is of type EEventNull. Clients should normally ignore these events.

This function should only be called in response to notification that an event has occurred, otherwise the client will be panicked.

This function would normally be called in the RunL() function of an active object which completes with the RWsSession::EventReady(TRequestStatus *) function's request status.

This function always causes a flush of the window server buffer.

Parameters

TWsEvent &aEvent

On return, contains the event that occurred

See also:


PurgePointerEvents()

IMPORT_C void PurgePointerEvents();

Description

Removes all pointer events waiting to be delivered to this session.

The events are removed from the event queue without being processed. This might occur, for example, at application startup.


RedrawReady(TRequestStatus *)

IMPORT_C void RedrawReady(TRequestStatus *aStat);

Description

Requests redraw events from the window server.

Typically, a client will create an active object for redraw events with a lower priority than the active objects for standard events. The client will then typically handle completed redraw requests in the active object's RunL() function.

As in RWsSession::EventReady(TRequestStatus *), the request status aStat should be used as the iStatus member of an active object. When a redraw event occurs the active object's RunL() function is called. The redraw event can be obtained by calling RWsSession::GetRedraw(TWsRedrawEvent &) in the RunL().

Note: you should not call this function again until you've either called RWsSession::GetRedraw(TWsRedrawEvent &) or RWsSession::RedrawReadyCancel().

Parameters

TRequestStatus *aStat

The request status. On successful completion contains KErrNone, otherwise another of the system-wide error codes.

See also:


RedrawReadyCancel()

IMPORT_C void RedrawReadyCancel();

Description

Cancels a redraw event request.

If active objects are used, this function should be called from the active object's DoCancel() function.

This function always causes a flush of the window server buffer.

See also:


GetRedraw(TWsRedrawEvent &)

IMPORT_C void GetRedraw(TWsRedrawEvent &aEvent);

Description

Gets the redraw event from the session.

This function is similar to RWsSession::GetEvent(TWsEvent &), except that the event is returned as a TWsRedrawEvent, and hence there is no need to convert it from a TWsEvent.

The function should only be called after notification that a redraw is waiting.

It always causes a flush of the window server buffer.

Parameters

TWsRedrawEvent &aEvent

On return, contains the redraw event that occurred

See also:


PriorityKeyReady(TRequestStatus *)

IMPORT_C void PriorityKeyReady(TRequestStatus *aStat);

Description

Requests priority key events from the window server.

Typically, an client will create an active object for priority key events with a higher priority than the active objects for standard events. The client will then normally handle completed priority key requests in the active object's RunL() function.

As in RWsSession::EventReady(TRequestStatus *), the request status argument should be the set to the iStatus member of CActive. When priority key events occur, they are obtained using RWsSession::GetPriorityKey(TWsPriorityKeyEvent &).

Note: you should not call this function again until you've either called RWsSession::GetPriorityKey(TWsPriorityKeyEvent &) or RWsSession::PriorityKeyReadyCancel().

Parameters

TRequestStatus *aStat

Request status. On successful completion contains KErrNone, otherwise another of the system-wide error codes.

See also:


PriorityKeyReadyCancel()

IMPORT_C void PriorityKeyReadyCancel();

Description

Cancels a priority key event request.

If active objects are used, this function should be called from the active object's DoCancel() function.

This function always causes a flush of the window server buffer.

See also:


GetPriorityKey(TWsPriorityKeyEvent &)

IMPORT_C void GetPriorityKey(TWsPriorityKeyEvent &aEvent);

Description

Gets the completed priority key event from the window server session.

Priority key events are typically used for providing "Abort" or "Escape" keys for an application.

This function is similar to RWsSession::GetEvent(TWsEvent &), except that it returns a TWsPriorityKeyEvent instead of a TWsEvent.

Note: this should only be called after notification that a priority key event has occurred.

This function always causes a flush of the window server buffer.

Parameters

TWsPriorityKeyEvent &aEvent

On return, contains the priority key event that occurred.

See also:


Flush()

IMPORT_C void Flush();

Description

Sends all pending commands in the buffer to the window server.

Delivering a command to the window server requires a context switch, and so it is more efficient to deliver several commands in one go. Hence all client commands are normally first placed into a buffer for delivery to the window server.

The buffer is delivered when it gets full, or when a command that returns a value is called (there are a few exceptions to this), or when this function is called.

Note: this function is called when a prompt response is required from the window server, e.g. after doing some drawing.

See also:


SetAutoFlush(TBool)

IMPORT_C TBool SetAutoFlush(TBool aState);

Description

Sets a session's auto-flush state.

If auto-flush is set to ETrue, the window server buffer is flushed immediately anything is put into it, instead of waiting until it becomes full. This setting is normally used only in a debugging environment.

If the auto-flush state is EFalse, the window server buffer is flushed normally.

Parameters

TBool aState

ETrue to set auto-flushing on, EFalse to disable auto-flushing.

Return value

TBool

Previous auto-flush state

See also:


SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &,const TTimeIntervalMicroSeconds32 &)

Capability: WriteDeviceData

IMPORT_C TInt SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime);

Description

Sets the system-wide keyboard repeat rate.

This is the rate at which keyboard events are generated when a key is held down.

The default settings for the keyboard repeat rate are 0.3 seconds for the initial delay, and 0.1 seconds for the interval between subsequent repeats. However, since the settings are system-wide, these will not necessarily be the current settings when an application is launched: the settings may have been over-ridden by another module.

This function always causes a flush of the window server buffer.

Parameters

const TTimeIntervalMicroSeconds32 &aInitialTime

Time before first repeat key event

const TTimeIntervalMicroSeconds32 &aTime

Time between subsequent repeat key events

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also:


GetKeyboardRepeatRate(TTimeIntervalMicroSeconds32 &,TTimeIntervalMicroSeconds32 &)

IMPORT_C void GetKeyboardRepeatRate(TTimeIntervalMicroSeconds32 &aInitialTime, TTimeIntervalMicroSeconds32 &aTime);

Description

Gets the current system-wide settings for the keyboard repeat rate.

This function always causes a flush of the window server buffer.

Parameters

TTimeIntervalMicroSeconds32 &aInitialTime

Time before first repeat key event

TTimeIntervalMicroSeconds32 &aTime

Time between subsequent repeat key events

See also:


GetDoubleClickSettings(TTimeIntervalMicroSeconds32 &,TInt &)

IMPORT_C void GetDoubleClickSettings(TTimeIntervalMicroSeconds32 &aInterval, TInt &aDistance);

Description

Gets the current system-wide settings for pointer double clicks.

Double click distances are measured in pixels as the sum of the X distance moved and the Y distance moved between clicks. For example: a first click at 10, 20 and a second click at 13,19 gives a distance of (13-10)+(21-20) = 4.

This function always causes a flush of the window server buffer.

Parameters

TTimeIntervalMicroSeconds32 &aInterval

Maximum interval between clicks that constitutes a double click

TInt &aDistance

Maximum distance between clicks that constitutes a double click

See also:


SetDoubleClick(const TTimeIntervalMicroSeconds32 &,TInt)

Capability: WriteDeviceData

IMPORT_C TInt SetDoubleClick(const TTimeIntervalMicroSeconds32 &aInterval, TInt aDistance);

Description

Sets the system-wide double click settings.

Double click distance is measured, in pixels, as the sum of the X distance moved and the Y distance moved between clicks. For example: a first click at 10, 20 and a second click at 13,19 gives a distance of (13-10)+(21-20) = 4.

This function always causes a flush of the window server buffer.

Parameters

const TTimeIntervalMicroSeconds32 &aInterval

Maximum interval between clicks that constitutes a double click

TInt aDistance

Maximum distance between clicks that constitutes a double click

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also:


NumWindowGroups()const

IMPORT_C TInt NumWindowGroups() const;

Description

Gets the total number of window groups currently running in the window server.

This includes all the groups running in all sessions.

This function always causes a flush of the window server buffer.

Return value

TInt

Total number of window groups running in the server


WindowGroupList(CArrayFixFlat< TInt > *)

IMPORT_C TInt WindowGroupList(CArrayFixFlat< TInt > *aWindowList);

Description

Gets a list of identifiers of all window groups in all window server sessions.

An array buffer must be created to store the resultant list.

This function always causes a flush of the window server buffer.

Parameters

CArrayFixFlat< TInt > *aWindowList

List of identifiers of all window groups in the server.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


WindowGroupList(RArray< TWindowGroupChainInfo > *)

IMPORT_C TInt WindowGroupList(RArray< TWindowGroupChainInfo > *aWindowList);

Description

Gets a list of identifier of window group and parent identifier of window group of all window groups in all window server sessions.

An array buffer must be created to store the resultant list.

This function always causes a flush of the window server buffer.

Parameters

RArray< RWsSession::TWindowGroupChainInfo > *aWindowList

List of identifiers of all window groups in the server.

Return value

TInt

KErrNone if successful otherwise KErrNoMemory if there is insufficient memory to create the array, Panics if aWindowList is NULL.


NumWindowGroups(TInt)const

IMPORT_C TInt NumWindowGroups(TInt aPriority) const;

Description

Gets the number of window groups of a given window group priority running in all sessions in the window server.

This function always causes a flush of the window server buffer.

Parameters

TInt aPriority

Window group priority

Return value

TInt

Number of window groups of priority aPriority


WindowGroupList(TInt,CArrayFixFlat< TInt > *)

IMPORT_C TInt WindowGroupList(TInt aPriority, CArrayFixFlat< TInt > *aWindowList);

Description

Lists the number of window groups of a given window group priority running in all window server sessions.

This function is the same as RWsSession::WindowGroupList(CArrayFixFlat< TInt > *) described above, but allows the application to restrict the list of window groups to those of a particular window group priority.

This function always causes a flush of the window server buffer.

Parameters

TInt aPriority

Window group priority

CArrayFixFlat< TInt > *aWindowList

List of identifiers of all window groups in the server of priority aPriority.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


WindowGroupList(TInt,RArray< TWindowGroupChainInfo > *)

IMPORT_C TInt WindowGroupList(TInt aPriority, RArray< TWindowGroupChainInfo > *aWindowList);

Description

Lists the number of window groups of a given window group priority running in all window server sessions.

This function is the same as RWsSession::WindowGroupList(CArrayFixFlat< TInt > *) described above, but allows the application to restrict the list of window groups to those of a particular window group priority.

This function always causes a flush of the window server buffer.

Parameters

TInt aPriority

Window group priority

RArray< RWsSession::TWindowGroupChainInfo > *aWindowList

List of identifiers of all window groups in the server of priority aPriority.

Return value

TInt

KErrNone if successful otherwise KErrNoMemory if there is insufficient memory to create the array, Panics if aWindowList is NULL.


GetFocusWindowGroup()

IMPORT_C TInt GetFocusWindowGroup();

Description

Gets the identifier of the window group that currently has the keyboard focus.

Note: this might not necessarily be the front-most window group, as window groups can disable keyboard focus.

This function always causes a flush of the window server buffer.

Return value

TInt

Identifier of window group with keyboard focus.


GetDefaultOwningWindow()

IMPORT_C TInt GetDefaultOwningWindow();

Description

Gets the identifier of the current default owning window group.

This function always causes a flush of the window server buffer.

Return value

TInt

Identifier of current default owning window group. Returns 0 if there isn't one.


SetWindowGroupOrdinalPosition(TInt,TInt)

IMPORT_C TInt SetWindowGroupOrdinalPosition(TInt aIdentifier, TInt aPosition);

Description

Sets the ordinal position of a window group.

This function allows the caller to change the ordinal position of an existing window group. It would typically be used by a shell application.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The window group.

TInt aPosition

Ordinal position for the window group.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


GetWindowGroupClientThreadId(TInt,TThreadId &)

IMPORT_C TInt GetWindowGroupClientThreadId(TInt aIdentifier, TThreadId &aThreadId);

Description

Gets the thread ID of the client that owns the window group specified by the window group identifier.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The window group identifier.

TThreadId &aThreadId

On return, contains the thread ID.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


GetWindowGroupHandle(TInt)

IMPORT_C TInt GetWindowGroupHandle(TInt aIdentifier);

Description

Gets the handle of the window specified by the window group identifier.

This is the handle that was passed as an argument to RWindowGroup::Construct(TUint32).

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The window group identifier.

Return value

TInt

Handle of the window group


GetWindowGroupOrdinalPriority(TInt)

IMPORT_C TInt GetWindowGroupOrdinalPriority(TInt aIdentifier);

Description

Gets a window group's priority.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The window group identifier.

Return value

TInt

The window group priority.


SendEventToWindowGroup(TInt,const TWsEvent &)

Interface status: deprecated
Capability: SwEvent Required when aEvent.Type() < EEventUser

IMPORT_C TInt SendEventToWindowGroup(TInt aIdentifier, const TWsEvent &aEvent);

Description

Sends an event to a window group.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

Window group identifier.

const TWsEvent &aEvent

Event to send to the window group.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SendEventToAllWindowGroups(const TWsEvent &)

Interface status: deprecated
Capability: SwEvent Required when aEvent.Type() < EEventUser

IMPORT_C TInt SendEventToAllWindowGroups(const TWsEvent &aEvent);

Description

Sends the specified event to all existing window groups.

This function always causes a flush of the window server buffer.

Parameters

const TWsEvent &aEvent

The event to be sent to all window groups.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SendEventToAllWindowGroups(TInt,const TWsEvent &)

Interface status: deprecated
Capability: SwEvent Required when aEvent.Type() < EEventUser

IMPORT_C TInt SendEventToAllWindowGroups(TInt aPriority, const TWsEvent &aEvent);

Description

Sends the specified event to all window groups with the specified priority.

This function always causes a flush of the window server buffer.

Parameters

TInt aPriority

The priority which window groups must have to be sent the message.

const TWsEvent &aEvent

The event to be sent to the specified window groups.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SendEventToOneWindowGroupsPerClient(const TWsEvent &)

Interface status: deprecated
Capability: SwEvent Required when aEvent.Type() < EEventUser

IMPORT_C TInt SendEventToOneWindowGroupsPerClient(const TWsEvent &aEvent);

Description

This function always causes a flush of the window server buffer.

Parameters

const TWsEvent &aEvent

Return value

TInt


GetWindowGroupNameFromIdentifier(TInt,TDes &)

IMPORT_C TInt GetWindowGroupNameFromIdentifier(TInt aIdentifier, TDes &aWindowName);

Description

Gets the name of a window group from its identifier.

Using the list of identifiers returned by RWsSession::WindowGroupList(CArrayFixFlat< TInt > *), it is possible to get the names of all window groups in the system. Note that window names are a zero length string by default.

Note that the window group name must have been previously set using RWindowGroup::SetName(const TDesC &) to contain a meaningful value.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The identifier of the window group whose name is to be inquired.

TDes16 &aWindowName

On return, contains the window group name.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


FindWindowGroupIdentifier(TInt,const TDesC &,TInt)

IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier, const TDesC &aMatch, TInt aOffset=0);

Description

Gets all window groups whose names match a given string, which can contain wildcards.

An example use of this function might be to find all the currently running instances of a particular application, assuming that the window group name contains the application name. An optional argument, aOffset, specifies the number of characters to be ignored at the beginning of the window group name. As several window group names may match the given string, and the function can return only one at a time, there is an argument, aPreviousIdentifier, which gives the identifier for the previous match that was returned. In other words, it means, "get me the next match after this one." The first time the function is called, give 0 as the previous identifier.

Matching is done using TDesC16::MatchF(const TDesC16 &)const, which does a folded match. Wildcards '*' and '?' can be used to denote one or more characters and exactly one character, respectively. Windows are searched in front to back order.

This function always causes a flush of the window server buffer.

Parameters

TInt aPreviousIdentifier

Identifier of the last window group returned. If the value passed is not a valid identifier, the function returns KErrNotFound.

const TDesC16 &aMatch

String to match window group name against: may contain wildcards

TInt aOffset

The first aOffset characters of the window group name are ignored when doing the match.

Return value

TInt

The next window group, after the one identified by aPreviousIdentifier, whose name matches aMatch. KErrNotFound if no window group matched or aPreviousIdentifier was not a valid identifier.


FindWindowGroupIdentifier(TInt,TThreadId)

IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier, TThreadId aThreadId);

Description

Gets the identifiers of window groups belonging to a client which is owned by a thread with the specified thread ID.

The thread may own more than one window group, so the identifier returned is the one after aPreviousIdentifier. The first time the function is called, use 0 for the previous identifier.

This function always causes a flush of the window server buffer.

Parameters

TInt aPreviousIdentifier

Identifier returned by previous call

TThreadId aThreadId

Thread owning the window group or groups.

Return value

TInt

Next window group identifier after the one identified by aPreviousIdentifier


SendMessageToWindowGroup(TInt,TUid,const TDesC8 &)

Interface status: deprecated

IMPORT_C TInt SendMessageToWindowGroup(TInt aIdentifier, TUid aUid, const TDesC8 &aParams);

Description

Sends a message to a window group.

The window group will then receive an event of type EEventMessageReady notifying it that a message has been received. The window group can belong to this or another session.

In order to receive messages sent using this function you will need to implement the MCoeMessageObserver interface which is defined in the UI Control Framework API.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The identifier of the window group to receive the message.

TUid aUid

A UID which uniquely identifies the session sending the message.

const TDesC8 &aParams

The message data. An unlimited amount of data can be passed in this argument.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SendMessageToAllWindowGroups(TUid,const TDesC8 &)

Interface status: deprecated

IMPORT_C TInt SendMessageToAllWindowGroups(TUid aUid, const TDesC8 &aParams);

Description

Sends a message to all window groups.

In order to receive messages sent using this function you will need to implement the MCoeMessageObserver interface which is defined in the UI Control Framework API.

This function always causes a flush of the window server buffer.

Parameters

TUid aUid

A UID which uniquely identifies the session sending the message.

const TDesC8 &aParams

The message data. An unlimited amount of data can be passed in this argument.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SendMessageToAllWindowGroups(TInt,TUid,const TDesC8 &)

Interface status: deprecated

IMPORT_C TInt SendMessageToAllWindowGroups(TInt aPriority, TUid aUid, const TDesC8 &aParams);

Description

Sends a message to all window groups with the specified priority.

In order to receive messages sent using this function you will need to implement the MCoeMessageObserver interface which is defined in the UI Control Framework API.

This function always causes a flush of the window server buffer.

Parameters

TInt aPriority

The priority which window groups must have to be sent the message.

TUid aUid

A UID which uniquely identifies the session sending the message.

const TDesC8 &aParams

The message data. An unlimited amount of data can be passed in this argument.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


FetchMessage(TUid &,TPtr8 &,const TWsEvent &)

IMPORT_C TInt FetchMessage(TUid &aUid, TPtr8 &aParams, const TWsEvent &aMessageEvent);

Description

Called by the client in response to an EEventMessageReady event to receive the message data.

This function always causes a flush of the window server buffer.

Parameters

TUid &aUid

A UID which uniquely identifies the session sending the message.

TPtr8 &aParams

The message data. An unlimited amount of data can be passed in this argument.

const TWsEvent &aMessageEvent

The event sent from the server to the client to identify the message.

Return value

TInt

KErrNone if successful, KErrNoMemory if there is insufficient memory for the message data, otherwise another of the system-wide error codes.


SetShadowVector(const TPoint &)

IMPORT_C void SetShadowVector(const TPoint &aVector);

Description

Sets the shadow vector.

Parameters

const TPoint &aVector

New shadow vector


ShadowVector()const

IMPORT_C TPoint ShadowVector() const;

Description

Gets the current value of the shadow vector.

This function always causes a flush of the window server buffer.

Return value

TPoint

Current shadow vector


SetBackgroundColor(TRgb)

IMPORT_C void SetBackgroundColor(TRgb aColor);

Description

Sets the background colour for the window server.

This background can only be seen in areas of the display that have no windows on them: so for many applications it will never be seen. It affects no other windows.

Parameters

TRgb aColor

Background colour


GetBackgroundColor()const

IMPORT_C TRgb GetBackgroundColor() const;

Description

Gets the window server's background colour.

This function always causes a flush of the window server buffer.

Return value

TRgb

Background colour


SetSystemPointerCursor(const RWsPointerCursor &,TInt)

IMPORT_C TInt SetSystemPointerCursor(const RWsPointerCursor &aPointerCursor, TInt aCursorNumber);

Description

Sets a cursor in the system pointer cursor list.

To gain access to the list, the client must first call RWsSession::ClaimSystemPointerCursorList().

This function always causes a flush of the window server buffer.

Parameters

const RWsPointerCursor &aPointerCursor

Pointer cursor to set in the list

TInt aCursorNumber

Cursor number in the list

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


ClearSystemPointerCursor(TInt)

IMPORT_C void ClearSystemPointerCursor(TInt aCursorNumber);

Description

Clears a system pointer cursor from the list.

Before calling this function, the client must first gain access to the list by calling RWsSession::ClaimSystemPointerCursorList().

Parameters

TInt aCursorNumber

Cursor number to clear


ClaimSystemPointerCursorList()

Capability: WriteDeviceData

IMPORT_C TInt ClaimSystemPointerCursorList();

Description

Claims the system pointer cursor list.

You must call this function before you can call RWsSession::SetSystemPointerCursor(const RWsPointerCursor &,TInt) or RWsSession::ClearSystemPointerCursor(TInt).

This function always causes a flush of the window server buffer.

Return value

TInt

KErrNone if successful, KErrInUse if another client is already using the system pointer cursor list, otherwise another of the system-wide error codes.

See also:


FreeSystemPointerCursorList()

IMPORT_C void FreeSystemPointerCursorList();

Description

Releases the system pointer cursor list and deletes all the entries in it.

A client should call this function when it no longer needs the system pointer cursor list.


SetCustomTextCursor(TInt,const TArray< TSpriteMember > &,TUint,TCustomTextCursorAlignment)

IMPORT_C TInt SetCustomTextCursor(TInt aIdentifier, const TArray< TSpriteMember > &aSpriteMemberArray, TUint aSpriteFlags, TCustomTextCursorAlignment aAlignment);

Description

Adds a custom text cursor to the server's list of cursors.

After adding a custom text cursor, it can be selected for use by calling RWindowGroup::SetTextCursor(RWindowBase &,const TPoint &,const TTextCursor &).

Note that once added, custom text cursors cannot be removed.

This function always causes a flush of the window server buffer.

Parameters

TInt aIdentifier

The unique identifier for the cursor.

const TArray< TSpriteMember > &aSpriteMemberArray

An array defining the bitmap(s) that make up the cursor. Typically, this array will contain a single element for a static, non-animated cursor.

TUint aSpriteFlags

Flags affecting the sprite behaviour. For possible values see TSpriteFlags.

RWsSession::TCustomTextCursorAlignment aAlignment

The vertical alignment of the cursor sprite.

Return value

TInt

KErrNone if successful, KErrAlreadyExists if a custom cursor with the specified identifier already exists, or another of the standard system wide error codes.


ResourceCount()

IMPORT_C TInt ResourceCount();

Description

Gets the number of objects that the server has allocated for that client.

This function can be used to check that the client has correctly cleaned up all of its objects.

It always causes a flush of the window server buffer.

Return value

TInt

The number of resources allocated to the client.


PasswordEntered()

Interface status: deprecated

IMPORT_C void PasswordEntered();

Description

Disables the window server password mode.

This function must be called by the session which owns the password window when the correct machine password has been entered.


ComputeMode(TComputeMode)

IMPORT_C void ComputeMode(TComputeMode aMode);

Description

Sets the mode used to control process priorities.

The default window server behaviour is that the application that owns the window with keyboard focus gets foreground process priority (EPriorityForeground) while all other clients get background priority (EPriorityBackground). This function can be used to over-ride this default behaviour, as discussed in TComputeMode.

Note:

Unlike real Symbian phones, the Emulator runs on a single process. As a result, on the Emulator this function sets the priority of individual threads rather than of processes. The values used for thread priorities are EPriorityLess instead of EPriorityBackground, and EPriorityNormal instead of EPriorityForeground.

Parameters

RWsSession::TComputeMode aMode

The compute mode.


HeapCount()const

IMPORT_C TInt HeapCount() const;

Description

Gets the heap count.

This function calls RAllocator::Count()const on the window server's heap, after throwing away all the temporary objects allocated for each window.

This function always causes a flush of the window server buffer.

Return value

TInt

The window server's heap count.


DebugInfo(TInt,TInt)const

IMPORT_C TInt DebugInfo(TInt aFunction, TInt aParam=0) const;

Description

Parameters

TInt aFunction

TInt aParam

Return value

TInt


DebugInfo(TInt,TDes8 &,TInt)const

IMPORT_C TInt DebugInfo(TInt aFunction, TDes8 &aReturnBuf, TInt aParam=0) const;

Description

Parameters

TInt aFunction

TDes8 &aReturnBuf

TInt aParam

Return value

TInt


HeapSetFail(TInt,TInt)

Capability: WriteDeviceData

IMPORT_C void HeapSetFail(TInt aTAllocFail, TInt aValue);

Description

Sets the heap failure mode in the window server.

The release version of the base does not support simulated heap failure functionality, and the result of this function is additional error messages. In the debug version the clients are notified of the simulated failure and handle it. See RAllocator::__DbgSetAllocFail(TAllocFail,TInt) for more information.

Note:

It is unlikely, but possible to create a ROM with a mixture of Release and Debug versions of the Base and Window Server DLLs, which results in different behaviour to that described above. If you run a debug Window Server with a release version of the Base, then calling this function will result in neither extra error messages (e.g. EDrawingRegion) nor simulated heap failures. However if you have a release Window Server with a debug Base then you will get both simulated heap failures and the extra error messages.

This function always causes a flush of the window server buffer.

Parameters

TInt aTAllocFail

A value from the RAllocator::TAllocFail enumeration which indicates how to simulate heap allocation failure.

TInt aValue

The rate of failure; when aType is RAllocator::EDeterministic, heap allocation fails every aRate attempt

See also:


SetModifierState(TEventModifier,TModifierState)

Capability: WriteDeviceData

IMPORT_C TInt SetModifierState(TEventModifier aModifier, TModifierState aState);

Description

Sets the state of the modifier keys.

This function is typically used for permanent modifier states such as Caps Lock or Num Lock, but other possible uses include on-screen function key simulation, or the implementation of a Shift Lock key.

This function always causes a flush of the window server buffer.

Parameters

TEventModifier aModifier

Modifier to set.

TModifierState aState

Modifier state.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also:


GetModifierState()const

IMPORT_C TInt GetModifierState() const;

Description

Gets the state of the modifier keys.

The state of each modifier key (defined in TEventModifier) is returned in a bitmask.

This function always causes a flush of the window server buffer.

Return value

TInt

Modifier state


RequestOffEvents(TBool,RWindowTreeNode *)

Capability: PowerMgmt

IMPORT_C TInt RequestOffEvents(TBool aOn, RWindowTreeNode *aWin=0);

Description

Requests the window server to send OFF events to a window.

After calling this function, the window server sends OFF events to the window when an event occurs which requires power down, rather than handling powering down itself.

Notes:

Any client can ask for OFF events, but only one window in the system can be set to receive them. If this function is called when another window is set to receive OFF events then the client will be panicked. The exception is the shell, which is allowed to take receipt of OFF events from other clients.

The window server identifies the shell client by comparing the process name of the client with the process name of the shell. Only the first client created by the shell is guaranteed to have the extra shell client privileges.

If the shell dies or terminates just before the action requiring power down happens then the window server will handle it rather than passing it on to the shell.

The window server has a queue of messages that it is waiting to send to clients. If the shell's client's queue is full and the window server cannot make room for the OFF message then it will power down the machine itself.

This function always causes a flush of the window server buffer.

Parameters

TBool aOn

ETrue to get the window server to send EEventShellSwitchOff messages to the shell (rather than powering down). EFalse makes the window server switch back to powering down the machine itself.

RWindowTreeNode *aWin

The handle to the window or window group of the shell to which the message is to be sent. This may be NULL only if aOn=EFalse, in other words, the window server is handling power down itself. If aOn=ETrue then this must not be NULL, or the Window Server will panic the shell. Note that as far as the window server is concerned the handle must exist when this function is called.

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.

Panic codes

WSERV

51 aOn is true, but no window was specified (aWin is NULL).


GetDefModeMaxNumColors(TInt &,TInt &)const

IMPORT_C TDisplayMode GetDefModeMaxNumColors(TInt &aColor, TInt &aGray) const;

Description

Gets the number of colours available in the richest supported colour mode, the number of greys available in the richest grey mode, and returns the default display mode.

This function always causes a flush of the window server buffer.

Parameters

TInt &aColor

The number of colours in the richest supported colour mode.

TInt &aGray

The number of greys in the richest supported grey mode.

Return value

TDisplayMode

The default display mode.


GetColorModeList(CArrayFixFlat< TInt > *)const

IMPORT_C TInt GetColorModeList(CArrayFixFlat< TInt > *aModeList) const;

Description

Gets the list of available colour modes.

Note that this function should usually be called within User::LeaveIfError(TInt). The only time that an error can be generated is when the array gets resized to the number of display modes. Thus if you make the size of your array equal to the maximum number of display modes over all hardware (this is the number of different values in TDisplayMode) then this function will never leave.

This function always causes a flush of the window server buffer.

Parameters

CArrayFixFlat< TInt > *aModeList

On return, contains a TDisplayMode entry for each of the available display modes. Note that the array's contents are deleted prior to filling with display mode information.

Return value

TInt

The number of color modes if the parameter is passed NULL. Otherwise KErrNone or KErrNoMemory.


SetPointerCursorArea(TInt,const TRect &)

Capability: WriteDeviceData

IMPORT_C void SetPointerCursorArea(TInt aScreenSizeMode, const TRect &aArea);

Description

Sets the area of the screen in which the virtual cursor can be used while in relative mouse mode, for a specified screen display mode.

The default area is the full digitiser area for the given mode. When you set the area it will come into immediate affect, i.e. if necessary the current pointer position will be updated to be within the new area.

The area is set and stored independently on each screen mode, so that it is not necessary to call this function again when switching back to a mode.

Notes:

Relative mouse mode is where the events received from the base by window server are deltas from the last position of the pointer, as opposed to absolute co-ordinates.

The previous function overload may be used to set the screen area for only the first mode.

This function is honoured even if there is a mouse or pen (e.g. on the emulator), by mapping the co-ordinates of where you click into the area set using this function. However the function does not restrict clicks outside of the 'drawing area' on the Emulator, to allow you to select items on the fascia.

Parameters

TInt aScreenSizeMode

The screen mode to which the new area applies.

const TRect &aArea

The area of the screen, in the aScreenSizeMode screen mode, within which the virtual cursor can be used.


PointerCursorArea()const

IMPORT_C TRect PointerCursorArea() const;

Description

Gets the pointer cursor area for the first screen display mode.

This is the area of the screen in which the virtual cursor can be used while in relative mouse mode. While in pen or mouse mode the event co-ordinates are forced to be within this area unless you click outside the drawable area.

This function always causes a flush of the window server buffer.

Return value

TRect

The pointer cursor area for the first screen display mode.


PointerCursorArea(TInt)const

IMPORT_C TRect PointerCursorArea(TInt aScreenSizeMode) const;

Description

Gets the pointer cursor area for the specified screen display mode.

This is the area of the screen in which the virtual cursor can be used while in relative mouse mode. While in pen or mouse mode the event co-ordinates are forced to be within this area unless you click outside the drawable area.

This function always causes a flush of the window server buffer.

Parameters

TInt aScreenSizeMode

The screen mode for which the pointer cursor area is required.

Return value

TRect

The pointer cursor area for the specified screen display mode.


SetPointerCursorMode(TPointerCursorMode)

IMPORT_C void SetPointerCursorMode(TPointerCursorMode aMode);

Description

Sets the current mode for the pointer cursor.

The mode determines which sprite is used for the pointer cursor at any point. The request is ignored unless the calling application is the application that currently has keyboard focus. See TPointerCursorMode for more information.

Parameters

TPointerCursorMode aMode

The new mode for the pointer cursor.

See also:


SetClientCursorMode(TPointerCursorMode)

Capability: WriteDeviceData

IMPORT_C TInt SetClientCursorMode(TPointerCursorMode aMode);

Description

Sets the current mode for the pointer cursor.

The mode determines which sprite is used for the pointer cursor at any point. See TPointerCursorMode for more information.

This function always causes a flush of the window server buffer.

Parameters

TPointerCursorMode aMode

The new mode for the pointer cursor.

Return value

TInt

KErrNone if successful, otherwise returns system wide errors. Returns KErrPermissionDenied if calling thread lacks WriteDeviceData capability

See also:


PointerCursorMode()const

IMPORT_C TPointerCursorMode PointerCursorMode() const;

Description

Gets the current mode for the pointer cursor.

The mode determines which sprite is used for the pointer cursor at any point.

This function always causes a flush of the window server buffer.

Return value

TPointerCursorMode

The current mode for the pointer cursor.


SetDefaultSystemPointerCursor(TInt)

IMPORT_C void SetDefaultSystemPointerCursor(TInt aCursorNumber);

Description

Sets the default system pointer cursor.

This function can only be called by the owner of the system pointer cursor list. By default the 0th entry in the pointer cursor list is assigned as the system pointer. The function allows any cursor from the list or even no cursor to be set as the system pointer cursor.

Note: ownership of the system pointer cursor list can be obtained by calling RWsSession::ClaimSystemPointerCursorList() when no-one else has ownership.

Parameters

TInt aCursorNumber

The index of the new default system pointer cursor within the system cursor list.


ClearDefaultSystemPointerCursor()

IMPORT_C void ClearDefaultSystemPointerCursor();

Description

Clears the default system pointer cursor.

This sets the pointer to the current default system pointer cursor to NULL.

Panic codes

WSERV

42 If this function is called by a client other than the owner of the system pointer cursor list.


SetPointerCursorPosition(const TPoint &)

Capability: WriteDeviceData required, if the client calling the function doesn't have keyboard focus. However, if the client have keyboard focus then he doesn't need any capability to call this function.

IMPORT_C TInt SetPointerCursorPosition(const TPoint &aPosition);

Description

Sets the pointer cursor position.

This function allows an application to move the virtual cursor. It works in all modes, not just relative mouse mode.

Note: the function works in screen co-ordinates and honours the pointer cursor area exactly as pen presses do, i.e. only when they are in the drawing area on the Emulator.

This function always causes a flush of the window server buffer.

Parameters

const TPoint &aPosition

The new pointer cursor position.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


PointerCursorPosition()const

IMPORT_C TPoint PointerCursorPosition() const;

Description

Gets the pointer cursor position.

This function allows an application to determine the position of the virtual cursor.

It always causes a flush of the window server buffer.

Return value

TPoint

The position of the virtual cursor.


SetBufferSizeL(TInt)

IMPORT_C void SetBufferSizeL(TInt aBufSize);

Description

Sets both the buffer size and maximum buffer size for queuing commands to send to the Windows Server. The value should be at least the size of the largest message that will be sent, otherwise a panic of the client may occur.

The minimum possible buffer size is 640 and the maximum possible size is 16384 bytes. The default size of 640 bytes is sufficient for most uses.

Larger buffers can reduce drawing flicker by allowing more drawing commands to be collected in the buffer before being sent to the server.

Smaller buffers conserve system memory.

Can be used to set a minimum buffer size, sufficient for largest drawing command used, before calling RWsSession::SetMaxBufferSizeL(TInt) to set a maximum buffer size for queuing commands.

Parameters

TInt aBufSize

The desired buffer size in bytes, at least the size of largest message to be sent.

Leave codes

KErrNoMemory

Could not allocate the required memory.

Panic codes

TW32Panic

5 Occurs during the session if a single drawing command is too big to fit in the buffer.

See also:


SetMaxBufferSizeL(TInt)

IMPORT_C void SetMaxBufferSizeL(TInt aMaxBufSize);

Description

Sets the maximum size that the buffer for queuing commands to send to the Windows Server can expand to.

The minimum possible buffer size is 640 and the maximum possible size is 16384 bytes.

If the buffer size is larger than the new maximum it is reduced.

A minimum size is calculated to be one quarter the maximum size, but in any case at least 640 bytes. If the buffer size is smaller than the calculated minimum it is expanded.

RWsSession::SetBufferSizeL(TInt) can be used to set a specific minimum size >640 bytes before setting a maximum size. This is useful if you will send very large drawing commands.

After calling this function the buffer size will be between the specified maximum and calculated minimum sizes.

The algorithm for growing the buffer up to the maximum is chosen to balance the cost of expanding the buffer with the waste of an excessively large buffer that is never filled.

If the buffer becomes too full to add a new drawing command, and the buffer size is less than the maximum, the buffer size will be expanded. If the buffer is already at the maximum size, or the expansion fails due to low memory, the buffer will be emptied with RWsSession::Flush(). If there is not enough space now for the new command a panic occurs.

Parameters

TInt aMaxBufSize

The desired maximum buffer size in bytes.

Leave codes

KErrNoMemory

Could not allocate the required minimum memory.

Panic codes

TW32Panic

5 Occurs during the session if a single drawing command is too big to fit in the buffer.

See also:


SetSystemFaded(TBool)

Capability: WriteDeviceData

IMPORT_C TInt SetSystemFaded(TBool aFaded);

Description

Sets all windows in the system as faded or unfaded, using the default fading parameters.

This function allows all windows that currently exist, not just those in a single window group, to be faded or unfaded.

Notes: The window server generates a redraw to un-fade a window, because information is lost during fading. Blank (RBlankWindow) and backup (RBackupWindow) windows deal with this themselves. Areas in shadow when the window is faded will also have redraw events generated for them by the window server. While a window is faded, all drawing to that window will be adjusted appropriately by the window server.

This function always causes a flush of the window server buffer.

Parameters

TBool aFaded

ETrue to fade all windows, EFalse to un-fade all windows.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SetSystemFaded(TBool,TUint8,TUint8)

Capability: WriteDeviceData

IMPORT_C TInt SetSystemFaded(TBool aFaded, TUint8 aBlackMap, TUint8 aWhiteMap);

Description

Sets all windows in the system as faded or unfaded, overriding the default fading parameters (as set by RWsSession::SetDefaultFadingParameters(TUint8,TUint8)).

This function allows all windows that currently exist, not just those in the same window group, to be faded or unfaded.

Notes: Fading a window for a second time (that is fading it when it is already faded) will not change the fading map used. The window server generates a redraw to un-fade a window, because information is lost during fading. Blank (RBlankWindow) and backup (RBackupWindow) windows deal with this themselves. Areas in shadow when the window is faded will also have redraw events generated for them by the window server. While a window is faded, all drawing to that window will be adjusted appropriately by the window server.

This function always causes a flush of the window server buffer.

Parameters

TBool aFaded

ETrue to fade all windows, EFalse to un-fade all windows.

TUint8 aBlackMap

Black map fading parameter.

TUint8 aWhiteMap

White map fading parameter.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SetFocusScreen(TInt)

IMPORT_C TInt SetFocusScreen(TInt aScreenNumber);

Description

Set focus screen

Parameters

TInt aScreenNumber

The new focus screen.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


GetFocusScreen()

IMPORT_C TInt GetFocusScreen();

Description

Get focus screen

Return value

TInt

The screen number of current focus screen


ClearAllRedrawStores()

IMPORT_C void ClearAllRedrawStores();

Description

Clear the redraw store for all windows in the system By default Windows will recorded the drawing commands used during a redraw and use them latter if the window needs to be redrawn. Calling this function will cause all these stores to be thrown away redraw will then be sent to all window, visible windows will recieve them first.

This function always causes a flush of the window server buffer.


LogCommand(TLoggingCommand)

IMPORT_C void LogCommand(TLoggingCommand aCommand);

Description

Allows the window server client to enable or disable logging of window server events.

The type of logging that takes place (e.g. whether to file or to serial port) depends on the settings specified in the wsini.ini file.

Clients can also force a dump of the window tree or information about the window server's heap size and usage.

For logging to work, the wsini.ini file has to specify the type of logging required and the DLLs for that type of logging must have been correctly installed. Otherwise, calling this function will have no effect.

Parameters

RWsSession::TLoggingCommand aCommand

The logging command.


LogMessage(const TLogMessageText &)

IMPORT_C void LogMessage(const TLogMessageText &aMessage);

Description

Adds a message to the window server debug log if one is currently in operation.

This function always causes a flush of the window server buffer.

Parameters

const TBuf &aMessage

The text added to the message log.

[Top]


Member structures


Struct TWindowGroupChainInfo

struct TWindowGroupChainInfo;

Description

Members

Defined in RWsSession::TWindowGroupChainInfo:

Member data


iId

TInt iId;

Description


iParentId

TInt iParentId;

Description

[Top]


Member enumerations


Enum TComputeMode

TComputeMode

Description

Compute mode flags.

When a window group takes focus or loses it, the window server can boost its client's thread or process priority to provide a better response to the user. How it alters the priority is determined by the current compute mode of the client.

See also:

EPriorityControlDisabled

Client priority is permanently set to its current level. It is not altered or set by the windowing system if the focus changes.

Thus if RWsSession::ComputeMode(TComputeMode) is called with this flag when a client is in the foreground, it will subsequently have foreground priority even if it is in the background.

EPriorityControlComputeOn

Client process's priority is always set to EPriorityBackground.

EPriorityControlComputeOff

Client process's priority is set to EPriorityForeground when the window group takes focus, and set to EPriorityBackground when it loses focus.

This is the default behaviour.


Enum anonymous

n/a

Description

ESystemInfoArraySize


Enum TLoggingCommand

TLoggingCommand

Description

Window server logging commands passed to RWsSession::LogCommand(TLoggingCommand).

See also:

ELoggingEnable

Enables logging.

ELoggingDisable

Disables logging.

ELoggingStatusDump

Logs the current status of all the windows in the tree, even if logging is not currently enabled.

ELoggingHeapDump

Logs information about the window server's heap size and usage, even if logging is not currently enabled.


Enum TCustomTextCursorAlignment

TCustomTextCursorAlignment

Description

The vertical alignment of a custom text cursor sprite.

One of these values must be set, see RWsSession::SetCustomTextCursor(TInt,const TArray< TSpriteMember > &,TUint,TCustomTextCursorAlignment). This value also determines which part of each sprite member bitmap is clipped when the cursor's TTextCursor::EFlagClipVertical flag is set.

ECustomTextCursorAlignTop

The y-origin of each sprite member bitmap is aligned with the top of the line.

ECustomTextCursorAlignBaseline

The y-origin of each sprite member bitmap is aligned with the baseline of the line.

ECustomTextCursorAlignBottom

The y-origin of each sprite member bitmap is aligned with the bottom of the line.