FreeCalypso > hg > fc-magnetite
comparison src/condat3/com/include/dspl.h @ 18:c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 27 Sep 2016 21:25:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:6323e661f2ed | 18:c8bd5a927942 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM (6103) | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Types definitions for the display driver | |
18 | . | |
19 +----------------------------------------------------------------------------- | |
20 History: | |
21 Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg | |
22 Description: Locosto: MIgration to New LCD APIs | |
23 Solution: Migrated to New APIs by replacing the old driver APIs with | |
24 corresponding New LCD APIs | |
25 +----------------------------------------------------------------------------- | |
26 */ | |
27 #ifndef DSPL_H | |
28 #define DSPL_H | |
29 #include "font_bitmaps.h" | |
30 | |
31 //Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg | |
32 //The file is included for the definition of T_RV_RET | |
33 | |
34 | |
35 /* | |
36 * Device Capabilities data Type | |
37 */ | |
38 typedef struct dspl_DevCaps | |
39 { | |
40 UBYTE DisplayType; | |
41 USHORT Width; | |
42 USHORT Height; | |
43 } dspl_DevCaps; | |
44 | |
45 /* | |
46 * Display Types | |
47 */ | |
48 #define DSPL_TYPE_CHARACTER 0 | |
49 #define DSPL_TYPE_GRAPHIC 1 | |
50 #define DSPL_TYPE_COLOR 2 | |
51 | |
52 /* | |
53 * Character Types | |
54 */ | |
55 | |
56 #define DSPL_TYPE_ASCII 1 | |
57 #define DSPL_TYPE_UNICODE 2 | |
58 #define DSPL_TYPE_ASCII_12_6 3 | |
59 | |
60 | |
61 /* | |
62 * Display Text Attributes | |
63 */ | |
64 #define DSPL_TXTATTR_NORMAL 0x00 | |
65 #define DSPL_TXTATTR_INVERS 0x01 | |
66 #define DSPL_TXTATTR_UNICODE 0x02 | |
67 #define DSPL_TXTATTR_CURRENT_MODE 0x04 /*Represents the string in the current display mode,unicode or ASCII*/ | |
68 #define DSPL_TXTATTR_SIGNED_COORDS 0x08 /*SH - if this is set, coordinates can have negative numbers*/ | |
69 #define DSPL_TXTATTR_HLIGHT 0x10 /*Same as 'inverse' on B+W - diff colour highlight on colour display */ | |
70 | |
71 /* | |
72 * Cursor Types | |
73 */ | |
74 #define DSPL_FBOX_CURSOR_TYPE 1 | |
75 #define DSPL_OBOX_CURSOR_TYPE 2 | |
76 #define DSPL_TLIN_CURSOR_TYPE 3 | |
77 #define DSPL_BLIN_CURSOR_TYPE 4 | |
78 | |
79 #define DSPL_SLOWFLASH_MODE 1 | |
80 #define DSPL_FASTFLASH_MODE 2 | |
81 #define DSPL_STATIC_MODE 3 | |
82 | |
83 #define DSPL_CURSOR_VISIBLE 1 | |
84 #define DSPL_CURSOR_INVISIBLE 0 | |
85 /* | |
86 * Raster Operations | |
87 */ | |
88 #define DSPL_BMPINVERT 1 | |
89 #define DSPL_BMPAND 2 | |
90 #define DSPL_BMPCOPY 4 | |
91 #define DSPL_BMPERASE 8 | |
92 #define DSPL_BMPPAINT 16 | |
93 | |
94 | |
95 /*mc, SPR 1319 moved definitions to header*/ | |
96 #define TXT_STYLE_NORMAL (0) | |
97 #define TXT_STYLE_INVERT (1) | |
98 #define TXT_STYLE_HIGHLIGHT (2) | |
99 #define TXT_STYLE_BORDER (3) | |
100 #define TXT_STYLE_SHADOW1 (4) | |
101 #define TXT_STYLE_SHADOW2 (5) | |
102 #define TXT_STYLE_2PIXEL_BORDER (6) | |
103 #define TXT_STYLE_3PIXEL_BORDER (7) | |
104 #define TXT_STYLE_4PIXEL_BORDER (8) | |
105 #define TXT_STYLE_MASK (0x00FF) | |
106 #define TXT_STYLE_WIDECHAR (0x0100) | |
107 #define TXT_STYLE_HIGHCHAR (0x0200) | |
108 #define TXT_STYLE_UNICODE (0x0400) | |
109 | |
110 /*mc end*/ | |
111 | |
112 /* | |
113 * Return Values | |
114 */ | |
115 #define DSPL_FCT_NOTSUPPORTED 1 | |
116 | |
117 #if defined (NEW_FRAME) | |
118 /* | |
119 * to achieve backward compatibility with older definitions | |
120 */ | |
121 #define drv_SignalCB_Type T_DRV_CB_FUNC | |
122 #define drv_SignalID_Type T_DRV_SIGNAL | |
123 #define T_VSI_THANDLE USHORT | |
124 #endif | |
125 | |
126 /* | |
127 * Prototypes | |
128 */ | |
129 | |
130 EXTERN UBYTE dspl_Init (void); | |
131 EXTERN void dspl_Exit (void); | |
132 EXTERN UBYTE dspl_Clear (USHORT in_X1, | |
133 USHORT in_Y1, | |
134 USHORT in_X2, | |
135 USHORT in_Y2); | |
136 EXTERN UBYTE dspl_ClearAll (void); | |
137 EXTERN UBYTE dspl_unfocusDisplay (void); | |
138 | |
139 EXTERN UBYTE dspl_Enable (UBYTE in_Enable); | |
140 EXTERN void dspl_GetDeviceCaps (dspl_DevCaps * out_DeviceCapsPtr); | |
141 EXTERN void dspl_SetDeviceCaps (dspl_DevCaps * in_DeviceCapsPtr); | |
142 EXTERN UBYTE dspl_GetIconImage (UBYTE in_Icon, | |
143 USHORT in_Size, | |
144 UBYTE * out_IconImagePtr); | |
145 EXTERN UBYTE dspl_SetCursor (UBYTE in_CursorType, | |
146 UBYTE in_CursorMode); | |
147 EXTERN UBYTE dspl_SetCursorPos (USHORT in_X, | |
148 USHORT in_Y, | |
149 USHORT in_SizeX, | |
150 USHORT in_SizeY);//GW 05/09/01 | |
151 EXTERN UBYTE dspl_ShowCursor (UBYTE in_Show); | |
152 EXTERN UBYTE dspl_SetBkgColor (UBYTE in_Color); | |
153 EXTERN UBYTE dspl_SetFrgColor (UBYTE in_Color); | |
154 EXTERN UBYTE dspl_DrawIcon (UBYTE in_IconID, | |
155 USHORT in_X, | |
156 USHORT in_Y); | |
157 EXTERN UBYTE dspl_DrawLine (USHORT in_X1, | |
158 USHORT in_Y1, | |
159 USHORT in_X2, | |
160 USHORT in_Y2); | |
161 EXTERN UBYTE dspl_DrawRect (USHORT in_X1, | |
162 USHORT in_Y1, | |
163 USHORT in_X2, | |
164 USHORT in_Y2); | |
165 EXTERN UBYTE dspl_roundRect (int px, | |
166 int py, | |
167 int sx, | |
168 int sy, | |
169 int border); | |
170 EXTERN UBYTE dspl_roundRectFill (int px, | |
171 int py, | |
172 int sx, | |
173 int sy, | |
174 int border); | |
175 EXTERN UBYTE dspl_DrawFilledRect (USHORT in_X1, | |
176 USHORT in_Y1, | |
177 USHORT in_X2, | |
178 USHORT in_Y2); | |
179 EXTERN UBYTE dspl_DrawFilledBgdRect (USHORT in_X1, | |
180 USHORT in_Y1, | |
181 USHORT in_X2, | |
182 USHORT in_Y2); | |
183 EXTERN UBYTE dspl_DrawFilledColRect (USHORT in_X1, | |
184 USHORT in_Y1, | |
185 USHORT in_X2, | |
186 USHORT in_Y2, | |
187 U32 Col); | |
188 | |
189 EXTERN UBYTE dspl_Ellipse (USHORT in_X1, | |
190 USHORT in_Y1, | |
191 USHORT in_X2, | |
192 USHORT in_Y2); | |
193 EXTERN UBYTE dspl_BitBlt (USHORT in_X, | |
194 USHORT in_Y, | |
195 USHORT in_Width, | |
196 USHORT in_Height, | |
197 USHORT in_Index, | |
198 void * in_BmpPtr, | |
199 USHORT in_Rop); | |
200 EXTERN UBYTE dspl_BitBlt2(short in_X, | |
201 short in_Y, | |
202 USHORT in_Width, | |
203 USHORT in_Height, | |
204 void * in_BmpPtr, | |
205 USHORT in_index, | |
206 int bmpFormat); | |
207 | |
208 void fastCopyBitmap(int startX, int startY, // start position of bitmap | |
209 int bmpSx, int bmpSy, //size of bitmap | |
210 char* srcBitmap, | |
211 int posX, int posY, // start of area to be copied into | |
212 int sx, int sy, // size of area to be copied into | |
213 U32 bgd_col, int bmptype); | |
214 | |
215 EXTERN UBYTE dspl_SelectFontbyID (UBYTE in_Font); | |
216 EXTERN UBYTE dspl_SelectFontbyImage (UBYTE * in_FontPtr); | |
217 EXTERN UBYTE dspl_GetFontImage (UBYTE in_Font, | |
218 USHORT in_Size, | |
219 UBYTE * out_FontPtr); | |
220 EXTERN UBYTE dspl_GetFontHeight (void); | |
221 EXTERN USHORT dspl_GetTextExtent (char * in_Text, | |
222 USHORT in_Length); | |
223 EXTERN USHORT dspl_GetMaxTextLen (char * in_Text, | |
224 USHORT in_HSize); | |
225 EXTERN UBYTE dspl_TextOut_Cmode (USHORT in_X, | |
226 USHORT in_Y, | |
227 UBYTE in_Attrib, | |
228 char * in_Text); | |
229 EXTERN UBYTE dspl_TextOut (USHORT in_X, | |
230 USHORT in_Y, | |
231 UBYTE in_Attrib, | |
232 char * in_Text); | |
233 EXTERN void dspl_ScrText (int x, int y, char *txt, int style); | |
234 | |
235 EXTERN UBYTE dspl_SetWorkShadow (UBYTE * in_ShadowPtr); | |
236 EXTERN UBYTE dspl_SetDisplayShadow (UBYTE * in_ShadowPtr); | |
237 | |
238 EXTERN UBYTE dspl_str_length(char * str); | |
239 | |
240 EXTERN void dspl_set_char_type(UBYTE char_type); | |
241 EXTERN UBYTE dspl_get_char_type(void); | |
242 | |
243 int dspl_getDisplayType( void ); | |
244 | |
245 GLOBAL USHORT dspl_GetNcharToFit (char * in_Text, USHORT pixelWidth);/*SPR 1541*/ | |
246 | |
247 //Functions to allow us to set-up the border around text. | |
248 int dspl_setBorderWidth(int borderSize); | |
249 int dspl_getBorderWidth(void); | |
250 //Condat UK Resources functions | |
251 | |
252 EXTERN UBYTE dspl_Prompt (USHORT x, USHORT y, UBYTE in_Attrib, int StringID); | |
253 | |
254 //GW Added new prototypes for setting and getting foreground and background colours | |
255 //NB Existing (unsupported) procedures cannot be used as these have colour defined as 256 colour not 32bit | |
256 EXTERN U32 dspl_SetBgdColour (U32 inColour); | |
257 EXTERN U32 dspl_GetBgdColour (void); | |
258 EXTERN U32 dspl_SetFgdColour (U32 inColour); | |
259 EXTERN U32 dspl_GetFgdColour (void); | |
260 GLOBAL void dspl_RestoreColour (void); | |
261 GLOBAL void dspl_InitColour (void); | |
262 | |
263 //Select a colour to contrast with another colour -used when the foreground and background colours are the same | |
264 int dspl_GetContrastColour( int ipCol); | |
265 | |
266 //Window types when displaying a bitmap | |
267 enum { | |
268 DSPL_WIN_NORMAL = 0, | |
269 DSPL_WIN_CENTRE, | |
270 DSPL_WIN_CLIP, | |
271 DSPL_WIN_CENTRE_CLIP, | |
272 DSPL_WIN_TILE, | |
273 DSPL_WIN_LAST | |
274 }; | |
275 //Draw win - create window with display area as specified | |
276 EXTERN UBYTE dspl_DrawWin ( USHORT in_PX, USHORT in_PY, | |
277 USHORT in_SX, USHORT in_SY, | |
278 int format, t_font_bitmap* bmp ); | |
279 | |
280 //Functions to allow us to limit where things are drawn - text/bitmaps outside the window are not drawn | |
281 GLOBAL UBYTE dspl_SetWindow(USHORT in_X1, | |
282 USHORT in_Y1, | |
283 USHORT in_X2, | |
284 USHORT in_Y2); | |
285 GLOBAL UBYTE dspl_GetWindow(USHORT* x1,USHORT* y1,USHORT* x2,USHORT* y2 ); | |
286 GLOBAL UBYTE dspl_ResetWindow( void ); //reset to full screen | |
287 | |
288 | |
289 //GW Added (temp) | |
290 typedef enum { | |
291 BMP_FORMAT_BW_PACKED = 0x00, | |
292 BMP_FORMAT_BW_UNPACKED = 0x01,/*MC, SPR1319*/ | |
293 BMP_FORMAT_256_COLOUR = 0x02, | |
294 BMP_FORMAT_32BIT_COLOUR = 0x03, | |
295 BMP_FORMAT_16BIT_LCD_COLOUR = 0x04, /* GW matches current LCD data format */ | |
296 BMP_FORMAT_16BIT_LCD_COMPRESSED_COLOUR = 0x05, /* GW matches future LCD data format */ | |
297 BMP_FORMAT_BW_2x4 = 0x0080, /* GW display bitmap scaled 2x width and 4x height */ | |
298 BMP_FORMAT_END | |
299 | |
300 } BMP_FORMAT_ENUM; | |
301 | |
302 #define SHOWBITMAP_NORMAL 0x0000 | |
303 #define SHOWBITMAP_INVERT 0x0001 | |
304 #define SHOWBITMAP_NORMAL_MASK 0x0001 | |
305 #define SHOWBITMAP_SCALE_2x4 0x0080 | |
306 | |
307 //Enumerated type for display (for MFW layout) | |
308 enum { | |
309 DSPL_BW = 0, | |
310 DSPL_COLOUR = 1, | |
311 DSPL_END | |
312 }; | |
313 | |
314 //Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg | |
315 enum | |
316 { | |
317 DSPL_ACCESS_ENABLE = 0, | |
318 DSPL_ACCESS_DISABLE , | |
319 DSPL_ACCESS_QUERY | |
320 }; | |
321 | |
322 #ifdef _SIMULATION_ | |
323 EXTERN void scrMobUpdate (void); | |
324 #endif | |
325 #ifdef FF_SSL_ADAPTATION | |
326 void dspl_set_to_mixed_mode(void); | |
327 void dspl_set_to_mmi_mode(void); | |
328 #endif | |
329 | |
330 | |
331 //xpradipg : New LCD API Migration | |
332 //New function added to control the refresh of the LCD, the earlier implement | |
333 //-ion of the global variable is moved inside this function and also adopted | |
334 //for the new LCD API migration | |
335 EXTERN int dspl_control(int state); | |
336 | |
337 #endif |