FreeCalypso > hg > fc-tourmaline
comparison src/ui/mfw/mfw_mnu.h @ 3:67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:33:10 +0000 |
parents | |
children | 92abb46dc1ba |
comparison
equal
deleted
inserted
replaced
2:3a14ee9a9843 | 3:67bfe9f274f6 |
---|---|
1 /* | |
2 +--------------------------------------------------------------------+ | |
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_mnu.h $| | |
4 | $Author:: Le $ CONDAT GmbH $Revision:: 10 $| | |
5 | CREATED: 23.11.98 $Modtime:: 4.01.00 13:30 $| | |
6 | STATE : code | | |
7 +--------------------------------------------------------------------+ | |
8 | |
9 MODULE : MFW_MNU | |
10 | |
11 PURPOSE : Keyboard types & constants | |
12 | |
13 EXPORT : | |
14 | |
15 TO DO : | |
16 | |
17 $History:: mfw_mnu.h $ | |
18 | |
19 June 05, 2006 REF:OMAPS00060424 x0045876 | |
20 Description: Header Toggling | |
21 Solution: Implemented the toggling of header when displaying the length text in SELECT ITEM and SET UP MENU | |
22 | |
23 May 18, 2006 REF: DRT OMAPS00076438 xdeepadh | |
24 Description: Scrolling not implemented in Imageviewer | |
25 Solution: The support for scrolling has been provided. | |
26 | |
27 Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462 | |
28 Icon support for SetupMenu & Select item. | |
29 | |
30 * | |
31 * ************************************************ | |
32 * User: xreddymn Date: Dec-16-2004 | |
33 * Updated in $/GSM/Condat/MS/SRC/MFW | |
34 * Added double line display for MFW list menu items | |
35 * | |
36 * ***************** Version 10 ***************** | |
37 * User: Le Date: 6.01.00 Time: 9:23 | |
38 * Updated in $/GSM/Condat/MS/SRC/MFW | |
39 * Alignment of MFW versions | |
40 * | |
41 * ***************** Version 2 ***************** | |
42 * User: Es Date: 22.11.99 Time: 10:29 | |
43 * Updated in $/GSM/Condat/SND-MMI/MFW | |
44 * | |
45 * ***************** Version 1 ***************** | |
46 * User: Es Date: 18.11.99 Time: 16:35 | |
47 * Created in $/GSM/Condat/SND-MMI/MFW | |
48 * Initial | |
49 */ | |
50 | |
51 #ifndef _DEF_MFW_MNU_H_ | |
52 #define _DEF_MFW_MNU_H_ | |
53 | |
54 /* MENU MODES */ | |
55 /* ALIGNMENT */ | |
56 #define MNU_LEFT 0x0001 /* left aligned */ | |
57 #define MNU_RIGHT 0x0002 /* right aligned */ | |
58 #define MNU_CENTER 0x0003 /* centered */ | |
59 #define MNU_ALIGN 0x0003 /* alignment mode mask */ | |
60 /* MENU MODES HEADER */ | |
61 /* ALIGNMENT */ | |
62 #define MNU_HDR_LEFT 0x0004 /* left aligned */ | |
63 #define MNU_HDR_RIGHT 0x0008 /* right aligned */ | |
64 #define MNU_HDR_CENTER 0x000C /* centered */ | |
65 #define MNU_HDR_ALIGN 0x000C /* alignment mode mask */ | |
66 | |
67 /* DISPLAY */ | |
68 #define MNU_OVERLAPPED 0x0010 /* location as specified */ | |
69 #define MNU_PAGED 0x0020 /* single item per page */ | |
70 #define MNU_LIST 0x0030 /* list items on page */ | |
71 #define MNU_LIST_ICONS 0x0040 /* list items on page with icon for each */ | |
72 #define MNU_PAGE_ICONS 0x0050 /* page with multiple 2-state icons */ | |
73 #define MNU_LIST_2_LINE 0x0060 /* list with each item occupying two lines. xreddymn Dec-16-2004 */ | |
74 #define MNU_LIST_COLOUR 0x00F0 /* list items on page - each item is a different colour */ | |
75 //May 18, 2006 REF: DRT OMAPS00076438 xdeepadh | |
76 #define MNU_DISPLAY 0x00F0 /* display mode mask */ | |
77 | |
78 /* ITEM SELECTION */ | |
79 #define MNU_FRAMED 0x0100 /* selection by frame */ | |
80 #define MNU_CUR_ARROW 0x0200 /* selection by arrow */ | |
81 #define MNU_CUR_STAR 0x0300 /* selection by star */ | |
82 #define MNU_CUR_BLOCK 0x0400 /* selection by block */ | |
83 #define MNU_CUR_LINE 0x0500 /* selection by line */ | |
84 #define MNU_ITEMSEL 0x0f00 /* item select mode mask */ | |
85 | |
86 #define MNU_HDRFORMAT_STR 0x8000 /* 0=Text ID, 1=Text string in supplied language */ | |
87 | |
88 /* MENU EVENTS */ | |
89 #define E_MNU_VISIBLE 0x00000001 /* menu is displayed */ | |
90 #define E_MNU_EMPTY 0x00000002 /* menu is empty */ | |
91 #define E_MNU_SELECT 0x00000010 /* menu item selected */ | |
92 #define E_MNU_ESCAPE 0x00000020 /* menu escape */ | |
93 #define E_MNU_TOPPED 0x00000040 /* menu over top */ | |
94 #define E_MNU_BOTTOMED 0x00000080 /* menu under bottom */ | |
95 #define E_MNU_PREDRAW 0x00000100 /* item will be drawn */ | |
96 #define E_MNU_POSTDRAW 0x00000200 /* item has been drawn */ | |
97 | |
98 /* ITEM EXTENSION FLAGS */ | |
99 #define MNU_ITEM_HIDE 0x0001 /* item is hidden */ | |
100 #define MNU_ITEM_NOTIFY 0x0002 /* notify on draw */ | |
101 #define MNU_ITEM_ANIMA 0x0004 /* icon animation */ | |
102 #define MNU_ITEM_FONT 0x0008 /* use font (disabled, ...) */ | |
103 #define MNU_ITEM_STATED 0x0010 /* item has status */ | |
104 #define MNU_ITEM_RADIO 0x0020 /* item is radio button */ | |
105 #define MNU_ITEM_HOTKEY 0x0040 /* item can have hotkey */ | |
106 #define MNU_ITEM_UNCHECKED 0x0080 /* SPR#998 - SH -Item in checklist, unchecked */ | |
107 #define MNU_ITEM_CHECKED 0x0100 /* SPR#998 - SH - Item in checklist, checked */ | |
108 | |
109 | |
110 | |
111 #define MAX_LVL 100 /* maximum of menu level */ | |
112 #define UNUSED -1 /* unused menu level */ | |
113 | |
114 // Shashi Shekar B.S., a0876501, 16-Jan-2006, OMAPS00061460 | |
115 #ifdef FF_MMI_SAT_ICON | |
116 #define TITLE_ICON_WIDTH 10 | |
117 #define TITLE_ICON_HEIGHT 16 | |
118 #define LINE_ICON_WIDTH 10 | |
119 extern const unsigned char SATIconQuestionMark[]; | |
120 #endif | |
121 | |
122 /* SPR#1983 - SH - These are the different text encodings for menus */ | |
123 | |
124 typedef enum | |
125 { | |
126 MNU_LIST_LANGUAGE_DEFAULT = 0, | |
127 MNU_LIST_LANGUAGE_UNICODE, | |
128 MNU_LIST_LANGUAGE_ASCII | |
129 } MfwMnuListLanguageType; | |
130 | |
131 struct MfwMnuItemTag; /*a0393213 compiler warning removal - removed typedef*/ | |
132 struct MfwMnuAttrTag; /*a0393213 compiler warning removal - removed typedef*/ | |
133 struct MfwMnuTag; /*a0393213 compiler warning removal - removed typedef*/ | |
134 | |
135 /* menu function */ | |
136 typedef int (*MenuFunc)(struct MfwMnuTag* m, struct MfwMnuItemTag* i); | |
137 /* item flag function */ | |
138 typedef U16 (*FlagFunc)(struct MfwMnuTag *m, struct MfwMnuAttrTag *a, | |
139 struct MfwMnuItemTag *i); | |
140 | |
141 | |
142 typedef struct MfwItmExtPredrawTag /* item ext: predraw */ | |
143 { | |
144 char *str; /* string to be drawn */ | |
145 MfwIcnAttr *icon; /* icon to be drawn */ | |
146 } MfwItmExtPredraw; | |
147 | |
148 typedef struct MfwMnuItemTag /* menu item */ | |
149 { | |
150 MfwIcnAttr * icon; /* item with icon control */ | |
151 void *exta; /* item extension data */ | |
152 MfwHnd x;//edit; /* Must be removed ES!! */ | |
153 char* str; /* item with textId (GW) */ | |
154 struct MfwMnuAttrTag *menu; /* item with submenu */ | |
155 MenuFunc func; /* item with handler */ | |
156 FlagFunc flagFunc; /* item flag function */ | |
157 } MfwMnuItem; | |
158 | |
159 typedef struct MfwMnuAttrTag /* menu attributes */ | |
160 { | |
161 MfwRect *area; /* menu area */ | |
162 U16 mode; /* menu modes */ | |
163 U8 font; /* default menu font */ | |
164 MfwMnuItem *items; /* menu items */ | |
165 U8 nItems; /* number of menu items */ | |
166 U32 mnuColour; //GW index as to what the colour is going to be | |
167 int hdrId; //GW Added | |
168 MfwIcnAttr *bgdBitmap; //GW Added for background for menus | |
169 int unused; //GW Added and removed definition | |
170 | |
171 /* 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */ | |
172 BOOL header_toggle; | |
173 | |
174 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 | |
175 #ifdef FF_MMI_SAT_ICON | |
176 MfwIcnAttr *icon; /* Icon to be displayed in the header.*/ | |
177 #endif | |
178 } MfwMnuAttr; | |
179 //If 'unused' is to be used, remove the definition below and add the required definition into the code | |
180 #define MNUATTRSPARE 0 | |
181 typedef struct MfwMnuTag /* menu control block */ | |
182 { | |
183 MfwEvt mask; /* selection of events */ | |
184 MfwEvt flags; /* current event */ | |
185 MfwCb handler; /* menu event handler */ | |
186 MfwMnuAttr *attr; /* menu attributes */ | |
187 MfwMnuAttr *curAttr; /* current attributes */ | |
188 MfwHnd useStrID; /* GW 0=Text is passed as ID's , 1=txt is strings */ | |
189 MfwHnd useDefLang; /* GW 0=Set text display to ascii, 1=txt is in language default*/ | |
190 U8 level; /* current level */ | |
191 U8 lShift[MAX_LVL]; /* shift scrolling */ | |
192 U8 lCursor [MAX_LVL]; /* level cursor position */ | |
193 U8 scrollMode; | |
194 int nLines; /* Number of lines that ftn on screen */ | |
195 int lineHeight; /* Height per line */ | |
196 UBYTE textDCS; /* specify the data type of text (ASCII, Unicode etc) */ | |
197 } MfwMnu; | |
198 | |
199 MfwRes mnuInit (void); | |
200 MfwRes mnuExit (void); | |
201 MfwHnd mnuCreate (MfwHnd w, MfwMnuAttr *a, MfwEvt e, MfwCb Mnu); | |
202 MfwRes mnuDelete (MfwHnd m); | |
203 MfwHnd mnuLang (MfwHnd m, MfwHnd l); | |
204 MfwHnd mnuStrType (MfwHnd m, MfwHnd l); //GW | |
205 MfwRes mnuShow (MfwHnd m); | |
206 MfwRes mnuHide (MfwHnd m); | |
207 MfwRes mnuUnhide (MfwHnd m);//GW added 29/11/01 | |
208 MfwRes mnuUpdate (MfwMnu *m); | |
209 MfwRes mnuUp (MfwHnd m); | |
210 MfwRes mnuDown (MfwHnd m); | |
211 MfwRes mnuEscape (MfwHnd m); | |
212 MfwRes mnuSelect (MfwHnd m); | |
213 MfwRes mnuDone (MfwHnd m); | |
214 MfwRes mnuKeyAction (MfwHnd m, U8 keycode); | |
215 MfwRes mnuChooseVisibleItem(MfwHnd m,U8 nItem); | |
216 U8 mnuCountVisibleItems(MfwHnd m); | |
217 U8 mnuCountCurrentVisibleItem(MfwHnd m); | |
218 void mnuScrollMode (MfwHnd menu,U8 mode); | |
219 | |
220 void mnuInitDataItem(MfwMnuItem* mnuItem); | |
221 int mnuIdentify(struct MfwMnuAttrTag *attr, struct MfwMnuItemTag *item); /*SPR#998 - SH - added*/ | |
222 EXTERN UBYTE dspl_Enable (UBYTE in_Enable); | |
223 #endif |