Writing Application Using Pixtel MMI Platform
Pixtel Confidential
Version 1.4 – July 25, 2005 Page: 2 of 40
© 2003 Pixtel Communication, Inc.
Revision History
Revision Date
(mm/dd/yyyy)
Author Comments
1.0 01/24/2003 Pixtel First Release
1.1 04/24/2003 Pixtel Second Release
1.2 10/29/2003 Neeraj Third Release
1.3 07/10/2004 JL Lee To integrate the ExecuteCurrExitHandler and
SetExitHandler into EntryNewScreen
1.4 07/25/2005 Justin Chuang Update definition of resource base ID
Writing Application Using Pixtel MMI Platform
Pixtel Confidential
Version 1.4 – July 25, 2005 Page: 3 of 40
© 2003 Pixtel Communication, Inc.
Table of Contents
Revision History 2
Table of Contents 3
1 Scope 5
2 Choose the Category Screens as Per the Screen Layout 6
3 Control the History Flow 7
4 Event Handlers 8
5 Write the Entry/Exit Functions 9
5.1
Entry Function 9
5.2
Exit Function 9
6 Populate Resource Macros 10
6.1
Defining String Ids, Image Ids & Menu Ids 11
7 Customization Related Guidelines 13
8 Ranges of Hash Defines Given to Various Applications 15
8.1
Before 05A Branch 15
8.2
After 05B Branch 16
9 Global Resources 17
9.1
List of Global Strings & Images 17
9.2
Global Array of Index Icons 17
10 Sequence of the API for Writing an Application 18
10.1
Code Snippet for Initialization Function 18
10.2
Code Snippet for the Entry Function 18
10.3
Code Snippet for Exit Function 20
11 Coding Guidelines 21
11.1
File Structure 21
11.1.1
CallInc 21
11.1.2
CallSrc 21
11.2
Function Naming Conventions 21
11.3
Global Variable Naming Conventions 22
12 Hardware Porting Code Dependencies 23
12.1
Nomenclature of Message Ids 23
12.2
Registration of Protocol Event Handlers 23
12.3
External Memory Handling 24
12.4
Typical Code Structure 24
13 Writing Unicode Compatible Code 25
13.1
Avoid String Libraries for String Manipulation 25
13.2
Array Definition for Storing Strings 25
14 Debug Macros 27
15 SubLCD History 28
16 Hint Handlers 29
Writing Application Using Pixtel MMI Platform
Pixtel Confidential
Version 1.4 – July 25, 2005 Page: 4 of 40
© 2003 Pixtel Communication, Inc.
16.1
Modifying Hints at Runtime 31
17 Global Buffer for Dynamic Menu Items 32
18 Displaying Popups 33
19 NVRAM Usage in Pixtel Framework 34
19.1
APIs 34
19.1.1
ReadRecord 34
19.1.2
WriteRecord 34
19.1.3
DeleteRecord 35
19.1.4
ReadValue 35
19.1.5
WriteValue 36
19.2
Error Codes 36
19.2.1
How to Use NVRAM Manager 36
19.2.1.1
File Creation 37
19.3
NVRAM Read for Your Application at Bootup 37
19.4
Tips for Application Writers 38
20 Deinitiaisation of Applications 39
21 References 40
Writing Application Using Pixtel MMI Platform
Pixtel Confidential
Version 1.4 – July 25, 2005 Page: 5 of 40
© 2003 Pixtel Communication, Inc.
1 Scope
This document enables the developer to write the application on the MMI. The following
topics have been discussed.
Category screens – Used to provide interface to various types of
screens that are displayed.
History concept – Used to provide interface to save and retrieve
contents of screens.
Event handlers – Used to register call back functions to handle
events.
Entry/Exit functions – Used to provide functions to control screen flow
and display.
Populating resources – Used to provide macros to customize appearance
of screens.
Initializing function – Used to initialize, events handlers and highlight in
the application.
Order of calling APIs for writing application.
Coding Guidelines For the Application Writer