46 #ifndef __D4D_OBJECT_H
47 #define __D4D_OBJECT_H
72 #define D4D_OBJECT_F_VISIBLE 0x0001
73 #define D4D_OBJECT_F_ENABLED 0x0002
74 #define D4D_OBJECT_F_TABSTOP 0x0004
75 #define D4D_OBJECT_F_TOUCHENABLE 0x0008
76 #define D4D_OBJECT_F_FASTTOUCH 0x0010
77 #define D4D_OBJECT_F_FOCUSRECT 0x0020
78 #define D4D_OBJECT_F_TIMETICK 0x0040
79 #define D4D_OBJECT_F_RESERVED1 0x0080
81 #define D4D_OBJECT_F_BEVEL_MASK 0x0300
82 #define D4D_OBJECT_F_BEVEL_SHIFT 8
84 #define D4D_OBJECT_F_BEVEL_RAISED 0x0100
85 #define D4D_OBJECT_F_BEVEL_DENTED 0x0200
87 #define D4D_OBJECT_F_MOUSE_MASK 0x0C00
88 #define D4D_OBJECT_F_MOUSE_SHIFT 10
90 #define D4D_OBJECT_F_MOUSE_NORMAL 0x0400
91 #define D4D_OBJECT_F_MOUSE_BUSY 0x0800
92 #define D4D_OBJECT_F_MOUSE_UNAVAILABLE 0x0C00
94 #define D4D_OBJECT_F_SYSTEM_MASK 0x000FFFFF
95 #define D4D_OBJECT_F_OBJECT_MASK 0xFFF00000
96 #define D4D_OBJECT_F_OBJECT_SHIFT 20
101 #define D4D_OBJECT_USR_DATA_PARENT_IX 0
103 #define D4D_OBJECT_USR_DATA_CHILD_IX 1
110 #define D4D_OBJECT_F_REDRAW 0x10000
111 #define D4D_OBJECT_F_REDRAWC 0x20000
112 #define D4D_OBJECT_F_REDRAWSTATE 0x40000
113 #define D4D_OBJECT_F_NOTINIT 0x80000
207 #define D4D_EXTERN_OBJECT(name) \
208 extern const D4D_OBJECT name;
216 #define D4D_GET_OBJECT_DATA(pObject) ((pObject)->pData)
224 #define D4D_BORDER_WIDTH(flags) (((flags) & D4D_OBJECT_F_BEVEL_MASK)? (D4D_BEVEL_WIDTH) : (((flags) & D4D_OBJECT_F_FOCUSRECT)? 1:0))
232 #define D4D_OBJECT_FLAGS2BEVEL(pObject) ((D4D_BEVEL)(((pObject)->pData->flags & D4D_OBJECT_F_BEVEL_MASK) >> D4D_OBJECT_F_BEVEL_SHIFT))
255 #define D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, rad, margin, relations, onusrmsg, sysFunc , param, initFlags, userData, pScheme) \
256 D4D_OBJECT_DATA name##_Data = {(D4D_OBJECT_FLAGS)((initFlags | D4D_OBJECT_F_NOTINIT) & D4D_OBJECT_F_SYSTEM_MASK), NULL}; \
257 type D4D_OBJECT name = \
264 (D4D_OBJECT_SYS_FUNCTION*)sysFunc, \
266 (D4D_OBJECT_USR_DATA)userData, \
280 #define D4D_DECLARE_OBJECT_RELATIONS(name, pParent, ...)\
281 const D4D_OBJECT * const name[] = {pParent, __VA_ARGS__ , NULL};
291 #define D4D_DECLARE_OBJECT_RELATIONS_BEGIN(name, pParent)\
292 const D4D_OBJECT * const name[] = \
301 #define D4D_DECLARE_OBJECT_RELATIONS_CHILD(child) &child,
307 #define D4D_DECLARE_OBJECT_RELATIONS_END NULL };
310 #define D4D_OBJECT_MAX_TEXT_LEN(str) 1000
D4D_WCHAR D4D_TCHAR
Type definition of eGUI character (it depends on UNICODE setting if this is D4D_CHAR or D4D_WCHAR)...
D4D_BOOL D4D_IsMineFocus(D4D_OBJECT *pObject)
Function find out if the object (including compounded objects) is focused.
void(* OnSysMessage)(struct D4D_MESSAGE_S *pMsg)
Object system message receiver function pointer.
D4D_OBJECT_SYS_FUNCTION * pObjFunc
The pointer on object system functions.
void * pParam
The object depends parameters.
D4D_ON_USR_MSG OnUsrMessage
The pointer on user message.
void D4D_EnableTabStop(D4D_OBJECT_PTR pObj, D4D_BOOL bEnable)
Function enables TabStop on the object.
struct D4D_SCREEN_S * pScreen
pointer to object screen owner - it is placed in RAM bacause one object could be used in multiply scr...
Type definition of eGUI point structure.
D4D object messages structure.
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
The string type. This structure contains all properties about string in eGUI.
D4D_OBJECT_INITFLAGS initFlags
The initializations object flags.
void * D4D_OBJECT_USR_DATA
The object user data type definition.
D4D_BOOL D4D_ObjectCheckCoordinates(D4D_OBJECT *pThis, D4D_POINT point)
struct D4D_OBJECT_SYS_FUNCTION_S D4D_OBJECT_SYS_FUNCTION
The object system function needed for each object - this is part of D4D_OBJECT main structure...
D4D_OBJECT_FLAGS flags
runtime object flags
The object changeble data structure - this is part of D4D_OBJECT main structure.
struct D4D_CLR_SCHEME_S * clrScheme
Pointer on used color scheme.
This is the main structure of the color scheme in the D4D. It contains all the necessary colors to ru...
void D4D_EnableObject(D4D_OBJECT_PTR pObj, D4D_BOOL bEnable)
Function enables object.
Byte D4D_COOR
Type definition of eGUI coordination variables.
D4D_POINT position
Position on the screen/object.
LWord D4D_OBJECT_FLAGS
The object flags type. The masks are described here D4D OBJECT Defines masks of object behaviour flag...
D4D_COOR radius
Object corners radius.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
LWord D4D_OBJECT_INITFLAGS
The object init flags type. The masks are described here D4D OBJECT Defines masks of object behaviour...
D4D_BOOL(* CheckCoordinates)(struct D4D_OBJECT_S *pObj, D4D_POINT point)
Object check coordinates function pointer (return true or false if the input point fits into the obje...
void D4D_ShowObject(D4D_OBJECT_PTR pObject, D4D_BOOL bShow)
Function control visibility of object on screen.
D4D_OBJECT_USR_DATA userData
The pointer on user data container (user pointer and optionaly parent/children).
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
D4D_SIZE size
Size of the object.
D4D_BOOL D4D_IsVisible(D4D_OBJECT *pObject)
Function find out if the object is visible or not.
The object main structure type definition.
void D4D_CaptureKeys(D4D_OBJECT_PTR pObj)
Function switch on capturing the keys to objects.
struct D4D_OBJECT_S *const * D4D_OBJECT_RELATIONS
The object relations type definition. In fact this is array of object pointer , where on position 0 i...
The object system function needed for each object - this is part of D4D_OBJECT main structure...
void * D4D_GetUserPointer(D4D_OBJECT *pThis)
Function return the object user data.
D4D_OBJECT_RELATIONS pRelations
Relationship between the objects.
LWord D4D_BOOL
Type definition of eGUI boolean.
Type definition of eGUI size structure.
void D4D_EnableTimeTicks(D4D_OBJECT_PTR pObj, D4D_BOOL bEnable)
Function enable or diasble receiving timeticks for an OBJECT.
The screen structure type. The main screen structure that contains all needed data to run the eGUI sc...
Byte(* D4D_ON_USR_MSG)(struct D4D_MESSAGE_S *pMsg)
Type definition of object on User message handler function.
D4D_TCHAR * strName
Object type (widget) name, it also could be used as a identifier of object type.
struct D4D_OBJECT_DATA_S D4D_OBJECT_DATA
The object changeble data structure - this is part of D4D_OBJECT main structure.
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
D4D_MARGIN * pMargin
Object inner margin.
struct D4D_OBJECT_S D4D_OBJECT
The object main structure type definition.
void D4D_EnableTouchScreen(D4D_OBJECT_PTR pObj, D4D_BOOL bEnable, D4D_BOOL bFastTouch)
Function enables touchs screen capability and sets also mode of touch event.
D4D_SIZE D4D_GetClientScreenSize(D4D_OBJECT *pObject)
The function return the real client size of object.
struct D4D_OBJECT_DATA_S * D4D_OBJECT_DATA_PTR
Type definition of eGUI client area margin structure.
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
const D4D_OBJECT * D4D_OBJECT_PTR
The type definition of object pointer to ROM.
D4D_OBJECT * D4D_GetCapturedObject(void)
Function returns the current keys capturing object pointer.