FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiBookDetailsWindow.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | ec9f955fc487 |
comparison
equal
deleted
inserted
replaced
91:c3d28a37caad | 92:c0052fe355d3 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 | 2 |
3 CONDAT (UK) | 3 CONDAT (UK) |
4 | 4 |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 | 6 |
7 This software product is the property of Condat (UK) Ltd and may not be | 7 This software product is the property of Condat (UK) Ltd and may not be |
8 disclosed to any third party without the express permission of the owner. | 8 disclosed to any third party without the express permission of the owner. |
9 | 9 |
10 ******************************************************************************** | 10 ******************************************************************************** |
11 | 11 |
12 $Project name: Basic MMI | 12 $Project name: Basic MMI |
13 $Project code: BMI (6349) | 13 $Project code: BMI (6349) |
14 $Module: PhoneBook | 14 $Module: PhoneBook |
15 $File: MmiBookDetailsWindow.h | 15 $File: MmiBookDetailsWindow.h |
16 $Revision: 1.0 | 16 $Revision: 1.0 |
17 | 17 |
18 $Author: Condat(UK) | 18 $Author: Condat(UK) |
19 $Date: 25/10/00 | 19 $Date: 25/10/00 |
20 | 20 |
21 ******************************************************************************** | 21 ******************************************************************************** |
22 | 22 |
23 Description: | 23 Description: |
24 | 24 |
25 Provides the details handlig for the phone book | 25 Provides the details handlig for the phone book |
26 | 26 |
27 | 27 |
28 ******************************************************************************** | 28 ******************************************************************************** |
29 $History: MmiBookDetailsWindow.h | 29 $History: MmiBookDetailsWindow.h |
30 | 30 |
31 25/10/00 Original Condat(UK) BMI version. | 31 25/10/00 Original Condat(UK) BMI version. |
32 | 32 |
33 $End | 33 $End |
34 | 34 |
35 *******************************************************************************/ | 35 *******************************************************************************/ |
36 | 36 |
37 | 37 |
38 | 38 |
39 | 39 |
40 /******************************************************************************* | 40 /******************************************************************************* |
41 | 41 |
42 Include Files | 42 Include Files |
43 | 43 |
44 *******************************************************************************/ | 44 *******************************************************************************/ |
45 #define ENTITY_MFW | 45 #define ENTITY_MFW |
46 | 46 |
47 /* includes */ | 47 /* includes */ |
48 #include <string.h> | 48 #include <string.h> |
125 #include "mmiColours.h" | 125 #include "mmiColours.h" |
126 | 126 |
127 | 127 |
128 | 128 |
129 /******************************************************************************* | 129 /******************************************************************************* |
130 | 130 |
131 Private Methods | 131 Private Methods |
132 | 132 |
133 *******************************************************************************/ | 133 *******************************************************************************/ |
134 | 134 |
135 | 135 |
136 /******************************************************************************* | 136 /******************************************************************************* |
137 | 137 |
138 $Function: bookDetailsDialog | 138 $Function: bookDetailsDialog |
139 | 139 |
140 $Description: Dialog function for the details window, doesn't currently do | 140 $Description: Dialog function for the details window, doesn't currently do |
141 anything | 141 anything |
142 | 142 |
143 $Returns: None | 143 $Returns: None |
144 | 144 |
145 $Arguments: win, window handle | 145 $Arguments: win, window handle |
146 event, event to be handled | 146 event, event to be handled |
147 value, not used | 147 value, not used |
148 parameter, not used | 148 parameter, not used |
149 | 149 |
150 *******************************************************************************/ | 150 *******************************************************************************/ |
151 | 151 |
152 static void bookDetailsDialog ( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) | 152 static void bookDetailsDialog ( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) |
153 { | 153 { |
154 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; | 154 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
162 | 162 |
163 TRACE_FUNCTION("bookDetailsDialog"); | 163 TRACE_FUNCTION("bookDetailsDialog"); |
164 | 164 |
165 entry = &data->phbk->current.entry[ data->phbk->current.selectedName ]; | 165 entry = &data->phbk->current.entry[ data->phbk->current.selectedName ]; |
166 /*SPR 2175, no need to do any GSM->ASCII conversions, removed conversion code*/ | 166 /*SPR 2175, no need to do any GSM->ASCII conversions, removed conversion code*/ |
167 | 167 |
168 | 168 |
169 numberText.dcs = ATB_DCS_ASCII; | 169 numberText.dcs = ATB_DCS_ASCII; |
170 numberText.data = entry->number; | 170 numberText.data = entry->number; |
171 ATB_string_Length(&numberText); | 171 ATB_string_Length(&numberText); |
172 | 172 |
173 if ( entry->name.data[0] ==0x80) | 173 if ( entry->name.data[0] ==0x80) |
174 { | 174 { |
175 | 175 |
176 /* UNICODE */ | 176 /* UNICODE */ |
177 TRACE_EVENT("***UNICODE OUTPUT***"); | 177 TRACE_EVENT("***UNICODE OUTPUT***"); |
178 nameText.dcs = ATB_DCS_UNICODE; | 178 nameText.dcs = ATB_DCS_UNICODE; |
179 nameText.data = &entry->name.data[2]; | 179 nameText.data = &entry->name.data[2]; |
180 } | 180 } |
207 /******************************************************************************* | 207 /******************************************************************************* |
208 | 208 |
209 $Function: bookDetailsWindowCB | 209 $Function: bookDetailsWindowCB |
210 | 210 |
211 $Description: Window event handler | 211 $Description: Window event handler |
212 | 212 |
213 $Returns: MFW_EVENT_CONSUMED for the window visible event, | 213 $Returns: MFW_EVENT_CONSUMED for the window visible event, |
214 MFW_EVENT_PASSED otherwise | 214 MFW_EVENT_PASSED otherwise |
215 | 215 |
216 $Arguments: e, event, w, window handle | 216 $Arguments: e, event, w, window handle |
217 | 217 |
218 *******************************************************************************/ | 218 *******************************************************************************/ |
219 | 219 |
220 static int bookDetailsWindowCB ( MfwEvt e, MfwWin *w ) | 220 static int bookDetailsWindowCB ( MfwEvt e, MfwWin *w ) |
221 { | 221 { |
222 tBookStandard *data = (tBookStandard *)w->user; | 222 tBookStandard *data = (tBookStandard *)w->user; |
223 | 223 |
224 /* x0045876, 14-Aug-2006 (WR - "ptr" was declared but never referenced) */ | 224 /* x0045876, 14-Aug-2006 (WR - "ptr" was declared but never referenced) */ |
225 #ifndef NEW_EDITOR | 225 #ifndef NEW_EDITOR |
226 T_MFW_PHB_ENTRY *ptr; // dat; | 226 T_MFW_PHB_ENTRY *ptr; // dat; |
227 #endif | 227 #endif |
228 | 228 |
237 */ | 237 */ |
238 MmiBookShowDefault(); | 238 MmiBookShowDefault(); |
239 | 239 |
240 /* SPR#1428 - SH - New Editor: display editor here rather than filling up the information. Do that in | 240 /* SPR#1428 - SH - New Editor: display editor here rather than filling up the information. Do that in |
241 * dialog function above. */ | 241 * dialog function above. */ |
242 | 242 |
243 #ifdef NEW_EDITOR | 243 #ifdef NEW_EDITOR |
244 ATB_edit_Show(data->editor); | 244 ATB_edit_Show(data->editor); |
245 resources_setTitleColour(COLOUR_EDITOR); | 245 resources_setTitleColour(COLOUR_EDITOR); |
246 | 246 |
247 /* TITLE */ | 247 /* TITLE */ |
248 | 248 |
249 dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1); | 249 dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1); |
250 PROMPT(0,0,0,TxtDetails); | 250 PROMPT(0,0,0,TxtDetails); |
251 #else /* NEW_EDITOR */ | 251 #else /* NEW_EDITOR */ |
252 /* Build and show the editor | 252 /* Build and show the editor |
253 */ | 253 */ |
272 // convert from GSM to Alpha characters | 272 // convert from GSM to Alpha characters |
273 bookGsm2Alpha( (UBYTE *) ptr->name.data ); | 273 bookGsm2Alpha( (UBYTE *) ptr->name.data ); |
274 | 274 |
275 sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name.data, "\n", (char *) ptr->number); | 275 sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name.data, "\n", (char *) ptr->number); |
276 edtShow(data->edt); | 276 edtShow(data->edt); |
277 } | 277 } |
278 #else /* NO_ASCIIZ */ | 278 #else /* NO_ASCIIZ */ |
279 { | 279 { |
280 sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name, "\n", (char *) ptr->number); | 280 sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name, "\n", (char *) ptr->number); |
281 edtShow(data->edt); | 281 edtShow(data->edt); |
282 } | 282 } |
283 #endif /* NO_ASCIIZ */ | 283 #endif /* NO_ASCIIZ */ |
303 /******************************************************************************* | 303 /******************************************************************************* |
304 | 304 |
305 $Function: bookDetailsKbdCB | 305 $Function: bookDetailsKbdCB |
306 | 306 |
307 $Description: Keyboard handler | 307 $Description: Keyboard handler |
308 | 308 |
309 $Returns: MFW_EVENT_CONSUMED always | 309 $Returns: MFW_EVENT_CONSUMED always |
310 | 310 |
311 $Arguments: e, event, k, key handle | 311 $Arguments: e, event, k, key handle |
312 | 312 |
313 *******************************************************************************/ | 313 *******************************************************************************/ |
314 | 314 |
315 static int bookDetailsKbdCB ( MfwEvt e, MfwKbd *k ) | 315 static int bookDetailsKbdCB ( MfwEvt e, MfwKbd *k ) |
316 { | 316 { |
317 T_MFW_HND win = mfwParent( mfw_header() ); | 317 T_MFW_HND win = mfwParent( mfw_header() ); |
378 /******************************************************************************* | 378 /******************************************************************************* |
379 | 379 |
380 $Function: bookDetailsKbdLongCB | 380 $Function: bookDetailsKbdLongCB |
381 | 381 |
382 $Description: Keyboard Long Press event handler | 382 $Description: Keyboard Long Press event handler |
383 | 383 |
384 $Returns: MFW_EVENT_CONSUMED always | 384 $Returns: MFW_EVENT_CONSUMED always |
385 | 385 |
386 $Arguments: e, event, k, keyboard handle | 386 $Arguments: e, event, k, keyboard handle |
387 | 387 |
388 *******************************************************************************/ | 388 *******************************************************************************/ |
389 | 389 |
390 static int bookDetailsKbdLongCB( MfwEvt e, MfwKbd *k ) | 390 static int bookDetailsKbdLongCB( MfwEvt e, MfwKbd *k ) |
391 { | 391 { |
392 T_MFW_HND win = mfwParent( mfw_header() ); | 392 T_MFW_HND win = mfwParent( mfw_header() ); |
407 /******************************************************************************* | 407 /******************************************************************************* |
408 | 408 |
409 $Function: bookDetailsCreate | 409 $Function: bookDetailsCreate |
410 | 410 |
411 $Description: create an instance of the details window | 411 $Description: create an instance of the details window |
412 | 412 |
413 $Returns: handle of newly created window, or NULL if we fail to create | 413 $Returns: handle of newly created window, or NULL if we fail to create |
414 | 414 |
415 $Arguments: parent, handle of parent window | 415 $Arguments: parent, handle of parent window |
416 | 416 |
417 *******************************************************************************/ | 417 *******************************************************************************/ |
418 | 418 |
419 static T_MFW_HND bookDetailsCreate(MfwHnd parent) | 419 static T_MFW_HND bookDetailsCreate(MfwHnd parent) |
420 { | 420 { |
421 T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; | 421 T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; |
453 data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookDetailsKbdCB ); | 453 data->kbd = kbdCreate( data->win, KEY_ALL, (MfwCb) bookDetailsKbdCB ); |
454 data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookDetailsKbdLongCB ); | 454 data->kbd_long = kbdCreate( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookDetailsKbdLongCB ); |
455 | 455 |
456 /* 1945 MZ Initialise the edtBuf */ | 456 /* 1945 MZ Initialise the edtBuf */ |
457 memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); | 457 memset(data->edtBuf,'\0', STANDARD_EDITOR_SIZE ); |
458 | 458 |
459 /* SPR#1428 - SH - New Editor changes */ | 459 /* SPR#1428 - SH - New Editor changes */ |
460 #ifdef NEW_EDITOR | 460 #ifdef NEW_EDITOR |
461 AUI_edit_SetAttr( &data->editor_attr, BOOKDETAILS_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, ED_MODE_READONLY, ED_CURSOR_NONE, ATB_DCS_UNICODE/*SPR1752*/, (UBYTE *)data->edtBuf, STANDARD_EDITOR_SIZE); | 461 AUI_edit_SetAttr( &data->editor_attr, BOOKDETAILS_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT, ED_MODE_READONLY, ED_CURSOR_NONE, ATB_DCS_UNICODE/*SPR1752*/, (UBYTE *)data->edtBuf, STANDARD_EDITOR_SIZE); |
462 data->editor = ATB_edit_Create( &data->editor_attr, 0 ); | 462 data->editor = ATB_edit_Create( &data->editor_attr, 0 ); |
463 SEND_EVENT(data->win, 0, 0, 0); | 463 SEND_EVENT(data->win, 0, 0, 0); |
481 | 481 |
482 | 482 |
483 | 483 |
484 | 484 |
485 /******************************************************************************* | 485 /******************************************************************************* |
486 | 486 |
487 Public Methods | 487 Public Methods |
488 | 488 |
489 *******************************************************************************/ | 489 *******************************************************************************/ |
490 | 490 |
491 | 491 |
492 /******************************************************************************* | 492 /******************************************************************************* |
493 | 493 |
494 $Function: bookDetailsStart | 494 $Function: bookDetailsStart |
495 | 495 |
496 $Description: Start routine for the phonebook details window | 496 $Description: Start routine for the phonebook details window |
497 | 497 |
498 $Returns: None, assigns the window handle to the name_details_win | 498 $Returns: None, assigns the window handle to the name_details_win |
499 hook in the current phone book | 499 hook in the current phone book |
500 | 500 |
501 $Arguments: m, menu, i, menu item | 501 $Arguments: m, menu, i, menu item |
502 | 502 |
503 *******************************************************************************/ | 503 *******************************************************************************/ |
504 | 504 |
505 void bookDetailsStart( MfwMnu* m, MfwMnuItem* i ) | 505 void bookDetailsStart( MfwMnu* m, MfwMnuItem* i ) |
506 { | 506 { |
507 T_MFW_HND win = mfwParent(mfw_header()); | 507 T_MFW_HND win = mfwParent(mfw_header()); |
519 /******************************************************************************* | 519 /******************************************************************************* |
520 | 520 |
521 $Function: bookDetailsDestroy | 521 $Function: bookDetailsDestroy |
522 | 522 |
523 $Description: Destroy the phone book details window | 523 $Description: Destroy the phone book details window |
524 | 524 |
525 $Returns: None | 525 $Returns: None |
526 | 526 |
527 $Arguments: window, handle of window to close | 527 $Arguments: window, handle of window to close |
528 | 528 |
529 *******************************************************************************/ | 529 *******************************************************************************/ |
530 | 530 |
531 void bookDetailsDestroy( MfwHnd window ) | 531 void bookDetailsDestroy( MfwHnd window ) |
532 { | 532 { |
533 T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; | 533 T_MFW_WIN *win = ((T_MFW_HDR *)window)->data; |
556 | 556 |
557 | 557 |
558 | 558 |
559 | 559 |
560 /******************************************************************************* | 560 /******************************************************************************* |
561 | 561 |
562 End of File | 562 End of File |
563 | 563 |
564 *******************************************************************************/ | 564 *******************************************************************************/ |