EasyGUI  v0.1
Platform independent GUI Library
Structures and enumerations

List of core structures and enumerations. More...

Modules

 Fonts
 Font description structures and flags.
 
 Image
 Image display widget.
 

Data Structures

struct  GUI_LinkedList_t
 Linked list structure. More...
 
struct  GUI_LinkedListMulti_t
 Structure used for dynamic struct allocation. More...
 
struct  GUI_LinkedListRoot_t
 Linked list root structure for start and end widget in structure. More...
 
struct  GUI_TIMER_CORE_t
 Core timer structure for GUI timers. More...
 
struct  GUI_Gradient_t
 Color gradient definition. More...
 
struct  GUI_TouchData_t
 Single touch data structure. More...
 
struct  __GUI_TouchData_t
 Internal touch structure used for widget callbacks. More...
 
struct  GUI_KeyboardData_t
 Single key data structure. More...
 
struct  __GUI_KeyboardData_t
 Internal single key data structure. More...
 
struct  GUI_Display_t
 GUI clipping management. More...
 
struct  GUI_Layer_t
 LCD layer structure. More...
 
struct  GUI_LCD_t
 GUI LCD structure. More...
 
struct  GUI_LL_t
 GUI Low-Level structure for drawing operations. More...
 

Macros

#define _GT(x)    (GUI_Char *)(x)
 
#define GUI_Const   const
 
#define GUI_COUNT_OF(x)
 Count number of elements in array. More...
 
#define gui_containerof(ptr, type, memb)    (type *)((char *)(ptr) - (char *)offsetof(type, memb))
 Get container object from member. More...
 

Typedefs

typedef uint32_t GUI_ID_t
 
typedef uint32_t GUI_Color_t
 
typedef int16_t GUI_Dim_t
 
typedef int16_t GUI_iDim_t
 
typedef uint8_t GUI_Byte
 
typedef GUI_Byte GUI_Byte_t
 
typedef int8_t GUI_iByte
 
typedef GUI_iByte GUI_iByte_t
 
typedef uint8_t GUI_Char
 
typedef void(* GUI_EventCallback_t) (void)
 Global event callback function declaration.
 

Enumerations

enum  GUI_Result_t { guiOK = 0x00, guiERROR = 0x01 }
 Results enumeration. More...
 
enum  GUI_TouchState_t { GUI_TouchState_RELEASED = 0x00, GUI_TouchState_PRESSED = 0x01 }
 Touch state on widget. More...
 
enum  __GUI_TouchStatus_t { touchHANDLED = 0x00, touchHANDLEDNOFOCUS, touchCONTINUE }
 Touch internal processing enumeration. More...
 
enum  __GUI_KeyboardStatus_t { keyHANDLED = 0x00, keyCONTINUE }
 Keyboard internal processing enumeration. More...
 
enum  GUI_LL_Command_t { GUI_LL_Command_Init = 0x00, GUI_LL_Command_SetActiveLayer }
 Low-level LCD command enumeration. More...
 

Detailed Description

List of core structures and enumerations.

Macro Definition Documentation

#define _GT (   x)    (GUI_Char *)(x)

Macro to force strings to right format for processing

#define GUI_Const   const

Macro for constant keyword

#define gui_containerof (   ptr,
  type,
  memb 
)    (type *)((char *)(ptr) - (char *)offsetof(type, memb))

Get container object from member.

Consider below structure

//Declare driver structure
typedef struct {
int x;
int y;
} drv_t
//Declare custom structure
//Use in custom software
typedef struct {
int a;
int b;
int c;
drv_t driver;
} my_structure;
//Create structure object
my_structure my;
//Create pointer to structure object
drv_t* driver_ptr = &my->driver;
//Pass pointer to our working function somewhere
//Let's assume this function is callback called from our software
void myFunc(drv_t* drv) {
//We know drv pointer is child of my_structure
//Let's get that my_structure pointer from drv_t structure
my_structure* my_struct = gui_containerof(drv, my_structure, driver);
//Check if they match
if (my_struct == &my) {
//This should be true
}
}
#define GUI_COUNT_OF (   x)

Count number of elements in array.

Warning
This does not work with pointers

Typedef Documentation

typedef uint8_t GUI_Byte

GUI byte data type

GUI byte data type

typedef uint8_t GUI_Char

GUI char data type for all string operations

typedef uint32_t GUI_Color_t

Color definition

typedef int16_t GUI_Dim_t

GUI dimensions in units of pixels

typedef int8_t GUI_iByte

GUI signed byte data type

GUI signed byte data type

typedef uint32_t GUI_ID_t

GUI object ID

typedef int16_t GUI_iDim_t

GUI signed dimensions in units of pixels

Enumeration Type Documentation

Keyboard internal processing enumeration.

Enumerator
keyHANDLED 

Key has been handled

keyCONTINUE 

Key has not been handled and further checking can be done

Touch internal processing enumeration.

Enumerator
touchHANDLED 

Touch has been handled

touchHANDLEDNOFOCUS 

Touch has been handled but widget is not in focus state (used for widget who don't have touch events)

touchCONTINUE 

Touch has not been handled and further checking can be done

Low-level LCD command enumeration.

Enumerator
GUI_LL_Command_Init 

Initialize low-level part of GUI.

Parameters
[in]*paramPointer to GUI_LL_t structure to fill data to
[out]*resultPointer to uint8_t variable to save result: 0 = OK otherwise ERRORSet new layer as active layer
GUI_LL_Command_SetActiveLayer 

Initialize low-level part of GUI.

Parameters
[in]*paramPointer to GUI_LL_t structure to fill data to
[out]*resultPointer to uint8_t variable to save result: 0 = OK otherwise ERRORSet new layer as active layer

Results enumeration.

Enumerator
guiOK 

GUI status is OK

guiERROR 

There was an error in processing

Touch state on widget.

Enumerator
GUI_TouchState_RELEASED 

Touch released

GUI_TouchState_PRESSED 

Touch detected