comparison src/ui/bmi/mmiResources.h @ 3:67bfe9f274f6

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