williamr@4: // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // text cursor header file williamr@4: // williamr@4: // williamr@4: williamr@4: #ifndef TEXTCURSOR_H williamr@4: #define TEXTCURSOR_H williamr@4: williamr@4: struct TTextCursor williamr@4: /** Text cursor parameter information. williamr@4: williamr@4: A text cursor is a rectangular area which can be set to flash. It is normally williamr@4: only visible when the window group which owns it has the keyboard focus. This williamr@4: structure is used to define the parameters of a text cursor, which can be williamr@4: selected for use through the window group using RWindowGroup::SetTextCursor(). williamr@4: williamr@4: Custom (non-rectangular) text cursors are supported from v7.0s. They are added williamr@4: to the window server using RWsSession::SetCustomTextCursor(), after which williamr@4: they can be selected for use through the window group, in the same way as williamr@4: standard rectangular cursors. They have a unique identifier, stored in the williamr@4: iType member, which must be greater than ETypeLastBasic. Custom text cursors williamr@4: are clipped to their iHeight and iWidth values. Their iColour member is not williamr@4: used. williamr@4: williamr@4: @publishedAll williamr@4: @released */ williamr@4: { williamr@4: // The different normal text cursors williamr@4: // A Text cursor can either be a predefined one williamr@4: // or a general sprite. Cursors between ETypeFirst williamr@4: // and ETypeLastBasic are predefined ones (even though williamr@4: // the ones above ETypeLast do not exist and are williamr@4: // for future use) williamr@4: /** Cursor type values. williamr@4: williamr@4: The values between ETypeFirst and ETypeLastBasic are reserved for predefined williamr@4: cursors. Custom text cursors must have a value greater than ETypeLastBasic. williamr@4: williamr@4: The values not listed below are for internal use only. williamr@4: williamr@4: @publishedAll */ williamr@4: enum ENamedCursors williamr@4: { williamr@4: ETypeNone, williamr@4: /** Standard filled rectangular cursor. */ williamr@4: ETypeRectangle, williamr@4: /** Standard hollow rectangular cursor. */ williamr@4: ETypeHollowRectangle, williamr@4: /** The first predefined cursor type. williamr@4: williamr@4: Equivalent to ETypeRectangle. This can be used for iterating through the predefined williamr@4: cursor types. williamr@4: williamr@4: WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases. */ williamr@4: ETypeFirst=ETypeRectangle, williamr@4: /** The last predefined cursor type. williamr@4: williamr@4: Equivalent to ETypeHollowRectangle. This can be used for iterating through williamr@4: the predefined cursor types. williamr@4: williamr@4: WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases. */ williamr@4: ETypeLast=ETypeHollowRectangle, williamr@4: /** Reserved for future use. williamr@4: williamr@4: /** All custom text cursors must have a type value greater than this. */ williamr@4: ETypeLastBasic = 1000, williamr@4: }; williamr@4: /** Added for compatibility with previous releases. */ williamr@4: typedef TInt EType; williamr@4: /** Cursor flash and clipping flags. williamr@4: williamr@4: The flags not listed below are for internal use only. */ williamr@4: enum EFlags williamr@4: { williamr@4: /** The text cursor should not flash. */ williamr@4: EFlagNoFlash = 0x00000001, williamr@4: /** The bitmap of each sprite member is clipped left of its x-origin and right of williamr@4: its x-origin plus iWidth. williamr@4: williamr@4: Used for custom text cursors only. */ williamr@4: EFlagClipHorizontal = 0x00000002, williamr@4: /** The bitmap of each sprite member is clipped vertically. williamr@4: williamr@4: How it is clipped depends on the text cursor's vertical alignment, see the williamr@4: TCustomTextCursorAlignment enum in class RWsSession. williamr@4: williamr@4: Used for custom text cursors only. */ williamr@4: EFlagClipVertical = 0x00000004, williamr@4: }; williamr@4: /** The cursor type. williamr@4: williamr@4: For possible values, see the ENamedCursors enum. */ williamr@4: TInt iType; williamr@4: /** The height of the text cursor. williamr@4: williamr@4: This value is also used for clipping custom text cursors, if the EFlagClipVertical williamr@4: flag is set. */ williamr@4: TInt iHeight; williamr@4: /** The ascent of the text cursor (the distance between the origin and the top). */ williamr@4: TInt iAscent; williamr@4: /** The width of the text cursor. williamr@4: williamr@4: Custom text cursors are clipped to this value, if the EFlagClipHorizontal williamr@4: flag is set. */ williamr@4: TInt iWidth; williamr@4: /** Cursor flash and clipping flags. williamr@4: williamr@4: For possible values, see the EFlags enum. */ williamr@4: TUint iFlags; williamr@4: /** The colour of the text cursor. williamr@4: williamr@4: If the cursor is flashing, this colour is XOR'd with the screen. williamr@4: williamr@4: This value is not used for custom text cursors. */ williamr@4: TRgb iColor; williamr@4: }; williamr@4: williamr@4: #endif // TEXTCURSOR_H