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