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

📄 mmi.h

📁 这是法国Kaleido公司提供了一个手机mmi设计平台
💻 H
字号:
/***************************************************************************
                             mmi.h  -  
                             ------------
    begin                : Tue Apr 04 2006
    copyright            : (C) 2006 by DigitalAirways 
    email                : info@digitalairways.com
 ***************************************************************************/

/*
 * Copyright (c) 2000-2006 DigitalAirways, sarl. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * DigitalAirways, sarl. ("Confidential Information").  You shall not 
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DigitalAirways.
 * A copy of this license is included in the licence.txt file included
 * in this software package.
 *
 * $Id: mmi.h,v 1.8 2007-04-16 08:39:26 franck.lefevre Exp $
 *
*/

/*
**************************************************************
* TODO
**************************************************************

- 

 

**************************************************************
* HISTORY
**************************************************************

  - 2006-12-08: added mmi_event, mmi_key_event
*/

#ifndef __MMI_H__
#define __MMI_H__


#ifndef KALEIDO_TIME_TYPE
#define KALEIDO_TIME_TYPE unsigned long
#define KALEIDO_MAX_TIME_VALUE 0xFFFFFFFF
#endif // ndef KALEIDO_TIME_TYPE


/* Screens' IDs */
#ifndef HARD_KEY_DEFINED // keys have already been defined
#define MAIN_SCREEN  0x01
#define AUX_SCREEN   0x02

#define HARD_KEY_UNDEF 0x00
#define HARD_KEY_PRESSED 0x01
#define HARD_KEY_RELEASED 0x02


/* Keys' IDs */
#define HARD_KEY_POWER 0x0100
#define HARD_KEY_OPEN  0x0101
#define HARD_KEY_CLOSE 0x0102
/* Numeric */
#define HARD_KEY_0 0x0200
#define HARD_KEY_1 0x0201
#define HARD_KEY_2 0x0202 
#define HARD_KEY_3 0x0203
#define HARD_KEY_4 0x0204
#define HARD_KEY_5 0x0205
#define HARD_KEY_6 0x0206
#define HARD_KEY_7 0x0207
#define HARD_KEY_8 0x0208
#define HARD_KEY_9 0x0209
#define HARD_KEY_STAR  0x020a 
#define HARD_KEY_POUND 0x020b
/**/
#define HARD_KEY_GREEN 0x0300
#define HARD_KEY_RED   0x0301
#define HARD_KEY_VALID 0x0302
#define HARD_KEY_CANCEL 0x0303
#define HARD_KEY_DELETE 0x0304
/* Joystick */ 
#define HARD_KEY_CENTER 0x0400
#define HARD_KEY_UP     0x0401
#define HARD_KEY_RIGHT  0x0402
#define HARD_KEY_DOWN   0x0403
#define HARD_KEY_LEFT   0x0404
/* Softkeys */
#define HARD_KEY_MENULEFT   0x0500
#define HARD_KEY_MENUCENTER 0x0501 
#define HARD_KEY_MENURIGHT  0x0502
/* Additional keys */
#define HARD_KEY_AUX1 0x0600
#define HARD_KEY_AUX2 0x0601
#define HARD_KEY_AUX3 0x0602
#define HARD_KEY_AUX4 0x0603
/* Sound,... */
#define HARD_KEY_FCN1UP   0x0700 
#define HARD_KEY_FCN1DOWN 0x0701
#define HARD_KEY_FCN2UP   0x0702 
#define HARD_KEY_FCN2DOWN 0x0703
#define HARD_KEY_FCN3UP   0x0704
#define HARD_KEY_FCN3DOWN 0x0705
#define HARD_KEY_FCN4UP   0x0706
#define HARD_KEY_FCN4DOWN 0x0707 
#endif
#ifdef __cplusplus
extern "C" {
#endif /* def __cplusplus */

#ifndef boolean
typedef unsigned char  boolean; 
#endif

/*
 * WARNING: this function is not supposed to be implemented in mmi.cpp. It is designed to be implementd in an 
 * external file (template...) compiled with the projects as it contains many parameterized calls depending 
 * on the application.
 */
void mmi_start(void* handle, int) ;


/*
 * Initialise the MMI's memory manager.
 * If a specific This must be done prior any other action that may need to allocate memory.
 * memoryBloc is a bloc of memory that may be used by a local allocator and that must be owned by
 * the calling shell application. For this reason, there is no function to release this memory here.
 */
void mmi_initMemory(void* memoryBloc, int blocSize);

/*
 * Initialise the MMI's context. No real action is done here.
 */
void* mmi_init(int screenWidth, int screenHeight, KALEIDO_TIME_TYPE currentTime);

/*
 * Set the storesystem's prefix to define where to look for the data.
 *  fsPrefix : prefix to use to access to the file system. The argument's ownership is NOT transferred to the function
 *      ex: "../export/"
 */
void mmi_setFsPrefix(void* handle, char* fsPrefix);

/*
 * Destroy the MMI's context.
 */
void mmi_release(void* handle);
/*
 * Send a message to the current context.
 */
int mmi_inMessage(void* handle, int messageCode, int actionCode, long actionArg);
/*
 * Send an action to the current context.
 */
int mmi_inAction(void* handle, int actionCode);
/*
 * Send an action to the current context with a defined arg.
 */
int mmi_event(void* handle, int actionCode, long actionArg);
/*
 * Repaint the screens...
 */
int mmi_repaint(void* handle);

/*
 * Notify to the current context that a key has pressed.
 */
int mmi_inkey(void* handle, int keyCode);
/*
 * Send an action to the current context with a defined arg.
 */
int mmi_key_event(void* handle,int keyCode, int action);
/*
 * Allows to know if the screen needs to be refreshed
 */
int mmi_isScreenToUpdate(void* handle);
/*
 * Confirm that the screen has been updated
 */
void mmi_screenUpdated(void* handle);
/*
 * Set a new jumplink in the main context
 */
void mmi_main_setJumplink(void* handle, int action , char* layout);
/*
 * Schedule the call a sliced function
 */
void mmi_scheduleSlicer(void* handle, KALEIDO_TIME_TYPE delay, void* function, void* user, int message, int action, unsigned long option);
/*
 * This function allows to start a project. 
 * It is supposed to be called after mmi_init() but before the first call mmi_process()
 */
void mmi_start_main(void* handle, char* keyproxy, char* suitecontext, char* usercontext, char* firstlayout);
/*
 * Process a set of pending messages, check the slicer's queue.
 */
KALEIDO_TIME_TYPE mmi_process(void* handle, KALEIDO_TIME_TYPE currentTime); 
/*
 * This function may only be used for debugging.
 */
int mmi_test(char*);
/*
 * This function MUST NOT be implemented. It may be used to test linkage errors
 */
int mmi_dummy(void); 
/*
 * This function allows to replace a value in the main context's global store.
 */
void mmi_replaceIntData(void* handle, char* key, int value);

/*
 * This function retrun a pointer to the primary context
 */
void* mmi_getPrimaryContext(void* handle);


#ifdef USE_TAPIMANAGER
 
/*
 * Create a TAPI manager. The TAPI manager created here is supposed to be an ATCommander.
 */
int mmi_createTAPIManager(void* handle, char* newPinCode, char* newServer, int newPort);
/*
 * Ask the TAPIManager to poll incoming data.
 * If data!=0, data is a string that is sent to the TAPIManager as if it was obtained through the polling but
 * there is no additional polling made in this case.
 */
int mmi_pollTAPIManager(void* handle, boolean reset, char* data, int dataLen);
/*
 * This function may just be used at debug time to test some functions from the TAPIManager.
 */
int mmi_testTAPIManager(void* handle, char* data);
#endif // def USE_TAPIMANAGER

#ifdef DEV_PROFILE
/*
 * Reset the current profiler's stamps.
 */
void mmi_rstProfilingStamps(void* handle);
/*
 * Mark the beginning of a profiled call for index.
 */
void mmi_begProfiling(void* handle, int index);
/*
 * Mark the end of a profiled call for index.
 */
void mmi_endProfiling(void* handle, int index);
/*
 * Display the current profiling data
 */
void mmi_dumpProfilingStamps(void* handle);
#endif // def DEV_PROFILE


#ifdef __cplusplus
}
#endif // def __cplusplus


#endif /* ndef __MMI_H__ */

⌨️ 快捷键说明

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