/*===========================================================================

FILE:  KDDIEdit_Sub.h

===========================================================================*/
#ifndef KDDIEDIT_SUB_H
#define KDDIEDIT_SUB_H
/* <EJECT> */
/*===========================================================================

                        EDIT HISTORY FOR MODULE

when       who     what, where, why
--------   ---     ----------------------------------------------------------
03/05/05           new

===========================================================================*/


/*===============================================================================
    INCLUDES AND VARIABLE DEFINITIONS
===============================================================================*/

/*-------------------------------------------------------------------
            Defines
-------------------------------------------------------------------*/

/*-------------------------------------------------------------------
      Include Files
-------------------------------------------------------------------*/
#include "AEEText.h"
#include "AEE_OEM.h"

/*-------------------------------------------------------------------
      Type Declarations
-------------------------------------------------------------------*/
//Maximum length of the Mode string. This is used in the Menu.

#define KDDI_MAX_MODE_STR 15

//Info holder for the text modes
typedef struct
{
    uint16 wID; // ID of the Text Mode.
    AECHAR pszTitle[KDDI_MAX_MODE_STR+1]; // Name of the mode. This name is used in the menu.
} KDDITextMode;



//-------------------------------------------------------------------
// Global Constant Declarations
//-------------------------------------------------------------------

//-------------------------------------------------------------------
// Global Data Declarations
//-------------------------------------------------------------------


//===============================================================================
// FUNCTION DECLARATIONS and INLINE FUNCTION DEFINITIONS
//===============================================================================

OEMCONTEXT          ExtTextSub_Create           (const IShell* pIShell, const IDisplay* pIDisplay, const AEERect *pRect);
void                ExtTextSub_Delete           (OEMCONTEXT hTextField);
void                ExtTextSub_TextSet          (OEMCONTEXT hTextField, AECHAR *pszText,uint16 size);
AECHAR            * ExtTextSub_TextGet          (OEMCONTEXT hTextField);
void                ExtTextSub_TextDraw         (OEMCONTEXT hTextField);
void                ExtTextSub_Update           (OEMCONTEXT hTextField);
void                ExtTextSub_GetModeString    (OEMCONTEXT hTextField, AECHAR* szBuf, uint16 len);
void                ExtTextSub_SetEdit          (OEMCONTEXT hTextField, boolean bIsEditable, AEETextInputMode wmode);
AEETextInputMode    ExtTextSub_GetCurrentMode   (OEMCONTEXT hTextField);
void                ExtTextSub_AddChar          (OEMCONTEXT hTextField,AECHAR ch, boolean bOverStrike);
int                 ExtTextSub_QueryModes       (KDDITextMode** ppTextMode);
boolean             ExtTextSub_KeyPress         (OEMCONTEXT hTextField, AEEEvent eCode, uint32 dwKeyCode, uint32 dwKeySyms);
uint32              ExtTextSub_GetProperties    (OEMCONTEXT hTextField);
void                ExtTextSub_SetProperties    (OEMCONTEXT hTextField, uint32 dwProperties);
void                ExtTextSub_GetRect          (OEMCONTEXT hTextField, AEERect *pOutRect);
void                ExtTextSub_TextSetRect      (OEMCONTEXT hTextField, const AEERect *pInRect);
uint16              ExtTextSub_GetMaxChars      (OEMCONTEXT hTextField);
void                ExtTextSub_SetMaxChars      (OEMCONTEXT hTextField, uint16 wMaxChars);
void                ExtTextSub_SetSel           (OEMCONTEXT hTextField, int iSelStart, int iSelEnd);
void                ExtTextSub_GetSel           (OEMCONTEXT hTextField, int *piSelStart, int *piSelEnd);
void                ExtTextSub_EnumModesInit    (void);
boolean             ExtTextSub_EnumMode         (KDDITextMode* pMode);
uint16              ExtTextSub_QuerySymbols     (AECHAR *pszOut, uint16 size);
int32               ExtTextSub_GetCursorPos     (OEMCONTEXT hTextField);
void                ExtTextSub_SetCursorPos     (OEMCONTEXT hTextField, int32 nOffset);
void                ExtTextSub_TimerStop        (OEMCONTEXT hTextField);

#endif    // KDDIEDIT_SUB_H
