EasyGUI
Internal macros

List of internal macros which can be used only inside GUI library and are not visible by user outside GUI library. More...

Macros

#define GUI_CORE_PROTECT(p)   GUI_UNUSED(p)
 
#define GUI_CORE_UNPROTECT(p)   GUI_UNUSED(p)
 
#define GUI_DEBUG(fmt, ...)
 Debugging macro for inside GUI. More...
 
#define GUI_MEMALLOC(size)
 Allocate memory with specific size in bytes. More...
 
#define GUI_MEMREALLOC(ptr, size)
 Reallocate memory with specific size in bytes.
 
#define GUI_MEMFREE(p)
 Free memory from specific address previously allocated with GUI_MEMALLOC or GUI_MEMREALLOC.
 
#define GUI_MAX(x, y)
 Get maximal value between 2 values. More...
 
#define GUI_MIN(x, y)
 Get minimal value between 2 values. More...
 
#define GUI_ABS(x)
 Get absolute value of input. More...
 
#define GUI_UNUSED(x)
 Macro for unused variables to prevent compiler warnings. More...
 
#define GUI_UNUSED2(x, y)
 Macro for unused variables to prevent compiler warnings. More...
 
#define GUI_UNUSED3(x, y, z)
 Macro for unused variables to prevent compiler warnings. More...
 
#define GUI_UNUSED4(x, y, z, k)
 Macro for unused variables to prevent compiler warnings. More...
 
#define GUI_ROUND(x)   ((float)(x) + 0.5f)
 Round value to the nearest integer and return it as float (can be casted to int without problems) More...
 
#define GUI_MEM_ALIGN(x)   ((x + (GUI_CFG_MEM_ALIGNMENT - 1)) & ~(GUI_CFG_MEM_ALIGNMENT - 1))
 align x value to specific number of bits, provided from GUI_CFG_MEM_ALIGNMENT configuration More...
 

Detailed Description

List of internal macros which can be used only inside GUI library and are not visible by user outside GUI library.

Macro Definition Documentation

◆ GUI_ABS

#define GUI_ABS (   x)

Get absolute value of input.

Parameters
[in]xInput value
Return values
Absolutevalue of input

◆ GUI_DEBUG

#define GUI_DEBUG (   fmt,
  ... 
)

Debugging macro for inside GUI.

Parameters
[in]fmtPointer to string with modifiers
[in]...List of parameters for all the modifiers in fmt pointer
Note
When RTOS is not used, this macro has no meaning

◆ GUI_MAX

#define GUI_MAX (   x,
 
)

Get maximal value between 2 values.

Parameters
[in]xFirst value
[in]ySecond value
Return values
Maximalvalue

◆ GUI_MEM_ALIGN

#define GUI_MEM_ALIGN (   x)    ((x + (GUI_CFG_MEM_ALIGNMENT - 1)) & ~(GUI_CFG_MEM_ALIGNMENT - 1))

align x value to specific number of bits, provided from GUI_CFG_MEM_ALIGNMENT configuration

Parameters
[in]xInput value to align
Return values
Inputvalue aligned to specific number of bytes

◆ GUI_MEMALLOC

#define GUI_MEMALLOC (   size)

Allocate memory with specific size in bytes.

Note
This function must take care of reseting memory to zero

◆ GUI_MIN

#define GUI_MIN (   x,
 
)

Get minimal value between 2 values.

Parameters
[in]xFirst value
[in]ySecond value
Return values
Minimalvalue

◆ GUI_ROUND

#define GUI_ROUND (   x)    ((float)(x) + 0.5f)

Round value to the nearest integer and return it as float (can be casted to int without problems)

Parameters
[in]xValue to round
Return values
Roundedvalue

◆ GUI_UNUSED

#define GUI_UNUSED (   x)

Macro for unused variables to prevent compiler warnings.

Note
It uses 1 parameter

◆ GUI_UNUSED2

#define GUI_UNUSED2 (   x,
 
)

Macro for unused variables to prevent compiler warnings.

Note
It uses 2 parameters

◆ GUI_UNUSED3

#define GUI_UNUSED3 (   x,
  y,
 
)

Macro for unused variables to prevent compiler warnings.

Note
It uses 3 parameters

◆ GUI_UNUSED4

#define GUI_UNUSED4 (   x,
  y,
  z,
 
)

Macro for unused variables to prevent compiler warnings.

Note
It uses 4 parameters