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

📄 keybrd.h

📁 MTK手机平台的MMI部分的源代码
💻 H
字号:
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2005
*
*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
*
*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/

/*******************************************************************************
 * Filename:
 * ---------
 * MMI_features.h
 *
 * Project:
 * --------
 *   MAUI
 *
 * Description:
 * ------------
 *   This file is intends for MMI keypad config function.
 *
 * Author:
 * -------
 * -------
 *
 *==============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *==============================================================================
 *******************************************************************************/

#ifndef _KEYBRD_H_
#define _KEYBRD_H_
#include "PixtelDataTypes.h"
#include "QueueGprot.h"
#include "FrameworkStruct.h"

/***************************************************************************** 
* Define
*****************************************************************************/
#define TOTAL_KEYS GetMaxPresentAllKeys()       /* JL 040223 for 3 extra keys. 22 */

#define KEYTIMER_LONGPRESS       2000   /* Key Long Pres Duration */
#define KEYTIMER_REPEAT          1000   /* Key Reapeat Duration */

/***************************************************************************** 
* Typedef 
*****************************************************************************/

typedef struct
{
    S16 nKeyCode;       /* From Key Pad Driver */
    S16 nMMIKeyCode;    /* Key code mapped from MMI perspective */
    S16 nTimerId;
    /* S16 nKeyState;//Pressed,Released or idle */
    U8 KeyPadTone;
    U8 KeyPadDuration;
#ifdef MMI_ON_WIN32
    S16 nHotKey;        /* Mapping to keyboard in PC simulator */
#endif 
} KeyPadMap;

typedef struct
{
    S16 nKeyState;
} KeyPadState;

/***************************************************************************** 
* Extern Global Variable
*****************************************************************************/
extern const U16 PresentAllKeys[];

/***************************************************************************** 
* Extern Global Function
*****************************************************************************/
#ifdef MMI_ON_WIN32
extern void KeyTimerExpiryProc(void *idEvent);
#endif /* MMI_ON_WIN32 */
extern void ProcessKeyEvent(U32 MsgType, U16 KeyMapIndex);
extern U8 ProcessPCKeyEvent(U32 MsgType, KEYBRD_MESSAGE *KeyBrdMsg);

/* Max 2005/02/20 */
extern void InitProcessKeyEvent(void);
extern void ProcessKeyBoardEvent(U32 MsgType, U16 KeyCode, U16 KeyMapIndex);
extern void KeyHandler(void *paraBuff);
extern void InitKeypadBeforePWRON(void);
extern void KeyHandleBeforePWRON(void *paraBuff);
extern void ClearKeyEvents(void);
extern S16 GetHumanVoiceToneID(S16 MMIKeyCode);
extern U16 GetCurKeypadTone(void);
extern U16 GetKeypadTone(S16 KeyCode);
extern U8 SetCurKeypadTone(U16 KeyTone);
extern U8 GetKeypadDuration(S16 KeyCode);
extern void StopCurrentKeyPadTone(void);
extern U8 GetMaxPresentAllKeys(void);
extern U8 GetMaxPresentDigitsKeys(void);

extern void mmi_kbd_reset_key_state(U32 MsgType, U16 KeyMapIndex);
extern void mmi_frm_kbd_set_tone_state(mmi_frm_kbd_tone_state_enum state);
extern mmi_frm_kbd_tone_state_enum mmi_frm_kbd_get_key_tone_state(void);
extern BOOL mmi_frm_kbd_is_tone_played(S16 key_code, S16 key_type);
extern void mmi_frm_kbd_reg_pre_key_hdlr(PsKeyProcessCBPtr func);
extern void mmi_frm_kbd_reg_post_key_hdlr(PsKeyProcessCBPtr func);
extern void mmi_frm_stop_keypad_tone(S16 key_code);
extern void mmi_frm_play_keypad_tone(S16 key_code);
extern U8 mmi_kbd_app_key_hdlr(KEYBRD_MESSAGE *eventKey);

extern void mmi_frm_set_key_handle_in_high_frequency(MMI_BOOL is_enable);

extern void mmi_frm_convert_process_key_event(U32 Keyevent, U16 KeyMapIndex);

extern void mmi_kbd_set_concurrent_mode(MMI_BOOL mode);
extern MMI_BOOL mmi_kbd_get_concurrent_mode(void);
extern U8 mmi_kbd_get_key_is_pressing_count(void);
extern S16 mmi_kbd_reverse_code(S16 mmi_key_code);

#ifndef MMI_ON_WIN32
/* redirect L4KeyHandle to mmi_frm_key_handle. may replace L4KeyHandle later */
#define L4KeyHandle   mmi_frm_key_handle
extern void mmi_frm_key_handle(void *paraBuff);
#endif /* MMI_ON_WIN32 */

void mmi_frm_set_default_power_onoff_key(void);

#endif /* _KEYBRD_H_ */ 

⌨️ 快捷键说明

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