📄 mmi.h
字号:
#ifndef _MMI_H
#define _MMI_H
/* MMI.h*/
/*
* jsguo created 2005.10.12
*
*/
#include "../inc/nucleus.h"
#include "../inc/winconfig.h"
#include "../inc/windows.h"
///jsguo
/* Define colors */
#ifndef MAINFRAME_WIDTH_DEFAULT
#define MAINFRAME_WIDTH_DEFAULT 240
#endif
#ifndef MAINFRAME_HEIGHT_DEFAULT
#define MAINFRAME_HEIGHT_DEFAULT 320
#endif
#ifndef MENU_HEIGHT_DEFAULT
#define MENU_HEIGHT_DEFAULT 12
#endif
#ifndef LIST_HEIGHT_DEFAULT
#define LIST_HEIGHT_DEFAULT 20
#endif
#ifndef LIST_DATA_DEFAULT
#define LIST_DATA_DEFAULT (MAINFRAME_HEIGHT_DEFAULT-30)/20
#endif
#ifndef MENU_MAIN
#define MENU_MAIN 0
#endif
#ifndef COLOR_NORMAL
#define COLOR_NORMAL 0xf800
#endif
#ifndef COLOR_SELECT
#define COLOR_SELECT 0xD6FD
#endif
#ifndef MENU_PREVIEW
#define MENU_PREVIEW 1
#endif
#if 0
#ifndef VIDEO_BUF_LEN
#define KBYTE (1024)
#define MBYTE (KBYTE * KBYTE)
#define VIDEO_BUF_LEN (2600*KBYTE)
//#define VIDEO_BUF_LEN (1*MBYTE)
#endif
#endif
//////////////////////////////////////////////////////////
// add by leon; define the key value //For 868 demo zlg cip
//////////////////////////////////////////////////////////
#ifndef KEY_UP
#define KEY_UP 11//28
#endif
#ifndef KEY_DOWN
#define KEY_DOWN 5//29
#endif
#ifndef KEY_RIGHT
#define KEY_RIGHT 10//12
#endif
#ifndef KEY_LEFT
#define KEY_LEFT 8//13
#endif
#ifndef KEY_OK
#define KEY_OK 4//5
#endif
#ifndef KEY_CANCEL
#define KEY_CANCEL 6//4
#endif
#ifndef KEY_CALL
#define KEY_CALL 12//21
#endif
#ifndef KEY_HANGUP
#define KEY_HANGUP 3//20
#endif
// Hua, add. 2006.1.2. The key in the middle of up,down, left,right
#ifndef KEY_MIDDLE
#define KEY_MIDDLE 0
#endif
#ifndef KEY_DELETE
#define KEY_DELETE 1
#endif
#ifndef KEY_1
#define KEY_1 3
#endif
#ifndef KEY_2
#define KEY_2 2
#endif
#ifndef KEY_3
#define KEY_3 1
#endif
#ifndef KEY_4
#define KEY_4 11
#endif
#ifndef KEY_5
#define KEY_5 10
#endif
#ifndef KEY_6
#define KEY_6 9
#endif
#ifndef KEY_7
#define KEY_7 19
#endif
#ifndef KEY_8
#define KEY_8 18
#endif
#ifndef KEY_9
#define KEY_9 17
#endif
#ifndef KEY_0
#define KEY_0 26
#endif
#ifndef KEY_X
#define KEY_X 27
#endif
#ifndef KEY_J
#define KEY_J 25
#endif
//////////////////////////////////////////////////////////
// add by leon; define the key value
//////////////////////////////////////////////////////////
/////////////////////jsguo 10.11//////////////////////////////////
//
typedef void (*KeyEvent)(UINT iMsg, WPARAM wParam, LPARAM lParam);
typedef int WINAPI (*InitMWindow)(void);
typedef int WINAPI (*CloseMWindow)(void);
typedef int WINAPI (*ExitInitMWindow)(void);
//
typedef struct MENU_STRUCT
{
char MenuName[50];
KeyEvent event;
}Menu;
typedef struct FORM_STRUCT
{
Menu * MenuList;
int MenuSize;
int CurrentMenuItem;
}Form;
/***************************************************/
//Remark:
//User_:Add the codes yourself
//MMI_:the external interfaces of MMI
/***************************************************/
//the interfaces of the MainForm.c
int User_initMain(void);
//the interfaces of the appDocument.c
int User_initDocument(void);
int User_closeDocument(void);
int MMI_GetDocumentSelectItem(void);
//the interfaces of the appFileList.c
int User_InitFileList(void);
int User_closeFileList(void);
int User_FileList_AddItem(char* str);
int MMI_GetFileListSelectItem(void);
char* MMI_GetFileListSelectItem_Name(void);
int USER_FileList_Delete(char* FileName);
//the interfaces of the appMediaPlayer.c
int User_InitMediaPlayer(void);
int USER_ExitInitMediaPlayer(void);
int USER_closeMediaPlayer(void);
void User_MediaPlayer_Play(UINT iMsg, WPARAM wParam, LPARAM lParam);
void User_MediaPlayer_Pause(UINT iMsg, WPARAM wParam, LPARAM lParam);
void User_MediaPlayer_Stop(UINT iMsg, WPARAM wParam, LPARAM lParam);
void User_MediaPlayer_Record(UINT iMsg, WPARAM wParam, LPARAM lParam);
void User_KeyValueEvent(UINT iKeyValue);
void User_MediaPlayerVolumeUp(void);
void User_MediaPlayerVolumeDown(void);
int MMI_SetSliderMaxValue(int MaxSliderValue);
int MMI_SetVolumeMaxValue(int MaxVolumeValue);
int MMI_SetSliderValue(int CurrentSliderValue);
int MMI_SetVolumeValue(int CurrentVolumeValue);
int MMI_SetCalculagraphValue(int CurrentCalculagraphValue);
//the interfaces of the U_Disk.c
int User_initU_Disk(void);
int User_closeU_Disk(void);
//the interfaces of the U_DiskList.c(include SD and NandFlash)
int User_initSDU_Disk(void);
int User_closeSDU_Disk(void);
int User_initNandFlashU_Disk(void);
int User_closeNandFlashU_Disk(void);
//the interfaces of the appCamera.c
int User_InitCamera(void);
int USER_ExitInitCamera(void);
int USER_closeCamera(void);
int User_CameraUp(void);
int User_CameraDown(void);
int User_CameraLeft(void);
int User_CameraRight(void);
int User_CameraOK(void);
int MMI_SetCameraInfo(char* szInfoLeft,char* szInfoRight,char* szButtonLeft,char* szButtonRight);
//the interfaces of the savePicture.c
int User_InitSavePicture(void);
int USER_ExitInitSavePicture(void);
int USER_closeSavePicture(void);
int User_SavePictureUp(void);
int User_SavePictureDown(void);
int User_SavePictureLeft(void);
int User_SavePictureRight(void);
int User_SavePictureSave(void);
int MMI_SetSavePictureInfo(char* szInfoLeft,char* szInfoRight,char* szButtonLeft,char* szButtonRight);
//the interfaces of the appSetting_slider.c
int User_closeSettingSlider(void);
int User_initSettingSlider(void);
int User_closeSettingSlider(void);
int User_SettingSliderLeft(void);
int User_SettingSliderRight(void);
int MMI_SettingSlider_AddItem(char* str);
int MMI_SetSettingSliderMaxValue(int MaxSliderValue);
int MMI_SetSettingSliderValue(int nSliderCount,int CurrentSliderValue);
int MMI_GetSettingSliderSelectItem(void);
//the interfaces of the appSetting_character.c
int User_initSettingCharacter(void);
int User_closeSettingCharacter(void);
int User_SettingCharacterLeft(void);
int User_SettingCharacterRight(void);
int MMI_SettingCharacter_AddItem(char* str);
int MMI_GetSettingCharacterSelectItem(void);
//the interfaces of the appSettingList.c
int MMI_GetSettingSelectItem(void);
int User_initSettingList(void);
int User_closeSettingList(void);
////////////////////////////////////////////////////////////////////////////////////////////
//MMI Using
int WINAPI SetMainList(InitMWindow init);
int WINAPI SetDocumentList(InitMWindow init,CloseMWindow close,Form FormDocumentList);
int WINAPI SetFileList(InitMWindow init,CloseMWindow close);
int WINAPI SetMediaPlayer(InitMWindow init,ExitInitMWindow exitInit,CloseMWindow close);
int WINAPI SetCamera(InitMWindow init,ExitInitMWindow exitInit,CloseMWindow close);
int WINAPI SetUDisk(InitMWindow init,CloseMWindow close,Form FormUDist);
int WINAPI SetUDiskList(InitMWindow init,CloseMWindow close,Form FormUDistList);
void Menu_MediaPlayer(UINT iMsg, WPARAM wParam, LPARAM lParam);
void Menu_SDFileList(UINT iMsg, WPARAM wParam, LPARAM lParam);
void Menu_DocumentList(UINT iMsg, WPARAM wParam, LPARAM lParam);
void MainMenu_MainList(UINT iMsg, WPARAM wParam, LPARAM lParam);
void Menu_Camera(UINT iMsg, WPARAM wParam, LPARAM lParam);
void Menu_SavePicture(UINT iMsg, WPARAM wParam, LPARAM lParam);
void Menu_SettingList(UINT iMsg, WPARAM wParam, LPARAM lParam);
void Menu_UDisk(UINT iMsg, WPARAM wParam, LPARAM lParam);
void SD_UDisk(UINT iMsg, WPARAM wParam, LPARAM lParam);
void NandFlask_UDisk(UINT iMsg, WPARAM wParam, LPARAM lParam);
///////////////////
typedef struct VM_MMI_APP__STRUCT
{
char * AppName; // 程序名
unsigned char * pBitmap; // 位图
KeyEvent event;
}vmMMIApp;
#endif /* _MMI_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -