Location:
w32std.h
Link against: ws32.lib
RWindowGroup
Supported from 5.0
Client-side handle to a server-side window group.
|
Defined in RWindowGroup
:
AddPriorityKey()
, AutoForeground()
, CancelCaptureKey()
, CancelCaptureKeyUpAndDowns()
, CancelTextCursor()
, CaptureKey()
, CaptureKeyUpAndDowns()
, Construct()
, DefaultOwningWindow()
, DisableKeyClick()
, DisableScreenChangeEvents()
, EnableReceiptOfFocus()
, EnableScreenChangeEvents()
, FetchMessage()
, Identifier()
, Name()
, RWindowGroup()
, RemovePriorityKey()
, SetName()
, SetOrdinalPriorityAdjust()
, SetOwningWindowGroup()
, SetTextCursor()
, SimulatePointerEvent()
Inherited from MWsClientClass
:
WsHandle()
Inherited from RWindowTreeNode
:
Child()
,
ClearPointerCursor()
,
Close()
,
Destroy()
,
DisableErrorMessages()
,
DisableFocusChangeEvents()
,
DisableGroupChangeEvents()
,
DisableModifierChangedEvents()
,
DisableOnEvents()
,
EFadeIncludeChildren
,
EFadeWindowOnly
,
EnableErrorMessages()
,
EnableFocusChangeEvents()
,
EnableGroupChangeEvents()
,
EnableModifierChangedEvents()
,
EnableOnEvents()
,
FullOrdinalPosition()
,
NextSibling()
,
OrdinalPosition()
,
OrdinalPriority()
,
Parent()
,
PrevSibling()
,
SetCustomPointerCursor()
,
SetFaded()
,
SetNonFading()
,
SetOrdinalPosition()
,
SetPointerCursor()
,
TFadeControl
RWindowGroup();
Creates a sessionless, uninitialised window group handle.
Handles to server-side objects must be created in a session in
order to be operational; this constructor is merely a convenience to allow the
handle to be stored as a data member. See
RWindowTreeNode::RWindowTreeNode()
for details of how the complete
setup of a handle field may be deferred until the window server session is
known.
RWindowGroup(RWsSession &aWs);
Creates an initialised window group handle within a server session.
|
TInt Construct(TUint32 aClientHandle);
Completes the construction of a window group.
Construction must be complete before any other window group methods can be called.
|
|
TInt Construct(TUint32 aClientHandle, TBool aInitialFocusState);
Completes the construction of a window group, setting its initial focus state.
Construction must be complete before any other window group methods can be called.
aInitialFocusState
can be specified in order to
prevent a window group from automatically taking the keyboard focus when it is
created. If specified, it sets the initial focus state of the window group. If
a window group has a focus state of ETrue
(the default), it can
receive keyboard focus; if EFalse
, it is prevented from receiving
keyboard focus until this setting is changed. If a window group is constructed without specifying an initial
focus state, keyboard focus will be enabled by default and the window group
will receive keyboard focus automatically when it is created. To prevent this,
set aInitialFocusState
to EFalse
.
|
|
TInt AddPriorityKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);
Adds a priority key.
Priority key events are typically used for providing "Abort" or
"Escape" keys for an application. For priority key events to occur they must
first be configured using this function. Functions provided by
RWsSession
can then be used to get priority key events. Note that unlike other events, the Control Framework does NOT get priority key events for you.
Priority key events for the key given by aKeyCode
are only delivered when the modifier keys specified by
aModifierMask
are in the states specified by
aModifier
. See RWsSession::SetHotKey()
for examples
of how to use aModifierMask
and aModifier
.
More than one priority key can be added for each keycode, each having a different set of modifier requirements.
Note:
If you press a priority key while another is waiting to be sent to the client then the first key is is lost.
|
|
void AutoForeground(TBool aState);
Sets or disables auto-foreground behaviour.
If this behaviour is set for a window, it will automatically be
given ordinal position zero whenever a pointer event of type
EButton1Down
occurs in any of its child windows. This will cause
it to be brought to the foreground, unless another window group exists with a
higher priority.
A window group that is moved to the foreground will
automatically get keyboard focus unless it has explicitly had receipt-of-focus
disabled or there is a focusable window group of higher priority. See EnableReceiptOfFocus()
.
|
void CancelCaptureKey(TInt32 aCaptureKey);
Cancels a request for key capture.
Use this function to cancel a request to capture a key
previously made with CaptureKey()
. If the value passed in
aCaptureKey
is not a valid capture key handle, this function will
cause a panic.
|
void CancelCaptureKeyUpAndDowns(TInt32 aCaptureKey);
Cancels a capture request for a key up or key down event.
Use this function to cancel a request to capture a key
previously made with CaptureKeyUpAndDowns()
. If the value passed
in aCaptureKey
is not a valid capture key handle, this function
will cause a panic.
|
void CancelTextCursor();
Removes the text cursor.
Use this function to remove the current text cursor from this window group. This function does nothing if the cursor is currently in another window group.
TInt32 CaptureKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);
Requests key capture.
Use this function to instruct the window server to send key
events (of type EEventKey
) from the specified key to this window
group, regardless of which window group currently has the keyboard
focus.
Key events for the key given by aKeyCode
are
captured only when the modifier keys specified by aModifierMask
are in the states specified by aModifier
. See
RWsSession::SetHotKey()
for examples of how to use
aModifierMask
and aModifier
.
Normally, keyboard key presses result in three events being
delivered to the client: EEventKeyDown
, EEventKey
and
EEventKeyUp
. However, CaptureKey()
results in only
the EEventKey
being delivered to the window group that called it:
the EEventKeyUp
and EEventKeyDown
events are sent to
the window group that has focus. If a window group wishes to capture the
EEventKeyUp
and EEventKeyDown
events as well as the
EEventKey
, it should call
CaptureKeyUpAndDowns()
.
|
|
TInt32 CaptureKeyUpAndDowns(TUint aScanCode, TUint aModifierMask, TUint aModifier);
Requests the capture of key-up and key-down events on behalf of a window group.
This function requests the window server to send
EEventKeyUp
and EEventKeyDown
key events from the
specified key to this window group, regardless of which window group currently
has the keyboard focus. This contrasts with CaptureKey()
, which
causes the window server to send the EEventKey
event.
Key events for the key given by aScanCode
are
captured only when the modifier keys specified by aModifierMask
are in the states specified by aModifier
. See
RWsSession::SetHotKey()
for examples of how to set
aModifierMask
and aModifier
.
Note:
In general, keyboard key presses result in three events
being delivered to the client: EEventKeyDown
, EEventKey
and EEventKeyUp
.
|
|
void DefaultOwningWindow();
Make this window group the default owning window group.
The default owning window group is the group that is brought to the foreground when the window group which has keyboard focus (the foreground application) dies — if no other window has been set up as the owning group.
This window group will take over as the default owning window group even if another window group has previously called this function. However, if this window group is subsequently destroyed, the default owning window group will revert to being the previous window group.
void DisableKeyClick(TBool aState);
Disable key click.
If a window group calls this function with aState
=ETrue
, key click (i.e., the sound generated when keys are pressed) will be disabled whenever this window group has the keyboard focus. Key click for this window group can be re-enabled by calling this function with aState=EFalse
.
Note that this function doesn't do anything in releases 6.0 and 6.1, but should be available again in subsequent releases.
|
void DisableScreenChangeEvents();
Disables screen change event sending.
This function prevents window groups from getting screen change events, which are set when the screen size mode changes. Such events would be sent, for example, when the flip on an Ericsson R380 phone is opened or closed.
Note that not getting screen change events is the default behaviour.
See EnableScreenChangeEvents()
.
void EnableReceiptOfFocus(TBool aState);
Enables or disables receipt of keyboard focus.
The front most focusable window has keyboard focus. This function sets whether or not the window can receive keyboard focus.
|
TInt EnableScreenChangeEvents();
Enables screen change event sending.
This function ensures that window groups are sent screen change events, which are set when the screen size mode changes. Such events are sent, for example, when the flip on an Ericsson R380 phone is opened or closed.
Note that not getting screen change events is the default behaviour.
|
TInt FetchMessage(TUid& aUid, TPtr8& aParams);
Withdrawn in 6.0
Gets a message from the session.
Use this function to retrieve a message that has been sent to
this window group by a session (either the session that owns this window group
or another session) using RWsSession::SendMessageToWindowGroup()
.
This function should be called whenever the window group receives an event of
type EEventMessageReady
.
Caution! An application must ensure that it calls this function
whenever it receives an EEventMessageReady
event. It will receive
no further EEventMessageReady
events until it does so.
Notes:
This function allocates memory to store the message data
pointer to by aParams
. After calling it, this memory is owned by
the client application, and the client must free it when it is no longer
required.
This function was removed in version 6.0 and was replaced in the
window server by an RWsSession
function which is not intended for use by 3rd party developers. The public
API for retrieving a message is defined in the UI Control framework in
MCoeMessageObserver
.
|
|
TInt Identifier() const;
Gets the identifier of the window group.
|
TInt Name(TDes &aWindowName) const;
Gets the window group’s name. See
SetName()
.
|
|
void RemovePriorityKey(TUint aKeycode, TUint aModifierMask, TUint aModifier);
Removes a priority key.
Use this function to remove a priority key that was added using
AddPriorityKey()
. If the specified priority key does not exist,
this function does nothing.
Note:
All 3 parameters must match exactly for a successful removal.
|
TInt SetName(const TDesC &aName);
Sets the window group's name.
Use this function to set the name of a window group. Window
group names are completely arbitrary and can contain any data that can be
stored in a descriptor of type TDesC
.
Note:
If this function is successful, a window group change event is sent to everything that is set up to receive these events.
|
|
void SetOrdinalPriorityAdjust(TInt aAdjust);
Set the window group's priority adjust value.
This function is primarily designed for sessions that own
multiple window groups. After this function has been called by a window group,
that window group's priority will be adjusted by the amount given by
aAdjust
whenever another window group owned by the same session
gains keyboard focus.
When the session loses focus the priority returns to its original value.
|
void SetOwningWindowGroup(TInt aIdentifier);
Sets the owning window group for this window group.
The owning window group is the group that is brought to the foreground when the window group which has keyboard focus (the foreground application) dies.
If the owning window group is not set, then the window group brought to the foreground when the application dies will be the default owning window group.
|
void SetTextCursor(RWindowBase &aWin, const TPoint &aPos, const TTextCursor &aCursor);
Sets the text cursor.
Use this function to set a text cursor for this window group, or to update the text cursor's position or appearance.
|
void SetTextCursor(RWindowBase& aWin, const TPoint& aPos, const TTextCursor &aCursor, const TRect &aClipRect);
Sets the text cursor and its clipping rectangle.
Use this function to set a text cursor for this window group, or to update the text cursor's position or appearance.
If aClipRect
is specified, the cursor is clipped
to this rectangle. This allows, for example, the window to have a border
region in which the cursor is not displayed.
|
void SimulatePointerEvent(TRawEvent aEvent);
Simulates a pointer event.
This function sends a pointer event into the window just as if it had come from the kernel, except that it will be send to a window which is a child of the Window Group it is called on.
Notes:
The function can be used to send a pointer event to an application event when it is in the background.
The function is supported for testing purposes only.
|