#include <w32std.h>
class RWindow : public RDrawableWindow, public RDrawableWindow |
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 Attributes | |
---|---|
MWsClientClass::iBuffer | |
MWsClientClass::iWsHandle |
Inherited Enumerations | |
---|---|
RWindowBase:TCaptureFlags | |
RWindowTreeNode:TFadeControl |
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.
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.
IMPORT_C | RWindow | ( | RWsSession & | aWs | ) |
Constructor which creates an initialised window handle within a server session.
Parameters | |
---|---|
aWs | Window server session to use. |
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.
See also: EndRedraw()
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.
See also: EndRedraw()
Parameters | |
---|---|
aRect | The rectangle to be redrawn. |
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.
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 | |
---|---|
parent | The window's parent. |
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. |
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 | |
---|---|
aEnabled | Indicates whether the redraw store should be enabled or disabled. |
IMPORT_C void | EndRedraw | ( | ) |
Ends the current redraw.
This function should be called when redrawing is complete.
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 | |
---|---|
aRegion | On return, contains the invalid region. |
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.
See also: RWindow::SetTransparencyAlphaChannel()
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.
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 | |
---|---|
aRect | Area to invalidate. |
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.
See also: RWindow::EnableRedrawStore()
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 | |
---|---|
aColor | Background colour to be used during redraws. |
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.
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 | |
---|---|
point | The position of the window's origin, relative to its parent. |
size | The window size. |
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().
See also: RWindow::SetTransparentRegion()
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 | |
---|---|
size | The window size. |
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.
See also: RWindow::SetBackgroundColor()
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.
See also: RWindow::SetTransparencyAlphaChannel()
Parameters | |
---|---|
aTransparencyBitmap | Ignored. |
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 | |
---|---|
aTransparencyFactor | Ignored. |
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.
See also: TWsTransparencyPolicy
Parameters | |
---|---|
aPolicy | Transparent window policy. |
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 | |
---|---|
aTransparencyBitmap | Ignored. |
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 | |
---|---|
aRegion | User defined windows's transparent region. |