comparison g23m/condat/ms/src/bmi/MmiSoftKeys.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 CONDAT (UK)
4
5 ********************************************************************************
6
7 This software product is the property of Condat (UK) Ltd and may not be
8 disclosed to any third party without the express permission of the owner.
9
10 ********************************************************************************
11
12 $Project name: Basic MMI
13 $Project code: BMI (6349)
14 $Module: Softkeys
15 $File: MmiSoftKeys.h
16 $Revision: 1.0
17
18 $Author: Condat(UK)
19 $Date: 25/10/00
20
21 ********************************************************************************
22
23 Description:
24
25
26 ********************************************************************************
27 $History: MmiSoftkeys.h
28
29 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
30 To display '?' to indicate to the user that help is available for a STK menu
31
32 25/10/00 Original Condat(UK) BMI version.
33
34
35 $End
36
37 *******************************************************************************/
38
39
40 #ifndef _DEF_MMI_SOFTKEYS_H_
41 #define _DEF_MMI_SOFTKEYS_H_
42
43 #define ALLOC_MEMORY mfwAlloc
44 #define FREE_MEMORY mfwFree
45
46
47 #include "MmiResources.h"
48
49
50 typedef enum
51 {
52 SOFTKEYS_FAILURE,
53 SOFTKEYS_CREATED,
54 SOFTKEYS_CHANGED
55 } SoftKeysResult;
56
57 typedef struct
58 {
59 LangTxt leftKeyLabel;
60 LangTxt rightKeyLabel;
61 MfwCb leftKeyCallBack;
62 MfwCb rightKeyCallBack;
63 } SoftKeysSetup;
64
65 //Softkey format definitions
66 #define SK_TALLBGD 0x0001 /* blank 2 lines of text over width of display */
67
68 #define SK_ROUNDBOX 0x0010 /* draw rounded rectangle round text*/
69 #define SK_FILLBOX 0x0020 /* draw filled rectangle round text*/
70
71 #define SK_DEFAULTCOL 0x0100 /* use default colour (i.e. do not change current colours) */
72
73 SoftKeysResult softKeysAttributes( U8 font, UBYTE displayAttibutes);
74 /*
75 * Change the <font> and <displayAttibutes> for _all_ softkeys.
76 * All consecutive calls of softKeysUpdate() will reflect the change.
77 * Returns SOFTKEYS_CHANGED when everything went fine,
78 * or SOFTKEYS_FAILURE on failure.
79 */
80
81
82 /*
83 * Please note that all functions below come in a softKeysHnd... and softKeysWin...
84 * version, which have identical functionality, but get the <window> passed
85 * in MfwHnd or MfwWin pointer form respectively.
86 * You can just use either one depending on what you got hold of at the moment.
87 */
88
89
90 SoftKeysResult softKeysHndCreate( MfwHnd window, SoftKeysSetup *setup);
91
92 SoftKeysResult softKeysWinCreate( MfwWin *window, SoftKeysSetup *setup);
93 /*
94 * Creates the softkeys for <window>, which will display the
95 * <leftKeyLabel> and <rightKeyLabel> in the softkey area
96 * on the screen, and invoke <leftKeyCallBack> or <rightKeyCallBack>
97 * when the approrpiate key is pressed. Returns SOFTKEYS_CREATED when
98 * everything went fine, or SOFTKEYS_FAILURE on failure.
99 */
100
101
102 SoftKeysResult softKeysHndSet( MfwHnd window, SoftKeysSetup *changes);
103
104 SoftKeysResult softKeysWinSet( MfwWin *window, SoftKeysSetup *changes);
105 /*
106 * Change the setup of the softkeys for <window>. Use TxtNull if you
107 * don't want to change a ...Label, and NULL if you don't want to change
108 * a ...CallBack. Returns SOFTKEYS_CHANGED when everything went fine,
109 * or SOFTKEYS_FAILURE on failure.
110 */
111
112
113 void softKeysHndUpdate(MfwHnd window);
114
115 void softKeysWinUpdate(MfwWin *window);
116 /*
117 * You will need to call this whenever <window> is updated.
118 */
119
120
121 void softkeysHndDelete(MfwHnd window);
122
123 void softkeysWinDelete(MfwWin *window);
124 /*
125 * Deletes the softkeys for <window>.
126 */
127
128
129 void softKeys_displayId(int leftSoftKey,int rightSoftKey, int format, unsigned int colIndex);
130 void softKeys_displayStr(char* leftSoftKey_str,char* rightSoftKey_str, int format, unsigned int colIndex);
131 void softKeys_displayStrXY(char* leftSoftKey_str,char* rightSoftKey_str, int format, unsigned int colIndex, MfwRect* rect );
132
133
134
135 void displaySoftKeys(int leftSoftKey, int rightSoftKey);
136
137 //Allow sk to be placed at locations other than the bottom of the screen
138 void displaySoftKeysXY(int leftSoftKey,int rightSoftKey,int lskX,int rskX, int lpos);
139
140 void displaySoftKeysBox(int leftSoftKey,int rightSoftKey, U32 fCol, U32 bCol, int format);
141
142 void displaySoftKeys_edition(int leftSoftKey,int index, int rightSoftKey);
143
144 // SH - 25/5/01
145 // This function provided for WAP, to allow the printing of custom softkeys
146 // from strings provided (otherwise same as displaySoftKeys).
147
148 void displayCustSoftKeys(char *LeftSoftKey, char *RightSoftKey);
149
150 void displayHelpSymbol(void); //xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
151
152
153
154 #endif
155