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