FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/mfw/mfw_mfw.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +--------------------------------------------------------------------+ | |
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_mfw.h $| | |
4 | $Author:: Kk $ CONDAT GmbH $Revision:: 13 $| | |
5 | CREATED: 21.09.98 $Modtime:: 23.03.00 16:37 $| | |
6 | STATE : code | | |
7 +--------------------------------------------------------------------+ | |
8 | |
9 MODULE : MFW_MFW | |
10 | |
11 PURPOSE : Framework common types & constants | |
12 | |
13 EXPORT : | |
14 | |
15 TO DO : | |
16 | |
17 $History:: mfw_mfw.h $ | |
18 * ***************** Version 14 ***************** | |
19 * Dec 22, 2004 REF: CRR MFW-SPR-27847 xnkulkar | |
20 * Description: MFW memory size variable changed from U16 -> U32 | |
21 * Solution: The use of variable U16 has been replaced with U32 | |
22 | |
23 * ***************** Version 13 ***************** | |
24 * User: Kk Date: 24.03.00 Time: 11:02 | |
25 * Updated in $/GSM/Condat/MS/SRC/MFW | |
26 * | |
27 * ***************** Version 12 ***************** | |
28 * User: Es Date: 23.03.00 Time: 14:43 | |
29 * Updated in $/GSM/Condat/MS/SRC/MFW | |
30 * Added 'mfwParent(elem)' | |
31 * | |
32 * ***************** Version 11 ***************** | |
33 * User: Es Date: 18.02.00 Time: 15:45 | |
34 * Updated in $/GSM/Condat/MS/SRC/MFW | |
35 * fixed alloc/free bug (shrink) | |
36 * changed MfwMemLarge macro | |
37 * added constants for MMI event handler return values | |
38 * | |
39 * ***************** Version 10 ***************** | |
40 * User: Kk Date: 10.01.00 Time: 14:03 | |
41 * Updated in $/GSM/Condat/MS/SRC/MFW | |
42 * | |
43 * ***************** Version 9 ***************** | |
44 * User: Le Date: 6.01.00 Time: 9:23 | |
45 * Updated in $/GSM/Condat/MS/SRC/MFW | |
46 * Alignment of MFW versions | |
47 * | |
48 * ***************** Version 3 ***************** | |
49 * User: Xsp Date: 8/12/99 Time: 15:34 | |
50 * Updated in $/GSM/Condat/SND-MMI/MFW | |
51 * Patch for CHAR botch... | |
52 * | |
53 * ***************** Version 2 ***************** | |
54 * User: Es Date: 22.11.99 Time: 10:29 | |
55 * Updated in $/GSM/Condat/SND-MMI/MFW | |
56 * | |
57 * ***************** Version 1 ***************** | |
58 * User: Es Date: 18.11.99 Time: 16:35 | |
59 * Created in $/GSM/Condat/SND-MMI/MFW | |
60 * Initial | |
61 * | |
62 * ***************** Version 8 ***************** | |
63 * User: Es Date: 14.06.99 Time: 12:14 | |
64 * Updated in $/GSM/DEV/MS/SRC/MFW | |
65 * | |
66 * ***************** Version 6 ***************** | |
67 * User: Es Date: 25.02.99 Time: 9:53 | |
68 * Updated in $/GSM/DEV/MS/SRC/MFW | |
69 * | |
70 * ***************** Version 5 ***************** | |
71 * User: Es Date: 20.02.99 Time: 11:54 | |
72 * Updated in $/GSM/DEV/MS/SRC/MFW | |
73 * | |
74 * ***************** Version 4 ***************** | |
75 * User: Es Date: 17.02.99 Time: 20:00 | |
76 * Updated in $/GSM/DEV/MS/SRC/MFW | |
77 * | |
78 * ***************** Version 3 ***************** | |
79 * User: Es Date: 14.01.99 Time: 17:19 | |
80 * Updated in $/GSM/DEV/MS/SRC/MFW | |
81 * | |
82 * ***************** Version 2 ***************** | |
83 * User: Es Date: 23.12.98 Time: 16:19 | |
84 * Updated in $/GSM/DEV/MS/SRC/MFW | |
85 */ | |
86 | |
87 #ifndef _DEF_MFW_MFW_H_ | |
88 #define _DEF_MFW_MFW_H_ | |
89 | |
90 #define ENTITY_MFW | |
91 | |
92 #ifndef NO_ASCIIZ | |
93 #define NO_ASCIIZ | |
94 #endif | |
95 | |
96 /* Ring tone definition */ | |
97 #ifdef FF_MMI_RINGTONE | |
98 #define CALLTONE_SELECT 41 | |
99 #define SMSTONE_SELECT 42 | |
100 #define ALARMTONE_SELECT 43 | |
101 #endif | |
102 /**************************************//* PORTABILITY TYPES */ | |
103 | |
104 #define U8 unsigned char | |
105 #define S8 signed char | |
106 #define U16 unsigned short | |
107 #define S16 signed short | |
108 #define U32 unsigned long | |
109 #define S32 signed long | |
110 | |
111 /**************************************//* MMI EVENT HANDLER RETURN */ | |
112 | |
113 #define MFW_EVENT_CONSUMED 1 /* return, if event handled */ | |
114 #define MFW_EVENT_REJECTED 0 /* return, if event unknown */ | |
115 | |
116 /**************************************//* COMMON MFW TYPES */ | |
117 | |
118 typedef void * MfwHnd; /* MFW element handle */ | |
119 typedef U32 MfwEvt; /* MFW event mask */ | |
120 typedef int (*MfwCb) (MfwEvt, MfwHnd); /* MFW event handler */ | |
121 | |
122 typedef struct MfwRectTag /* RECTANGLE SPEC */ | |
123 { | |
124 U16 px; /* top left pos x */ | |
125 U16 py; /* top left pos y */ | |
126 U16 sx; /* horizontal size */ | |
127 U16 sy; /* vertical size */ | |
128 } MfwRect; | |
129 | |
130 typedef enum /* Error codes */ | |
131 { | |
132 MfwResOk = 0, /* no error */ | |
133 MfwResDone, /* OK, handler ready */ | |
134 MfwResErr, /* unspecific error */ | |
135 MfwResNoMem, /* insufficient memory */ | |
136 MfwResIllHnd, /* invalid handle */ | |
137 MfwResDriver /* driver error */ | |
138 } MfwRes; | |
139 | |
140 typedef enum /* MFW commands to modules */ | |
141 { | |
142 MfwCmdNone = 0, /* no command */ | |
143 MfwCmdDelete, /* delete element */ | |
144 MfwCmdUpdate /* repaint visibles */ | |
145 } MfwCmd; | |
146 | |
147 typedef enum /* MFW element types */ | |
148 { | |
149 MfwTypNone = 0, /* no element (first !!) */ | |
150 MfwTypWin, /* window */ | |
151 MfwTypEdt, /* editor */ | |
152 MfwTypMnu, /* menu handler */ | |
153 MfwTypIcn, /* icon handler */ | |
154 MfwTypKbd, /* keyboard */ | |
155 MfwTypTim, /* timer */ | |
156 MfwTypMme, /* misc. mobile equipment */ | |
157 MfwTypVmm, /* MDL virtual machine */ | |
158 MfwTypNm, /* network */ | |
159 MfwTypSim, /* SIM card */ | |
160 MfwTypCm, /* call handling */ | |
161 MfwTypPhb, /* phonebook handling */ | |
162 MfwTypSms, /* short message handling */ | |
163 MfwTypSs, /* supl. services handling */ | |
164 MfwTypSat, /* SIM Toolkit handling */ | |
165 MfwTypLng, /* language handling */ | |
166 MfwTypInp, /* input handling */ | |
167 MfwTypNode, /* node element */ | |
168 MfwTypCphs, /* CPHS element */ | |
169 MfwTypGprs, /* GPRS handling */ | |
170 MfwTypEm, /*MC, SPR 1209 Eng Mode handling*/ | |
171 MfwTypTd, /*MC, SPr 1725, Time/date handling*/ | |
172 #ifdef BT_INTERFACE | |
173 MfwTypBt, /* bluetooth handling */ | |
174 #endif | |
175 #ifdef BTE_MOBILE | |
176 MfwTypBte, /* bluetooth handling */ | |
177 #endif | |
178 MfwTypCt, /* camera test handling*/ | |
179 MfwTypMax /* end of types (last !!) */ | |
180 } MfwTyp; | |
181 | |
182 typedef struct MfwHdrTag /* header structure */ | |
183 { | |
184 struct MfwHdrTag *next; /* next header */ | |
185 MfwTyp type; /* elem type code */ | |
186 void *data; /* elem control structure */ | |
187 | |
188 } MfwHdr; | |
189 | |
190 // Dec 22, 2004 REF: CRR MFW-SPR-27847 xnkulkar | |
191 // Description: MFW memory size variable changed from U16 -> U32 | |
192 // Solution: The use of variable U16 has been replaced with U32 | |
193 typedef struct /* memory management header */ | |
194 { | |
195 U32 next; /* index of next free block */ | |
196 U32 len; /* length of this block */ | |
197 } MfwMemHdr; | |
198 /* sizeof(MfwMemHdr) must be 2^n !! */ | |
199 /* align with header length */ | |
200 #define mfwMemLarge(x) (((x)+sizeof(MfwMemHdr)-1)&(~(sizeof(MfwMemHdr)-1))) | |
201 /* not used: #define mfwMemShrink(x) ((x)&(~(sizeof(MfwMemHdr)-1))) */ | |
202 | |
203 /**************************************//* MFW EXPORTED VARIABLES */ | |
204 | |
205 extern MfwHdr *mfwFocus; /* the focus node */ | |
206 extern MfwHdr *mfwRoot; /* root of MFW elements */ | |
207 extern MfwCb mfwCommand []; /* MFW commands to modules */ | |
208 | |
209 | |
210 /**************************************//* MFW FUNCTION PROTOTYPES */ | |
211 | |
212 // Dec 22, 2004 REF: CRR MFW-SPR-27847 xnkulkar | |
213 // Description: MFW memory size variable changed from U16 -> U32 | |
214 // Solution: The use of variable U16 has been replaced with U32 | |
215 | |
216 MfwRes mfwInit (void *externalRoot, U32 dynMemSize); | |
217 void mfwExit (void); | |
218 MfwHdr *mfwAppend (MfwHdr **h, MfwHdr *e); | |
219 MfwHdr **mfwRemove (MfwHdr *e); | |
220 MfwHdr *mfwInsert (MfwHdr *h, MfwHdr *e); | |
221 MfwHnd mfwParent (MfwHdr *h); | |
222 MfwHnd mfwControl (MfwHdr *h); | |
223 U8 *mfwAlloc (U32 size); | |
224 void mfwFree (U8 *mem, U32 size); | |
225 MfwHnd mfwHeader (void); | |
226 MfwRes mfwSetSignallingMethod (U8 method); | |
227 U32 mfwCheckMemoryLeft(void); | |
228 void mfwSetFocus(MfwHdr *w); | |
229 void mfwSetSatIdle(MfwHdr *w); | |
230 char *mfwStrncpy(char *cpyto, const char *cpyfrm, size_t len); | |
231 | |
232 extern U8 mfwSignallingMethod; | |
233 /**************************************//* PRELIMINARIES ES!! */ | |
234 | |
235 #define T_MFW int | |
236 #define T_MFW_HND MfwHnd | |
237 #define T_MFW_EVENT MfwEvt | |
238 #define T_MFW_HDR MfwHdr | |
239 #define T_MFW_RES MfwRes | |
240 #define T_MFW_CB MfwCb | |
241 #define MFW_TYP_SIM MfwTypSim | |
242 #define MFW_TYP_NM MfwTypNm | |
243 #define MFW_TYP_CM MfwTypCm | |
244 #define MFW_TYP_PHB MfwTypPhb | |
245 #define MFW_TYP_SMS MfwTypSms | |
246 #define MFW_TYP_SS MfwTypSs | |
247 #define MFW_RES_ILL_HND MfwResIllHnd | |
248 #define MFW_RES_OK MfwResOk | |
249 #define MFW_RES_ERR MfwResErr | |
250 #define T_MFW_PREF_PLMN_LIST MfwNmPrefPlmnList | |
251 | |
252 #endif | |
253 |