RWsPointerCursor Class Reference

#include <w32std.h>

class RWsPointerCursor : public RWsSpriteBase, public RWsSpriteBase
Public Member Functions
RWsPointerCursor()
RWsPointerCursor(RWsSession &)
IMPORT_C TIntConstruct(TInt)
Inherited Attributes
MWsClientClass::iBuffer
MWsClientClass::iWsHandle
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
RWsSpriteBase::Activate()
RWsSpriteBase::AppendMember(const TSpriteMember &)
RWsSpriteBase::Close()
RWsSpriteBase::RWsSpriteBase()
RWsSpriteBase::RWsSpriteBase(RWsSession &)
RWsSpriteBase::UpdateMember(TInt)
RWsSpriteBase::UpdateMember(TInt,const TSpriteMember &)

Detailed Description

Pointer cursor.

The pointer cursor is created in a similar way to a sprite. After creating it, one or more sprite members containing the bitmaps to be displayed are added.

After a pointer cursor has been created and activated, it does not become visible until the application calls RWindowTreeNode::SetPointerCursor() or RWindowTreeNode::SetCustomPointerCursor(). The pointer cursor's origin automatically tracks the position of the pointing device, or position of emulated single pointer if there are more pointers in the system (see documentation of RWindowBase::EnableAdvancedPointers() for more details), and the origin forms the pointer cursor's "hot spot", i.e., the point whose co-ordinates are sent to the client if a pointer event occurs. If the pointer cursor's bitmap needs to extend to the left or upwards from the pointer position, its sprite member should be given a negative offset in TSpriteMember::iOffset.

Note:

Pointer cursors are rarely used in pure pen architectures, but they are supported for mouse or tablet use.

See also: RWindowBase::EnableAdvancedPointers()

Constructor & Destructor Documentation

RWsPointerCursor ( )

IMPORT_CRWsPointerCursor()

Default C++ constructor.

Use this constructor to allow classes that contain an RWsPointerCursor to be constructed before an RWsSession exists.

Note: do not use this version of the constructor on its own. Before an RWsPointerCursor object can be used, it must be constructed using the RWsPointerCursor(RWsSession) constructor. An example of this might be as follows:

RWsPointerCursor pointerCursor;
pointerCursor=RWsPointerCursor(iWsSession);

RWsPointerCursor ( RWsSession & )

IMPORT_CRWsPointerCursor(RWsSession &aWs)

Constructs a pointer cursor initialised with a window server session.

Initialisation must be completed using the Construct() function before the sprite can be activated using RWsSpriteBase::Activate().

Once initialisation is complete, the pointer cursor can be passed as an argument to RWsSession::SetSystemPointerCursor() or RWindowTreeNode::SetCustomPointerCursor().

Parameters
aWsThe window server session owning the pointer cursor.

Member Function Documentation

Construct ( TInt )

IMPORT_C TIntConstruct(TIntaFlags)

Completes pointer cursor construction.

This function must be called before the pointer cursor is activated.

It always causes a flush of the window server buffer.

Parameters
aFlagsESpriteFlash to flash the sprite on and off or 0 for a non-flashing cursor. Note that pointer cursors always behave as if ESpriteNoChildClip and ESpriteNoShadows are set.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.
Panic Codes
TW32Panic17 in debug builds if called on an already constructed object.