111 if(pOldScreen !=
NULL)
296 if(*pObjects ==
NULL)
366 if(*pObjects ==
NULL)
441 if(pNewFocus ==
NULL)
444 if(pNewFocus == pFocusedObj)
544 return *nClientPoint;
593 return *nScreenPoint;
665 while(*(pObject + 1))
680 if(!pScreen || !pLocObject)
688 if(pLocObject == pObject)
707 if(pNewScreen ==
NULL)
710 if(pOldScreen == pNewScreen)
715 if(pOldScreen !=
NULL)
735 pData = pNewScreen->
pData;
755 d4d_LastTouchedObj =
NULL;
805 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
806 tmp_off += (pScreen->
radius * 2);
839 resultSize->
cx = tmp_coor;
840 resultSize->
cy = tmp_coor;
873 contentGeom.
sz = pScreen->
size;
886 contentGeom.
sz.
cx -= 2;
887 contentGeom.
sz.
cy -= 2;
914 tmpSize = contentGeom.
sz;
925 tmpPoint = contentGeom.
pnt;
934 tmpPoint = contentGeom.
pnt;
959 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
967 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
975 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
981 #if D4D_ROUND_CORNER_ENABLE != D4D_FALSE
1086 while(*pObj !=
NULL)
1118 while(*pObjects !=
NULL)
1142 if((point->
x >= tmp_pos.
x) && (point->
y >= tmp_pos.
y))
1144 if((point->
x <= (tmp_pos.
x + tmp_size.
cx)) && (point->
y <= (tmp_pos.
y + tmp_size.
cy)))
#define D4D_SCR_FINT_INITDONE
#define D4D_SCR_FINT_TOUCHENABLE
void D4D_RBox(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
D4D_OBJECT * D4D_GetParentObject(D4D_OBJECT *pObject)
D4D_OBJECT * d4d_pKeysCapturer
Draw Done message - is send after the object is redrawed.
#define D4D_OBJECT_DRAWFLAGS_FOCUSED
Draw fosused state flag.
void D4D_InvalidateScreen(const D4D_SCREEN *pScreen, D4D_BOOL bComplete)
The function mark the screen and its abject as "redraw pending".
D4D_TEXT_PROPERTIES text_properties
Text properties structure.
D4D_SYSTEM_FLAGS d4d_systemFlags
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.
const D4D_OBJECT *const * pObjects
NULL-terminated array of objects (may lay in ROM)
void D4D_SendMessageMask(D4D_MESSAGE *pMsg, D4D_OBJECT_FLAGS parentFlagsMask, D4D_OBJECT_FLAGS endFlagMask)
D4D_COOR left
Margin of left side.
void(* D4DLCD_FlushBuffer)(D4DLCD_FLUSH_MODE mode)
The LCD driver flush function.
On Init message - is send for first time when the object is inicialized.
D4D object messages structure.
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
The notification that the end of screen is draw.
D4D_BOOL D4D_ScrCheckExitBtnCoor(D4D_SCREEN *pScreen, D4D_POINT *point)
static void D4D_DrawScreenNC(const D4D_SCREEN *pScreen, D4D_BOOL active)
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
The string type. This structure contains all properties about string in eGUI.
#define D4D_DrawRBmp(ppt, pBmp, greyScale, radius)
#define D4D_OBJECT_F_TABSTOP
Object can be focused.
#define D4D_OBJECT_F_REDRAWSTATE
D4D_OBJECT * D4D_GetLastObject(D4D_SCREEN *pScreen)
The function returns the pointer to last object in the screen.
D4D_FONT fontId
index of used font
#define D4D_OBJECT_F_TIMETICK
Object will gets the time tick events.
Time Tick Occur message - is send with each time tick to object.
#define D4D_OBJECT_F_ENABLED
Object after initialization is enabled.
Set Focus message - is send when the object is getting focus.
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
#define D4D_SCR_FINT_REDRAWC
D4D_SCREEN_FLAGS flags
Screen behaviour flags.
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
static D4D_BOOL D4D_GetScrHeaderExitBtnCoor(const D4D_SCREEN *pScreen, D4D_POINT *resultPos, D4D_SIZE *resultSize)
D4D Driver main header file.
#define D4D_OBJECT_F_REDRAW
void D4D_InitScreen(const D4D_SCREEN *pScreen)
The function inits the screen and its objects for first time case.
D4D_COOR D4D_GetScrHeaderSize(D4D_SCREEN *pScreen)
D4D_OBJECT_FLAGS flags
runtime object flags
D4D_COOR D4D_GetBmpHeight(const D4D_BMP *pBmp)
Function gets information about bitmap height.
#define D4D_SCREEN_HISTORY
This macro is used to set the screen buffer depth. If not defined, the 5 is used as a default...
#define D4D_SCR_F_TITLEBAR
The screen has title bar.
void D4D_ClearKeysBuffer(void)
Clear all rest information about pushed Keys in buffer.
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
#define D4D_SCR_TITLE_EXITBTN_MIN_SIZE
This is screen exit button minimal size definition. If not defined, it sets to 6 pixels as a default...
D4D Driver private header file.
#define D4D_SCR_TITLE_OFF_Y
This is screen title offset definition in axis Y. If not defined, it sets to 1 pixels as a default...
void D4D_SetObjectFlags(D4D_OBJECT *pObject, D4D_OBJECT_FLAGS flagsMask, D4D_BOOL alsoChildren)
This is the main structure of the color scheme in the D4D. It contains all the necessary colors to ru...
Byte D4D_TEXT_PROPERTIES
The string text properties type. The masks are described here D4D BASE Defines masks of aligment prop...
void D4D_FocusNextObject(const D4D_SCREEN *pScreen, D4D_BOOL bInitialSearch)
The function change focus to the next object in the given screen.
D4D_COOR cx
Size in axis X (width)
void D4D_HandleTimeTicks(D4D_SCREEN *pScreen)
Byte D4D_COOR
Type definition of eGUI coordination variables.
D4D_POINT position
Position on the screen/object.
D4D_COLOR exitBtnBckg
Background color of screen exit button (if enabled)
D4D_COOR radius
Screen corner radius.
LWord D4D_OBJECT_FLAGS
The object flags type. The masks are described here D4D OBJECT Defines masks of object behaviour flag...
#define D4D_OBJECT_USR_DATA_CHILD_IX
The relations object index to relation array for first child object.
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
void D4D_FocusPrevObject(const D4D_SCREEN *pScreen)
The function change focus to the previous object in the given screen.
D4D_CLR_SCHEME * D4D_ScreenGetScheme(D4D_SCREEN *pScreen)
D4D_MARGIN d4d_screenMarginDflt
#define D4D_MouseChangedScreen()
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
#define D4D_OBJECT_DRAWFLAGS_CAPTURING
Draw capturing state flag.
void D4D_ActivateScreen(const D4D_SCREEN *pNewScreen, D4D_BOOL bReplaceCurrent)
The function activate the new screen.
#define NULL
Type definition of null pointer.
D4D_TCHAR * pText
pointer to text array
static void D4D_RedrawScreenObject(D4D_OBJECT *pObject, D4D_BOOL complete)
D4D_STR_PROPERTIES * str_properties
pointer to string properties
D4D_COOR y
Coordination in axis Y.
D4D_SCREEN * D4D_GetActiveScreen(void)
Returns pointer to current active screen.
#define D4D_OBJECT_F_NOTINIT
#define D4D_SCR_F_EXIT
The screen has exit button in title bar.
D4D_COLOR title_text
Color of screen title bar text (if enabled)
D4D_SIZE sz
Size of object.
D4D_OBJECT_PTR D4D_GetFocusedObject(const D4D_SCREEN *pScreen)
The function returns pointer to object that is focused in given screen.
D4D_COLOR exitBtnFore
Fore color of screen exit button.
D4D_SIZE size
Screen size (standard screen has full size of physical screen)
D4D_MSGID nMsgId
Type of message.
void D4D_RRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR color, D4D_COOR radius)
Function draw rectangle on the screen with round corners.
#define D4D_DrawText(ppt, buffText, colorText, colorBkgd)
Function that draw simple text on the screen.
D4D_CLR_SCHEME_SCR screen
Sub structure of screen colors.
void D4D_Bevel(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_BEVEL type, D4D_COOR radius)
Function draw standard object bevel specified by parameters.
#define D4D_OBJECT_USR_DATA_PARENT_IX
The relations object index to relation array for parent object.
Byte flags
Internal screen flags.
D4D_POINT pnt
Left Top corner point.
void D4D_SetScreenFontProperties(const D4D_SCREEN *pScreen, D4D_FONT_PROPERTIES property)
The function sets the screen font properties.
D4D_POINT D4D_GetClientToScreenPoint(D4D_OBJECT *pObject, D4D_POINT *nClientPoint)
The function convert client point on the screen to the global screen point.
The object main structure type definition.
D4D_COLOR outline
Color of screen outline (if enabled)
void D4D_CaptureKeys(D4D_OBJECT_PTR pObj)
Function switch on capturing the keys to objects.
#define D4D_BEVEL_WIDTH
D4D_BEVEL_WIDTH constant declaration - can't be changed!
D4D_SCREEN_DATA * pData
pointer to screen private run time data
Draw message - is send when the object should be redrawed.
const D4D_BMP * pIcon
Screen title icon.
D4D_COOR D4D_GetBmpWidth(const D4D_BMP *pBmp)
Function gets information about bitmap width.
#define D4D_SCR_TITLE_OFF_X
This is screen title offset definition in axis X. If not defined, it sets to 3 pixels as a default...
void D4D_EscapeScreen(void)
The function return to previous screen recorded in the history.
void D4D_SetObjectScreenPointer(D4D_OBJECT *pObject, D4D_SCREEN *pScreen)
D4D_COOR cy
Size in axis Y (height)
void(* OnDeactivate)(void)
Screen event handler of called before deactivating.
D4D_COLOR title_bar
Color of screen title bar (if enabled)
D4D_POINT position
Screen coordination on physical screen (standard screen has {0,0})
D4D_OBJECT_RELATIONS pRelations
Relationship between the objects.
#define D4D_OBJECT_F_VISIBLE
Object after initialization is visible on the screen.
const D4DLCD_FUNCTIONS D4D_LLD_LCD
LWord D4D_BOOL
Type definition of eGUI boolean.
The notification that the start of screen is done.
#define D4D_SCR_F_BCKG
The screen has filled background (desktop)
Type definition of eGUI size structure.
D4D_OBJECT * D4D_FindNextObject(D4D_OBJECT *pObject, D4D_BOOL childrenAlso)
void(* OnInit)(void)
Screen event handler of one-time initialization.
void D4D_EscapeToBaseScreen(void)
The function return to base screen recorded in the history.
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
void D4D_FillRRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
The screen structure type. The main screen structure that contains all needed data to run the eGUI sc...
Type definition of eGUI geometry structure.
#define D4D_SCR_HEADER_SIZE_MIN_SIZE
This is screen header minimal size definition in axis Y. If not defined, it sets to 13 pixels as a de...
#define D4D_SYSTEM_F_TIMETICK
Byte d4d_screenHistoryIndex
#define D4D_OBJECT_F_REDRAWC
D4D_MARGIN * pMargin
Object inner margin.
D4D driver - resistive touch screen driver function header file.
#define D4D_EnableScrTouchScreen(pScr, bEnable)
void D4D_SendMessage(D4D_MESSAGE *pMsg)
D4D_SCREEN * d4d_screenHistory[D4D_SCREEN_HISTORY]
D4D_COLOR desktop
Color of screen desktop.
void(* OnActivate)(void)
Screen event handler of called before screen activation.
static void D4D_ChangeScreen(const D4D_SCREEN *pNewScreen, D4D_SCREEN *pOldScreen)
static D4D_COOR D4D_GetScrHeaderTitleOffset(const D4D_SCREEN *pScreen)
#define D4D_SCR_FINT_CHECKOBJECTS
void D4D_LineTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw line on the screen.
LWord D4D_COLOR
Type definition of eGUI color variables.
#define D4D_SCR_TITLE_EXITBTN_OFFSET
This is screen exit button offset definition. If not defined, it sets to 3 pixels as a default...
void D4D_RedrawScreen(D4D_SCREEN *pScreen)
D4D_OBJECT * focusedObject
Pointer on currently focused object.
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
D4D_COLOR D4D_GetGreyScale(D4D_COLOR color)
Compute the grayscale color.
D4D_FONT_PROPERTIES font_properties
Font properties structure.
#define D4D_SCR_F_BEVEL
The screen has bevel.
void D4D_SetScreenTextProperties(const D4D_SCREEN *pScreen, D4D_TEXT_PROPERTIES property)
The function sets the screen text properties.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
D4D_BOOL D4D_ScrCheckCoor(D4D_SCREEN *pScreen, D4D_POINT *point)
The function check if the coordination are in screen area.
void D4D_MoveTo(D4D_POINT *ppt)
Function move logic cursor to new position.
struct D4D_STRING_S textBuff
Screen title bar text buffer.
#define D4D_SCR_EXITBTN_CROSS_SIZE
This is screen exit button cross minimal size definition. If not defined, it sets to 2 pixels as a de...
#define D4D_SCR_F_OUTLINE
The screen has out line.
D4D_COOR top
Margin of top side.
D4D_COOR x
Coordination in axis X.
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.
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
D4D_POINT D4D_GetScreenToClientPoint(D4D_OBJECT *pObject, D4D_POINT *nScreenPoint)
The function convert global screen point on the screen to the client point.
The screen run time data type. It used to internal store the runtime data by eGUI.
D4D_OBJECT * D4D_FindPreviousObject(D4D_OBJECT *pObject, D4D_BOOL childrenAlso)
static D4D_OBJECT * D4D_FindObject(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)