61 #define D4D_VERSION "v3.01"
66 #define D4D_MCU_TYPE D4D_MK
67 #warning "There is no definition for D4D_MCU_TYPE in configuration file. The driver is using as default D4D_MK."
72 #ifndef D4D_SCREEN_HISTORY
73 #define D4D_SCREEN_HISTORY 5
77 #ifdef D4D_ENABLE_AUTOSIZE
80 #if D4D_ENABLE_AUTOSIZE != D4D_FALSE
81 #error The D4D_ENABLE_AUTOSIZE capability had removed from eGUI since version 3.00. For update your eGUI project just define size for all objects.
87 #ifndef D4D_ROUND_CORNER_ENABLE
88 #define D4D_ROUND_CORNER_ENABLE D4D_FALSE
93 #ifndef D4D_FONT_TABLE_DISABLED
94 #define D4D_FONT_TABLE_DISABLED D4D_FALSE
95 #warning "Font table is disabled by default, set the D4D_FONT_TABLE_DISABLED to D4D_TRUE in config file."
100 #ifndef D4D_SCREEN_SIZE_LONGER_SIDE
101 #define D4D_SCREEN_SIZE_LONGER_SIDE 320
102 #warning "The D4D configuration file doesn't contains the resolution information for longer axis. The D4D sets this value to default: 320 pixels."
107 #ifndef D4D_SCREEN_SIZE_SHORTER_SIDE
108 #define D4D_SCREEN_SIZE_SHORTER_SIDE 240
109 #warning "The D4D configuration file doesn't contains the resolution information for shorter axis. The D4D sets this value to default: 240 pixels."
114 #ifndef D4D_MCU_BUS_CLOCK
115 #define D4D_MCU_BUS_CLOCK 24000000L
120 #ifndef D4D_COLOR_SYSTEM_FORE
121 #define D4D_COLOR_SYSTEM_FORE D4D_COLOR_YELLOW
126 #ifndef D4D_COLOR_SYSTEM_BCKG
127 #define D4D_COLOR_SYSTEM_BCKG D4D_COLOR_BLACK
132 #ifndef D4D_FONT_SYSTEM_DEFAULT
133 #define D4D_FONT_SYSTEM_DEFAULT 0
138 #ifndef D4D_BMP_EXTSRC_SUPPORT_D4D
139 #define D4D_BMP_EXTSRC_SUPPORT_D4D D4D_FALSE
144 #ifndef D4D_BMP_EXTSRC_SUPPORT_BMP
145 #define D4D_BMP_EXTSRC_SUPPORT_BMP D4D_FALSE
150 #ifndef D4D_EXTSRC_TEXT_ENABLE
151 #define D4D_EXTSRC_TEXT_ENABLE D4D_FALSE
156 #ifndef D4D_EXTSRC_FILE_ENABLE
157 #if (D4D_BMP_EXTSRC_SUPPORT_BMP != D4D_FALSE) || (D4D_BMP_EXTSRC_SUPPORT_D4D != D4D_FALSE) || (D4D_FNT_EXTSRC_SUPPORT != D4D_FALSE)
158 #define D4D_EXTSRC_FILE_ENABLE D4D_TRUE
160 #define D4D_EXTSRC_FILE_ENABLE D4D_FALSE
166 #ifndef D4D_EXTSRC_BUFF_SIZE
167 #define D4D_EXTSRC_BUFF_SIZE 64
172 #ifndef D4D_LLD_FLUSH_ELEMENT
173 #define D4D_LLD_FLUSH_ELEMENT D4D_FALSE
179 #define D4D_DEBUG D4D_FALSE
183 #define D4D_ENDIAN_BIG 0
185 #define D4D_ENDIAN_LITTLE 1
190 #if (D4D_MCU_TYPE == D4D_MK)
191 #define D4D_ENDIAN D4D_ENDIAN_LITTLE
192 #else // for other cases (this should not work for every cases)
193 #define D4D_ENDIAN D4D_ENDIAN_BIG
216 #define D4D_ALIGN_MASK (0x0F)
219 #define D4D_ALIGN_H_MASK (0x03)
221 #define D4D_ALIGN_H_LEFT_MASK (0x00)
223 #define D4D_ALIGN_H_RIGHT_MASK (0x01)
225 #define D4D_ALIGN_H_CENTER_MASK (0x02)
228 #define D4D_ALIGN_V_MASK (0x0C)
230 #define D4D_ALIGN_V_TOP_MASK (0x00)
232 #define D4D_ALIGN_V_BOTTOM_MASK (0x04)
234 #define D4D_ALIGN_V_CENTER_MASK (0x08)
249 #define D4D_KEY_UP 0x01
254 #define D4D_KEY_DOWN 0x02
259 #define D4D_KEY_LEFT 0x04
263 #ifndef D4D_KEY_RIGHT
264 #define D4D_KEY_RIGHT 0x08
268 #ifndef D4D_KEY_ENTER
269 #define D4D_KEY_ENTER 0x10
274 #define D4D_KEY_ESC 0x20
279 #ifndef D4D_KEY_SCANCODE_UP
280 #define D4D_KEY_SCANCODE_UP 0x51
284 #ifndef D4D_KEY_SCANCODE_DOWN
285 #define D4D_KEY_SCANCODE_DOWN 0x50
289 #ifndef D4D_KEY_SCANCODE_LEFT
290 #define D4D_KEY_SCANCODE_LEFT 0x4B
294 #ifndef D4D_KEY_SCANCODE_RIGHT
295 #define D4D_KEY_SCANCODE_RIGHT 0x4D
299 #ifndef D4D_KEY_SCANCODE_ENTER
300 #define D4D_KEY_SCANCODE_ENTER 0x1C
304 #ifndef D4D_KEY_SCANCODE_ESC
305 #define D4D_KEY_SCANCODE_ESC 0x01
309 #define D4D_KEY_SCANCODE_KEYMASK 0x7F
311 #define D4D_KEY_SCANCODE_RELEASEMASK 0x80
315 #ifndef D4D_KEY_FUNC_FOCUS_NEXT
316 #define D4D_KEY_FUNC_FOCUS_NEXT D4D_KEY_SCANCODE_DOWN
321 #ifndef D4D_KEY_FUNC_FOCUS_PREV
322 #define D4D_KEY_FUNC_FOCUS_PREV D4D_KEY_SCANCODE_UP
327 #ifndef D4D_KEYS_BUFF_LENGTH
328 #define D4D_KEYS_BUFF_LENGTH 4
339 #ifndef D4DTCH_CALIB_CROSS_OFFSET
340 #define D4DTCH_CALIB_CROSS_OFFSET 30
348 #if D4D_SCREEN_SIZE_SHORTER_SIDE > D4D_SCREEN_SIZE_LONGER_SIDE
349 #warning "The D4D_SCREEN_SIZE_SHORTER_SIDE macro has greater value then D4D_SCREEN_SIZE_LONGER_SIDE in d4d_cfg.h file. Please check!"
361 #define D4D_OBJECT_DRAWFLAGS_COMPLETE (0x01)
362 #define D4D_OBJECT_DRAWFLAGS_FOCUSED (0x02)
363 #define D4D_OBJECT_DRAWFLAGS_CAPTURING (0x04)
364 #define D4D_OBJECT_DRAWFLAGS_STATE (0x08)
457 #define D4D_TCHSCR_STATUS_TOUCHED (0x01) // The new touch has to be 0x01
458 #define D4D_TCHSCR_STATUS_RESERVED (0x02)
459 #define D4D_TCHSCR_STATUS_NEWTOUCH (0x04)
460 #define D4D_TCHSCR_STATUS_RESERVED1 (0x08)
461 #define D4D_TCHSCR_STATUS_LOSTTOUCH (0x10)
462 #define D4D_TCHSCR_STATUS_NEWRAWEVENT (0x20)
463 #define D4D_TCHSCR_STATUS_NEWEVENT (0x40)
464 #define D4D_TCHSCR_STATUS_CHECKTOUCH (0x80)
466 #define D4D_TCHSCR_STATUS_EVENTS (0xE0)
472 #define D4D_SYSTEM_F_TIMETICK (0x01)
473 #define D4D_SYSTEM_F_SYSTEM_KEYS_DISABLE (0x02)
488 #define D4D_SWAP_WORD(x) D4D_SwapWord(x)
497 #define D4D_LOG_EXOR(a,b) (!!(a) ^ !!(b))
504 #define D4D_UNUSED(x) (void)(x);
511 #define D4D_TEXT_LEN(txt) (sizeof((txt)) / sizeof(D4D_TCHAR))
520 #define D4D_CONST const
523 #define D4D_GetKeys() 0 // Just for backward compatibility
544 #define D4D_GetTextBuffWidthTabAdj(text_buffer, pTab) D4D_GetTextBuffWidthTab(text_buffer, pTab)
553 #define D4D_GetTextBuffWidth(text_buffer) D4D_GetTextBuffWidthTab(text_buffer, NULL)
564 #ifdef D4D_INPUT_EVENT_CALLBACK
565 extern void D4D_INPUT_EVENT_CALLBACK(
void);
579 #define D4D_SCRATCHPAD_SIZE 48
583 #define D4D_ASSERT(cond) if(!(cond)) for(;;)
UnTouched message - is send when the screen is untouched.
Draw Done message - is send after the object is redrawed.
Mouse Left Button Click message - is send in case that mouse left click is detected on this object...
Byte D4D_TOUCHSCREEN_STATUS
Mouse Middle Button Click message - is send in case that mouse middle click is detected on this objec...
On Init message - is send for first time when the object is inicialized.
D4D object messages structure.
Keep it on end of list (there is stored count of events)
Mouse Right Button Click message - is send in case that mouse right click is detected on this object...
Mouse Whell Move Down message - is send in case that mouse whell move down is detected on this object...
On Change done (complete change is finished.
Time Tick Occur message - is send with each time tick to object.
Set Focus message - is send when the object is getting focus.
struct D4D_MESSAGE_S D4D_MESSAGE
D4D object messages structure.
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
Key Up message - is send when the object get new Key Up event.
Auto Touched message - is send when the object is still keep touch by touch screen driver ...
Mouse Right Button Release message - is send in case that mouse right release is detected on this obj...
#define D4D_SCRATCHPAD_SIZE
Call back function raised by any new input event (touch, mouse, keys).
Mouse Left Button Release message - is send in case that mouse left release is detected on this objec...
const D4D_MARGIN d4d_marginDefault
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
Mouse Middle Button Release message - is send in case that mouse middle release is detected on this o...
Byte d4d_scratchPad[D4D_SCRATCHPAD_SIZE]
D4D_EVENTID
D4D events that is handled by object callback functions.
D4D_MSGID nMsgId
Type of message.
D4D_KEY_SCANCODE key
There will be stored only code of key without release / press information - is valid with D4D_MSG_KEY...
The object main structure type definition.
Draw message - is send when the object should be redrawed.
Lost Touch message - is send when the screen is still touch but the coordination leaves the original ...
The return value of user/application message function - continue handling of message by eGUI...
Touched message - is send when the object is touched by touch screen driver.
#define D4D_KEYS_BUFF_LENGTH
This macro is used to specify leght of keybord events buffer. If not defined, it sets to 4 events as ...
Mouse Cursor Enter message - is send in case that mouse cursor enter to object area.
Kill Capture message - is send when the object is losing capture keys status.
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
D4D_MSGID
D4D object messages types enumeration.
The screen structure type. The main screen structure that contains all needed data to run the eGUI sc...
The return value of user/application message function - skip handling of message by eGUI...
Set Capture message - is send when the object is getting capture keys status.
Byte D4D_KEY_SCANCODE
Type definition of eGUI keys scan code.
Key Down message - is send when the object get new Key Down event.
Byte D4D_OBJECT_DRAWFLAGS
Drawing object flags type, handled to object in D4D_MSG_DRAW events.
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
Mouse Whell Move Up message - is send in case that mouse whell move up is detected on this object...
Dummy message - could be strached.
Kill Focus message - is send when the object is losing focus.
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.
Type definition of eGUI client area margin structure.
Mouse Cursor Leave message - is send in case that mouse cursor leave the object area.