annotate src/ui/bmi/mmiDialogs.c @ 292:0f688d07b068

block deep sleep on activity in new PWT and vibrator drivers
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 27 Mar 2022 00:29:19 +0000
parents dc9ce599f7e7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
3 CONDAT (UK)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
5 ********************************************************************************
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 This software product is the property of Condat (UK) Ltd and may not be
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
8 disclosed to any third party without the express permission of the owner.
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
9
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
12 $Project name: Basic MMI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
13 $Project code: BMI (6349)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
14 $Module: MmiDialogs
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
15 $File: MmiDialogs.c
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
16 $Revision: 1.0
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
17
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
18 $Author: Condat(UK)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
19 $Date: 25/10/00
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ********************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
22
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Description:MMI Information dialogue handling.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
24
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
25
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 ********************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 $History: MmiDialogs.c
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
30 May 23, 2007 DR: OMAPS00127483 x0pleela
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
31 Description: Phonelock - Unable to unlock the phone during incoming call with ringer...
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
32 Solution: Made changes in the function dialog_info_win_resize_cb() to restart the ringer set for
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
33 incoming call or alarm after thr phone is unlocked.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
34
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
35 Apr 03, 2007 ER: OMAPS00122561 x0pleela
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
36 Description: [ACI] Phone lock feature has to be supported by ACI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
37 Solution: Phone Lock ER implementation
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
38
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
39 x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
40 The window height calculation related to wrapping should be skipped when no
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
41 string wrapping is done
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
42
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
43 Mar 11, 2006 REF:DR:OMAPS00061467 x0035544
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
44 Description: 27.22.4.13.3 SET UP CALL (display of icons) fails.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
45 Solution: Assigned the default values for icon data for the structure display_info in the function
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
46 dlg_zeroDisplayData(). copied icon data in to the structure data->IconData and provided functionality
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
47 in the function dialog_info_win_resize_cb() to display icon data appropriately on the dialog screen for SAT
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
48 call setup.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
49
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 Sep 06 2005 REF: MMI-SPR-33548 x0012849 Jagan
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 Description : A dialog with long message is not displayed properly.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Solution : The no of lines in a dialog is increased from 4 to 15.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
53
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
54 Feb 24, 2005 REF: CRR MMI-SPR-29102 xnkulkar
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
55 Description: The phone resets when user presses the ''End All' key while the SMSs are being deleted.
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
56 Solution: As the user has already confirmed that all SMS messages are to be deleted, ''End All' key
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
57 press is ignored till the delete operation is over.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 xrashmic 08 Feb, 2005 MMI-SPR-27853
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
59 Moved the T_dialog_info structure from MmiDialogs.c to MmiDialogs.h
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 xrashmic 08 Feb, 2005 MMI-SPR-27853
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
63 Moved the T_dialog_info structure from MmiDialogs.c to MmiDialogs.h
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
65 Aug 25, 2004 REF: CRR 24904 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
66 Bug:cleanup compile switches used for Go-lite
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
67 Fix:COLOURDISPLAY compiler switch has been added to the functions which are
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
68 used only for the normal color build.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
69
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
70 Aug 16, 2004 REF: CRR 24323 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
71 Bug:Clenup of sprintf used for tracing
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
72 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
73
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
74
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
75 Sep 01, 2004 REF: CRR 21380 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
76 Bug:Not getting proper display, When Messages Memory is Full.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
77 Fix:Assigning TextId and TextString will not display both the messages.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
78 Hence we need to use TextId and TextString2 or TextId2 and TextString
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
79
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
80 Jun 04,2004 CRR:13601 xpradipg - SASKEN
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
81 Description: CFO interrogation display : Timer to long
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
82 Fix: Timer is enabled for the information dialog. It times out after 5 seconds from the last key
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
83 press.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
84 25/10/00 Original Condat(UK) BMI version.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
85
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 $End
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 /*******************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
92
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 Include Files
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
94
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #define ENTITY_MFW
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /* includes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 #include <stdlib.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 #if defined (NEW_FRAME)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 #include "STDDEFS.H"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 /* SPR#1428 - SH - New Editor changes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #include "mfw_edt.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 #include "mfw_sms.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 #include "mfw_icn.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #include "mfw_mnu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #include "mfw_lng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 #include "mfw_sat.h"
206
dc9ce599f7e7 wake up display to full brightness on all info dialogs
Mychaela Falconia <falcon@freecalypso.org>
parents: 205
diff changeset
135 #include "mfw_mme.h"
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #include "mfw_nm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 #include "ksd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 #include "psa.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #include "MmiMain.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 #include "MmiDummy.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 //JVJE #include "MmiMsgsEdit.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 //#include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #include "MmiMmi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 #include "MmiDialogs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 #include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 #include "MmiMenu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 #include "MmiSoftKeys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 /* JF Modified
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #include "MmiBookController.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 #include "prim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 #ifndef PCM_2_FFS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 #include "pcm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 #include "mmiColours.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 void dlg_initDisplayData_type( T_DISPLAY_DATA *displayInfo, U32 displayCol, int dlgType, T_BITMAP* dlgBitmap , int dlgSKFormat );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 * START NEW PART
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 static T_MFW_HND dialog_info_create (T_MFW_HND parent_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 static void dialog_info (T_MFW_HND win,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 USHORT event, SHORT value, void * parameter);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
176 /* x0039928 - Lint warning fix
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 static int dialog_info_win_cb (T_MFW_EVENT event, T_MFW_WIN * win); */
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
178 static int dialog_info_win_resize_cb (T_MFW_EVENT event, T_MFW_WIN * win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 static T_MFW_CB dialog_info_tim_cb (T_MFW_EVENT event, T_MFW_TIM * tc);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 static int dialog_info_kbd_cb (T_MFW_EVENT event, T_MFW_KBD * keyboard);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 static int dialog_info_kbd_long_cb (T_MFW_EVENT event, T_MFW_KBD * keyboard);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 void mmi_dialogs_insert_animation_CB (T_MFW_EVENT event, T_MFW_TIM *tc);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 void mmi_dialogs_animation_new_CB (T_MFW_EVENT event, T_MFW_TIM *tc);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 MfwRect calcLayout( int dlgType, int dataSx, int dataSy, int bmpSx, int bmpSy)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
189 MfwRect area;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
190 int px,py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
191 int sx =0,sy = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
192
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
193 TRACE_EVENT_P5("dlgType,= %d, dataSx = %d, dataSy = %d, bmpSx = %d, bmpSy = %d", dlgType, dataSx, dataSy, bmpSx, bmpSy);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
194
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
195 /*Adjust area available for drawing by the border */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
196 switch (dlgType & DLG_BORDER_VERTICAL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
197 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
198 case DLG_BORDER_VERTICAL_0: sx =bmpSx; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
199 case DLG_BORDER_VERTICAL_1: sx =bmpSx*6/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
200 case DLG_BORDER_VERTICAL_2: sx =bmpSx*4/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
201 case DLG_BORDER_VERTICAL_3: sx =bmpSx*3/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
202 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
203 if (sx < dataSx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
204 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
205 px = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
206
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
207 switch (dlgType & DLG_BORDER_HORIZONTAL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
208 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
209 case DLG_BORDER_HORIZONTAL_0: sy =bmpSy; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
210 case DLG_BORDER_HORIZONTAL_1: sy =bmpSy*6/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
211 case DLG_BORDER_HORIZONTAL_2: sy =bmpSy*4/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
212 case DLG_BORDER_HORIZONTAL_3: sy =bmpSy*3/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
213 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
214 if (sy < dataSy)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
215 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
216 py = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
217
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
218 switch (dlgType & (DLG_INFO_LAYOUT_LEFT | DLG_INFO_LAYOUT_RIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
219 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
220 case DLG_INFO_LAYOUT_CENTRE: //display info in centre of display
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
221 px = px + (sx-dataSx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
222 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
223 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
224 case DLG_INFO_LAYOUT_RIGHT: //all info is displayed at the foot of trhe display
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
225 px = px+(sx-dataSx);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
226 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
227 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
228 case DLG_INFO_LAYOUT_LEFT: //display all info at the top of the bitmap
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
229 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
230 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
231 default: //display info over entire area
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
232 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
233 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
234
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
235 switch (dlgType & (DLG_INFO_LAYOUT_BOTTOM | DLG_INFO_LAYOUT_TOP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
236 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
237 case DLG_INFO_LAYOUT_CENTRE: //display info in centre of display
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
238 py = py + (sy-dataSy)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
239 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
240 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
241 case DLG_INFO_LAYOUT_BOTTOM: //all info is displayed at the foot of trhe display
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
242 py = py+(sy-dataSy);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
243 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
244 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
245 case DLG_INFO_LAYOUT_TOP: //display all info at the top of the bitmap
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
246 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
247 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
248 default: //display info over entire area
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
249 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
250 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
251 area.px = px; area.py = py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
252 area.sx = sx; area.sy = sy; //Area sx/sy must be no smaller than dataSx/Sy
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
253 return (area);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
259 $Function: info_dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
260
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
261 $Description: Common information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
262
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
263 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
264
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
265 $Arguments: parent win, display info
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
266
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 T_MFW_HND info_dialog (T_MFW_HND parent_win,
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 T_DISPLAY_DATA * display_info)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
271 T_MFW_HND win;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 TRACE_FUNCTION("info_dialog()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 display_info->SoftKeyStrings = FALSE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
274
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
275 win = dialog_info_create (parent_win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 if (win NEQ NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 SEND_EVENT (win, DIALOG_INIT, 0, display_info);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 return win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
287 $Function: info_dialog_softkeystrings
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
288
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
289 $Description: Common information dialog, sets "softkeystrings" to TRUE
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
290
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
291 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
292
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
293 $Arguments: parent win, display info, leftsoftkey, rightsoftkey
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
294
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 T_MFW_HND info_dialog_softkeystrings (T_MFW_HND parent_win, T_DISPLAY_DATA * display_info)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 T_MFW_HND win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 display_info->SoftKeyStrings = TRUE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 win = dialog_info_create (parent_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 if (win NEQ NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 SEND_EVENT (win, DIALOG_INIT, 0, display_info);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 return win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
313 $Function: dialog_info_create
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
314
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
315 $Description: Creation of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
316
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
317 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
318
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
319 $Arguments: parent win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
320
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 static T_MFW_HND dialog_info_create (T_MFW_HND parent_win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 T_MFW_WIN * win_data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 T_dialog_info * data = (T_dialog_info *)ALLOC_MEMORY (sizeof (T_dialog_info));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 TRACE_FUNCTION ("dialog_info_create()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 data->info_win = win_create (parent_win, 0, E_WIN_VISIBLE
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
329 , (T_MFW_CB)dialog_info_win_resize_cb);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 if (data->info_win EQ 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
334 /*
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 * Create window handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 data->mmi_control.dialog = (T_DIALOG_FUNC)dialog_info;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 data->mmi_control.data = data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 data->parent_win = parent_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 win_data = ((T_MFW_HDR *)data->info_win)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 win_data->user = (void *)data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 * return window handle
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 return data->info_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
352 $Function: dialog_info_destroy
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
353
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
354 $Description: Destruction of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
355
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
356 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
357
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
358 $Arguments: win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
359
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 void dialog_info_destroy (T_MFW_HND own_window)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 T_MFW_WIN * win = ((T_MFW_HDR *)own_window)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 T_dialog_info * data = (T_dialog_info *)win->user;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 TRACE_FUNCTION ("dialog_info_destroy()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 if (own_window == NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
370 TRACE_EVENT ("Error :- Called with NULL Pointer");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
371 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
374 if (data)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 * Exit TIMER & KEYBOARD Handle
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 kbd_delete (data->info_kbd);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 tim_delete (data->info_tim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 if(data->animation_timer != 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
384 timDelete(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
385
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
386 if (data->icon != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
387 icnDelete(data->icon);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 * Delete WIN Handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 win_delete (data->info_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 * Free Memory
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 FREE_MEMORY ((void *)data, sizeof (T_dialog_info));
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 void dlg_zeroDisplayData( T_DISPLAY_DATA *displayInfo)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
403 TRACE_EVENT("dlg_zeroDisplayData()");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
404 if (displayInfo == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
405 return;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
406 memset (displayInfo, 0x00, sizeof(T_DISPLAY_DATA));
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
407
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
408 displayInfo->LeftSoftKey = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
409 displayInfo->RightSoftKey = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
410 displayInfo->LSKString = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
411 displayInfo->RSKString = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
412 displayInfo->TextString = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
413 displayInfo->TextString2 = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
414
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
415 displayInfo->WrapStrings = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
416
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
417 displayInfo->TextId = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
418 displayInfo->TextId2 = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
419
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
420 displayInfo->SoftKeyStrings = FALSE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
421
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
422 displayInfo->Identifier = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
423 displayInfo->anim_time = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
424 displayInfo->number_of_frames = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
425 displayInfo->current_frame = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 //x0035544 Feb 07, 2006 DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
428 displayInfo->IconData.width = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
429 displayInfo->IconData.height = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
430 displayInfo->IconData.dst = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
431 displayInfo->IconData.selfExplanatory = FALSE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
432 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
433 dlg_initDisplayData_events( displayInfo, NULL, 0, 0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
434
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
435 /* GW#2294 COLOUR_STATUS has been used for all popups - change this to default instead of COLOUR_POPUP .*/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
436 dlg_initDisplayData_type( displayInfo, COLOUR_STATUS, 0, NULL, 0 );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
437
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
438 /* GW #2294 02/07/03 - The default bitmap is set-up here to allow us to disable it for some dialogs (if required) */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
439 displayInfo->bgdBitmap = icon_getBgdBitmap(BGD_CLOUD);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 void dlg_initDisplayData_TextId( T_DISPLAY_DATA *displayInfo, int lsk, int rsk, int str1, int str2, int colId)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
444 if (displayInfo == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
445 return;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
446 dlg_zeroDisplayData(displayInfo);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
447 displayInfo->LeftSoftKey = (USHORT)lsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
448 displayInfo->RightSoftKey = (USHORT)rsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
449 displayInfo->TextId = str1;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
450 displayInfo->TextId2 = str2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
451 displayInfo->displayCol = colId ;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 void dlg_initDisplayData_TextStr( T_DISPLAY_DATA *displayInfo, int lsk, int rsk,char *str1, char *str2, int colId)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
456 if (displayInfo == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
457 return;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
458 dlg_zeroDisplayData(displayInfo);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
459 displayInfo->LeftSoftKey = (USHORT)lsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
460 displayInfo->RightSoftKey = (USHORT)rsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
461 displayInfo->TextString = str1;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
462 displayInfo->TextString2 = str2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
463 displayInfo->displayCol = colId ;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 void dlg_initDisplayData_events( T_DISPLAY_DATA *displayInfo, T_VOID_FUNC callback, int timer, T_MFW_EVENT keyEvents)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
468 displayInfo->Callback = callback;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
469 displayInfo->Time = timer;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
470 displayInfo->KeyEvents = keyEvents;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 void dlg_initDisplayData_type( T_DISPLAY_DATA *displayInfo, U32 displayCol, int dlgType, T_BITMAP* dlgBitmap, int dlgSkFormat )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
475 displayInfo->displayCol = displayCol;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
476 displayInfo->dlgType = dlgType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
477 displayInfo->bgdBitmap = dlgBitmap;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
482 $Function: dialog_info
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
483
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
484 $Description: Dialog function for information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
485
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
486 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
487
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
488 $Arguments: win, window handle event, value, parameter
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 *******************************************************************************/
205
81f5c4ca1fb3 mmiDialogs.c: make dialog_info() static
Mychaela Falconia <falcon@freecalypso.org>
parents: 204
diff changeset
491 static void dialog_info (T_MFW_HND win, USHORT event, SHORT value,
81f5c4ca1fb3 mmiDialogs.c: make dialog_info() static
Mychaela Falconia <falcon@freecalypso.org>
parents: 204
diff changeset
492 void * parameter)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 T_dialog_info * data = (T_dialog_info *)win_data->user;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
496 T_DISPLAY_DATA * display_info = (T_DISPLAY_DATA *)parameter;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 TRACE_FUNCTION ("dialog_info()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 switch (event)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 case DIALOG_INIT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503 * Initialize dialog
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 #if defined (WIN32)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
507 /***************************Go-lite Optimization changes Start***********************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
508
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
509 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
510 TRACE_EVENT_P1( "Identifier %d", display_info->Identifier);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
511 /***************************Go-lite Optimization changes end***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 * Create timer and keyboard handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 */
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
518 data->info_tim = tim_create (win, display_info->Time, (T_MFW_CB)dialog_info_tim_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
519 data->info_kbd = kbd_create (win, KEY_ALL, (T_MFW_CB)dialog_info_kbd_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
520 data->info_kbd_long = kbd_create(win,KEY_ALL|KEY_LONG,(MfwCb)dialog_info_kbd_long_cb);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 * Store any other data
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 */
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
525 data->KeyEvents = display_info->KeyEvents;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
526 data->TextString = display_info->TextString;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527 data->LeftSoftKey = display_info->LeftSoftKey;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528 data->RightSoftKey = display_info->RightSoftKey;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
529 data->SoftKeyStrings = display_info->SoftKeyStrings; // SH - TRUE if using strings rather than IDs
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
530 data->LSKString = display_info->LSKString; // Text for left soft key
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
531 data->RSKString = display_info->RSKString; // Text for right soft key
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 data->TextId = display_info->TextId;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 data->Identifier = display_info->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 data->Callback = display_info->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 data->TextString2 = display_info->TextString2;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 data->TextId2 = display_info->TextId2;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
537 data->WrapStrings = display_info->WrapStrings; //GW-SPR#762
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
538
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
539 data->dlgCol = display_info->displayCol;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
540 data->dlgType = display_info->dlgType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
541 data->dlgBgdBitmap = display_info->bgdBitmap;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
542 data->dlgSkFormat = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
543 data->current_frame = display_info->current_frame;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
544 data->number_of_frames = display_info->number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
545 data->icon_array = (MfwIcnAttr*)display_info->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
546 data->animation_timer = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547 //x0035544 Feb 07, 2006 DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 #ifdef FF_MMI_SAT_ICON
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 if(display_info->IconData.dst != NULL)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
550 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
551 data->IconData.width = display_info->IconData.width;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
552 data->IconData.height = display_info->IconData.height;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
553 data->IconData.dst = display_info->IconData.dst;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
554 data->IconData.selfExplanatory = display_info->IconData.selfExplanatory;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
555 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556 else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
557 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
558 data->IconData.dst = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
559 data->IconData.selfExplanatory = FALSE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
560 data->IconData.width =0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
561 data->IconData.height =0;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
562 }
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
563 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
565 TRACE_EVENT_P1("anim_time = %d", display_info->anim_time);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
566 TRACE_EVENT_P1("data->anim_time = %d", data->anim_time);
204
a7d9fe97e5b8 mmiDialogs.c: rm FF_PHONE_LOCK and other dead code
Mychaela Falconia <falcon@freecalypso.org>
parents: 146
diff changeset
567 if (display_info->anim_time != 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
568 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
569 data->animation_timer = timCreate(win,display_info->anim_time,(MfwCb)mmi_dialogs_animation_new_CB);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
570 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
571 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 if (display_info->Time NEQ FOREVER)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 tim_start (data->info_tim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575 win_show (win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576
206
dc9ce599f7e7 wake up display to full brightness on all info dialogs
Mychaela Falconia <falcon@freecalypso.org>
parents: 205
diff changeset
577 mme_backlightOnEvent();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580 case DIALOG_DESTROY:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
581 dialog_info_destroy(win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
582 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
589 $Function: dialog_info_win_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
590
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
591 $Description: Callback function for information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
592
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
593 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
594
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
595 $Arguments: window handle event, win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
596
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
597 GW SPR#2294 02/07/03 - Removed Unicode specific code as the 'display' routines called to calculate
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
598 the string length and output the text should correctly handle the 0x80 unicode tag
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
599 at the start.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
600 Modified the display code to wrap the text in the second text string.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
601 Modified the window drawing code so that if the text will not fit in the dialog box
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
602 with the background bitmap, a pop-up 'box' will be drawn instead. If this will still
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
603 not be large enough, the entire screen is used.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
604 For the C-sample, there is no bitmap.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
605 Modified the code to use an array of values to position the text output.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 GW SPR#2294 08/07/03 - Added code to expand the dialog box to include the animation (if any).
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
607
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 // Allow 4 lines of text (0..3) for dialogs
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 // To display a dialog properly when it contain lengthy message - No of lines increased.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
612 #define MAX_DLG_LINES (15)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 //Allow up to 40 chars of text on a dialog line
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614 #define MAX_WRAP_CHAR (42)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 //Allow us to wrap text from line 2 to lines 2,3 and 4 lines
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 #define MAX_WRAP_LINES (MAX_DLG_LINES-1)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
618 #define DLG_USE_BITMAP 0x0001 //use bitmap if present
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
619 #define DLG_USE_RECTANGLE 0x0002 //use a rectangle
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
620 #define DLG_USE_FULL_SCREEN 0x0004 //use full-screen
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 #define DLG_LINE1 0
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 #define DLG_LINE2 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 static int dialog_info_win_resize_cb (T_MFW_EVENT event, T_MFW_WIN * win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 T_dialog_info * data = (T_dialog_info *)win->user;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 // T_DISPLAY_DATA * display_info; // RAVI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629 int xPos[MAX_DLG_LINES];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 int yPos[MAX_DLG_LINES];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
632 //The size of array str and strlen are increased by 1, so that the last elements holds data
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 // which is used while wrapping the text.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
634 char* str[MAX_DLG_LINES+1];
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
635 int strLen[MAX_DLG_LINES+1];
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
636 int i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
637 char* lskStr,*rskStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
638 int wx = 0; //,wy,sx=0,sy=0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
639 int wy = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
640 int sx = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
641 int sy = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
642 int fullScreen = DLG_USE_RECTANGLE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
643 int yOfs;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
644 int yBmpOfs = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
645 MfwRect skArea;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
646 //x0035544 Feb 15, 2006. DR:OMAPS00061467
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
648 USHORT titleIconWidth = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 MfwRect area;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
651 int scrWidth = 0; //available width for the display // RAVI - Assignment to 0.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 // temp_ptr is used while wrapping the text.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 // Now str2[][] is not required.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
655 char *temp_ptr;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
656 int nChar;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
657
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
658 /* t_font_bitmap bmp; */ /* Warning Removal - x0020906 - 24-08-2006 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
659 // t_font_bitmap* bmpPtr = &bmp; // RAVI - Not Referenced.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
660
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
661 int drawWinType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
662 int nLines;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
663
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
664 int linePos=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
665 int lineLen = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
666 int wrapLine = 0; /*GW #2294*/ // x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
667
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
668 const int charWidth = dspl_GetTextExtent("0",1);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
669 TRACE_FUNCTION ("dialog_info_win_resize_cb()");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
672 memset(str,'\0',sizeof(str)); /* x0039928 - Lint warning fix */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
673 memset(strLen,0,sizeof(strLen));
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 //x0035544 Feb 15, 2006. DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
676 if (data->IconData.dst != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
677 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
678 if (data->IconData.width > TITLE_ICON_WIDTH)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
679 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
680 titleIconWidth = TITLE_ICON_WIDTH;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
681 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
682 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
683 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
684 titleIconWidth = data->IconData.width ;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
685 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
686 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
687 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
688 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
689 titleIconWidth = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
690 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
691
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
692 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 if (data EQ 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 switch (event)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
697 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
698 //x0pleela 15 May, 2007 DR: OMAPS00127483
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
699 //Added the following code to handle ringer for incoming call and alarm in phone unlocked state.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
700 //the ringer for incoming call or alarm is restarted here after unlocking the phone.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
701 case E_WIN_RESUME:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
702 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
703
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
704 case E_WIN_VISIBLE:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
705 if (win->flags & E_WIN_VISIBLE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
706 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
707 TRACE_EVENT("dialog_info_win_resize_cb: E_WIN_VISIBLE");
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
708
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
709 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
710 * Print the information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
711 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
712 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
713 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
714 xPos[i]=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
715 yPos[i] = Mmi_layout_line_height()*i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
716 str[i]=NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
717 strLen[i]=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
718 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 // Assign the values to last elments of the array str and strLen
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
721 str[MAX_DLG_LINES] = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 strLen[MAX_DLG_LINES] = 0;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
723 yOfs = Mmi_layout_line_height()/4;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
724 if (data->TextId != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
725 str[DLG_LINE1] = MmiRsrcGetText( data->TextId);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
726 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
727 str[DLG_LINE1] = data->TextString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
728
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
729 if (data->TextId2 != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
730 str[DLG_LINE2] = MmiRsrcGetText( data->TextId2);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
731 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
732 str[DLG_LINE2] = data->TextString2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
733
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
734 if (data->SoftKeyStrings!=0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
735 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
736 lskStr = data->LSKString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
737 rskStr = data->RSKString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
738 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
739 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
740 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
741 if (data->LeftSoftKey != TxtNull)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
742 lskStr = MmiRsrcGetText(data->LeftSoftKey);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
743 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
744 lskStr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
745
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
746 if (data->RightSoftKey != TxtNull)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
747 rskStr = MmiRsrcGetText(data->RightSoftKey);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
748 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
749 rskStr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
750 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
751
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
752 if ((str[DLG_LINE1]!= NULL) || (str[DLG_LINE2]!=NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
753 { //Draw a window for status info
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
754 if (str[DLG_LINE2] == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
755 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
756 sy = Mmi_layout_line_height()+yOfs*2; // 18 or 12
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
757
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
758 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
759 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
760 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
761 sy = Mmi_layout_line_height()*2+yOfs*3; // 33 or 22
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
762 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
763
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
764 //MC, if (Mmi_getCurrentLanguage() != CHINESE_LANGUAGE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
765 { //calculate longest string - use this to calc width of window
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
766 sx = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
767 if ((lskStr!=NULL) || (rskStr!=NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
768 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
769 sy = sy+Mmi_layout_softkeyHeight()+yOfs*2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
770 sx = sx + 10;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
771 if (lskStr != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
772 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
773 sx = sx + dspl_GetTextExtent(lskStr, 0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
774 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
775 if (rskStr != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
776 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
777 sx = sx + dspl_GetTextExtent(rskStr,0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
778 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
779
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
780 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
781 for (i=DLG_LINE1;i<=DLG_LINE2;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
782 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
783 strLen[i] = dspl_GetTextExtent(str[i],0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
784 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
785
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
786 /* Work out the desired width of the dialog. If we can wrap line 2 and it is long, wrap it */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
787 if (data->WrapStrings & WRAP_STRING_2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
788 nLines = MAX_WRAP_LINES;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
789 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
790 nLines = 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
791 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
792 if (data->dlgBgdBitmap!=NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
793 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
794 //we only have room to split line 2 into 'max_lines_dlg_popup' lines in the pop-up.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
795 //NB this should be calculated depending on the height of the popup bitmap.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
796 const int max_lines_dlg_popup=2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
797 if (nLines>max_lines_dlg_popup)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
798 nLines = max_lines_dlg_popup;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
799 scrWidth = (data->dlgBgdBitmap->area.sx * 3)/4; //the max width is about 3/4 of the pop-up
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
800 if ( (strLen[DLG_LINE2] > (scrWidth-charWidth)*nLines) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
801 (strLen[DLG_LINE1] > scrWidth))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
802 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
803 //recalculate width below.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
804 if (data->WrapStrings & WRAP_STRING_2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
805 nLines = MAX_WRAP_LINES;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
806 fullScreen = DLG_USE_RECTANGLE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
807 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
808 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
809 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
810 fullScreen = DLG_USE_BITMAP;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
811 //Leave width as is
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
812 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
813 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
814 #else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
815 //On a C-sample, limit pop-up lines to 2 extra (any more - use entire screen)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
816 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
817 const int max_lines_dlg_popup=2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
818 if (nLines>max_lines_dlg_popup)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
819 nLines = max_lines_dlg_popup;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
820 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
823 if (fullScreen == DLG_USE_RECTANGLE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
824 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
825 //see if we can display as a pop-up
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
826 if (SCREEN_SIZE_X < 128)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
827 scrWidth = SCREEN_SIZE_X-6;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
828 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
829 scrWidth = (SCREEN_SIZE_X*7)/8;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
830 if ( strLen[DLG_LINE2] > (scrWidth-charWidth)*nLines)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
831 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
832 //Cannot fit in as a pop-up - use full screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
833 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
834 scrWidth = SCREEN_SIZE_X;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
835 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
836 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
837 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
838 //We can fit it in - but we may want to reduce the width for a nicer look.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
839 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
840 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
841
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
842 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
843 * Wrap second text line (e.g. for long phone numbers.)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
844 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 if (strLen[DLG_LINE2] > scrWidth-charWidth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847 //If we can fit the string on 2 lines - do it.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
848 if (data->WrapStrings & WRAP_STRING_2)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
850 if (str[DLG_LINE2][0] != (char)0x80) //not unicode /* x0039928 -Lint warning removal */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
851 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
852 wrapLine = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853 lineLen = strlen(str[DLG_LINE2]);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
854 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
855 // memset is not required any more .
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
856 //Now the last element of the str[] will point to the second string of the dialog
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
857 str[MAX_DLG_LINES] = str[DLG_LINE2]; // Now move the second line of text to the last element of the arrya
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858 strLen[MAX_DLG_LINES] = strLen[DLG_LINE2];// put the right value for the length of the string
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859 str[DLG_LINE2] = NULL ; // Assign NULL to the second element of the array.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
860 while ((wrapLine < MAX_WRAP_LINES) && (linePos<lineLen))
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
861 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
862 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
863 // Instead of DLG_LINE2 use MAX_DLG_LINES
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
864 nChar = dspl_GetNcharToFit (&str[MAX_DLG_LINES][linePos], (USHORT)scrWidth);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 if (nChar > MAX_WRAP_CHAR)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 nChar = MAX_WRAP_CHAR;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
868 // Allocate MAX_WRAP_CHAR no of bytes
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
869 temp_ptr = (char*)mfwAlloc(MAX_WRAP_CHAR);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 if(NULL == temp_ptr)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
871 return 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873 // Now the destination of memcpy is temp_ptr instead of str2[wrapLine] and the source is str[MAX_DLG_LINES] instead of str[DLG_LINE2]
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 memcpy(temp_ptr,&str[MAX_DLG_LINES][linePos],nChar); // Now the source data is from the last element of the array.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875 linePos = linePos+nChar;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
876 ////GW - even if we cannot display the entire string - it is better than what we would have otherwise
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878 // Assign the value of pointer temp_ptr to str[]
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 str[DLG_LINE2+wrapLine] = temp_ptr;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
880 temp_ptr = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 strLen[DLG_LINE2 + wrapLine] = dspl_GetTextExtent(str[DLG_LINE2+wrapLine],0);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882 wrapLine++;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
884
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
885 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
886 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
887 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
888 //Unicode is more problematic - we need the 0x80 at the front of the string
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
889 //for the call to 'dspl_GetNcharToFit'. This will involve copying the entire remainder
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
890 //of 'str2' into a temporary buffer. At the moment, we only wrap numbers so this
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
891 //code will wait until it is required.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
892 // str[3] = "Code not written!!"; //issue warning
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
893 // strLen[3] = dspl_GetTextExtent(str[3],0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
894 fullScreen = DLG_USE_FULL_SCREEN; //error - use full screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
895 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
896 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
897 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
898
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
899 //Calculate longest line of text (including softkeys - sx already set to the softkey width)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
900 for (i=0;i< MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
901 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
902 if (strLen[i]>sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
903 sx = strLen[i];
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
904 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
905 if (sx > SCREEN_SIZE_X-charWidth)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
906 sx = SCREEN_SIZE_X;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
907 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
908 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
909 if (sx > SCREEN_SIZE_X/2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
910 sx = sx + charWidth;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
911 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
912 sx = sx + charWidth*2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
913 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
914 if (sy> sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
915 sx = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
916 wx = (SCREEN_SIZE_X-sx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
917 if (wx<0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
918 wx=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
919 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
920
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
921 if (sy > SCREEN_SIZE_Y)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
922 wy = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
923 else if (SCREEN_SIZE_Y > 2*sy)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
924 wy = (SCREEN_SIZE_Y*2/3-sy)/2; //display in middle of top 2/3 of screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
925 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
926 wy = (SCREEN_SIZE_Y-sy)/2; //display in middle of screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
927 if (wy < 10)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
928 wy = wy/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
929
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
930 if ((wx == 0) || (wy==0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
931 { //not enough room to display as a window - use whole screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
932 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
933 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
934
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
936 if ((data->icon_array != NULL) && (fullScreen != DLG_USE_BITMAP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
937 { //The dialog has an animation - we must make the pop-up large enough to support this
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
938 if (sx < data->icon_array[0].area.sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
939 sx = data->icon_array[0].area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
940 yBmpOfs = data->icon_array[0].area.py + data->icon_array[0].area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
941 wy = data->icon_array[0].area.py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
942 sy = sy + data->icon_array[0].area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
943 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
945 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
946 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
947 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
948 //We have no strings to display - clear entire screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
949 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
950 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
951
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
952
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
953 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
954 * Draw window (full screen/pop-up)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
955 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
956 if (fullScreen != DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
957 dspl_unfocusDisplay();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
958 area.px = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
959 area.py = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
960 area.sx = sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
961 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
962 resources_setColour(data->dlgCol);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
963 drawWinType = DSPL_WIN_CENTRE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
964
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
965 if (fullScreen!=DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
966 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
967 t_font_bitmap bmp;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
968 t_font_bitmap* bmpPtr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
969
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
970 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
971 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
972 //centre text
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
973 xPos[i] = wx+(sx-strLen[i])/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
974 yPos[i] = wy+yOfs+yBmpOfs+Mmi_layout_line_height()*i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
975 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
976
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
977 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
978 if ((data->dlgBgdBitmap != NULL) && (fullScreen==DLG_USE_BITMAP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
979 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
980 bmp.format = data->dlgBgdBitmap->icnType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
981 bmp.height = data->dlgBgdBitmap->area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
982 bmp.width = data->dlgBgdBitmap->area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
983 bmp.bitmap = data->dlgBgdBitmap->icons;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
984 bmpPtr = &bmp;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
985 area = calcLayout(data->dlgType, sx, sy, bmp.width, bmp.height);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
986
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
987 //Adjust size of available area depending on bitmap properties/dlgType.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
988 //dlgType== 0 =>display info in centre of bitmap
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
989 if (data->dlgType == 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
990 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
991 //If the bmp is bigger than the data we will move the bmp to
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
992 //lie over the centre of the data
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
993 area.px = area.px - (bmp.width - sx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
994 area.py = area.py - (bmp.height- sy)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
995 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
996 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
997 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
998 xPos[i] = xPos[i] + area.px;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
999 yPos[i] = yPos[i] + area.py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1000 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1001
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1002 TRACE_EVENT_P3("wy = %d, yOfs = %d, area.py = %d",wy,yOfs,area.py);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1003 if( data->dlgBgdBitmap->icnType != ICON_TYPE_1BIT_UNPACKED )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1004 dspl_SetBgdColour( COL_TRANSPARENT );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1005
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1006
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1007 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1008 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1009 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1010 // x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1011 //The window height calculation related to wrapping should be skipped when no
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1012 //string wrapping is done
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1013 if(wrapLine>0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1014 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1015 sy = sy + (wrapLine-1)*Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1016 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1017 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1018 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1019 #else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1020 if (wrapLine>1)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1021 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1022 sy = sy + (wrapLine-1)*Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1023 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1024 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1025 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1026 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1027 //If length of the dialog is bigger than screen then start the dialog from the top corner.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1028 if(sy+wy >= SCREEN_SIZE_Y && sy < SCREEN_SIZE_Y)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1029 if(wy>0 && wy < sy)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1030 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1031 wy = (SCREEN_SIZE_Y - sy ) /2 ;// centre the dialog
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1032 if(wy < 0)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1033 wy=0;
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1034 for (i=0;i<MAX_DLG_LINES;i++)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1035 yPos[i] = wy+yOfs+yBmpOfs+Mmi_layout_line_height()*i;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1036 }
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1037 dspl_DrawWin( wx,wy,sx,sy, drawWinType , bmpPtr);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1038 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1039 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1040 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1041 dspl_ClearAll();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1042 sx = 84;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1043 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1044 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1045 xPos[i] = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1046 yPos[i] = Mmi_layout_line(i+1);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1047 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1048 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1049 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1050 * Print softkeys
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1051 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1052 icnShow(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1053 if ((lskStr != NULL) || (rskStr != NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1054 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1055 if (fullScreen==DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1056 Mmi_layout_softkeyArea( &skArea );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1057 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1058 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1059 skArea.px = area.px+wx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1060 skArea.sx = area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1061 skArea.py = area.py+wy+area.sy-Mmi_layout_softkeyHeight()-1;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1062 skArea.sy = Mmi_layout_softkeyHeight();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1063 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1064 softKeys_displayStrXY(lskStr, rskStr, data->dlgSkFormat, data->dlgCol, &skArea);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1065 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1066
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1067 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1068 * Print dialog text
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1069 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1070 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1071 { /* GW#2294 No need to draw zero length strings .*/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1072 if ((str[i] != NULL) && (strLen[i] > 0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1073 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1074 //x0035544 Feb 15, 2006. DR:OMAPS00061467
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1075 #ifdef FF_MMI_SAT_ICON
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1076 if(data->IconData.selfExplanatory == FALSE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1077 dspl_TextOut(xPos[i] + titleIconWidth, yPos[i], DSPL_TXTATTR_NORMAL, str[i] );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1078 #else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1079 dspl_TextOut(xPos[i] , yPos[i], DSPL_TXTATTR_NORMAL, str[i] );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1080 #endif
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1081 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1082 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1083 //x0035544 Feb 15, 2006. DR:OMAPS00061467
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1084 #ifdef FF_MMI_SAT_ICON
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1085 if(data->IconData.dst != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1086 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1087 if(str[DLG_LINE2] == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1088 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1089 if ((data->IconData.width > TITLE_ICON_WIDTH) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1090 (data->IconData.height > TITLE_ICON_HEIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1091 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1092 dspl_BitBlt2(xPos[0], yPos[0], 8,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1093 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1094 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1095
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1096 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1097 dspl_BitBlt2(xPos[0], yPos[0], data->IconData.width,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1098 data->IconData.height, (void*)data->IconData.dst, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1099 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1100 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1101 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1102 if ((data->IconData.width > TITLE_ICON_WIDTH) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1103 (data->IconData.height > TITLE_ICON_HEIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1104 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1105 dspl_BitBlt2(xPos[DLG_LINE2], yPos[DLG_LINE2], 8,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1106 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1107 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1108 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1109 dspl_BitBlt2(xPos[DLG_LINE2], yPos[DLG_LINE2],data->IconData.width,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1110 data->IconData.height, (void*)data->IconData.dst, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1111 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1112
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1113 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1114 #endif
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1115
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1116
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1117 resources_restoreColour();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1118 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1119 // Sep 06 2005 REF: MMI-SPR-33548 x0012849
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1120 // Now free the allocated memory
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1121 /* x0039928 - Lint warning removal */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1122 if (strLen[MAX_DLG_LINES] > scrWidth-charWidth)
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1123 if (data->WrapStrings & WRAP_STRING_2)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124 if (str[MAX_DLG_LINES][0] != (char)0x80) /* x0039928 - lint warning removal */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1125 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1126 for(i=DLG_LINE2;i<MAX_DLG_LINES;i++)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1127 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1128 if(NULL != str[i] && strLen[i] > 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1129 mfwFree((U8*)str[i],MAX_WRAP_CHAR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1130 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1131 str[MAX_DLG_LINES]=NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1132 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1133
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1134 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1135 default:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1136 return 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1137 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1138
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1139 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1140 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1141
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1142 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1143
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1144 $Function: dialog_info_tim_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1145
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1146 $Description: Callback function for the dialog info timer.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1147
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1148
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1149 $Returns: MFW event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1150
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1151 $Arguments: window handle event, timer control block
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1152
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1153 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1154 static T_MFW_CB dialog_info_tim_cb (T_MFW_EVENT event, T_MFW_TIM *tc)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1155 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1156 T_MFW_HND win = mfw_parent (mfw_header());
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1157 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1158 T_dialog_info * data = (T_dialog_info *)win_data->user;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1159
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1160 T_MFW_HND parent_win = data->parent_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161 USHORT Identifier = data->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1162 void (* Callback)() = data->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1163
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1164 TRACE_FUNCTION("dialog_info_tim_cb()");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1165 #if defined (WIN32)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1166 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1167 /***************************Go-lite Optimization changes Start***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1168
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1169 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1170 TRACE_EVENT_P1 ("Identifier %d", data->Identifier);
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1171 /***************************Go-lite Optimization changes end***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1172
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1176 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1177 ** SPR#1744 NDH
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1178 ** Move the dialog destory in front of the Callback to make the processing consistent
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1179 ** with the Right Keypress and Hangup Processing. Also to ensure that the dialog is
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1180 ** removed when the screen is redrawn.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1181 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182 dialog_info_destroy (win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 //TISH modified for MSIM
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185 // if (Callback)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1186 if (Callback && parent_win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187 (Callback) (parent_win, Identifier, INFO_TIMEOUT);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1188
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1191
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1192
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1193 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1194
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1195 $Function: dialog_info_kbd_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1196
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1197 $Description: Keyboard event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1198
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1199 $Returns: status int
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1200
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1201 $Arguments: window handle event, keyboard control block
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1202
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1203 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1204
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1205 static int dialog_info_kbd_cb (T_MFW_EVENT event, T_MFW_KBD *keyboard)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1206 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1207 T_MFW_HND win = mfw_parent (mfw_header());
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1208 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1209 T_dialog_info * data = (T_dialog_info *)win_data->user;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1210 T_MFW_HND parent_win = data->parent_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1211 USHORT Identifier = data->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1212 void (* Callback)() = data->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1213
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1214 TRACE_FUNCTION("dialog_info_kbd_cb");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1215 switch (keyboard->code)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1216 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1217 case KCD_LEFT:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1218 if (data->KeyEvents & KEY_LEFT )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1219 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1220 TRACE_EVENT("dialog_info_kbd_cb: KEY_LEFT");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1221
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1222 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1223 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1224 (Callback) (parent_win, Identifier, INFO_KCD_LEFT);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1225 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1226 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1227
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1228 case KCD_RIGHT:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1229 if (data->KeyEvents & KEY_RIGHT)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1230 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1231 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1232 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1233 (Callback) (parent_win, Identifier, INFO_KCD_RIGHT);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1234 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1235 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1236
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1237 case KCD_HUP:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1238 if (data->KeyEvents & KEY_HUP || data->KeyEvents & INFO_KCD_ALL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1239 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1240 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1241 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1242 (Callback) (parent_win, Identifier, INFO_KCD_HUP);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1243 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1244 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1245
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1246 case KCD_MNUUP:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1247 if (data->KeyEvents & KEY_MNUUP)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1248 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1249 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1250 (Callback) (parent_win, Identifier, INFO_KCD_UP);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1251 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1252 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1253
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1254 case KCD_MNUDOWN:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1255 if (data->KeyEvents & KEY_MNUDOWN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1256 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1257 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1258 (Callback) (parent_win, Identifier, INFO_KCD_DOWN);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1259 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1260 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1261
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1262 //MZ 7/3/01 used to start a call.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1263 case KCD_CALL:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1264 if (data->KeyEvents & KEY_CALL )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1265 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1266 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1267 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1268 (Callback) (parent_win, Identifier, INFO_KCD_OFFHOOK);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1269 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1270 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1271
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272 default:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1273 if (data->KeyEvents & INFO_KCD_ALL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1274 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1275 TRACE_EVENT("dialog_info_kbd_cb: INFO_KCD_ALL");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1276
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1277 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1278 Note: The variable Identifier is overwritten with the
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1279 keycode of the dialog;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1280 we need it only for the Multicall Control !!
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1281 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1282 Identifier = keyboard->code;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1283 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1284 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1285 (Callback) (parent_win, Identifier, INFO_KCD_ALL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1286 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1287 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1288
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1289 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1290 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1291 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1292
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1293 static int dialog_info_kbd_long_cb(T_MFW_EVENT event, T_MFW_KBD *keyboard){
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1294 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1295 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1296
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1297
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1298 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1299
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1300 $Function: mmi_dialog_information_screen
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1301
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1302 $Description:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1303
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1304 $Returns:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1305
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1306 $Arguments:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1307
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1308 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1309
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1310 T_MFW_HND mmi_dialog_information_screen(T_MFW_HND parent_win, int TxtId, char* text, T_VOID_FUNC call_back, USHORT identifier)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1311 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1312 T_DISPLAY_DATA display_info;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1313 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtId, TxtNull, COLOUR_STATUS);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1314 dlg_initDisplayData_events( &display_info, call_back, THREE_SECS, KEY_ALL );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1315 //Sep 01, 2004 REF: CRR 21380 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1316 //Assigning TextId and TextString will not display both the messages.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1317 //Hence we need to use TextId and TextString2 or TextId2 and TextString
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1318 display_info.TextString2 = text;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1319 display_info.Identifier = identifier;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1320 return info_dialog(parent_win,&display_info); //information screen
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1321 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1322
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1323 T_MFW_HND mmi_dialog_information_screen_forever(MfwHnd win,int TextId, char* TextStr, int colour)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1324 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1325 T_DISPLAY_DATA DisplayInfo;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1326 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtNull, TextId, TxtNull, colour);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1327 dlg_initDisplayData_events( &DisplayInfo, NULL, FOREVER, KEY_HUP );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1328 DisplayInfo.TextString = TextStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1329 return info_dialog(win, &DisplayInfo);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1330 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1331
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1332 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1333
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1334 $Function: mmi_dialogs_insert_icon
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1335
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1336 $Description: Displays one icon in a dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1337
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1338 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1339
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1340 $Arguments: win, pointer to an icon
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1341
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1342 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1343 void mmi_dialogs_insert_icon (T_MFW_HND win_dialog ,MfwIcnAttr *icon)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1344 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1345 T_MFW_WIN * win_data = ((T_MFW_HDR *)win_dialog)->data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1346 T_dialog_info * data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1347
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1348 data->icon = icnCreate(win_dialog,icon,E_ICN_VISIBLE,NULL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1349 icnUnhide(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1350 winShow(win_dialog);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1351 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1352
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1353 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1354
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1355 $Function: mmi_dialogs_insert_animation
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1356
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1357 $Description: starts an animation in a dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1358
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1359 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1360
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1361 $Arguments: win, animation time, pointer to an icon, number of frames
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1362
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1363 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1364 void mmi_dialogs_insert_animation (T_MFW_HND win_dialog , S32 anim_time ,MfwIcnAttr *icon ,UBYTE number_of_frames)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1365 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1366 T_MFW_WIN * win_data = ((T_MFW_HDR *)win_dialog)->data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1367 T_dialog_info * data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1368
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1369 data->number_of_frames = number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1370 data->current_frame = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1371 data->icon_array = icon;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1372 data->current_icon = data->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1373 data->icon = icnCreate(win_dialog,data->current_icon,E_ICN_VISIBLE,NULL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1374 icnUnhide(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1375
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1376 data->animation_timer = timCreate(win_dialog,anim_time,(MfwCb)mmi_dialogs_insert_animation_CB);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1377 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1378 winShow(win_dialog);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1379 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1380
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1381 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1382
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1383 $Function: mmi_dialogs_insert_animation_CB
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1384
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1385 $Description: destroys the current icon and starts the next icon
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1386
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1387 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1388
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1389 $Arguments: timer event, timer control block
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1390
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1391 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1392 void mmi_dialogs_insert_animation_CB (T_MFW_EVENT event, T_MFW_TIM *tc)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1393 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1394 T_MFW_HND win = mfw_parent (mfw_header());
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1395 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1396 T_dialog_info * data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1397
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1398 icnDelete(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1399 if (data->current_frame < (data->number_of_frames-1))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1400 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1401 data->current_frame++;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1402 data->current_icon++;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1403 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1404 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1405 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1406 data->current_frame = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1407 data->current_icon = data->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1408 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1409 data->icon = icnCreate(win,data->current_icon,E_ICN_VISIBLE,NULL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1410 icnUnhide(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1411 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1412 winShow(win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1413 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1414 /***************************Go-lite Optimization changes Start***********************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1415
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1416 //Aug 25, 2004 REF: CRR 24904 Deepa M.D
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1417 //This function is used only for the Color build.Hence it is put under the
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1418 //COLOURDISPLAY compiler switch
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1419 #ifdef COLOURDISPLAY
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1420 void mmi_dialogs_insert_animation_new (T_DISPLAY_DATA *animateInfo , S32 anim_time ,MfwIcnAttr* icon ,UBYTE number_of_frames)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1421 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1422 TRACE_EVENT("mmi_dialogs_insert_animation_new()");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1423
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1424 animateInfo->number_of_frames = number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1425 animateInfo->current_frame = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1426 animateInfo->icon_array = icon;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1427 animateInfo->anim_time = anim_time;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1428 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1429 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1430 /***************************Go-lite Optimization changes end***********************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1431
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1432 void mmi_dialogs_animation_new_CB (T_MFW_EVENT event, T_MFW_TIM *tc)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1433 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1434 T_MFW_HND win = mfw_parent (mfw_header());
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1435 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1436 T_dialog_info * data = (T_dialog_info *)win_data->user;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1437 char * idData;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1438 int px, py, sx, sy;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1439 MfwIcnAttr* icn_array;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1440 MfwIcnAttr* icn;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1441
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1442 TRACE_EVENT("mmi_dialogs_insert_animation_new_CB()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1443
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1444 data->current_frame = (data->current_frame +1) % data->number_of_frames;
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1445 TRACE_EVENT_P1("data->current_frame = %d", data->current_frame);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1446 TRACE_EVENT_P1("number_of_frames = %d", data->number_of_frames);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1447
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1448 icn_array = (MfwIcnAttr*)data->icon_array;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1449 TRACE_EVENT_P1("data->icon_array = %x", (int)data->icon_array);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1450
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1451 icn = &icn_array[data->current_frame];
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1452
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1453 px = icn->area.px;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1454 py = icn->area.py;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1455 sx = icn->area.sx;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1456 sy = icn->area.sy;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1457
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1458 TRACE_EVENT_P4("px = %d, py = %d, sx = %d, sy = %d", icn->area.px,icn->area.py,icn->area.sx,icn->area.sy);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1459
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1460 idData = icn->icons;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1461
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1462 dspl_BitBlt2(px,py,sx,sy,(void*)idData,0,0x02);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1463 timStart(data->animation_timer);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1464 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1465 //Jun 04,2004 CRR:13601 xpradipg - SASKEN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1466 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1467
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1468 $Function: InfoDialogTimRestart
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1469
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1470 $Description: restarts the information dialog timer
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1471
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1472 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1473
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1474 $Arguments: window handler
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1475
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1476 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1477
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1478 void InfoDialogTimRestart(T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1479 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1480 T_MFW_WIN * win_data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1481 T_dialog_info * data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1482
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1483 win_data = ((T_MFW_HDR *)win)->data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1484 data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1485
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1486 tim_stop(data->info_tim);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1487 tim_start(data->info_tim);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1488 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1489
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1490 // Feb 24, 2005 CRR:29102 xnkulkar - SASKEN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1491 // As the user has already confirmed that all SMS messages are to be deleted, KEY_HUP is not
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1492 // registered.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1493 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1494
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1495 $Function: mmi_dialog_information_screen_delete_all
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1496
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1497 $Description: Displays the information screen during "Delete All" operation
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1498
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1499 $Returns: Handle of information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1500
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1501 $Arguments: window handle, text id, text string and generic status window
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1502
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1503 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1504 T_MFW_HND mmi_dialog_information_screen_delete_all(MfwHnd win,int TextId, char* TextStr, int colour)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1505 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1506 T_DISPLAY_DATA DisplayInfo;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1507
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1508 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtNull, TextId, TxtNull, colour);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1509 dlg_initDisplayData_events( &DisplayInfo, NULL, FOREVER, NULL );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1510 DisplayInfo.TextString = TextStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1511
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1512 return info_dialog(win, &DisplayInfo);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1513 }