comparison g23m/condat/ms/src/bmi/MmiResources.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 #ifndef _MMIRESOURCES_H_
2 #define _MMIRESOURCES_H_ 1
3
4
5 /*******************************************************************************
6
7 CONDAT (UK)
8
9 ********************************************************************************
10
11 This software product is the property of Condat (UK) Ltd and may not be
12 disclosed to any third party without the express permission of the owner.
13
14 ********************************************************************************
15
16 $Project name: Basic MMI
17 $Project code: BMI (6349)
18 $Module: Resource Manager
19 $File: MmiResources.h
20 $Revision: 1.0
21
22 $Author: Condat(UK)
23 $Date: 25/10/00
24
25 ********************************************************************************
26
27 Description:
28
29 Define a simple get text routine to fetch a pointer
30 to a textual resource given a resource identifier.
31
32 The resource identifiers are given in the MmiBlkResources.h
33 module header
34
35 ********************************************************************************
36 $History: MmiResources.h
37
38 25/10/00 Original Condat(UK) BMI version.
39 03/10/02 Replaced most of the file with version on branch for issue 1150 (MC, SPR 1242)
40 May 10, 2004 REF: CRR 15753 Deepa M.D
41 Menuitem provided to set the validity period to maximum.
42 $End
43
44 *******************************************************************************/
45
46 #include "MmiBlkLangDB.h"
47
48
49 /********************************/
50 /* Positions depending on the language */
51 //Positions are now in mmiResources.C
52
53 #define LAST_LINE (-1)
54 #define LAST_LINE_TOP (-51)
55 #define SECOND_LAST_LINE_TOP (-52)
56
57 //#define SCREEN_SIZE_X 160
58 //#define SCREEN_SIZE_Y 120
59 //#define CHINESE_MENU_VERTICAL_SIZE 84
60 //#define STANDARD_MENU_VERTICAL_SIZE 84
61
62 //#if ((NBRD == 40) || (NBRD == 41))
63 //#define COLOURDISPLAY
64 //#endif
65
66
67 #ifndef LSCREEN
68 #define SCREEN_SIZE_X 84
69 #define SCREEN_SIZE_Y 48
70 #define LINE_HEIGHT 8
71 #define CHAR_WIDTH 6
72 #define LINE_HEIGHT_LATIN (LINE_HEIGHT)
73 #define LINE_HEIGHT_CHINESE 12
74
75 #define ALLOFFSET (0)
76 #define MNUOFFSET (0)
77
78 #else
79 // by nitin for QVGA LCD
80 #if (BOARD==61)
81 #define SCREEN_SIZE_X 240
82 #define SCREEN_SIZE_Y 320
83 #else
84 #define SCREEN_SIZE_X 176
85 #define SCREEN_SIZE_Y 220
86 #endif //(BOARD==61)
87
88 #define LINE_HEIGHT 16
89 #define CHAR_WIDTH 6
90 #define LINE_HEIGHT_CHINESE (LINE_HEIGHT)
91 #define LINE_HEIGHT_LATIN (LINE_HEIGHT)
92
93 #define ALLOFFSET (LINE_HEIGHT*2)
94 #define MNUOFFSET (LINE_HEIGHT)
95
96 #endif
97 #define ALLBUT1LINE (SCREEN_SIZE_Y-1*LINE_HEIGHT+ALLOFFSET)
98 #define ALLBUT2LINE (SCREEN_SIZE_Y-2*LINE_HEIGHT+ALLOFFSET)
99 #define ALLBUT3LINE (SCREEN_SIZE_Y-3*LINE_HEIGHT+ALLOFFSET)
100 #define MNU3LINE (LINE_HEIGHT*3+MNUOFFSET)
101
102
103
104 extern int Easy_Text_Available;
105 //////////////////////////
106 // Common window sizes //
107 //////////////////////////
108
109 #define BOOKSEARCH_EDITOR (ZONE_BOTTOM_LINE)
110
111 /* SPR#1428 - SH - New Editor changes */
112 #ifdef NEW_EDITOR
113 /* SH - moved here from MmiEditor.h */
114 //Zone data for drawing windows
115 #define ZONE_FULL_HEIGHT 0x000F
116 #define ZONE_TOPHALF_HEIGHT 0x000C
117 #define ZONE_MIDDLE_HEIGHT 0x0006
118 #define ZONE_BOTTOMHALF_HEIGHT 0x0003
119 #define ZONE_BOTTOMTWOLINES_HEIGHT 0x0001
120 #define ZONE_FULL_WIDTH 0x00F0
121 #define ZONE_LEFTHALF_WIDTH 0x00C0
122 #define ZONE_MIDDLE_WIDTH 0x0060
123 #define ZONE_RIGHTHALF_WIDTH 0x0030
124
125 #define ZONE_ICONS 0x0100
126 #define ZONE_TITLE 0x0200
127 #define ZONE_CASE_ABC 0x0400
128 #define ZONE_SOFTKEYS 0x1000
129 #define ZONE_SCROLLBAR 0x2000
130
131
132 #define ZONE_FULLSCREEN (ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH)
133 #define ZONE_FULLICONS (ZONE_ICONS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH)
134 #define ZONE_FULLTITLE (ZONE_TITLE|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH)
135 #define ZONE_FULLSOFTKEYS (ZONE_SOFTKEYS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH)
136 #define ZONE_FULL_SK_SCROLL (ZONE_SOFTKEYS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH | ZONE_SCROLLBAR)
137
138 #define ZONE_FULL_SK_TITLE (ZONE_TITLE|ZONE_SOFTKEYS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH)
139 #define ZONE_FULL_SK_TITLE_ALPHA (ZONE_TITLE|ZONE_SOFTKEYS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH | ZONE_CASE_ABC)
140 #define ZONE_FULL_SK_TITLE_SCROLL (ZONE_TITLE|ZONE_SOFTKEYS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH | ZONE_SCROLLBAR)
141 #define ZONE_WAP_EDITOR (ZONE_TITLE|ZONE_SOFTKEYS|ZONE_FULL_HEIGHT | ZONE_FULL_WIDTH)
142 #define ZONE_MIDDLE_EDITOR (ZONE_TITLE|ZONE_SOFTKEYS|ZONE_MIDDLE_WIDTH|ZONE_MIDDLE_HEIGHT)
143
144 //Specific editor sizes
145 #define ZONE_SMALL_EDITOR (0xFF00) /* editor for small (one line) editors */
146 #define ZONE_BORDER_EDITOR (0xFE00) /* editors with a border to the left/right - sim toolkit */
147 #define ZONE_BOTTOM_LINE (0xFD00) /* editors for the bottom line */
148 #define ZONE_BOTTOM_LINE_FIND (0xFC00) /* editors on the bottom line after "Find:" */
149 #endif /* NEW_EDITOR */
150
151 #ifndef LSCREEN
152 #define BOOKDETAILS_EDITOR 0xFF01
153 #define NUMBER_EDITOR 0xFF02
154 #define PHONEBOOK_DLG_EDITOR 0xFF03
155 #define BOOKSDN_EDITOR 0xFF04
156
157 //MMIbooksearchwindow
158 //#define BOOKSEARCH_EDITOR 0xFF05
159 #define CALL_EDITOR 0xFF06
160 #define CALLSCRATCHPAD_EDITOR 0xFF07
161 #define SERVICE_CREATE_EDITOR 0xFF08
162 #define PASSWORD_EDITOR 0xFF09
163 #define EM_CREATE_EDITOR 0xFF0A
164 #define WIN_DIALLING 0xFF30
165 #define WIN_DIALLING_CB 0xFF31
166 #define WIN_DIALLING_SMS 0xFF32
167 #define WIN_DIALLING_SAT 0xFF33
168
169 #define PHNO_EDITOR 0xFF0C
170
171 #define CENTRE_EDITOR 0xFF0D
172
173 //And for MMIServices - moved here from mmiservices.c
174 #define SAT_EDITOR 0xFF0E
175
176 #define RPWD_EDITOR 0xFF0F
177
178 //MMIBookCallDetails
179 #define PHB_EDITOR 0xFF10
180
181 //MMIPins
182 #define PIN_EDIT_RESET 0xFF13
183
184 //MMITimeDate
185 #define TIMEDATE_EDITOR_AREA 0xFF15
186
187 //#define TIMEDATE_EDITOR_AREA 0,20,70,20
188 #else
189 #define BOOKDETAILS_EDITOR ZONE_FULL_SK_TITLE
190 #define NUMBER_EDITOR ZONE_FULL_SK_TITLE
191 #define PHONEBOOK_DLG_EDITOR ZONE_FULL_SK_TITLE
192 #define BOOKSDN_EDITOR ZONE_FULL_SK_TITLE
193
194 //MMIbooksearchwindow
195 #define CALL_EDITOR ZONE_FULL_SK_TITLE
196 #define CALLSCRATCHPAD_EDITOR ZONE_FULL_SK_TITLE
197 #define SERVICE_CREATE_EDITOR ZONE_FULL_SK_TITLE
198 #define EM_CREATE_EDITOR ZONE_FULL_SK_TITLE
199 #define PASSWORD_EDITOR ZONE_FULL_SK_TITLE
200 /* SPR#1428 - SH - New Editor changes - change these so they look better */
201 #ifdef NEW_EDITOR
202 #define WIN_DIALLING (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_FULL_WIDTH|ZONE_BOTTOMTWOLINES_HEIGHT)
203 #define WIN_DIALLING_CB (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_FULL_WIDTH|ZONE_BOTTOMTWOLINES_HEIGHT)
204 #define WIN_DIALLING_SMS (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_FULL_WIDTH|ZONE_BOTTOMHALF_HEIGHT)
205 #define WIN_DIALLING_SAT (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_FULL_WIDTH|ZONE_BOTTOMTWOLINES_HEIGHT)
206 #else /* NEW_EDITOR */
207 #define WIN_DIALLING (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_MIDDLE_WIDTH|ZONE_MIDDLE_HEIGHT)
208 #define WIN_DIALLING_CB (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_MIDDLE_WIDTH|ZONE_MIDDLE_HEIGHT)
209 #define WIN_DIALLING_SMS (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_FULL_WIDTH|ZONE_BOTTOMHALF_HEIGHT)
210 #define WIN_DIALLING_SAT (ZONE_ICONS|ZONE_SOFTKEYS|ZONE_FULL_WIDTH|ZONE_BOTTOMTWOLINES_HEIGHT)
211 #endif /* NEW_EDITOR */
212
213 #define PHNO_EDITOR ZONE_FULL_SK_TITLE
214
215 #define CENTRE_EDITOR ZONE_FULL_SK_TITLE
216
217 //And for MMIServices - moved here from mmiservices.c
218 #define SAT_EDITOR ZONE_FULL_SK_TITLE
219
220 #define RPWD_EDITOR ZONE_FULL_SK_TITLE
221
222 //MMIBookCallDetails
223 #define PHB_EDITOR ZONE_FULL_SK_TITLE
224
225 //MMIPins
226 #define PIN_EDIT_RESET ZONE_FULL_SK_TITLE
227
228 //MMITimeDate
229 #define TIMEDATE_EDITOR_AREA ZONE_FULL_SK_TITLE
230 //#define TIMEDATE_EDITOR_AREA 0,20,70,20
231
232 #endif
233
234 //For displaying call information
235 #define CALLINFO_X_AH 8
236 #define CALLINFO_X_TAGPOS 35
237 #define INCALLTIMER_X 24
238 //For autoredial (no chinese)
239 #define CALL_AUTOREDIAL_X 20
240 #define CALL_AUTOREDIAL_Y1 16
241 #define CALL_AUTOREDIAL_Y2 26
242 #define CALL_AUTOREDIAL_Y3 36
243 //Information
244 #define CALL_INFORMATION_X 24
245 #define CALL_INFORMATION_Y 16
246 //txt Please Wait
247 #define TXTMESSAGE_X 20
248 #define TXTMUTED_X 8
249
250
251 //From mmidynamenu
252 // default menu dimensions
253 #define MENU_LEFT 0
254 #define MENU_INDENT 10
255 #define MENU_TOP 0
256 #define MENU_RIGHT 96
257 #define MENU_BOTTOM 50
258
259 // scroll bar dimensions
260 #define SCROLL_BAR_LEFT 87
261 #define SMALL_RECT 91
262 #define ELEVAT_RECT (SMALL_RECT-2)
263
264 //MMIIcons
265 #define TXTCHARGE_X 16
266
267 //MMIIdle
268 //indent for text on idle screen
269 #define IDLEMENUTXT1_X 16
270 #define IDLEMENUTXT2_X TXTCHARGE_X
271
272
273 //MMIPins
274 #define INFO_TEXT_X 0
275 #define INFO_TEXT_Y 6
276
277
278
279 extern MfwRect selected_area;
280
281 //MMIEditor
282 #define EDITOR_TOP_LEFT_POS_X 4
283 #define EDITOR_TOP_LEFT_POS_Y (Mmi_layout_line_height())
284 #define EDITOR_HORIZONTAL_SIZE (SCREEN_SIZE_X - EDITOR_TOP_LEFT_POS_X)
285 #define EDITOR_VERTICAL_SIZE (SCREEN_SIZE_Y - 2*Mmi_layout_line_height())
286 #define EDITOR_COLOR 0
287 #define EDITOR_FONT 0
288 #define EDITOR_CONTROLS 0
289
290 //MMIGame - connect 4
291 #ifndef LSCREEN
292 #define GAME_POS_X 0
293 #define GAME_POS_Y 8
294 #define GAME_SCALE_X 5
295 #define GAME_SCALE_Y 5
296 #define GAME_NAMEPOSX1 56
297 #define GAME_NAMEPOSY1 6
298 #define GAME_NAMEPOSX2 56
299 #define GAME_NAMEPOSY2 (6+21)
300 #define GAME_NAMEPOSX3 56
301 #define GAME_NAMEPOSY3 (6+21)
302 #define GAME_WINPOSX1 56
303 #define GAME_WINPOSY1 6
304 #define GAME_WINPOSX2 56
305 #define GAME_WINPOSY2 (6+21)
306
307 #else
308 #define GAME_POS_X ((SCREEN_SIZE_X / 2) - (MAX_X_BOARD*GAME_SCALE_X/2))
309 #define GAME_POS_Y (27+15)
310 #define GAME_SCALE_X 13
311 #define GAME_SCALE_Y 15
312
313 #define GAME_NAMEPOSX1 (SCREEN_SIZE_X/2-36)
314 #define GAME_NAMEPOSX2 (SCREEN_SIZE_X/2-12)
315 #define GAME_NAMEPOSX3 (SCREEN_SIZE_X/2+12)
316 #define GAME_NAMEPOSY1 (0)
317 #define GAME_NAMEPOSY2 (0)
318 #define GAME_NAMEPOSY3 (0)
319 #define GAME_WINPOSX1 (SCREEN_SIZE_X/2-12)
320 #define GAME_WINPOSX2 (SCREEN_SIZE_X/2+12)
321 #define GAME_WINPOSY1 (0)
322 #define GAME_WINPOSY2 (0)
323
324
325 #endif
326
327 #ifndef COLOURDISPLAY
328
329 #define WELCOME_ANI_POS_X (SCREEN_SIZE_X - 56 )/2
330 #define WELCOME_ANI_POS_Y (SCREEN_SIZE_Y - (42+4))/2
331 #else
332 #define WELCOME_ANI_POS_X (SCREEN_SIZE_X - 176 )/2
333 #define WELCOME_ANI_POS_Y (SCREEN_SIZE_Y - 60)/3 //top 1/3 of screen
334 #endif
335 //Definitions for 'pop-up' windows with 1/2 lines of text
336 #define DLG_WINDOW1_LINE 10,20,60,30, 0
337 #define DLG_WINDOW2_LINE 10,20,60,45, 0
338
339 /*NDH - 13/01/04 - CQ 16753 - Redefine these values in accordance with GSM 03.40, para 9.2.3.12.1 */
340 /*API - 28/07/03 - CQ10203 - Add these defines for the Validity Period of an SMS*/
341 #define VP_REL_1_HOUR 11
342 #define VP_REL_12_HOURS 143
343 #define VP_REL_24_HOURS 167
344 #define VP_REL_1_WEEK 173
345 #define VP_REL_MAXIMUM 255 // May 10, 2004 REF: CRR 15753 Deepa M.D
346 /*API - CQ10203 END*/
347 /* NDH - CQ16753 - END */
348
349 extern MfwRect menuArea;
350 extern MfwRect menuNamesArea;
351 extern MfwRect menuListArea;
352 extern MfwRect editor_menuArea;
353 extern MfwRect network_menuArea;
354 extern MfwRect sat_setup_menuArea;
355 extern MfwRect sat_select_menuArea;
356 extern MfwRect smscb_M_CBArea;
357 extern MfwRect smscb_M_CB_ACTArea;
358 extern MfwRect smscb_M_CB_TOPArea;
359 extern MfwRect smscb_M_CB_TOP_CONSArea;
360 extern MfwRect smscb_M_CB_TOP_CONS_SELArea;
361 extern MfwRect smscb_CBArea;
362 extern MfwRect smscb_CB_OPTArea;
363 extern MfwRect readSMS_menuArea;
364
365 //#if(BOARD==61)
366 #ifdef FF_MMI_MULTIMEDIA
367 // BEGIN ADD : RAVI : 13-07-2005
368 extern MfwRect FileType_menuArea;
369 // END ADD : RAVI : 13-07-2005
370 #endif
371
372 extern MfwRect SmsRead_R_OPTArea;
373 extern MfwRect SmsSend_R_OPTArea;
374 extern MfwRect melody_menuArea;
375 extern MfwRect MAINICONarea;
376 extern MfwRect MAINICONareaColour; //For the larger colour main icons
377
378
379
380 /********************************/
381
382
383
384 /* Define a simple get text routine to fetch a pointer
385 to a textual resource given a resource identifier.
386
387 The resource identifiers are given in the MmiBlkResources.h
388 module header
389 */
390
391
392 char *MmiRsrcGetText( int Id );
393
394 void MmiRsrcSetLang(int lang );/*MC SPR 1150 */
395 void Mmi_Set2English( void );
396 void Mmi_Set2German( void );
397 void Mmi_Set2Chinese( void );
398 #ifdef LANG_CHANGE_TEST
399 void Mmi_Set2Martian( void );/*MC SPR 1150 */
400 #endif
401 void Mmi_Set2Language(int lang);
402 UBYTE Mmi_getCurrentLanguage(void);
403
404 UBYTE Mmi_layout_line(int lineNo); //GW
405 UBYTE Mmi_getCurrentLanguage(void); //GW
406 //The following are redundant - maintain for compatibility only
407 #define Mmi_layout_first_line( ) Mmi_layout_line(1)
408 #define Mmi_layout_second_line( ) Mmi_layout_line(2)
409 #define Mmi_layout_third_line( ) Mmi_layout_line(3)
410 #define Mmi_layout_fourth_line( ) Mmi_layout_line(4)
411 #define Mmi_layout_fifth_line( ) Mmi_layout_line(5)
412
413 UBYTE Mmi_number_of_lines_without_icons_on_top(void);
414 UBYTE Mmi_number_of_lines_with_icons_on_top(void);
415
416 UBYTE Mmi_layout_softkeyHeight( void );
417 UBYTE Mmi_layout_line_height(void);
418 UBYTE Mmi_layout_softkeyArea( MfwRect* rect );
419 UBYTE Mmi_layout_TitleHeight( void );
420 UBYTE Mmi_layout_IconHeight( void );
421 UBYTE Mmi_layout_line_icons(int lineNo);
422
423
424 void Mmi_layout_areas(void);
425
426 void Mmi_set_area_attr(MfwRect* area,U16 px,U16 py,U16 sx,U16 sy);
427 void resources_destroy (T_MFW_HND own_window);
428 BOOL resources_reset_language(char* string);
429 typedef struct {
430 U16 id;
431 U16 count;
432 U32 attributes;
433 } T_RESOURCE_DIRECTORY_HEADER;
434
435 // This type identifies the various resources that are listable in the file.
436 typedef enum
437 {
438 RES_FIRST_RESOURCE_TYPE=0,
439 RES_LANGUAGE_TABLE,
440 RES_LANGUAGE,
441 RES_STRING,
442 RES_MELODY_TABLE,
443 RES_MELODY,
444 RES_LAST_RESOURCE_TYPE
445 } res_ResourceID_type;
446
447 typedef const T_RESOURCE_DIRECTORY_HEADER * RESOURCE_DIRECTORY_HEADER;
448
449 typedef unsigned char ST_DIMENSION ;
450
451 /*MC SPR 1111*/
452 typedef struct /*Entry in table of country codes*/
453 {
454 char* country_dialling_code; /*Dialling code(4 digits)*/
455 UBYTE language; /*language (e.g. ENGLISH_LANGUAGE defined above)*/
456 }CountryLangEntry;
457
458 typedef struct /*Table of country codes and associated languages*/
459 {
460 UBYTE no_of_entries;
461 CountryLangEntry* entries;
462 } CountryLanguageTable;
463
464 /*MC end*/
465 void resources_setColour(unsigned int colIndex);
466 void resources_setSKColour(unsigned int colIndex);
467 void resources_setHLColour(unsigned int colIndex);
468 void resources_setTitleColour(unsigned int colIndex);
469
470 void resources_restoreColour( void );
471 void resources_restoreMnuColour(void);
472
473 void resources_setColourMnuItem( int txtId);
474
475 int res_getTitleHeight( void );
476
477 void res_set_SIMToolkit_title_string(char* SAT_string);
478
479 int resources_truncate_to_screen_width(char* IpStr, int IpLen, char* OpStr, int OutLen,
480 int ScreenWidth, BOOL unicode);
481
482 void resetFactoryColour ( void );
483 // API - 13-01-03 - 1550
484 void resetFactoryBackground( void );
485
486 /*API - 27/07/03 - CQ10203 - Function Definition for SMS VP reset*/
487 void resetSMSValidityPeriod( void );
488 /*API - CQ10203 - END*/
489
490 void colour_initial_colours (void);
491
492 /*******************************************************************************
493
494 End of File
495
496 *******************************************************************************/
497
498 #endif