RWindow Class Reference

#include <w32std.h>

class RWindow : public RDrawableWindow, public RDrawableWindow
Public Member Functions
RWindow()
RWindow(RWsSession &)
IMPORT_C voidBeginRedraw()
IMPORT_C voidBeginRedraw(const TRect &)
IMPORT_C voidClearRedrawStore()
IMPORT_C TIntConstruct(const RWindowTreeNode &, TUint32)
IMPORT_C voidEnableOSB(TBool)
IMPORT_C voidEnableRedrawStore(TBool)
IMPORT_C voidEndRedraw()
IMPORT_C voidGetInvalidRegion(RRegion &)
IMPORT_C voidHandleTransparencyUpdate()
IMPORT_C voidInvalidate()
IMPORT_C voidInvalidate(const TRect &)
IMPORT_C TBoolIsRedrawStoreEnabled()
IMPORT_C voidSetBackgroundColor(TRgb)
IMPORT_C voidSetBackgroundColor()
IMPORT_C voidSetExtent(const TPoint &, const TSize &)
IMPORT_C voidSetNonTransparent()
IMPORT_C voidSetSize(const TSize &)
IMPORT_C TIntSetTransparencyAlphaChannel()
IMPORT_C TIntSetTransparencyBitmap(const CFbsBitmap &)
IMPORT_C TIntSetTransparencyFactor(const TRgb &)
IMPORT_C TIntSetTransparencyPolicy(TWsTransparencyPolicy)
IMPORT_C TIntSetTransparencyWsBitmap(const CWsBitmap &)
IMPORT_C TIntSetTransparentRegion(const TRegion &)
Inherited Attributes
MWsClientClass::iBuffer
MWsClientClass::iWsHandle
Inherited Enumerations
RWindowBase:TCaptureFlags
RWindowTreeNode:TFadeControl
Inherited Functions
MWsClientClass::AddToBitmapArray(const TInt)const
MWsClientClass::AsyncRequest(TRequestStatus &,TUint)const
MWsClientClass::CachedWindowSize(TSize &)const
MWsClientClass::DestroyWindowSizeCacheEntry()
MWsClientClass::MWsClientClass()
MWsClientClass::MWsClientClass(RWsBuffer *)
MWsClientClass::MarkWindowSizeCacheDirty()
MWsClientClass::RefreshWindowSizeCache(const TSize &)const
MWsClientClass::WindowSizeCacheEnabled()const
MWsClientClass::Write(TUint)const
MWsClientClass::Write(const TAny *,TInt,TInt,TUint)const
MWsClientClass::Write(const TAny *,TInt,TUint,const TIpcArgs *)const
MWsClientClass::Write(const TAny *,TInt,const TAny *,TInt,TUint,const TIpcArgs *)const
MWsClientClass::WriteInt(TInt,TUint)const
MWsClientClass::WritePoint(const TPoint &,TUint)const
MWsClientClass::WriteRect(const TRect &,TUint)const
MWsClientClass::WriteReply(TUint,const TIpcArgs *)const
MWsClientClass::WriteReply(const TAny *,TInt,TUint,const TIpcArgs *)const
MWsClientClass::WriteReply(const TAny *,TInt,const TAny *,TInt,TUint,const TIpcArgs *)const
MWsClientClass::WriteReplyByProvidingRemoteReadAccess(const TAny *,TInt,const TReadDescriptorType &,TUint)const
MWsClientClass::WriteReplyInt(TInt,TUint,const TIpcArgs *)const
MWsClientClass::WriteReplyIntP(TInt,const TWriteDescriptorType &,TUint)const
MWsClientClass::WriteReplyP(const TAny *,TInt,const TAny *,TInt,const TWriteDescriptorType &,TUint)const
MWsClientClass::WriteReplyP(const TAny *,TInt,const TWriteDescriptorType &,TUint)const
MWsClientClass::WriteReplyP(const TWriteDescriptorType &,TUint)const
MWsClientClass::WriteSize(const TSize &,TUint)const
MWsClientClass::WsHandle()const
RDrawableWindow::GetDrawRect()const
RDrawableWindow::RDrawableWindow()
RDrawableWindow::RDrawableWindow(RWsSession &)
RDrawableWindow::Scroll(const TPoint &)
RDrawableWindow::Scroll(const TPoint &,const TRect &)
RDrawableWindow::Scroll(const TRect &,const TPoint &)
RDrawableWindow::Scroll(const TRect &,const TPoint &,const TRect &)
RDrawableWindow::SetDrawRect(const TRect &)
RWindowBase::AbsPosition()const
RWindowBase::Activate()
RWindowBase::AddKeyRect(const TRect &,TInt,TBool)
RWindowBase::AllocPointerMoveBuffer(TInt,TUint)
RWindowBase::CancelPointerRepeatEventRequest()
RWindowBase::CancelPointerRepeatEventRequest(const TUint8)
RWindowBase::ClaimPointerGrab(TBool)
RWindowBase::ClaimPointerGrab(const TUint8,const TBool)
RWindowBase::DisablePointerMoveBuffer()
RWindowBase::DiscardPointerMoveBuffer()
RWindowBase::DisplayMode()const
RWindowBase::EnableAdvancedPointers()
RWindowBase::EnableBackup(TUint)
RWindowBase::EnablePointerMoveBuffer()
RWindowBase::FadeBehind(TBool)
RWindowBase::FixNativeOrientation()
RWindowBase::FreePointerMoveBuffer()
RWindowBase::GetBackgroundSurface(TSurfaceConfiguration &)const
RWindowBase::GetPointerCapturePriority()const
RWindowBase::InquireOffset(const RWindowTreeNode &)const
RWindowBase::IsFaded()const
RWindowBase::IsNonFading()const
RWindowBase::KeyColor()const
RWindowBase::MoveToGroup(TInt)
RWindowBase::OverrideEffects(TInt,const TFileName &,const TFileName &,const TFileName &,TBitFlags)
RWindowBase::PasswordWindow(TPasswordMode)
RWindowBase::PointerFilter(TUint32,TUint32)
RWindowBase::Position()const
RWindowBase::RWindowBase()
RWindowBase::RWindowBase(RWsSession &)
RWindowBase::RemoveAllKeyRects()
RWindowBase::RemoveBackgroundSurface(TBool)
RWindowBase::RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32,const TRect &)
RWindowBase::RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32,const TRect &,const TUint8)
RWindowBase::RetrievePointerMoveBuffer(TDes8 &)const
RWindowBase::SendEffectCommand(TInt,const TDesC8 &)
RWindowBase::SetBackgroundSurface(const TSurfaceConfiguration &,TBool)
RWindowBase::SetBackgroundSurface(const TSurfaceId &)
RWindowBase::SetCornerType(TCornerType,TInt)
RWindowBase::SetExtentErr(const TPoint &,const TSize &)
RWindowBase::SetPointerAcceptanceRegion(const TRegion &)
RWindowBase::SetPointerCapture(TInt)
RWindowBase::SetPointerCapturePriority(TInt)
RWindowBase::SetPointerGrab(TBool)
RWindowBase::SetPosition(const TPoint &)
RWindowBase::SetPurpose(TInt)
RWindowBase::SetRequiredDisplayMode(TDisplayMode)
RWindowBase::SetShadowDisabled(TBool)
RWindowBase::SetShadowHeight(TInt)
RWindowBase::SetShape(const TRegion &)
RWindowBase::SetSizeErr(const TSize &)
RWindowBase::SetSurfaceTransparency(TBool)
RWindowBase::SetVisible(TBool)
RWindowBase::Size()const
RWindowBase::SizeForEgl()const
RWindowBase::construct(const RWindowTreeNode &,TUint32,TInt,TDisplayMode)
RWindowTreeNode::Child()const
RWindowTreeNode::ClearPointerCursor()
RWindowTreeNode::ClientHandle()const
RWindowTreeNode::Close()
RWindowTreeNode::Destroy()
RWindowTreeNode::DisableErrorMessages()
RWindowTreeNode::DisableFocusChangeEvents()
RWindowTreeNode::DisableGroupChangeEvents()
RWindowTreeNode::DisableGroupListChangeEvents()
RWindowTreeNode::DisableModifierChangedEvents()
RWindowTreeNode::DisableOnEvents()
RWindowTreeNode::DisableVisibilityChangeEvents()
RWindowTreeNode::EnableErrorMessages(TEventControl)
RWindowTreeNode::EnableFocusChangeEvents()
RWindowTreeNode::EnableGroupChangeEvents()
RWindowTreeNode::EnableGroupListChangeEvents()
RWindowTreeNode::EnableModifierChangedEvents(TUint,TEventControl)
RWindowTreeNode::EnableOnEvents(TEventControl)
RWindowTreeNode::EnableVisibilityChangeEvents()
RWindowTreeNode::FullOrdinalPosition()const
RWindowTreeNode::NextSibling()const
RWindowTreeNode::OrdinalPosition()const
RWindowTreeNode::OrdinalPriority()const
RWindowTreeNode::Parent()const
RWindowTreeNode::PrevSibling()const
RWindowTreeNode::RWindowTreeNode()
RWindowTreeNode::RWindowTreeNode(RWsSession &)
RWindowTreeNode::ScreenNumber()const
RWindowTreeNode::Session()const
RWindowTreeNode::SetCustomPointerCursor(const RWsPointerCursor &)
RWindowTreeNode::SetFaded(TBool,TFadeControl)
RWindowTreeNode::SetFaded(TBool,TFadeControl,TUint8,TUint8)
RWindowTreeNode::SetNonFading(TBool)
RWindowTreeNode::SetOrdinalPosition(TInt)
RWindowTreeNode::SetOrdinalPosition(TInt,TInt)
RWindowTreeNode::SetPointerCursor(TInt)
RWindowTreeNode::WindowGroupId()const
RWindowTreeNode::__DbgTest(TAny *)const
RWindowTreeNode::__DbgTestInvariant()const

Detailed Description

Handle to a standard window.

An RWindow is a handle to a server-side window which can be displayed and drawn to, and whose redraws are performed by the application.

Constructor & Destructor Documentation

RWindow ( )

IMPORT_CRWindow()

Default constructor which creates a sessionless, uninitialised window 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.

RWindow ( RWsSession & )

IMPORT_CRWindow(RWsSession &aWs)

Constructor which creates an initialised window handle within a server session.

Parameters
aWsWindow server session to use.

Member Function Documentation

BeginRedraw ( )

IMPORT_C voidBeginRedraw()

Begins redrawing the window's invalid region.

This method tells the window server that the window is about to respond to the last redraw event by redrawing the entire invalid region. This causes the window server to validate the entire invalid region.

After the redraw is complete the entire region that was previously invalid is validated. The window should then call EndRedraw().

Note: the redraw is clipped to the region that was previously invalid.

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

See also: EndRedraw()

BeginRedraw ( const TRect & )

IMPORT_C voidBeginRedraw(const TRect &aRect)

Begins the redraw of a rectangle within the window's invalid region.

This method tells the window server that the window is about to respond to the last redraw event by redrawing the specified rectangle. This causes the window server to clear the rectangle, and remove it from the invalid region.

After the redraw is complete the window should call EndRedraw().

Note:

When handling a redraw event, this rectangle would typically be the rectangle returned by TWsRedrawEvent::Rect().

The redraw is clipped to the area that is validated, i.e. the intersection of the rectangle with the previously invalid region.

If you only validate part of the rectangle given in the redraw event then, after EndRedraw() is called, drawing will be clipped to the visible area which is not invalid. This is because drawing (that is non-redrawing) is always clipped to the visible region less the invalid region. You will get another message telling you to redraw the area that is still invalid.

See also: EndRedraw()

Parameters
aRectThe rectangle to be redrawn.

ClearRedrawStore ( )

IMPORT_C voidClearRedrawStore()

Clears the draw commands that are stored for this window from the redraw store. Windows that have had their redraw store cleared are not ready to draw again until a new set of draw commands enclosed by BeginRedraw/EndRedraw have been issued.

Construct ( const RWindowTreeNode &, TUint32 )

IMPORT_C TIntConstruct(const RWindowTreeNode &parent,
TUint32aHandle
)

Completes the construction of the window handle.

This method should be called after the RWindow() constructor, before any other functions are performed on the window. It creates a window in the window server corresponding to the RWindow object. The window is initialised to inherit the size and extent of its parent window, given by the first parameter. If its parent is a group window then it will be full screen.

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

Parameters
parentThe window's parent.
aHandleClient handle for the window. This is an integer value chosen by the client that must be unique within the current server session. The usual way of doing this is to cast the address of the object that owns the window to a TUint32; this allows event handlers which are given a window handle to obtain a reference to the window an event is intended for. For example, CCoeControl uses this technique when it constructs a window. Note that in GUI applications, every window is created and owned by a control. Therefore it is rare for 3rd party code to ever need to call a window's Construct() function directly.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

EnableOSB ( TBool )

IMPORT_C voidEnableOSB(TBool)

Enables/Disables the WSERV to use its OSB

EnableRedrawStore ( TBool )

IMPORT_C voidEnableRedrawStore(TBoolaEnabled)

Enables or Disables the storing of redraw operations that do not intersect the viewport for a window.

The window server stores operations required to redraw a window in a redraw store. Calling this function with ETrue causes all such drawing operations to be stored. The EnableRedrawStore(EFalse) call serves as a hint to store only the subset of draw commands which intersect the viewport.

Parameters
aEnabledIndicates whether the redraw store should be enabled or disabled.

EndRedraw ( )

IMPORT_C voidEndRedraw()

Ends the current redraw.

This function should be called when redrawing is complete.

GetInvalidRegion ( RRegion & )

IMPORT_C voidGetInvalidRegion(RRegion &aRegion)const

Gets the invalid region.

Note: if there is not enough memory to create the region, the region's error flag will be set.

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

Parameters
aRegionOn return, contains the invalid region.

HandleTransparencyUpdate ( )

IMPORT_C voidHandleTransparencyUpdate()
Deprecated

Window transparency based on the use of a separate window mask bitmap has been deprecated. Calling this method method has no effect. For window transparency see the the support for window alpha channel.

See also: RWindow::SetTransparencyAlphaChannel()

Invalidate ( )

IMPORT_C voidInvalidate()

Invalidates the entire window.

This function causes the window to get a redraw message specifying its entire visible area, allowing an application-initiated redraw.

Invalidate ( const TRect & )

IMPORT_C voidInvalidate(const TRect &aRect)

Invalidates an area within the window.

This function invalidates the specified rectangle, which causes the window to get a redraw message. This allows an application-initiated redraw of a specified rectangle.

Parameters
aRectArea to invalidate.

IsRedrawStoreEnabled ( )

IMPORT_C TBoolIsRedrawStoreEnabled()const
Deprecated

Returns whether the window uses a redraw store to store drawing commands.

The current WServ implementation always uses a redraw store. Therefore this function always returns ETrue.

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

See also: RWindow::EnableRedrawStore()

Return Value
ETrue

SetBackgroundColor ( TRgb )

IMPORT_C voidSetBackgroundColor(TRgbaColor)

Sets the background colour used for clearing in server-initiated redraws.

The window will be cleared to its background colour when a window server-initiated redraw occurs. Background colour can be changed dynamically after a window has been created and activated, however, the new background colour will not be visible until the window has been redrawn.

Parameters
aColorBackground colour to be used during redraws.

SetBackgroundColor ( )

IMPORT_C voidSetBackgroundColor()

Sets the background colour used for clearing in server-initiated redraws to none.

The window will not be cleared to its background colour when a window server-initiated redraw occurs.

For a window on which SetTransparencyAlphaChannel() has been called, this function means that the transparent window has no background.

If a client calls this function for an opaque window, it is their responsibility to provide opaque drawing to every pixel in the window (for example, a background bitmap). Otherwise, undefined behaviour will result.

SetExtent ( const TPoint &, const TSize & )

IMPORT_C voidSetExtent(const TPoint &point,
const TSize &size
)

Sets the size and position of a window.

This function may be called at any time after the window's Construct() function: the window's extent will change dynamically.

If the window size is increased, any new area will be cleared to the background colour and a redraw event will be generated for it.

See also: RBackedUpWindow

Parameters
pointThe position of the window's origin, relative to its parent.
sizeThe window size.

SetNonTransparent ( )

IMPORT_C voidSetNonTransparent()
Deprecated

Window transparency based on the use of a separate window mask bitmap has been deprecated. Calling this method method has no effect. To guarantee a window being opaque; see SetTransparentRegion().

See also: RWindow::SetTransparentRegion()

SetSize ( const TSize & )

IMPORT_C voidSetSize(const TSize &size)

Sets the size of a window.

This function may be called at any time after the window's Construct() function: the window's size will change dynamically.

If the window size is increased, any new area will be cleared to the background colour and a redraw event will be generated for it.

Parameters
sizeThe window size.

SetTransparencyAlphaChannel ( )

IMPORT_C TIntSetTransparencyAlphaChannel()

Enables the use of an alpha channel to control the window's transparency.

Note that the window's invalid area will be cleared using the window's background color before any drawing commence. Thus setting the background color to fully transparent is essential in most use cases.

See also: RWindow::SetBackgroundColor()

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

SetTransparencyBitmap ( const CFbsBitmap & )

IMPORT_C TIntSetTransparencyBitmap(const CFbsBitmap &aTransparencyBitmap)
Deprecated

Window transparency based on the use of a separate window mask bitmap has been deprecated. Calling this method method has no effect. For window transparency see the the support for window alpha channel.

See also: RWindow::SetTransparencyAlphaChannel()

Parameters
aTransparencyBitmapIgnored.
Return Value
Always KErrNone.

SetTransparencyFactor ( const TRgb & )

IMPORT_C TIntSetTransparencyFactor(const TRgb &aTransparencyFactor)
Deprecated

The support for window transparency factor has been deprecated. Calling this method has no effect. For window transparency see the the support for window alpha channel.

See also: RWindow::SetTransparencyAlphaChannel()

Parameters
aTransparencyFactorIgnored.
Return Value
Always KErrNone.

SetTransparencyPolicy ( TWsTransparencyPolicy )

IMPORT_C TIntSetTransparencyPolicy(TWsTransparencyPolicyaPolicy)

Sets the transparency policy of a window.

No screen content changes will occur immediately as a result of calling this function.

This function applies to transparent window only.

See also: TWsTransparencyPolicy

Parameters
aPolicyTransparent window policy.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

SetTransparencyWsBitmap ( const CWsBitmap & )

IMPORT_C TIntSetTransparencyWsBitmap(const CWsBitmap &aTransparencyBitmap)
Deprecated

Window transparency based on the use of a separate window mask bitmap has been deprecated. Calling this method method has no effect. For window transparency see the the support for window alpha channel.

See also: RWindow::SetTransparencyAlphaChannel()

Parameters
aTransparencyBitmapIgnored.
Return Value
Always KErrNone.

SetTransparentRegion ( const TRegion & )

IMPORT_C TIntSetTransparentRegion(const TRegion &aRegion)

Sets the user-defined transparent region of a window.

This will replace the default transparent region in a transparent window which is normally the full window base area. The area outside of the transparent region will be treated by window server as being opaque. The client is responsible for ensuring that opaque drawing is present in all pixels of this area. If the client fails to do this, undefined behaviour will result. It is possible to make the transparent window completely opaque by passing an empty region. Passing a region equal to the window base area or larger will revert the window to its default behaviour (i.e. full window transparency). No screen content changes will occur immediately as a result of calling this function.

This function applies to transparent window only and always causes a flush of the window server buffer.

See also: RWindow::SetTransparencyAlphaChannel()

Parameters
aRegionUser defined windows's transparent region.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.