⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmieditor.h

📁 是一个手机功能的模拟程序
💻 H
字号:
#ifndef _DEF_MMI_EDITOR_H_
#define _DEF_MMI_EDITOR_H_

/*******************************************************************************

          CONDAT (UK)

********************************************************************************

 This software product is the property of Condat (UK) Ltd and may not be
 disclosed to any third party without the express permission of the owner.

********************************************************************************

 $Project name: Basic MMI
 $Project code: BMI (6349)
 $Module:   MMI
 $File:       MmiEditor.h
 $Revision:   1.0

 $Author:   Condat(UK)
 $Date:       25/10/00

********************************************************************************

 Description:

    This provides the root mofule for the basic MMI

********************************************************************************
 $History: MmiMmi.h
     * *****************  Version 02.2 *****************
 * zgz,2002.9.3
 *
 * add event define INFO_TOPREV_EDT,INFO_TONEXT_EDT

    * *****************  Version 02.1 *****************
 * zgz,2002.8.27
 *
 * add event define INFO_EDT_UPDATE

   * *****************  Version 02 *****************
 * zgz,2002.7.11
 *change the editor for eastcom symbol input
 * INFO_EDT_UPDATE

 * *****************  Version 01  *****************
 * zgz,2002.7.2
 * added function editor_attr_init_only(), editor_attr_init_fullscr(), getNextInputLen()

 
******************************************************************************

  25/10/00      Original Condat(UK) BMI version.

 $End

*******************************************************************************/




/*******************************************************************************

                    Type definitions

*******************************************************************************/
#include "mmiQQSwitch.h" //hxl add for check qq func

/*
 * Definitions from common editor function
 */
#define INFO_TIMEOUT      1
#define INFO_KCD_LEFT     2
#define INFO_KCD_RIGHT      3
#define INFO_KCD_HUP      4
#define INFO_KCD_UP       5
#define INFO_KCD_DOWN     6
#define INFO_KCD_0_9      7

//glowing, 2004-04-09, adjust the INFO_KCD_XXX define
//#define INFO_KCD_ALTERNATELEFT  8
//#define INFO_KCD_ABC	12

#define INFO_KCD_ALTERNATELEFT  28
#define INFO_KCD_ABC	22
#ifdef QQFUNC//hxl add for qq func switch,2003-3-24
#define INFO_KCD_OK		23//hxl add fro qq ,2003-3-2
#endif



#define INFO_EMERGENCY      99

#define INFO_TOPREV_EDT  220   //zgz add,2002.9.3 return this event for phonebook layer
#define INFO_TONEXT_EDT  221   //zgz add,2002.9.3 return this event for phonebook layer
#define INFO_EDT_UPDATE 222  //zgz, add 2002.8.27 return this value for upper layer update


#define DIGITS_MODE     0
#define ALPHA_MODE      1
#define READ_ONLY_MODE  2
#define T9_MODE         3
#define CALC_MODE   4
//#define T9_MODE        	3
#define PIN_SECURITY    5
#define FORMAT_MODE		6				// SH - formatted input mode for WAP
 
/* 2003/12/04 sunsj */
#define TEXTINPUT_MODE				10		//text editor
#define SHUZI_MODE					11		//number editor
#define ONLYREAD_MODE				12
#define PHONENUMONLY_MODE			13
#define IPADDRESS_MODE				14

#define PROMPT_LENGTH  20

#ifndef FOREVER
#define TIMER_EXIT  0x0BB8             /* Default SMS timer period - 3 secs.  */
#define SHORT_SECS  0x01F4                              /* Information dialogue display times. */
#define THREE_SECS  0x0BB8             /* 3000 milliseconds.                  */
#define FIVE_SECS   0x1388             /* 5000 milliseconds.                  */
#define TEN_SECS    0x2710             /* 10000 milliseconds.                 */
#define TWO_MIN     0x1D4C0            /* 2 min                               */
#define FOREVER     0xFFFF             /* Infinite time period.               */
#endif /* FOREVER */

/*
 *  Parameter Decription:
 *    ----------------
 *    mode                 -> sets mode to digits or alpha;
 *                            (ALPHA_MODE | DIGITS_MODE | READ_ONLY_MODE | T9_MODE)
 *    Callback             -> Routine to be called, if the user presses left- or right- or clear-key or a timeout occurs
 *                            (parameter = INFO_KCD_LEFT, INFO_KCD_ALTERNATELEFT, INFO_KCD_RIGHT, INFO_KCD_HUP,
 *                                         INFO_TIMEOUT)
 *    timeout              -> after this timeout the Callback will be executed
 *                            (optional, set to FOREVER if unused)
 *                            (timeout is refreshed on every key-press)
 *    Identifier           -> passed back to the creator as a parameter of Callback (optional)
 *    hide                 -> hide the entered string (currently not supported),
 *    TextId               -> If you want to use a label...
 *                            (optional, set to 0 if unused)
 *    TextString           -> if no TextId is provided this will be used as alternative label
 *                            (optional, set to NULL if unused)
 *    min_enter            -> minimum number of chars to be entered in buffer,
 *                            min_enter= 0x00                 means no min. limit
 *                            min_enter = editor_attr.size-1  means fixed lenght
 *    LeftSoftKey          -> SoftKey to be shown if number of entered chars >= min_enter
 *    AlternateLeftSoftKey -> SoftKey to be shown if number of entered chars < min_enter
 *    RightSoftKey         -> SoftKey to be shown unconditionally
 *                            (in order to hide/disable a Softkey set it to TxtNull)
 * NOTE: The buffer to be edited shall provide sufficient space to hold the terminating zero character.
 * NOTE: We assume that the buffer to be edited is provided by the caller and valid throughout the lifetime of the editor.
 *       Thus we do NOT copy the buffer into local temporary space.
 * NOTE: If digits-mode and hide are concurrently enabled, entering of '+' is not possible
 * NOTE: In read-only mode the cursor is set to the top of the buffer and all normal keys are ignored.
 *       However Softkeys and long-clear are functional.
 * NOTE: There's an exception from the normal behaviour if (mode == DIGITS) and (size == 2).
 *       In this case called "single digit key request" the editor is left immediately on any normal key
 *       by calling <Callback> with parameter INFO_KCD_LEFT.
 */

/*
 * External types
 */

typedef enum
{
    E_EDITOR_INIT,
    E_EDITOR_DEINIT,
    E_EDITOR_UPDATE
} e_editor_events;


typedef void (*T_EDIT_CB) (T_MFW_HND, USHORT, USHORT);

typedef struct
{
    T_MFW_EDT_ATTR  editor_attr;
    BOOL            hide;
    USHORT          LeftSoftKey;
    USHORT          AlternateLeftSoftKey;
    USHORT          RightSoftKey;                  //zgz,At Most time,The key  is  "Del"
    //USHORT	     AlternateRightSoftKey;  // zgz, add 2002.08.26  At Most time,The key  is  "back"
    USHORT          Identifier;
    UBYTE           mode;
    USHORT          TextId;
    char           *TextString;
    UBYTE           min_enter;
    ULONG           timeout;
    T_EDIT_CB       Callback;
    UBYTE     destroyEditor;
    UBYTE     edtInPbk;    // zgz, 2002.9.3  indicate cur editor is in phonebook or not    
    char			*FormatString;		// SH - Formatting string for formatted input
    int				formatIndex;		// SH - Position in formatting string
    int				fieldIndex;			// SH - position within a delimited field
    UBYTE           InputMode;          /* 2003/12/04 sunsj add */
} T_EDITOR_DATA;

/* PROTOTYPES */
extern T_MFW_HND editor_start (T_MFW_HND parent, T_EDITOR_DATA * editor_data);

extern T_MFW_HND editor_start_common(T_MFW_HND win, char * buffer, U16 len,
                                     T_EDITOR_DATA * editor_info, T_EDIT_CB editor_cb);

int showeZiTextIcon(MfwMnu* m, MfwMnuItem* i);

 int Easy_Activate(MfwMnu* m, MfwMnuItem* i);

 int Easy_DeActivate(MfwMnu* m, MfwMnuItem* i);

extern void editor_destroy (T_MFW_HND window);
extern void editor_attr_init(MfwEdtAttr* attr, int zone_id, U8 mode, U8 *controls, char *text, U16 size);
////////////////////////
extern void editor_attr_init_only(MfwEdtAttr* attr, U16 px, U16 py, U16 sx, U16 sy, U8 titleMode, int title_id, char *text, U16 size , U8 mode, char *textnum); //zgz,2002.7.2
extern void editor_attr_init_fullscr(MfwEdtAttr* attr,  U8 titleMode, int title_id, char *text, U16 size, U8 mode );  //zgz,2002.7.2
extern int getNextInputLen(void);  //zgz,2002.06.28
//yq add for sms
extern BOOL set_esize (U16 esize, MfwHnd win);
#endif /* _DEF_MMI_EDITOR */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -