RWindow Class Reference

class RWindow : public RDrawableWindow

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.

Public Member Functions
RWindow ()
RWindow ( RWsSession &)
IMPORT_C void BeginRedraw ()
IMPORT_C void BeginRedraw (const TRect &)
IMPORT_C void ClearRedrawStore ()
IMPORT_C TInt Construct (const RWindowTreeNode &, TUint32 )
IMPORT_C void EnableOSB ( TBool )
IMPORT_C void EnableRedrawStore ( TBool )
IMPORT_C void EndRedraw ()
IMPORT_C void GetInvalidRegion ( RRegion &)
IMPORT_C void HandleTransparencyUpdate ()
IMPORT_C void Invalidate ()
IMPORT_C void Invalidate (const TRect &)
IMPORT_C TBool IsRedrawStoreEnabled ()
IMPORT_C void SetBackgroundColor ( TRgb )
IMPORT_C void SetBackgroundColor ()
IMPORT_C void SetExtent (const TPoint &, const TSize &)
IMPORT_C void SetNonTransparent ()
IMPORT_C void SetSize (const TSize &)
IMPORT_C TInt SetTransparencyAlphaChannel ()
IMPORT_C TInt SetTransparencyBitmap (const CFbsBitmap &)
IMPORT_C TInt SetTransparencyFactor (const TRgb &)
IMPORT_C TInt SetTransparencyPolicy ( TWsTransparencyPolicy )
IMPORT_C TInt SetTransparencyWsBitmap (const CWsBitmap &)
IMPORT_C TInt SetTransparentRegion (const TRegion &)
Inherited Functions
MWsClientClass::AddToBitmapArray(const TInt)const
MWsClientClass::AsyncRequest(TRequestStatus &,TUint)const
MWsClientClass::CachedWindowSize(TSize &)const
MWsClientClass::DestroyWindowNativeSizeCacheEntry()
MWsClientClass::DestroyWindowSizeCacheEntry()
MWsClientClass::EnableWindowNativeSizeCacheL()
MWsClientClass::MWsClientClass()
MWsClientClass::MWsClientClass(RWsBuffer *)
MWsClientClass::MarkWindowSizeCacheDirty()
MWsClientClass::RefreshWindowSizeCache(const TSize &)const
MWsClientClass::SetWindowNativeSize(const TSize &)const
MWsClientClass::WindowNativeSize(TSize &)const
MWsClientClass::WindowNativeSizeCacheEnabled()const
MWsClientClass::WindowSizeCacheEnabled()const
MWsClientClass::Write(TUint)const
MWsClientClass::Write(const TAny *,TInt,TUint)const
MWsClientClass::Write(const TAny *,TInt,const TAny *,TInt,TUint)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::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::SetBackgroundSurface(const TSurfaceConfiguration &,TBool)
RWindowBase::SetBackgroundSurface(const TSurfaceId &)
RWindowBase::SetCornerType(TCornerType,TInt)
RWindowBase::SetExtentErr(const TPoint &,const TSize &)
RWindowBase::SetPointerCapture(TInt)
RWindowBase::SetPointerCapturePriority(TInt)
RWindowBase::SetPointerGrab(TBool)
RWindowBase::SetPosition(const TPoint &)
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
Inherited Enumerations
RWindowBase:TCaptureFlags
RWindowTreeNode:TFadeControl
Inherited Attributes
MWsClientClass::iBuffer
MWsClientClass::iWsHandle
RWindowTreeNode::__DECLARE_TEST

Constructor & Destructor Documentation

RWindow()

IMPORT_C RWindow ( )

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_C RWindow ( RWsSession & aWs )

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

Parameters

RWsSession & aWs Window server session to use.

Member Functions Documentation

BeginRedraw()

IMPORT_C void BeginRedraw ( )

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.

EndRedraw()

BeginRedraw(const TRect &)

IMPORT_C void BeginRedraw ( 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.

EndRedraw()

Parameters

const TRect & aRect The rectangle to be redrawn.

ClearRedrawStore()

IMPORT_C void ClearRedrawStore ( )

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 TInt Construct ( const RWindowTreeNode & parent,
TUint32 aHandle
)

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

const RWindowTreeNode & parent The window's parent.
TUint32 aHandle Client 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.

EnableOSB(TBool)

IMPORT_C void EnableOSB ( TBool )

Enables/Disables the WSERV to use its OSB

Parameters

TBool

EnableRedrawStore(TBool)

IMPORT_C void EnableRedrawStore ( TBool aEnabled )

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

TBool aEnabled Indicates whether the redraw store should be enabled or disabled.

EndRedraw()

IMPORT_C void EndRedraw ( )

Ends the current redraw.

This function should be called when redrawing is complete.

GetInvalidRegion(RRegion &)

IMPORT_C void GetInvalidRegion ( 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

RRegion & aRegion On return, contains the invalid region.

HandleTransparencyUpdate()

IMPORT_C void HandleTransparencyUpdate ( )

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.

RWindow::SetTransparencyAlphaChannel()

Invalidate()

IMPORT_C void Invalidate ( )

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 void Invalidate ( 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

const TRect & aRect Area to invalidate.

IsRedrawStoreEnabled()

IMPORT_C TBool IsRedrawStoreEnabled ( ) const

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.

RWindow::EnableRedrawStore()

SetBackgroundColor(TRgb)

IMPORT_C void SetBackgroundColor ( TRgb aColor )

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

TRgb aColor Background colour to be used during redraws.

SetBackgroundColor()

IMPORT_C void SetBackgroundColor ( )

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 void SetExtent ( 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.

RBackedUpWindow

Parameters

const TPoint & point The position of the window's origin, relative to its parent.
const TSize & size The window size.

SetNonTransparent()

IMPORT_C void SetNonTransparent ( )

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() .

RWindow::SetTransparentRegion()

SetSize(const TSize &)

IMPORT_C void SetSize ( 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

const TSize & size The window size.

SetTransparencyAlphaChannel()

IMPORT_C TInt SetTransparencyAlphaChannel ( )

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.

RWindow::SetBackgroundColor()

SetTransparencyBitmap(const CFbsBitmap &)

IMPORT_C TInt SetTransparencyBitmap ( const CFbsBitmap & aTransparencyBitmap )

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.

RWindow::SetTransparencyAlphaChannel()

Parameters

const CFbsBitmap & aTransparencyBitmap Ignored.

SetTransparencyFactor(const TRgb &)

IMPORT_C TInt SetTransparencyFactor ( const TRgb & aTransparencyFactor )

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.

RWindow::SetTransparencyAlphaChannel()

Parameters

const TRgb & aTransparencyFactor Ignored.

SetTransparencyPolicy(TWsTransparencyPolicy)

IMPORT_C TInt SetTransparencyPolicy ( TWsTransparencyPolicy aPolicy )

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.

TWsTransparencyPolicy

Parameters

TWsTransparencyPolicy aPolicy Transparent window policy.

SetTransparencyWsBitmap(const CWsBitmap &)

IMPORT_C TInt SetTransparencyWsBitmap ( const CWsBitmap & aTransparencyBitmap )

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.

RWindow::SetTransparencyAlphaChannel()

Parameters

const CWsBitmap & aTransparencyBitmap Ignored.

SetTransparentRegion(const TRegion &)

IMPORT_C TInt SetTransparentRegion ( 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.

RWindow::SetTransparencyAlphaChannel()

Parameters

const TRegion & aRegion User defined windows's transparent region.