eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_types.h
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * Copyright 2014 by Petr Gargulak. eGUI Community.
4 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License Version 3
9 * or later (the "LGPL").
10 *
11 * As a special exception, the copyright holders of the eGUI project give you
12 * permission to link the eGUI sources with independent modules to produce an
13 * executable, regardless of the license terms of these independent modules,
14 * and to copy and distribute the resulting executable under terms of your
15 * choice, provided that you also meet, for each linked independent module,
16 * the terms and conditions of the license of that module.
17 * An independent module is a module which is not derived from or based
18 * on this library.
19 * If you modify the eGUI sources, you may extend this exception
20 * to your version of the eGUI sources, but you are not obligated
21 * to do so. If you do not wish to do so, delete this
22 * exception statement from your version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 *
28 * You should have received a copy of the GNU General Public License
29 * and the GNU Lesser General Public License along with this program.
30 * If not, see <http://www.gnu.org/licenses/>.
31 *
32 ***************************************************************************/
47 #ifndef __D4D_TYPES_H
48 #define __D4D_TYPES_H
49 
50 /******************************************************************************
51 * Includes
52 ******************************************************************************/
53 
54 /******************************************************************************
55 * Doxygen Documentation settings
56 ******************************************************************************/
57 #ifdef __EGUI_DOXYGEN__
58 
59  #undef D4D_COLOR_SYSTEM
60  #define D4D_COLOR_SYSTEM D4D_COLOR_SYSTEM_RGB888
61 
62  #undef D4D_ROUND_CORNER_ENABLE
63  #define D4D_ROUND_CORNER_ENABLE D4D_TRUE
64 
65  #undef D4D_MCU_TYPE
66  #define D4D_MCU_TYPE D4D_MK
67 
68  #define D4D_UNICODE
69 
70  #define d4dlcd_template_ID 1
71 
72  #undef D4D_LLD_LCD
73  #define D4D_LLD_LCD d4dlcd_template_ID
74 
75  #undef D4D_LLD_LCD_HW
76  #define D4D_LLD_LCD_HW d4dlcdhw_template_ID
77 
78  #undef D4D_LLD_TCH
79  #define D4D_LLD_TCH d4dtch_template_ID
80 
81  #undef D4D_LLD_TCH_HW
82  #define D4D_LLD_TCH_HW d4dtchhw_template_ID
83 
84  #undef D4D_LLD_MOUSE
85  #define D4D_LLD_MOUSE nothing
86 
87  #undef D4D_STRINGTABLE_PREFIX
88  #define D4D_STRINGTABLE_PREFIX '@'
89 
90  #
91 
92 #endif
93 
94 
95 
96 /******************************************************************************
97 * D4D TYPES setting constants
98 *
99 */
104 #define D4D_FALSE 0
105 
106 #define D4D_TRUE 1
107 
108 // The MCU type list
119  #define D4D_HC08 1
120  #define D4D_HCS08 2
121  #define D4D_HC12 10
122  #define D4D_HCS12 11
123  #define D4D_HCS12X 12
124  #define D4D_MCF51 50
125  #define D4D_MCF52 51
126  #define D4D_MCF53 52
127  #define D4D_MCF54 53
128  #define D4D_MPC51 60
129  #define D4D_MK 80
130 
135 #ifndef D4D_USE_STANDARD_TYPES
136  #define D4D_USE_STANDARD_TYPES D4D_FALSE
137  #warning "The D4D is using own standard types Byte, Word etc. , because the D4D_USE_STANDARD_TYPES is not defined!"
138 #endif
139 
142 /******************************************************************************
143 * D4D Standard types
144 *
145 */
148 #if (D4D_USE_STANDARD_TYPES != D4D_TRUE)
149  #ifndef Byte
150 
151  typedef unsigned char Byte;
152  #endif
153  #ifndef sByte
154 
155  typedef signed char sByte;
156  #endif
157  #ifndef Word
158 
159  typedef unsigned short Word;
160  #endif
161  #ifndef sWord
162 
163  typedef signed short sWord;
164  #endif
165  #ifndef LWord
166 
167  typedef unsigned long LWord;
168  #endif
169  #ifndef sLWord
170 
171  typedef signed long sLWord;
172  #endif
173  #ifndef DLWord
174 
175  typedef unsigned long long DLWord;
176  #endif
177  #ifndef sDLWord
178 
179  typedef signed long long sDLWord;
180  #endif
181 
182  #ifndef NULL
183 
184  #define NULL (void*)0
185  #endif
186 
187 #else
188  #if D4D_MCU_TYPE == D4D_HCS08
189  #include <hidef.h>
190  #endif
191 #endif
192 
193 
194 #if (D4D_MCU_TYPE == D4D_HC08) || (D4D_MCU_TYPE == D4D_HCS08)
195  typedef Byte D4D_BOOL;
196  typedef Word D4D_INDEX;
197  typedef sWord D4D_INDEX_DELTA;
198 #elif (D4D_MCU_TYPE == D4D_HC12) || (D4D_MCU_TYPE == D4D_HCS12) || (D4D_MCU_TYPE == D4D_HCS12X)
199  typedef Word D4D_BOOL;
200  typedef Word D4D_INDEX;
201  typedef sWord D4D_INDEX_DELTA;
202 #elif (D4D_MCU_TYPE == D4D_MCF51) || (D4D_MCU_TYPE == D4D_MCF52) || (D4D_MCU_TYPE == D4D_MPC51) || (D4D_MCU_TYPE == D4D_MK)
203 
204  typedef LWord D4D_BOOL;
206  typedef LWord D4D_INDEX;
209 #else
210  #error "Unsupported MCU type for D4D_BOOL type!"
211 #endif
212 
213 
214 #ifdef D4D_COOR_TYPE
215 
216  typedef D4D_COOR_TYPE D4D_COOR;
217 #else
218 
219  typedef Byte D4D_COOR;
220 #endif
221 
223 typedef struct
224 {
227 } D4D_POINT;
228 
230 typedef struct
231 {
234 } D4D_SIZE;
235 
237 typedef struct
238 {
241 }D4D_GEOMETRY;
242 
244 typedef struct
245 {
251 
253 typedef struct
254 {
257 }D4D_TAB;
258 
259 // Color type definition
260 #if ((D4D_COLOR_SYSTEM == D4D_COLOR_SYSTEM_RGB888) || (D4D_COLOR_SYSTEM == D4D_COLOR_SYSTEM_RGB666))
261 
262  typedef LWord D4D_COLOR;
263 #elif ((D4D_COLOR_SYSTEM == D4D_COLOR_SYSTEM_RGB565) || (D4D_COLOR_SYSTEM == D4D_COLOR_SYSTEM_RGB555))
264  typedef Word D4D_COLOR;
265 #elif ((D4D_COLOR_SYSTEM == D4D_COLOR_SYSTEM_RGB332) || (D4D_COLOR_SYSTEM == D4D_COLOR_SYSTEM_MONO))
266  typedef Byte D4D_COLOR;
267 #else
268  #error D4D_COLOR not defined due to unsupported D4D system color.
269 #endif
270 
271 #ifndef D4D_WCHAR_TYPE
272 
273  #define D4D_WCHAR_TYPE unsigned short
274 #endif
275 
278 
280 typedef char D4D_CHAR;
281 
282 #ifdef D4D_UNICODE
283 
285 #else
286 
287  typedef D4D_CHAR D4D_TCHAR;
288 #endif
289 
291 typedef enum
292 {
293  D4D_LINE_THIN = 0x00,
295 }D4D_LINETYPE;
296 
298 typedef void* D4D_FILEPTR;
299 
301 typedef Byte D4D_KEYS;
302 
305 
307 typedef enum
308 {
314 
316 typedef enum
317 {
320 }D4D_TREND;
321 
323 typedef enum
324 {
329 }D4D_QUADRANT;
330 
332 typedef enum
333 {
338 }D4D_BEVEL;
339 
341 typedef enum
342 {
348 
350 typedef struct
351 {
352  unsigned char ScreenCalibrated;
353  unsigned short TouchScreenXoffset;
354  unsigned short TouchScreenYoffset;
358 
360 typedef struct
361 {
365 
367 /******************************************************************************
368 * Macros
369 ******************************************************************************/
370 
371 
372 
373 #endif /* __D4D_TYPES_H */
D4D_LINETYPE
Type definition of eGUI line type.
Definition: d4d_types.h:291
D4D_WCHAR D4D_TCHAR
Type definition of eGUI character (it depends on UNICODE setting if this is D4D_CHAR or D4D_WCHAR)...
Definition: d4d_types.h:284
unsigned short TouchScreenYBitsPerPixelx16
Input value gain per 16 pixels in axis Y.
Definition: d4d_types.h:356
Dented bevel type.
Definition: d4d_types.h:336
Type definition of eGUI touch screen event structure.
Definition: d4d_types.h:360
signed long sLWord
Type definition of sLWord (signed 32-bit).
Definition: d4d_types.h:171
Type definition of eGUI touch screen calibration structure.
Definition: d4d_types.h:350
Type definition of eGUI point structure.
Definition: d4d_types.h:223
D4D_COOR left
Margin of left side.
Definition: d4d_types.h:246
First quadrant &lt;0-90)
Definition: d4d_types.h:325
D4D_COOR * pTabTable
Pointer to tabulator table.
Definition: d4d_types.h:255
D4D_COOR tabOffset
Start offset of tabulator.
Definition: d4d_types.h:256
D4D_POINT point
Point of touch event or lost of touch event.
Definition: d4d_types.h:363
Byte D4D_KEYS
Type definition of eGUI keys - this is obsolete type that is kept just only for backward compatibilit...
Definition: d4d_types.h:301
Landscape up side down orientation.
Definition: d4d_types.h:346
Third quadrant &lt;180-270)
Definition: d4d_types.h:327
None Bevel is used.
Definition: d4d_types.h:334
Direction UP.
Definition: d4d_types.h:309
D4D_TREND
Type definition of eGUI trend type.
Definition: d4d_types.h:316
D4D_ORIENTATION
Type definition of eGUI display orientation.
Definition: d4d_types.h:341
Portrait up side down orientation.
Definition: d4d_types.h:344
Direction RIGHT.
Definition: d4d_types.h:311
D4D_COOR cx
Size in axis X (width)
Definition: d4d_types.h:232
Byte D4D_COOR
Type definition of eGUI coordination variables.
Definition: d4d_types.h:219
unsigned short TouchScreenXBitsPerPixelx16
Input value gain per 16 pixels in axis X.
Definition: d4d_types.h:355
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
Definition: d4d_types.h:151
D4D_COOR bottom
Margin of bottom side.
Definition: d4d_types.h:249
Reserved for future use.
Definition: d4d_types.h:337
D4D_COOR right
Margin of right side.
Definition: d4d_types.h:248
Line type thick.
Definition: d4d_types.h:294
Direction LEFT.
Definition: d4d_types.h:312
Landscape orientation.
Definition: d4d_types.h:345
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
Definition: d4d_types.h:167
D4D_COOR y
Coordination in axis Y.
Definition: d4d_types.h:226
D4D_SIZE sz
Size of object.
Definition: d4d_types.h:240
Raised bevel type.
Definition: d4d_types.h:335
signed short sWord
Type definition of sWord (signed 16-bit).
Definition: d4d_types.h:163
struct D4D_MARGIN * D4D_MARGIN_PTR
D4D_DIRECTION
Type definition of eGUI direction type.
Definition: d4d_types.h:307
D4D_POINT pnt
Left Top corner point.
Definition: d4d_types.h:239
Type definition of eGUI tabulation structure.
Definition: d4d_types.h:253
LWord D4D_INDEX
Type definition of eGUI general index variables.
Definition: d4d_types.h:206
D4D_BEVEL
Type definition of eGUI bevel type.
Definition: d4d_types.h:332
D4D_QUADRANT
Type definition of eGUI circle quadrant.
Definition: d4d_types.h:323
signed char sByte
Type definition of sByte (signed 8-bit).
Definition: d4d_types.h:155
Second quadrant &lt;90-180)
Definition: d4d_types.h:326
#define D4D_WCHAR_TYPE
User type definition of eGUI wide char.
Definition: d4d_types.h:273
Direction DOWN.
Definition: d4d_types.h:310
Fourth quadrant &lt;270-360)
Definition: d4d_types.h:328
D4D_COOR cy
Size in axis Y (height)
Definition: d4d_types.h:233
Trend Anti Clock Wise.
Definition: d4d_types.h:319
D4D_WCHAR_TYPE D4D_WCHAR
Type definition of eGUI wide char.
Definition: d4d_types.h:277
Trend Clock Wise.
Definition: d4d_types.h:318
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
char D4D_CHAR
Type definition of eGUI ASCII character.
Definition: d4d_types.h:280
Type definition of eGUI size structure.
Definition: d4d_types.h:230
signed long long sDLWord
Type definition of sDLWord (signed 64-bit).
Definition: d4d_types.h:179
sLWord D4D_INDEX_DELTA
Type definition of eGUI general index variables for signed offsets.
Definition: d4d_types.h:208
Portrait orientation.
Definition: d4d_types.h:343
Type definition of eGUI geometry structure.
Definition: d4d_types.h:237
Line type thin.
Definition: d4d_types.h:293
unsigned long long DLWord
Type definition of DLWord (unsigned 64-bit).
Definition: d4d_types.h:175
unsigned short TouchScreenXoffset
Input value offset in axis X.
Definition: d4d_types.h:353
unsigned short TouchScreenYoffset
Input value offset in axis Y.
Definition: d4d_types.h:354
unsigned char ScreenCalibrated
Boolean if the values are valid.
Definition: d4d_types.h:352
Byte D4D_KEY_SCANCODE
Type definition of eGUI keys scan code.
Definition: d4d_types.h:304
D4D_BOOL touched
Boolean of touch state (touched or non touched)
Definition: d4d_types.h:362
LWord D4D_COLOR
Type definition of eGUI color variables.
Definition: d4d_types.h:262
unsigned short Word
Type definition of Word (unsigned 16-bit).
Definition: d4d_types.h:159
void * D4D_FILEPTR
Type definition of eGUI file pointer.
Definition: d4d_types.h:298
D4D_COOR top
Margin of top side.
Definition: d4d_types.h:247
D4D_COOR x
Coordination in axis X.
Definition: d4d_types.h:225
Type definition of eGUI client area margin structure.
Definition: d4d_types.h:244