annotate src/ui/bmi/mmiDialogs.c @ 164:0b8ebd4dd2ef

mmiSatInfo.c: bogotab fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 18 Nov 2020 23:24:36 +0000
parents 303704cf0701
children a7d9fe97e5b8
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"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #include "mfw_kbd.h"
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 //x0pleela 15 May, 2007 DR: OMAPS00127483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 #ifdef FF_PHONE_LOCK
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
140 #ifdef FF_MIDI_RINGER
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 #include "mfw_midi.h"
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
142 #endif //FF_MIDI_RINGER
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #endif /* FF_PHONE_LOCK */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 #include "ksd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #include "psa.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 "MmiMain.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 #include "MmiDummy.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 //JVJE #include "MmiMsgsEdit.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 //#include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #include "MmiMmi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #include "MmiDialogs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #include "MmiLists.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 #include "MmiMenu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #include "MmiSoftKeys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 /* JF Modified
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 #include "MmiBookController.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 #include "prim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #ifndef PCM_2_FFS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 #include "pcm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169
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 #include "mmiColours.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 //x0pleela 27 Mar, 2007 ER: OMAPS00122561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 #ifdef FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #include "MmiPins.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 //x0pleela 15 May, 2007 DR: OMAPS00127483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 #include "MmiSounds.h"
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
178 EXTERN T_call call_data;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
179 extern T_MFW_HND phlock_win_handle; /* to hold the win handle of phone unlock editor window */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
180 extern T_MFW_HND phlock_kbd_handle; /* to hold the kbd handle of phone unlock editor window */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
181 extern T_MFW_HND phlock_alarm_win_handle; /* to hold the win handle of alarm window */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
182 extern T_MFW_HND phlock_dialog_mtc_win_handle;/* to hold the win handle of MT call dialog window */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
183 extern int phlock_alarm; /* flag to check whether alarm event has occured or not */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
184 int phlock_mtc_anim_time; /* to hold the display info for MTC while in locked state */
3
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 //x0pleela 15 May, 2007 DR: OMAPS00127483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #ifdef FF_MMI_AUDIO_PROFILE
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
188 extern UBYTE mfwAudPlay;//flag for audio
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 static T_MFW_HND phlock_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
192 static int phlock_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
193 void phlock_dialog_info (T_MFW_HND win, USHORT event, SHORT value, void * parameter);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 static T_MFW_CB phlock_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
195 static int phlock_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
196 static int phlock_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
197 void phlock_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
198
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 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
202
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 * START NEW PART
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 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
208 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
209 USHORT event, SHORT value, void * parameter);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
211 /* x0039928 - Lint warning fix
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 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
213 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
214
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 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
216 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
217 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
218 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
219 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
220
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 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
223 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
224 MfwRect area;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
225 int px,py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
226 int sx =0,sy = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
227
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
228 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
229
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
230 /*Adjust area available for drawing by the border */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
231 switch (dlgType & DLG_BORDER_VERTICAL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
232 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
233 case DLG_BORDER_VERTICAL_0: sx =bmpSx; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
234 case DLG_BORDER_VERTICAL_1: sx =bmpSx*6/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
235 case DLG_BORDER_VERTICAL_2: sx =bmpSx*4/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
236 case DLG_BORDER_VERTICAL_3: sx =bmpSx*3/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
237 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
238 if (sx < dataSx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
239 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
240 px = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
241
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
242 switch (dlgType & DLG_BORDER_HORIZONTAL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
243 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
244 case DLG_BORDER_HORIZONTAL_0: sy =bmpSy; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
245 case DLG_BORDER_HORIZONTAL_1: sy =bmpSy*6/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
246 case DLG_BORDER_HORIZONTAL_2: sy =bmpSy*4/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
247 case DLG_BORDER_HORIZONTAL_3: sy =bmpSy*3/8; break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
248 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
249 if (sy < dataSy)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
250 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
251 py = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
252
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
253 switch (dlgType & (DLG_INFO_LAYOUT_LEFT | DLG_INFO_LAYOUT_RIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
254 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
255 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
256 px = px + (sx-dataSx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
257 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
258 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
259 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
260 px = px+(sx-dataSx);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
261 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
262 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
263 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
264 sx = dataSx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
265 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
266 default: //display info over entire area
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
267 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
268 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
269
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
270 switch (dlgType & (DLG_INFO_LAYOUT_BOTTOM | DLG_INFO_LAYOUT_TOP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
271 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
272 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
273 py = py + (sy-dataSy)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
274 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
275 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
276 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
277 py = py+(sy-dataSy);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
278 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
279 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
280 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
281 sy = dataSy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
282 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
283 default: //display info over entire area
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
284 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
285 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
286 area.px = px; area.py = py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
287 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
288 return (area);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
294 $Function: info_dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
295
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
296 $Description: Common information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
297
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
298 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
299
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
300 $Arguments: parent win, display info
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
301
3
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 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
304 T_DISPLAY_DATA * display_info)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
306 T_MFW_HND win;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 TRACE_FUNCTION("info_dialog()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 display_info->SoftKeyStrings = FALSE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
309
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
310 win = dialog_info_create (parent_win);
3
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 if (win NEQ NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 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
315 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 return win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
322 $Function: info_dialog_softkeystrings
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
323
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
324 $Description: Common information dialog, sets "softkeystrings" to TRUE
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
325
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
326 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
327
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
328 $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
329
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 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
332 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 T_MFW_HND win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 display_info->SoftKeyStrings = TRUE;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 win = dialog_info_create (parent_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 if (win NEQ NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 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
341 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 return win;
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
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 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
348 $Function: dialog_info_create
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
349
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
350 $Description: Creation of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
351
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
352 $Returns: Dialogue info win
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 $Arguments: parent win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
355
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 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
358 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 T_MFW_WIN * win_data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 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
361 TRACE_FUNCTION ("dialog_info_create()");
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 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
364 //x0pleela 06 Apr, 2007 ER: OMAPS00122561
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
365 #ifdef FF_PHONE_LOCK
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
366 |E_WIN_RESUME
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
367 #endif //FF_PHONE_LOCK
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
368 , (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
369
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 if (data->info_win EQ 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
373 /*
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 * Create window handler
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 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
377 data->mmi_control.data = data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 data->parent_win = parent_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 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
380 win_data->user = (void *)data;
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 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 * return window handle
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 return data->info_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387
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
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
391 $Function: dialog_info_destroy
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
392
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
393 $Description: Destruction of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
394
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
395 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
396
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
397 $Arguments: win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
398
3
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 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
401 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 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
403 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
404
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 TRACE_FUNCTION ("dialog_info_destroy()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 if (own_window == NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
409 TRACE_EVENT ("Error :- Called with NULL Pointer");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
410 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
413 if (data)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 * Exit TIMER & KEYBOARD Handle
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 kbd_delete (data->info_kbd);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 tim_delete (data->info_tim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 if(data->animation_timer != 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
423 timDelete(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
424
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
425 if (data->icon != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
426 icnDelete(data->icon);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 * Delete WIN Handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 win_delete (data->info_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 * Free Memory
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 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
437 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 //x0pleela 05 Apr, 2007 ER: OMAPS00122561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 #ifdef FF_PHONE_LOCK
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
440 if( phlock_alarm && phlock_alarm_win_handle )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
441 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
442 phlock_alarm_win_handle = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
443 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
444
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
445 if(( call_data.call_direction == MFW_CM_MTC )&& phlock_dialog_mtc_win_handle )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
446 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
447 phlock_dialog_mtc_win_handle = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
448 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 }
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 void dlg_zeroDisplayData( T_DISPLAY_DATA *displayInfo)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
455 TRACE_EVENT("dlg_zeroDisplayData()");
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 memset (displayInfo, 0x00, sizeof(T_DISPLAY_DATA));
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
459
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
460 displayInfo->LeftSoftKey = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
461 displayInfo->RightSoftKey = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
462 displayInfo->LSKString = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
463 displayInfo->RSKString = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
464 displayInfo->TextString = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
465 displayInfo->TextString2 = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
466
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
467 displayInfo->WrapStrings = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
468
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
469 displayInfo->TextId = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
470 displayInfo->TextId2 = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
471
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
472 displayInfo->SoftKeyStrings = FALSE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
473
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
474 displayInfo->Identifier = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
475 displayInfo->anim_time = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
476 displayInfo->number_of_frames = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
477 displayInfo->current_frame = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 //x0035544 Feb 07, 2006 DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
480 displayInfo->IconData.width = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
481 displayInfo->IconData.height = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
482 displayInfo->IconData.dst = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
483 displayInfo->IconData.selfExplanatory = FALSE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
484 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
485 dlg_initDisplayData_events( displayInfo, NULL, 0, 0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
486
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
487 /* 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
488 dlg_initDisplayData_type( displayInfo, COLOUR_STATUS, 0, NULL, 0 );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
489
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
490 /* 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
491 displayInfo->bgdBitmap = icon_getBgdBitmap(BGD_CLOUD);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 }
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 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
495 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
496 if (displayInfo == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
497 return;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
498 dlg_zeroDisplayData(displayInfo);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
499 displayInfo->LeftSoftKey = (USHORT)lsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
500 displayInfo->RightSoftKey = (USHORT)rsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
501 displayInfo->TextId = str1;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
502 displayInfo->TextId2 = str2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
503 displayInfo->displayCol = colId ;
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 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
507 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
508 if (displayInfo == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
509 return;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
510 dlg_zeroDisplayData(displayInfo);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
511 displayInfo->LeftSoftKey = (USHORT)lsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
512 displayInfo->RightSoftKey = (USHORT)rsk;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
513 displayInfo->TextString = str1;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
514 displayInfo->TextString2 = str2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
515 displayInfo->displayCol = colId ;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 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
519 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
520 displayInfo->Callback = callback;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
521 displayInfo->Time = timer;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
522 displayInfo->KeyEvents = keyEvents;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 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
526 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
527 displayInfo->displayCol = displayCol;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
528 displayInfo->dlgType = dlgType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
529 displayInfo->bgdBitmap = dlgBitmap;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
534 $Function: dialog_info
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
535
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
536 $Description: Dialog function for information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
537
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
538 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
539
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
540 $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
541
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 void dialog_info (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 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
546 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
547 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
548 TRACE_FUNCTION ("dialog_info()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550 switch (event)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 case DIALOG_INIT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 * Initialize dialog
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556 #if defined (WIN32)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
558 /***************************Go-lite Optimization changes Start***********************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
559
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
560 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
561 TRACE_EVENT_P1( "Identifier %d", display_info->Identifier);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
562 /***************************Go-lite Optimization changes end***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 * Create timer and keyboard handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 */
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
569 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
570 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
571 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
572
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 //x0pleela 05 Apr, 2007 ER: OMAPS00122561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 #ifdef FF_PHONE_LOCK
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
575 if( phlock_win_handle &&
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
576 ( ( phlock_alarm) || ( call_data.call_direction == MFW_CM_MTC ) ) )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
577 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
578 TRACE_EVENT("dialog_info: Bef deleting kbd_delete(data->info_kbd);");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
579 if( phlock_alarm )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
580 phlock_alarm_win_handle = win;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
581
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
582 if( call_data.call_direction == MFW_CM_MTC )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
583 phlock_dialog_mtc_win_handle = win;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
584
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
585 kbd_delete(data->info_kbd);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
586 data->info_kbd = phlock_kbd_handle; //set the kbd handle of unlock screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
587 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 * Store any other data
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 */
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
593 data->KeyEvents = display_info->KeyEvents;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
594 data->TextString = display_info->TextString;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 data->LeftSoftKey = display_info->LeftSoftKey;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 data->RightSoftKey = display_info->RightSoftKey;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
597 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
598 data->LSKString = display_info->LSKString; // Text for left soft key
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
599 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
600 data->TextId = display_info->TextId;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 data->Identifier = display_info->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 data->Callback = display_info->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 data->TextString2 = display_info->TextString2;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 data->TextId2 = display_info->TextId2;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
605 data->WrapStrings = display_info->WrapStrings; //GW-SPR#762
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
606
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
607 data->dlgCol = display_info->displayCol;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
608 data->dlgType = display_info->dlgType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
609 data->dlgBgdBitmap = display_info->bgdBitmap;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
610 data->dlgSkFormat = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
611 data->current_frame = display_info->current_frame;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
612 data->number_of_frames = display_info->number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
613 data->icon_array = (MfwIcnAttr*)display_info->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
614 data->animation_timer = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 //x0035544 Feb 07, 2006 DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 #ifdef FF_MMI_SAT_ICON
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 if(display_info->IconData.dst != NULL)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
618 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
619 data->IconData.width = display_info->IconData.width;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
620 data->IconData.height = display_info->IconData.height;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
621 data->IconData.dst = display_info->IconData.dst;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
622 data->IconData.selfExplanatory = display_info->IconData.selfExplanatory;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
623 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
625 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
626 data->IconData.dst = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
627 data->IconData.selfExplanatory = FALSE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
628 data->IconData.width =0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
629 data->IconData.height =0;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
630 }
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
631 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
633 TRACE_EVENT_P1("anim_time = %d", display_info->anim_time);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
634 TRACE_EVENT_P1("data->anim_time = %d", data->anim_time);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 //x0pleela 27 Mar, 2007 ER: OMAPS00122561
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
636 #ifdef FF_PHONE_LOCK
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
637 phlock_mtc_anim_time = display_info->anim_time;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
638 if( ( !phlock_win_handle) || (mmiPinsEmergencyCall())
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
639 || call_data.emergencyCall )
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642 if(display_info->anim_time != 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
643 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
644 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
645 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
646 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 if (display_info->Time NEQ FOREVER)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 tim_start (data->info_tim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 win_show (win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
652 #ifdef FF_PHONE_LOCK
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
656 if (display_info->Time NEQ FOREVER)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
657 tim_start (data->info_tim);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
658
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
659
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 winShow(phlock_win_handle );
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 case DIALOG_DESTROY:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
667 dialog_info_destroy(win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
668 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 }
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 #if(0) /* x0039928 - Lint warning fix */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
675 $Function: dialog_info_win_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
676
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
677 $Description: Callback function for information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
678
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
679 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
680
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
681 $Arguments: window handle event, win
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 *******************************************************************************/
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
683 //GW-SPR#762-Added code to wraps txtString2 if there is room on the display to allow
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 //very long numbers to be displayed.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 #define MAX_LINE_CHAR MAX_LINE
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 static int dialog_info_win_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
687 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 T_dialog_info * data = (T_dialog_info *)win->user;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
689 char buffer[MAX_LINE_CHAR+1];
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
690 int yPos,len,bufPos,nLines;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 TRACE_FUNCTION ("dialog_info_win_cb()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 if (data EQ 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
696 return 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 switch (event)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
699 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
700 case E_WIN_VISIBLE:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
701 if (win->flags & E_WIN_VISIBLE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
702 {
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 * Print the information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
705 */
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 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
708 * Clear Screen
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 dspl_ClearAll();
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 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
713 * Print softkeys
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
714 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
715 icnShow(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
716 if (data->SoftKeyStrings)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
717 displayCustSoftKeys(data->LSKString, data->RSKString); // SH - display text softkeys
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
718 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
719 displaySoftKeys(data->LeftSoftKey, data->RightSoftKey); // display ID softkeys
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
720
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
721 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
722 * Print information
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
723 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
724 /*MC SPR 1257, having to shift everything up 1 line as string wrapping for second
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
725 string causes softkey overwrite when in Chinese*/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
726 if (data->TextId NEQ 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
727 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
728 ALIGNED_PROMPT(LEFT,0,DSPL_TXTATTR_CURRENT_MODE, data->TextId);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
729 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
730 else if (data->TextString NEQ NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
731 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
732 #ifdef EASY_TEXT_ENABLED
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
733 if (data->TextString[0] == (char)0x80) //MC if this is a unicode string /* x0039928 -lint warning removal */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
734 displayAlignedText(LEFT, 0, DSPL_TXTATTR_UNICODE, &data->TextString[2]);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
735 else
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
737 displayAlignedText(LEFT, 0, DSPL_TXTATTR_NORMAL, data->TextString);
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
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
740 if (data->TextId2 NEQ 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
741 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
742 ALIGNED_PROMPT(LEFT,Mmi_layout_first_line()/*MC*/,DSPL_TXTATTR_CURRENT_MODE, data->TextId2);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
743 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
744 else if (data->TextString2 NEQ NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
745 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
746 #ifdef EASY_TEXT_ENABLED
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
747 if (data->TextString2[0] == (char)0x80 ) //MC if this is a unicode string /* x0039928 -Lint warning removal */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
748 displayAlignedText(LEFT, Mmi_layout_first_line()/*MC*/, DSPL_TXTATTR_UNICODE, &data->TextString2[2]);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
749 else
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 #endif
146
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 ((data->WrapStrings & WRAP_STRING_2) && (strlen(data->TextString2) > MAX_LINE_CHAR))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
753 { //Display text over a number of lines
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
754 yPos = Mmi_layout_first_line();/*MC*/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
755 bufPos = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
756 nLines = Mmi_number_of_lines_without_icons_on_top()-2;//starting on 2nd line
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
757 len = strlen(data->TextString2);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
758 while ((bufPos < len) && (nLines >=0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
759 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
760 memcpy(buffer,&data->TextString2[bufPos],MAX_LINE_CHAR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
761 bufPos = bufPos + MAX_LINE_CHAR;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
762 buffer[MAX_LINE_CHAR] = 0x00;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
763 displayAlignedText(LEFT, yPos, 0, buffer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
764 yPos = yPos + Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
765 nLines--;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
766 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
767 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
768 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
769 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
770 displayAlignedText(LEFT, Mmi_layout_second_line(),DSPL_TXTATTR_NORMAL, data->TextString2);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
771 }
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 }
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 break;
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 default:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
778 return 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
779 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
786 $Function: dialog_info_win_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
787
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
788 $Description: Callback function for information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
789
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
790 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
791
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
792 $Arguments: window handle event, win
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 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
795 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
796 at the start.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
797 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
798 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
799 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
800 not be large enough, the entire screen is used.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
801 For the C-sample, there is no bitmap.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
802 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
803 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
804
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 // 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
807 // 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
808 // 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
809 #define MAX_DLG_LINES (15)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 //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
811 #define MAX_WRAP_CHAR (42)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 //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
813 #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
814
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
815 #define DLG_USE_BITMAP 0x0001 //use bitmap if present
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
816 #define DLG_USE_RECTANGLE 0x0002 //use a rectangle
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
817 #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
818
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 #define DLG_LINE1 0
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 #define DLG_LINE2 1
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 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
823 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 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
825 // T_DISPLAY_DATA * display_info; // RAVI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 int xPos[MAX_DLG_LINES];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827 int yPos[MAX_DLG_LINES];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828 // 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
829 //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
830 // 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
831 char* str[MAX_DLG_LINES+1];
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
832 int strLen[MAX_DLG_LINES+1];
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
833 int i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
834 char* lskStr,*rskStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
835 int wx = 0; //,wy,sx=0,sy=0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
836 int wy = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
837 int sx = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
838 int sy = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
839 int fullScreen = DLG_USE_RECTANGLE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
840 int yOfs;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
841 int yBmpOfs = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
842 MfwRect skArea;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
843 //x0035544 Feb 15, 2006. DR:OMAPS00061467
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
845 USHORT titleIconWidth = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847 MfwRect area;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
848 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
849 // 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
850 // 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
851 // Now str2[][] is not required.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
852 char *temp_ptr;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
853 int nChar;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
854
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
855 /* t_font_bitmap bmp; */ /* Warning Removal - x0020906 - 24-08-2006 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
856 // t_font_bitmap* bmpPtr = &bmp; // RAVI - Not Referenced.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
857
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
858 int drawWinType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
859 int nLines;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
860
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
861 int linePos=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
862 int lineLen = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
863 int wrapLine = 0; /*GW #2294*/ // x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
864
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
865 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
866 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
867
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
869 memset(str,'\0',sizeof(str)); /* x0039928 - Lint warning fix */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
870 memset(strLen,0,sizeof(strLen));
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
871 //x0035544 Feb 15, 2006. DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
873 if (data->IconData.dst != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
874 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
875 if (data->IconData.width > TITLE_ICON_WIDTH)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
876 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
877 titleIconWidth = TITLE_ICON_WIDTH;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
878 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
879 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
880 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
881 titleIconWidth = data->IconData.width ;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
882 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
883 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
884 else
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 titleIconWidth = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
887 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
888
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
889 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890 if (data EQ 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 switch (event)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
894 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
895 //x0pleela 15 May, 2007 DR: OMAPS00127483
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
896 //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
897 //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
898 case E_WIN_RESUME:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
900 #ifdef FF_PHONE_LOCK
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
901
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
902 if( ( ( ( call_data.call_direction == MFW_CM_MTC ) && ( phlock_dialog_mtc_win_handle ) ) || ( phlock_alarm ) )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
903 #ifdef FF_MMI_AUDIO_PROFILE
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
904 && ( !mfwAudPlay)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
905 #endif
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
906 )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
907 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
908 if( call_data.call_direction == MFW_CM_MTC )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
909 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
910 #ifdef FF_MIDI_RINGER
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
911 mfw_ringer_start(AS_RINGER_MODE_IC, TRUE, sounds_midi_ringer_start_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
912 #endif
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 else if ( phlock_alarm )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
915 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
916 #ifdef FF_MIDI_RINGER
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
917 mfw_ringer_start(AS_RINGER_MODE_ALARM, TRUE, sounds_midi_ringer_start_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
918 #endif
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
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
922 #endif // FF_PHONE_LOCK
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
923
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
924 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
925
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
926 case E_WIN_VISIBLE:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
927 if (win->flags & E_WIN_VISIBLE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
928 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
929 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
930
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
931 #ifdef FF_PHONE_LOCK
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
932 if( phlock_alarm && phlock_alarm_win_handle )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
933 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
934 TRACE_EVENT("dialog_info_win_resize_cb: creating alarm kbd handler");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
935 data->info_kbd = kbd_create (phlock_alarm_win_handle, KEY_ALL, (T_MFW_CB)dialog_info_kbd_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
936 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
937 if( ( call_data.call_direction == MFW_CM_MTC ) && ( phlock_dialog_mtc_win_handle ) )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
938 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
939 TRACE_EVENT("dialog_info_win_resize_cb: creating mtc kbd handler");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
940 data->info_kbd = kbd_create (phlock_dialog_mtc_win_handle, KEY_ALL, (T_MFW_CB)dialog_info_kbd_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
941 if(phlock_mtc_anim_time != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
942 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
943 data->animation_timer = timCreate(phlock_dialog_mtc_win_handle, phlock_mtc_anim_time,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
944 (MfwCb)mmi_dialogs_animation_new_CB);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
945 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
946 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
947 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
948 #endif //FF_PHONE_LOCK
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949
146
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 * Print the information dialog
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 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
954 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
955 xPos[i]=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
956 yPos[i] = Mmi_layout_line_height()*i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
957 str[i]=NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
958 strLen[i]=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
959 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960 // 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
961 // 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
962 str[MAX_DLG_LINES] = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 strLen[MAX_DLG_LINES] = 0;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
964 yOfs = Mmi_layout_line_height()/4;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
965 if (data->TextId != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
966 str[DLG_LINE1] = MmiRsrcGetText( data->TextId);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
967 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
968 str[DLG_LINE1] = data->TextString;
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 if (data->TextId2 != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
971 str[DLG_LINE2] = MmiRsrcGetText( data->TextId2);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
972 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
973 str[DLG_LINE2] = data->TextString2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
974
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
975 if (data->SoftKeyStrings!=0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
976 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
977 lskStr = data->LSKString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
978 rskStr = data->RSKString;
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 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
981 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
982 if (data->LeftSoftKey != TxtNull)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
983 lskStr = MmiRsrcGetText(data->LeftSoftKey);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
984 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
985 lskStr = NULL;
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 if (data->RightSoftKey != TxtNull)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
988 rskStr = MmiRsrcGetText(data->RightSoftKey);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
989 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
990 rskStr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
991 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
992
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
993 if ((str[DLG_LINE1]!= NULL) || (str[DLG_LINE2]!=NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
994 { //Draw a window for status info
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
995 if (str[DLG_LINE2] == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
996 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
997 sy = Mmi_layout_line_height()+yOfs*2; // 18 or 12
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
998
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
999 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1000 else
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 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
1003 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1004
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1005 //MC, if (Mmi_getCurrentLanguage() != CHINESE_LANGUAGE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1006 { //calculate longest string - use this to calc width of window
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1007 sx = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1008 if ((lskStr!=NULL) || (rskStr!=NULL))
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 sy = sy+Mmi_layout_softkeyHeight()+yOfs*2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1011 sx = sx + 10;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1012 if (lskStr != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1013 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1014 sx = sx + dspl_GetTextExtent(lskStr, 0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1015 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1016 if (rskStr != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1017 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1018 sx = sx + dspl_GetTextExtent(rskStr,0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1019 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1020
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 for (i=DLG_LINE1;i<=DLG_LINE2;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1023 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1024 strLen[i] = dspl_GetTextExtent(str[i],0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1025 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1026
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1027 /* 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
1028 if (data->WrapStrings & WRAP_STRING_2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1029 nLines = MAX_WRAP_LINES;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1030 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1031 nLines = 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1032 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1033 if (data->dlgBgdBitmap!=NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1034 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1035 //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
1036 //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
1037 const int max_lines_dlg_popup=2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1038 if (nLines>max_lines_dlg_popup)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1039 nLines = max_lines_dlg_popup;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1040 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
1041 if ( (strLen[DLG_LINE2] > (scrWidth-charWidth)*nLines) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1042 (strLen[DLG_LINE1] > scrWidth))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1043 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1044 //recalculate width below.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1045 if (data->WrapStrings & WRAP_STRING_2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1046 nLines = MAX_WRAP_LINES;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1047 fullScreen = DLG_USE_RECTANGLE;
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 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1050 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1051 fullScreen = DLG_USE_BITMAP;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1052 //Leave width as is
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1053 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1054 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1055 #else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1056 //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
1057 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1058 const int max_lines_dlg_popup=2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1059 if (nLines>max_lines_dlg_popup)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1060 nLines = max_lines_dlg_popup;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1061 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1062
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1063 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1064 if (fullScreen == DLG_USE_RECTANGLE)
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 //see if we can display as a pop-up
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1067 if (SCREEN_SIZE_X < 128)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1068 scrWidth = SCREEN_SIZE_X-6;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1069 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1070 scrWidth = (SCREEN_SIZE_X*7)/8;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1071 if ( strLen[DLG_LINE2] > (scrWidth-charWidth)*nLines)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1072 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1073 //Cannot fit in as a pop-up - use full screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1074 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1075 scrWidth = SCREEN_SIZE_X;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1076 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1077 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1078 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1079 //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
1080 }
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 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1084 * Wrap second text line (e.g. for long phone numbers.)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1085 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1086 if (strLen[DLG_LINE2] > scrWidth-charWidth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1087 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1088 //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
1089 if (data->WrapStrings & WRAP_STRING_2)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1090 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1091 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
1092 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1093 wrapLine = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1094 lineLen = strlen(str[DLG_LINE2]);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1095 // 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
1096 // memset is not required any more .
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1097 //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
1098 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
1099 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
1100 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
1101 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
1102 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1103 // 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
1104 // 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
1105 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
1106 if (nChar > MAX_WRAP_CHAR)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1107 nChar = MAX_WRAP_CHAR;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1108 // 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
1109 // 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
1110 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
1111 if(NULL == temp_ptr)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1112 return 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1113 // 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
1114 // 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
1115 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
1116 linePos = linePos+nChar;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1117 ////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
1118 // 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
1119 // 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
1120 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
1121 temp_ptr = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1122 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
1123 wrapLine++;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1125
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1126 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1127 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1128 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1129 //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
1130 //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
1131 //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
1132 //code will wait until it is required.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1133 // str[3] = "Code not written!!"; //issue warning
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1134 // strLen[3] = dspl_GetTextExtent(str[3],0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1135 fullScreen = DLG_USE_FULL_SCREEN; //error - use full screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1136 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1137 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1138 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1139
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1140 //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
1141 for (i=0;i< MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1142 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1143 if (strLen[i]>sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1144 sx = strLen[i];
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 if (sx > SCREEN_SIZE_X-charWidth)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1147 sx = SCREEN_SIZE_X;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1148 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1149 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1150 if (sx > SCREEN_SIZE_X/2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1151 sx = sx + charWidth;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1152 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1153 sx = sx + charWidth*2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1154 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1155 if (sy> sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1156 sx = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1157 wx = (SCREEN_SIZE_X-sx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1158 if (wx<0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1159 wx=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1160 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1161
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1162 if (sy > SCREEN_SIZE_Y)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1163 wy = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1164 else if (SCREEN_SIZE_Y > 2*sy)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1165 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
1166 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1167 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
1168 if (wy < 10)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1169 wy = wy/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1170
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1171 if ((wx == 0) || (wy==0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1172 { //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
1173 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1174 }
3
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 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1177 if ((data->icon_array != NULL) && (fullScreen != DLG_USE_BITMAP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1178 { //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
1179 if (sx < data->icon_array[0].area.sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1180 sx = data->icon_array[0].area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1181 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
1182 wy = data->icon_array[0].area.py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1183 sy = sy + data->icon_array[0].area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1184 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1186 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1187 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1188 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1189 //We have no strings to display - clear entire screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1190 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1191 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1192
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1193
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1194 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1195 * Draw window (full screen/pop-up)
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 if (fullScreen != DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1198 dspl_unfocusDisplay();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1199 area.px = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1200 area.py = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1201 area.sx = sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1202 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1203 resources_setColour(data->dlgCol);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1204 drawWinType = DSPL_WIN_CENTRE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1205
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1206 if (fullScreen!=DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1207 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1208 t_font_bitmap bmp;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1209 t_font_bitmap* bmpPtr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1210
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1211 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1212 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1213 //centre text
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1214 xPos[i] = wx+(sx-strLen[i])/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1215 yPos[i] = wy+yOfs+yBmpOfs+Mmi_layout_line_height()*i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1216 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1217
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1218 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1219 if ((data->dlgBgdBitmap != NULL) && (fullScreen==DLG_USE_BITMAP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1220 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1221 bmp.format = data->dlgBgdBitmap->icnType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1222 bmp.height = data->dlgBgdBitmap->area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1223 bmp.width = data->dlgBgdBitmap->area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1224 bmp.bitmap = data->dlgBgdBitmap->icons;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1225 bmpPtr = &bmp;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1226 area = calcLayout(data->dlgType, sx, sy, bmp.width, bmp.height);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1227
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1228 //Adjust size of available area depending on bitmap properties/dlgType.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1229 //dlgType== 0 =>display info in centre of bitmap
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1230 if (data->dlgType == 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1231 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1232 //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
1233 //lie over the centre of the data
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1234 area.px = area.px - (bmp.width - sx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1235 area.py = area.py - (bmp.height- sy)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1236 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1237 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1238 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1239 xPos[i] = xPos[i] + area.px;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1240 yPos[i] = yPos[i] + area.py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1241 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1242
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1243 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
1244 if( data->dlgBgdBitmap->icnType != ICON_TYPE_1BIT_UNPACKED )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1245 dspl_SetBgdColour( COL_TRANSPARENT );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1246
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1247
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 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1250 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1251 // x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1252 //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
1253 //string wrapping is done
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1254 if(wrapLine>0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1255 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1256 sy = sy + (wrapLine-1)*Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1257 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1258 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1259 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1260 #else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1261 if (wrapLine>1)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1262 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1263 sy = sy + (wrapLine-1)*Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1264 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1265 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1266 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1267 // 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
1268 //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
1269 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
1270 if(wy>0 && wy < sy)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1271 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272 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
1273 if(wy < 0)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1274 wy=0;
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1275 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
1276 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
1277 }
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1278 dspl_DrawWin( wx,wy,sx,sy, drawWinType , bmpPtr);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1279 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1280 else
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 dspl_ClearAll();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1283 sx = 84;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1284 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1285 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1286 xPos[i] = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1287 yPos[i] = Mmi_layout_line(i+1);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1288 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1289 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1290 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1291 * Print softkeys
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1292 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1293 icnShow(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1294 if ((lskStr != NULL) || (rskStr != NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1295 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1296 if (fullScreen==DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1297 Mmi_layout_softkeyArea( &skArea );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1298 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1299 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1300 skArea.px = area.px+wx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1301 skArea.sx = area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1302 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
1303 skArea.sy = Mmi_layout_softkeyHeight();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1304 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1305 softKeys_displayStrXY(lskStr, rskStr, data->dlgSkFormat, data->dlgCol, &skArea);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1306 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1307
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1308 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1309 * Print dialog text
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1310 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1311 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1312 { /* GW#2294 No need to draw zero length strings .*/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1313 if ((str[i] != NULL) && (strLen[i] > 0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1314 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1315 //x0035544 Feb 15, 2006. DR:OMAPS00061467
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1316 #ifdef FF_MMI_SAT_ICON
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1317 if(data->IconData.selfExplanatory == FALSE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1318 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
1319 #else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1320 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
1321 #endif
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1322 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1323 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1324 //x0035544 Feb 15, 2006. DR:OMAPS00061467
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1325 #ifdef FF_MMI_SAT_ICON
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1326 if(data->IconData.dst != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1327 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1328 if(str[DLG_LINE2] == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1329 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1330 if ((data->IconData.width > TITLE_ICON_WIDTH) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1331 (data->IconData.height > TITLE_ICON_HEIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1332 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1333 dspl_BitBlt2(xPos[0], yPos[0], 8,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1334 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
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
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1337 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1338 dspl_BitBlt2(xPos[0], yPos[0], data->IconData.width,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1339 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
1340 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1341 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1342 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1343 if ((data->IconData.width > TITLE_ICON_WIDTH) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1344 (data->IconData.height > TITLE_ICON_HEIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1345 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1346 dspl_BitBlt2(xPos[DLG_LINE2], yPos[DLG_LINE2], 8,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1347 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1348 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1349 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1350 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
1351 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
1352 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1353
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1354 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1355 #endif
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
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1358 resources_restoreColour();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1359 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1360 // 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
1361 // Now free the allocated memory
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1362 /* x0039928 - Lint warning removal */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1363 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
1364 if (data->WrapStrings & WRAP_STRING_2)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1365 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
1366 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1367 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
1368 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1369 if(NULL != str[i] && strLen[i] > 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1370 mfwFree((U8*)str[i],MAX_WRAP_CHAR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1371 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1372 str[MAX_DLG_LINES]=NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1373 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1374
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1375 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1376 default:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1377 return 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1378 }
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 return 1;
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1383 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1384
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1385 $Function: dialog_info_tim_cb
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 $Description: Callback function for the dialog info timer.
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
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1390 $Returns: MFW event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1391
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1392 $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
1393
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1394 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1395 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
1396 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1397 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
1398 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
1399 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
1400
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1401 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
1402 USHORT Identifier = data->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1403 void (* Callback)() = data->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1404
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1405 TRACE_FUNCTION("dialog_info_tim_cb()");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1406 #if defined (WIN32)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1407 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1408 /***************************Go-lite Optimization changes Start***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1409
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1410 //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
1411 TRACE_EVENT_P1 ("Identifier %d", data->Identifier);
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1412 /***************************Go-lite Optimization changes end***********************/
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 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1415 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1416
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1417 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1418 ** SPR#1744 NDH
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1419 ** 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
1420 ** 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
1421 ** removed when the screen is redrawn.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1422 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1423 dialog_info_destroy (win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1424
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1425 //TISH modified for MSIM
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1426 // if (Callback)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1427 if (Callback && parent_win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1428 (Callback) (parent_win, Identifier, INFO_TIMEOUT);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1429
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1430 return 0;
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1433
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1434 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1435
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1436 $Function: dialog_info_kbd_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1437
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1438 $Description: Keyboard event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1439
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1440 $Returns: status int
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1441
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1442 $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
1443
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1444 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1445
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1446 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
1447 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1448 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
1449 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
1450 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
1451 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
1452 USHORT Identifier = data->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1453 void (* Callback)() = data->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1454
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1455 TRACE_FUNCTION("dialog_info_kbd_cb");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1456 switch (keyboard->code)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1457 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1458 case KCD_LEFT:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1459 if (data->KeyEvents & KEY_LEFT )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1460 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1461 TRACE_EVENT("dialog_info_kbd_cb: KEY_LEFT");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1462
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1463 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1464 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1465 (Callback) (parent_win, Identifier, INFO_KCD_LEFT);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1466 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1467 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1468
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1469 case KCD_RIGHT:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1470 if (data->KeyEvents & KEY_RIGHT)
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 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1473 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1474 (Callback) (parent_win, Identifier, INFO_KCD_RIGHT);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1475 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1476 break;
3
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 case KCD_HUP:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1479 if (data->KeyEvents & KEY_HUP || data->KeyEvents & INFO_KCD_ALL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1480 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1481 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1482 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1483 (Callback) (parent_win, Identifier, INFO_KCD_HUP);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1484 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1485 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1486
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1487 case KCD_MNUUP:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1488 if (data->KeyEvents & KEY_MNUUP)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1489 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1490 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1491 (Callback) (parent_win, Identifier, INFO_KCD_UP);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1492 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1493 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1494
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1495 case KCD_MNUDOWN:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1496 if (data->KeyEvents & KEY_MNUDOWN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1497 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1498 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1499 (Callback) (parent_win, Identifier, INFO_KCD_DOWN);
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 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1502
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1503 //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
1504 case KCD_CALL:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1505 if (data->KeyEvents & KEY_CALL )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1506 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1507 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1508 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1509 (Callback) (parent_win, Identifier, INFO_KCD_OFFHOOK);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1510 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1511 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1512
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1513 default:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1514 if (data->KeyEvents & INFO_KCD_ALL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1515 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1516 TRACE_EVENT("dialog_info_kbd_cb: INFO_KCD_ALL");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1517
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1518 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1519 Note: The variable Identifier is overwritten with the
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1520 keycode of the dialog;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1521 we need it only for the Multicall Control !!
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1522 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1523 Identifier = keyboard->code;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1524 dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1525 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1526 (Callback) (parent_win, Identifier, INFO_KCD_ALL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1527 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1528 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1529
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1530 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1531 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1532 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1533
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1534 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
1535 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1536 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1537
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1538
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1539 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1540
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1541 $Function: mmi_dialog_information_screen
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1542
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1543 $Description:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1544
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1545 $Returns:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1546
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1547 $Arguments:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1548
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1549 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1550
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1551 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
1552 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1553 T_DISPLAY_DATA display_info;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1554 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
1555 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
1556 //Sep 01, 2004 REF: CRR 21380 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1557 //Assigning TextId and TextString will not display both the messages.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1558 //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
1559 display_info.TextString2 = text;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1560 display_info.Identifier = identifier;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1561 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
1562 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1563
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1564 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
1565 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1566 T_DISPLAY_DATA DisplayInfo;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1567 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtNull, TextId, TxtNull, colour);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1568 dlg_initDisplayData_events( &DisplayInfo, NULL, FOREVER, KEY_HUP );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1569 DisplayInfo.TextString = TextStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1570 return info_dialog(win, &DisplayInfo);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1571 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1572
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1573 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1574
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1575 $Function: mmi_dialogs_insert_icon
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1576
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1577 $Description: Displays one icon in a dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1578
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1579 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1580
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1581 $Arguments: win, pointer to an icon
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1582
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1583 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1584 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
1585 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1586 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
1587 T_dialog_info * data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1588
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1589 data->icon = icnCreate(win_dialog,icon,E_ICN_VISIBLE,NULL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1590 icnUnhide(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1591 winShow(win_dialog);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1592 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1593
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1594 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1595
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1596 $Function: mmi_dialogs_insert_animation
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1597
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1598 $Description: starts an animation in a dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1599
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1600 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1601
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1602 $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
1603
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1604 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1605 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
1606 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1607 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
1608 T_dialog_info * data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1609
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1610 data->number_of_frames = number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1611 data->current_frame = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1612 data->icon_array = icon;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1613 data->current_icon = data->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1614 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
1615 icnUnhide(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1616
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1617 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
1618 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1619 winShow(win_dialog);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1620 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1621
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1622 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1623
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1624 $Function: mmi_dialogs_insert_animation_CB
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1625
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1626 $Description: destroys the current icon and starts the next icon
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1627
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1628 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1629
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1630 $Arguments: timer event, timer control block
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1631
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1632 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1633 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
1634 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1635 T_MFW_HND win = mfw_parent (mfw_header());
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1636 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1637 T_dialog_info * data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1638
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1639 icnDelete(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1640 if (data->current_frame < (data->number_of_frames-1))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1641 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1642 data->current_frame++;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1643 data->current_icon++;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1644 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1645 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1646 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1647 data->current_frame = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1648 data->current_icon = data->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1649 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1650 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
1651 icnUnhide(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1652 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1653 winShow(win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1654 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1655 /***************************Go-lite Optimization changes Start***********************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1656
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1657 //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
1658 //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
1659 //COLOURDISPLAY compiler switch
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1660 #ifdef COLOURDISPLAY
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1661 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
1662 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1663 TRACE_EVENT("mmi_dialogs_insert_animation_new()");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1664
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1665 animateInfo->number_of_frames = number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1666 animateInfo->current_frame = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1667 animateInfo->icon_array = icon;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1668 animateInfo->anim_time = anim_time;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1669 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1670 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1671 /***************************Go-lite Optimization changes end***********************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1672
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1673 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
1674 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1675 T_MFW_HND win = mfw_parent (mfw_header());
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1676 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
1677 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
1678 char * idData;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1679 int px, py, sx, sy;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1680 MfwIcnAttr* icn_array;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1681 MfwIcnAttr* icn;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1682
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1683 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
1684
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1685 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
1686 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
1687 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
1688
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1689 icn_array = (MfwIcnAttr*)data->icon_array;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1690 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
1691
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1692 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
1693
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1694 px = icn->area.px;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1695 py = icn->area.py;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1696 sx = icn->area.sx;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1697 sy = icn->area.sy;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1698
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1699 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
1700
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1701 idData = icn->icons;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1702
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1703 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
1704 timStart(data->animation_timer);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1705 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1706 //Jun 04,2004 CRR:13601 xpradipg - SASKEN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1707 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1708
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1709 $Function: InfoDialogTimRestart
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1710
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1711 $Description: restarts the information dialog timer
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1712
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1713 $Returns: none
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1714
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1715 $Arguments: window handler
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1716
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1717 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1718
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1719 void InfoDialogTimRestart(T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1720 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1721 T_MFW_WIN * win_data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1722 T_dialog_info * data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1723
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1724 win_data = ((T_MFW_HDR *)win)->data;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1725 data = (T_dialog_info *)win_data->user;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1726
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1727 tim_stop(data->info_tim);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1728 tim_start(data->info_tim);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1729 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1730
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1731 // Feb 24, 2005 CRR:29102 xnkulkar - SASKEN
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1732 // 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
1733 // registered.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1734 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1735
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1736 $Function: mmi_dialog_information_screen_delete_all
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1737
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1738 $Description: Displays the information screen during "Delete All" operation
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1739
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1740 $Returns: Handle of information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1741
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1742 $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
1743
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1744 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1745 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
1746 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1747 T_DISPLAY_DATA DisplayInfo;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1748
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1749 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtNull, TextId, TxtNull, colour);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1750 dlg_initDisplayData_events( &DisplayInfo, NULL, FOREVER, NULL );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1751 DisplayInfo.TextString = TextStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1752
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1753 return info_dialog(win, &DisplayInfo);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1754 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1755
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1756 //x0peela 02 Apr, 2007 ER: OMAPS00122561
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1757 #ifdef FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1758 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1759
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1760 $Function: phlock_info_dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1761
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1762 $Description: Common information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1763
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1764 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1765
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1766 $Arguments: parent win, display info
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1767
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1768 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1769 T_MFW_HND phlock_info_dialog (T_MFW_HND parent_win,
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1770 T_DISPLAY_DATA * display_info)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1771 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1772 T_MFW_HND win;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1773 TRACE_FUNCTION("phlock_info_dialog()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1774 display_info->SoftKeyStrings = FALSE;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1775
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1776 win = phlock_dialog_info_create (parent_win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1777
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1778 if (win NEQ NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1779 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1780 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
1781 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1782 return win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1783 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1784
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1785 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1786
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1787 $Function: phlock_dialog_info_create
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1788
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1789 $Description: Creation of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1790
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1791 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1792
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1793 $Arguments: parent win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1794
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1795 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1796 static T_MFW_HND phlock_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
1797 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1798 T_MFW_WIN * win_data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1799 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
1800 TRACE_FUNCTION ("phlock_dialog_info_create()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1801
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1802 data->info_win = win_create (parent_win, 0, E_WIN_VISIBLE, (T_MFW_CB)phlock_dialog_info_win_resize_cb);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1803
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1804 if (data->info_win EQ 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1805 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1806 TRACE_EVENT_P1("phlock_dialog_info_create:data->info_win:%02x", data->info_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1807 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1808 * Create window handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1809 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1810 data->mmi_control.dialog = (T_DIALOG_FUNC)phlock_dialog_info;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1811 data->mmi_control.data = data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1812 data->parent_win = parent_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1813 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
1814 win_data->user = (void *)data;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1815
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1816 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1817 * return window handle
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1818 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1819 return data->info_win;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1820 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1821
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1822 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1823
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1824 $Function: phlock_dialog_info_win_resize_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1826 $Description: Creation of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1827
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1828 $Returns: Dialogue info win
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1829
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1830 $Arguments: parent win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1831
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1832 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1833 static int phlock_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
1834 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1835 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
1836 // T_DISPLAY_DATA * display_info; // RAVI
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1837 int xPos[MAX_DLG_LINES];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1838 int yPos[MAX_DLG_LINES];
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1839 // 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
1840 //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
1841 // 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
1842 char* str[MAX_DLG_LINES+1];
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1843 int strLen[MAX_DLG_LINES+1];
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1844 int i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1845 char* lskStr,*rskStr;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1846 int wx = 0; //,wy,sx=0,sy=0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1847 int wy = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1848 int sx = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1849 int sy = 0; // RAVI
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1850 int fullScreen = DLG_USE_RECTANGLE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1851 int yOfs;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1852 int yBmpOfs = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1853 MfwRect skArea;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1854 //x0035544 Feb 15, 2006. DR:OMAPS00061467
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1855 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1856 USHORT titleIconWidth = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1857 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1858 MfwRect area;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1859 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
1860 // 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
1861 // 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
1862 // Now str2[][] is not required.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1863 char *temp_ptr;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1864 int nChar;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1865
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1866 /* t_font_bitmap bmp; */ /* Warning Removal - x0020906 - 24-08-2006 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1867 // t_font_bitmap* bmpPtr = &bmp; // RAVI - Not Referenced.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1868
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1869 int drawWinType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1870 int nLines;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1871
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1872 int linePos=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1873 int lineLen = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1874 int wrapLine = 0; /*GW #2294*/ // x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1875
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1876 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
1877 TRACE_FUNCTION ("phlock_dialog_info_win_resize_cb()");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1878
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1879 memset(str,'\0',sizeof(str)); /* x0039928 - Lint warning fix */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1880 memset(strLen,0,sizeof(strLen));
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1881 //x0035544 Feb 15, 2006. DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1882 #ifdef FF_MMI_SAT_ICON
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1883 if (data->IconData.dst != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1884 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1885 if (data->IconData.width > TITLE_ICON_WIDTH)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1886 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1887 titleIconWidth = TITLE_ICON_WIDTH;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1888 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1889 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1890 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1891 titleIconWidth = data->IconData.width ;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1892 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1893 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1894 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1895 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1896 titleIconWidth = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1897 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1898
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
1899 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1900 if (data EQ 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1901 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1902
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1903 switch (event)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1904 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1905 case E_WIN_VISIBLE:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1906 if (win->flags & E_WIN_VISIBLE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1907 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1908 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1909 * Print the information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1910 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1911 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1912 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1913 xPos[i]=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1914 yPos[i] = Mmi_layout_line_height()*i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1915 str[i]=NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1916 strLen[i]=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1917 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1918 // 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
1919 // 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
1920 str[MAX_DLG_LINES] = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1921 strLen[MAX_DLG_LINES] = 0;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1922 yOfs = Mmi_layout_line_height()/4;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1923 if (data->TextId != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1924 str[DLG_LINE1] = MmiRsrcGetText( data->TextId);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1925 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1926 str[DLG_LINE1] = data->TextString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1927
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1928 if (data->TextId2 != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1929 str[DLG_LINE2] = MmiRsrcGetText( data->TextId2);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1930 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1931 str[DLG_LINE2] = data->TextString2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1932
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1933 if (data->SoftKeyStrings!=0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1934 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1935 lskStr = data->LSKString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1936 rskStr = data->RSKString;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1937 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1938 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1939 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1940 if (data->LeftSoftKey != TxtNull)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1941 lskStr = MmiRsrcGetText(data->LeftSoftKey);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1942 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1943 lskStr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1944
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1945 if (data->RightSoftKey != TxtNull)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1946 rskStr = MmiRsrcGetText(data->RightSoftKey);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1947 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1948 rskStr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1949 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1950
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1951 if ((str[DLG_LINE1]!= NULL) || (str[DLG_LINE2]!=NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1952 { //Draw a window for status info
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1953 if (str[DLG_LINE2] == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1954 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1955 sy = Mmi_layout_line_height()+yOfs*2; // 18 or 12
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1956
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1957 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1958 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1959 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1960 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
1961 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1962
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1963 //MC, if (Mmi_getCurrentLanguage() != CHINESE_LANGUAGE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1964 { //calculate longest string - use this to calc width of window
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1965 sx = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1966 if ((lskStr!=NULL) || (rskStr!=NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1967 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1968 sy = sy+Mmi_layout_softkeyHeight()+yOfs*2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1969 sx = sx + 10;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1970 if (lskStr != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1971 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1972 sx = sx + dspl_GetTextExtent(lskStr, 0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1973 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1974 if (rskStr != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1975 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1976 sx = sx + dspl_GetTextExtent(rskStr,0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1977 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1978
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1979 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1980 for (i=DLG_LINE1;i<=DLG_LINE2;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1981 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1982 strLen[i] = dspl_GetTextExtent(str[i],0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1983 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1984
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1985 /* 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
1986 if (data->WrapStrings & WRAP_STRING_2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1987 nLines = MAX_WRAP_LINES;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1988 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1989 nLines = 1;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1990 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1991 if (data->dlgBgdBitmap!=NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1992 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1993 //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
1994 //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
1995 const int max_lines_dlg_popup=2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1996 if (nLines>max_lines_dlg_popup)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1997 nLines = max_lines_dlg_popup;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1998 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
1999 if ( (strLen[DLG_LINE2] > (scrWidth-charWidth)*nLines) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2000 (strLen[DLG_LINE1] > scrWidth))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2001 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2002 //recalculate width below.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2003 if (data->WrapStrings & WRAP_STRING_2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2004 nLines = MAX_WRAP_LINES;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2005 fullScreen = DLG_USE_RECTANGLE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2006 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2007 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2008 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2009 fullScreen = DLG_USE_BITMAP;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2010 //Leave width as is
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2011 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2012 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2013 #else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2014 //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
2015 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2016 const int max_lines_dlg_popup=2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2017 if (nLines>max_lines_dlg_popup)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2018 nLines = max_lines_dlg_popup;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2019 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2020
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2021 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2022 if (fullScreen == DLG_USE_RECTANGLE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2023 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2024 //see if we can display as a pop-up
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2025 if (SCREEN_SIZE_X < 128)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2026 scrWidth = SCREEN_SIZE_X-6;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2027 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2028 scrWidth = (SCREEN_SIZE_X*7)/8;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2029 if ( strLen[DLG_LINE2] > (scrWidth-charWidth)*nLines)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2030 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2031 //Cannot fit in as a pop-up - use full screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2032 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2033 scrWidth = SCREEN_SIZE_X;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2034 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2035 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2036 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2037 //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
2038 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2039 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2040
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2041 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2042 * Wrap second text line (e.g. for long phone numbers.)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2043 */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2044 if (strLen[DLG_LINE2] > scrWidth-charWidth)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2045 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2046 //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
2047 if (data->WrapStrings & WRAP_STRING_2)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2048 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2049 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
2050 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2051 wrapLine = 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2052 lineLen = strlen(str[DLG_LINE2]);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2053 // 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
2054 // memset is not required any more .
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2055 //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
2056 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
2057 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
2058 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
2059 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
2060 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2061 // 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
2062 // 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
2063 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
2064 if (nChar > MAX_WRAP_CHAR)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2065 nChar = MAX_WRAP_CHAR;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2066 // 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
2067 // 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
2068 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
2069 if(NULL == temp_ptr)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2070 return 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2071 // 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
2072 // 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
2073 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
2074 linePos = linePos+nChar;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2075 ////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
2076 // 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
2077 // 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
2078 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
2079 temp_ptr = NULL;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2080 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
2081 wrapLine++;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2082 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2083
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2084 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2085 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2086 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2087 //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
2088 //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
2089 //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
2090 //code will wait until it is required.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2091 // str[3] = "Code not written!!"; //issue warning
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2092 // strLen[3] = dspl_GetTextExtent(str[3],0);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2093 fullScreen = DLG_USE_FULL_SCREEN; //error - use full screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2094 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2095 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2096 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2097
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2098 //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
2099 for (i=0;i< MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2100 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2101 if (strLen[i]>sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2102 sx = strLen[i];
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2103 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2104 if (sx > SCREEN_SIZE_X-charWidth)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2105 sx = SCREEN_SIZE_X;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2106 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2107 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2108 if (sx > SCREEN_SIZE_X/2)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2109 sx = sx + charWidth;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2110 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2111 sx = sx + charWidth*2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2112 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2113 if (sy> sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2114 sx = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2115 wx = (SCREEN_SIZE_X-sx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2116 if (wx<0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2117 wx=0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2118 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2119
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2120 if (sy > SCREEN_SIZE_Y)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2121 wy = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2122 else if (SCREEN_SIZE_Y > 2*sy)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2123 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
2124 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2125 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
2126 if (wy < 10)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2127 wy = wy/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2128
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2129 if ((wx == 0) || (wy==0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2130 { //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
2131 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2132 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2133
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2134 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2135 if ((data->icon_array != NULL) && (fullScreen != DLG_USE_BITMAP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2136 { //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
2137 if (sx < data->icon_array[0].area.sx)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2138 sx = data->icon_array[0].area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2139 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
2140 wy = data->icon_array[0].area.py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2141 sy = sy + data->icon_array[0].area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2142 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2143 #endif
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2144 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2145 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2146 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2147 //We have no strings to display - clear entire screen
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2148 fullScreen = DLG_USE_FULL_SCREEN;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2149 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2150
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2151
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2152 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2153 * Draw window (full screen/pop-up)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2154 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2155 if (fullScreen != DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2156 dspl_unfocusDisplay();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2157 area.px = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2158 area.py = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2159 area.sx = sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2160 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2161 resources_setColour(data->dlgCol);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2162 drawWinType = DSPL_WIN_CENTRE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2163
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2164 if (fullScreen!=DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2165 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2166 t_font_bitmap bmp;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2167 t_font_bitmap* bmpPtr = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2168
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2169 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2170 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2171 //centre text
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2172 xPos[i] = wx+(sx-strLen[i])/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2173 yPos[i] = wy+yOfs+yBmpOfs+Mmi_layout_line_height()*i;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2174 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2175
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2176 #ifdef COLOURDISPLAY
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2177 if ((data->dlgBgdBitmap != NULL) && (fullScreen==DLG_USE_BITMAP))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2178 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2179 bmp.format = data->dlgBgdBitmap->icnType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2180 bmp.height = data->dlgBgdBitmap->area.sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2181 bmp.width = data->dlgBgdBitmap->area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2182 bmp.bitmap = data->dlgBgdBitmap->icons;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2183 bmpPtr = &bmp;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2184 area = calcLayout(data->dlgType, sx, sy, bmp.width, bmp.height);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2185
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2186 //Adjust size of available area depending on bitmap properties/dlgType.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2187 //dlgType== 0 =>display info in centre of bitmap
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2188 if (data->dlgType == 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2189 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2190 //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
2191 //lie over the centre of the data
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2192 area.px = area.px - (bmp.width - sx)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2193 area.py = area.py - (bmp.height- sy)/2;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2194 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2195 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2196 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2197 xPos[i] = xPos[i] + area.px;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2198 yPos[i] = yPos[i] + area.py;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2199 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2200
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2201 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
2202 if( data->dlgBgdBitmap->icnType != ICON_TYPE_1BIT_UNPACKED )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2203 dspl_SetBgdColour( COL_TRANSPARENT );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2204
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2205
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2206 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2207 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2208 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2209 // x0066814 06 Dec 2006, OMAPS00106825
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2210 //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
2211 //string wrapping is done
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2212 if(wrapLine>0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2213 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2214 sy = sy + (wrapLine-1)*Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2215 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2216 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2217 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2218 #else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2219 if (wrapLine>1)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2220 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2221 sy = sy + (wrapLine-1)*Mmi_layout_line_height();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2222 area.sy = sy;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2223 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2224 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2225 // 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
2226 //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
2227 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
2228 if(wy>0 && wy < sy)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2229 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2230 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
2231 if(wy < 0)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2232 wy=0;
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2233 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
2234 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
2235 }
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2236 dspl_DrawWin( wx,wy,sx,sy, drawWinType , bmpPtr);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2237 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2238 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2239 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2240 dspl_ClearAll();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2241 sx = 84;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2242 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2243 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2244 xPos[i] = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2245 yPos[i] = Mmi_layout_line(i+1);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2246 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2247 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2248 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2249 * Print softkeys
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2250 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2251 icnShow(data->icon);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2252 if ((lskStr != NULL) || (rskStr != NULL))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2253 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2254 if (fullScreen==DLG_USE_FULL_SCREEN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2255 Mmi_layout_softkeyArea( &skArea );
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2256 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2257 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2258 skArea.px = area.px+wx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2259 skArea.sx = area.sx;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2260 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
2261 skArea.sy = Mmi_layout_softkeyHeight();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2262 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2263 softKeys_displayStrXY(lskStr, rskStr, data->dlgSkFormat, data->dlgCol, &skArea);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2264 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2265
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2266 /******************************
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2267 * Print dialog text
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2268 *****************************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2269 for (i=0;i<MAX_DLG_LINES;i++)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2270 { /* GW#2294 No need to draw zero length strings .*/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2271 if ((str[i] != NULL) && (strLen[i] > 0))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2272 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2273 //x0035544 Feb 15, 2006. DR:OMAPS00061467
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2274 #ifdef FF_MMI_SAT_ICON
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2275 if(data->IconData.selfExplanatory == FALSE)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2276 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
2277 #else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2278 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
2279 #endif
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2280 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2281 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2282 //x0035544 Feb 15, 2006. DR:OMAPS00061467
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2283 #ifdef FF_MMI_SAT_ICON
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2284 if(data->IconData.dst != NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2285 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2286 if(str[DLG_LINE2] == NULL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2287 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2288 if ((data->IconData.width > TITLE_ICON_WIDTH) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2289 (data->IconData.height > TITLE_ICON_HEIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2290 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2291 dspl_BitBlt2(xPos[0], yPos[0], 8,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2292 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2293 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2294
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2295 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2296 dspl_BitBlt2(xPos[0], yPos[0], data->IconData.width,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2297 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
2298 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2299 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2300 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2301 if ((data->IconData.width > TITLE_ICON_WIDTH) ||
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2302 (data->IconData.height > TITLE_ICON_HEIGHT))
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2303 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2304 dspl_BitBlt2(xPos[DLG_LINE2], yPos[DLG_LINE2], 8,
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2305 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2306 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2307 else
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2308 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
2309 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
2310 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2311
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2312 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2313 #endif
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2314
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2315
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2316 resources_restoreColour();
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2317 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2318
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2319 // 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
2320 // Now free the allocated memory
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2321 /* x0039928 - Lint warning removal */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2322 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
2323 if (data->WrapStrings & WRAP_STRING_2)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2324 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
2325 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2326 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
2327 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2328 if(NULL != str[i] && strLen[i] > 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2329 mfwFree((U8*)str[i],MAX_WRAP_CHAR);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2330 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2331 str[MAX_DLG_LINES]=NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2332 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2333
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2334 break;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2335
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2336 default:
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2337 return 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2338 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2339
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2340 return 1;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2341 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2342
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2343 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2344
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2345 $Function: phlock_dialog_info
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2346
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2347 $Description: Dialog function for information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2348
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2349 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2350
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2351 $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
2352
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2353 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2354 void phlock_dialog_info (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2355 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2356 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
2357 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
2358 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
2359 TRACE_FUNCTION ("phlock_dialog_info()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2360
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2361 switch (event)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2362 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2363 case DIALOG_INIT:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2364 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2365 * Initialize dialog
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2366 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2367 #if defined (WIN32)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2368 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2369 /***************************Go-lite Optimization changes Start***********************/
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2370
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2371 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2372 TRACE_EVENT_P1( "Identifier %d", display_info->Identifier);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2373 /***************************Go-lite Optimization changes end***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2374
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2375 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2376 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2377 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2378 * Create timer and keyboard handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2379 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2380 data->info_tim = tim_create (win, display_info->Time, (T_MFW_CB)phlock_dialog_info_tim_cb);
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2381 data->info_kbd = kbd_create (win, KEY_ALL, (T_MFW_CB)phlock_dialog_info_kbd_cb);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2382 data->info_kbd_long = kbd_create(win,KEY_ALL|KEY_LONG,(MfwCb)phlock_dialog_info_kbd_long_cb);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2383
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2384 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2385 * Store any other data
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2386 */
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2387 data->KeyEvents = display_info->KeyEvents;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2388 data->TextString = display_info->TextString;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2389 data->LeftSoftKey = display_info->LeftSoftKey;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2390 data->RightSoftKey = display_info->RightSoftKey;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2391 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
2392 data->LSKString = display_info->LSKString; // Text for left soft key
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2393 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
2394 data->TextId = display_info->TextId;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2395 data->Identifier = display_info->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2396 data->Callback = display_info->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2397 data->TextString2 = display_info->TextString2;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2398 data->TextId2 = display_info->TextId2;
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2399 data->WrapStrings = display_info->WrapStrings; //GW-SPR#762
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2400
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2401 data->dlgCol = display_info->displayCol;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2402 data->dlgType = display_info->dlgType;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2403 data->dlgBgdBitmap = display_info->bgdBitmap;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2404 data->dlgSkFormat = 0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2405 data->current_frame = display_info->current_frame;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2406 data->number_of_frames = display_info->number_of_frames;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2407 data->icon_array = (MfwIcnAttr*)display_info->icon_array;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2408 data->animation_timer = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2409 //x0035544 Feb 07, 2006 DR:OMAPS00061467
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2410 #ifdef FF_MMI_SAT_ICON
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2411 if(display_info->IconData.dst != NULL)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2412 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2413 data->IconData.width = display_info->IconData.width;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2414 data->IconData.height = display_info->IconData.height;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2415 data->IconData.dst = display_info->IconData.dst;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2416 data->IconData.selfExplanatory = display_info->IconData.selfExplanatory;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2417 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2418 else
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2419 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2420 data->IconData.dst = NULL;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2421 data->IconData.selfExplanatory = FALSE;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2422 data->IconData.width =0;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2423 data->IconData.height =0;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2424 }
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2425 #endif
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2426
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2427 TRACE_EVENT_P1("anim_time = %d", display_info->anim_time);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2428 TRACE_EVENT_P1("data->anim_time = %d", data->anim_time);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2429 if(display_info->anim_time != 0)
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2430 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2431 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
2432 timStart(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2433 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2434
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2435 if (display_info->Time NEQ FOREVER)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2436 tim_start (data->info_tim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2437 win_show (win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2438
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2439 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2440
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2441 case DIALOG_DESTROY:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2442 phlock_dialog_info_destroy(win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2443 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2444 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2445 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2446
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2447 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2448
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2449 $Function: phlock_dialog_info_tim_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2450
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2451 $Description: Callback function for the dialog info timer.
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2452
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2453
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2454 $Returns: MFW event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2455
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2456 $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
2457
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2458 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2459 static T_MFW_CB phlock_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
2460 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2461 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
2462 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
2463 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
2464
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2465 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
2466 USHORT Identifier = data->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2467 void (* Callback)() = data->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2468
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2469 TRACE_FUNCTION("phlock_dialog_info_tim_cb()");
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2470 #if defined (WIN32)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2471 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2472 /***************************Go-lite Optimization changes Start***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2473
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2474 //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
2475 TRACE_EVENT_P1 ("Identifier %d", data->Identifier););
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2476 /***************************Go-lite Optimization changes end***********************/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2477
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2478 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2479 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2480
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2481 #ifdef FF_PHONE_LOCK
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2482 TRACE_EVENT("Bef. destroy");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2483 TRACE_EVENT_P1("phlock_dialog_info_tim_cb: win: %02x", win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2484
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2485 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2486 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2487 ** SPR#1744 NDH
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2488 ** 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
2489 ** 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
2490 ** removed when the screen is redrawn.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2491 */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2492
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2493 TRACE_EVENT("phlock_dialog_info_tim_cb: Bef dialog_info_destrroy");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2494 phlock_dialog_info_destroy (win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2495
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2496 #ifdef FF_PHONE_LOCK
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2497 TRACE_EVENT("Aft. destroy");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2498 TRACE_EVENT_P1("phlock_dialog_info_tim_cb: win: %02x", win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2499 #endif //FF_PHONE_LOCK
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2500
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2501 if (Callback)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2502 (Callback) (parent_win, Identifier, INFO_TIMEOUT);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2503
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2504 return 0;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2505 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2506
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2507 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2508
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2509 $Function: phlock_dialog_info_kbd_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2510
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2511 $Description: Keyboard event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2512
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2513 $Returns: status int
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2514
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2515 $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
2516
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2517 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2518
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2519 static int phlock_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
2520 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2521 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
2522 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
2523 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
2524 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
2525 USHORT Identifier = data->Identifier;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2526 void (* Callback)() = data->Callback;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2527
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2528 TRACE_FUNCTION("phlock_dialog_info_kbd_cb");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2529
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2530 switch (keyboard->code)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2531 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2532 case KCD_LEFT:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2533 if (data->KeyEvents & KEY_LEFT )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2534 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2535 phlock_dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2536 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2537 (Callback) (parent_win, Identifier, INFO_KCD_LEFT);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2538 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2539 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2540
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2541 case KCD_RIGHT:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2542 if (data->KeyEvents & KEY_RIGHT)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2543 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2544 phlock_dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2545 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2546 (Callback) (parent_win, Identifier, INFO_KCD_RIGHT);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2547 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2548 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2549
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2550 case KCD_HUP:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2551 if (data->KeyEvents & KEY_HUP || data->KeyEvents & INFO_KCD_ALL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2552 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2553 phlock_dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2554 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2555 (Callback) (parent_win, Identifier, INFO_KCD_HUP);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2556 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2557 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2558 case KCD_MNUUP:
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2559
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2560 if (data->KeyEvents & KEY_MNUUP)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2561 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2562 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2563 (Callback) (parent_win, Identifier, INFO_KCD_UP);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2564 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2565
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2566 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2567 case KCD_MNUDOWN:
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2568
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2569 if (data->KeyEvents & KEY_MNUDOWN)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2570 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2571 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2572 (Callback) (parent_win, Identifier, INFO_KCD_DOWN);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2573 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2574
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2575 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2576 //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
2577 case KCD_CALL:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2578 if (data->KeyEvents & KEY_CALL )
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2579 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2580 phlock_dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2581 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2582 (Callback) (parent_win, Identifier, INFO_KCD_OFFHOOK);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2583 }
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2584 break;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2585 default:
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2586 if (data->KeyEvents & INFO_KCD_ALL)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2587 {
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2588 /*
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2589 Note: The variable Identifier is overwritten with the
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2590 keycode of the dialog;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2591 we need it only for the Multicall Control !!
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2592 */
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2593 Identifier = keyboard->code;
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2594 phlock_dialog_info_destroy (win);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2595 if (Callback)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2596 (Callback) (parent_win, Identifier, INFO_KCD_ALL);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2597 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2598 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2599
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2600 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2601 return MFW_EVENT_CONSUMED;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2602 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2603
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2604 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2605
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2606 $Function: phlock_dialog_info_kbd_long_cb
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2607
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2608 $Description: Keyboard event handler
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2609
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2610 $Returns: status int
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2611
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2612 $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
2613
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2614 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2615 static int phlock_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
2616 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2617 TRACE_FUNCTION("dialog_info_kbd_long_cb()");
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2618 return MFW_EVENT_CONSUMED;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2619 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2620
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2621 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2622
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2623 $Function: phlock_dialog_info_destroy
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2624
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2625 $Description: Destruction of an information dialog
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2626
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2627 $Returns: void
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2628
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2629 $Arguments: win
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2630
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2631 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2632 void phlock_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
2633 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2634 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
2635 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
2636
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2637 TRACE_FUNCTION ("phlock_dialog_info_destroy()");
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2638
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2639 if (own_window == NULL)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2640 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2641 TRACE_EVENT ("Error :- Called with NULL Pointer");
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2642 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2643 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2644
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2645 if (data)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2646 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2647 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2648 * Exit TIMER & KEYBOARD Handle
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2649 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2650 kbd_delete (data->info_kbd);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2651 tim_delete (data->info_tim);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2652
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2653 if(data->animation_timer != 0)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2654 {
146
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2655 timDelete(data->animation_timer);
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2656
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2657 if (data->icon != 0)
303704cf0701 mmiDialogs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2658 icnDelete(data->icon);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2659 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2660
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2661 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2662 * Delete WIN Handler
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2663 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2664 TRACE_EVENT_P1("phlock_dialog_info_destroy: deleting:data->info_win:%02x",data->info_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2665
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2666 win_delete (data->info_win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2667 /*
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2668 * Free Memory
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2669 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2670 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
2671 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2672 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2673 #endif //FF_PHONE_LOCK
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2674