MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_common.h File Reference

Common macros and definitions used by Legato. More...

#include "gfx/legato/legato_config.h"
#include <stddef.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
Include dependency graph for legato_common.h:

Go to the source code of this file.

Data Structures

struct  leMargin
 This struct represents the four margin settings for objects. More...
 
struct  lePoint
 This structure represents a integer Cartesian point. More...
 
struct  leSize
 This structure is used represents the size of an item. More...
 
struct  leRect
 This struct represents a rectangle. More...
 

Macros

#define LE_DEFAULT_SCHEME_COLOR_MODE   LE_COLOR_MODE_RGB_565
 Defines the default color of mode for all schemes. More...
 
#define LE_UNKNOWN_GLYPH   0xFFFF
 
#define LE_PCALL(var, func, args...)   var->fn->func(var, ## args)
 
#define LE_OCALL(var, func, args...)   var.fn->func(&var, ## args)
 
#define ASSIGN_VIRTUAL_FUNCTION(name)   .name = name
 
#define ASSIGN_VTABLE_FUNCTION(vtable, name)   vtable.name = name
 

Typedefs

typedef enum leResult leResult
 This enum represents function call results. More...
 
typedef enum leBool leBool
 This enum represents booleans. More...
 
typedef struct leMargin leMargin
 This struct represents the four margin settings for objects. More...
 
typedef enum leDirection leDirection
 This enum represents the four directions modes for objects. More...
 
typedef enum leRotationDirection leRotationDirection
 This enum represents the two rotation direction modes for objects. More...
 
typedef enum leRelativePosition leRelativePosition
 This enum represents the relative position modes for objects. More...
 
typedef enum leOrientation leOrientation
 This enum represents the orientation modes for objects. More...
 
typedef struct lePoint lePoint
 This structure represents a integer Cartesian point. More...
 
typedef struct leSize leSize
 This structure is used represents the size of an item. More...
 
typedef struct leRect leRect
 This struct represents a rectangle. More...
 
typedef void * leBuffer
 This typedef represents general-purpose buffer. More...
 
typedef uint16_t leChar
 This typedef represents Legato character. More...
 

Enumerations

enum  leResult { LE_FAILURE = -1, LE_SUCCESS = 0 }
 This enum represents function call results. More...
 
enum  leBool { LE_FALSE = 0, LE_TRUE }
 This enum represents booleans. More...
 
enum  leVAlignment { LE_VALIGN_TOP, LE_VALIGN_MIDDLE, LE_VALIGN_BOTTOM }
 This enum represents the vertical alignment mode of objects. More...
 
enum  leHAlignment { LE_HALIGN_LEFT, LE_HALIGN_CENTER, LE_HALIGN_RIGHT }
 This enum represents the horizontal alignment mode of objects. More...
 
enum  leDirection { LE_DIRECTION_RIGHT, LE_DIRECTION_DOWN, LE_DIRECTION_LEFT, LE_DIRECTION_UP }
 This enum represents the four directions modes for objects. More...
 
enum  leRotationDirection { LE_COUNTER_CLOCKWISE, LE_CLOCKWISE }
 This enum represents the two rotation direction modes for objects. More...
 
enum  leRelativePosition {
  LE_RELATIVE_POSITION_LEFTOF, LE_RELATIVE_POSITION_ABOVE, LE_RELATIVE_POSITION_BELOW, LE_RELATIVE_POSITION_RIGHTOF,
  LE_RELATIVE_POSITION_BEHIND
}
 This enum represents the relative position modes for objects. More...
 
enum  leOrientation { LE_ORIENTATION_HORIZONTAL, LE_ORIENTATION_VERTICAL }
 This enum represents the orientation modes for objects. More...
 

Detailed Description

Common macros and definitions used by Legato.

This file defines the common macros and definitions used by the legato library definition and implementation files.

Remarks
The directory in which this file resides should be added to the compiler's search path for header files.

Macro Definition Documentation

◆ LE_DEFAULT_SCHEME_COLOR_MODE

#define LE_DEFAULT_SCHEME_COLOR_MODE   LE_COLOR_MODE_RGB_565

Defines the default color of mode for all schemes.

In Legato there is a need to identify the default color mode for schemes.

Typedef Documentation

◆ leBool

typedef enum leBool leBool

This enum represents booleans.

Boolean are used to communicate true and false conditions.

◆ leBuffer

typedef void* leBuffer

This typedef represents general-purpose buffer.

The address of any variable of any data type (char, int, float etc.) can be assigned to a void pointer variable.

◆ leChar

typedef uint16_t leChar

This typedef represents Legato character.

A Legato character is a 16-bit character.

◆ leDirection

typedef enum leDirection leDirection

This enum represents the four directions modes for objects.

The four directions: right, down, left, up controls the direction of objects.

◆ leMargin

typedef struct leMargin leMargin

This struct represents the four margin settings for objects.

The four margin: left, top, right, bottom controls the size of the borders around objects.

◆ leOrientation

This enum represents the orientation modes for objects.

The orientation modes controls the horizontal and vertical of objects to other objects.

◆ lePoint

typedef struct lePoint lePoint

This structure represents a integer Cartesian point.

A point is specified by an x and y coordinate.

◆ leRect

typedef struct leRect leRect

This struct represents a rectangle.

A rectangle is specified by x and y top-left position and a width and height bottom-right position.

◆ leRelativePosition

This enum represents the relative position modes for objects.

The relative position modes controls the relative position of objects to other objects.

◆ leResult

typedef enum leResult leResult

This enum represents function call results.

Results are used to report success and failure conditions. These are the various success and failure codes.

◆ leRotationDirection

This enum represents the two rotation direction modes for objects.

The two directions: counter clockwise, clockwise controls the rotation direction of objects.

◆ leSize

typedef struct leSize leSize

This structure is used represents the size of an item.

A size is specified by a width and height.

Enumeration Type Documentation

◆ leBool

enum leBool

This enum represents booleans.

Boolean are used to communicate true and false conditions.

Enumerator
LE_FALSE 

Logic false =0.

LE_TRUE 

Logic true = 1.

◆ leDirection

This enum represents the four directions modes for objects.

The four directions: right, down, left, up controls the direction of objects.

Enumerator
LE_DIRECTION_RIGHT 

Specifies right direction.

LE_DIRECTION_DOWN 

Specifies down direction.

LE_DIRECTION_LEFT 

Specifies left direction.

LE_DIRECTION_UP 

Specifies up direction.

◆ leHAlignment

This enum represents the horizontal alignment mode of objects.

The horizontal alignment mode controls how objects are positioned horizontally.

Enumerator
LE_HALIGN_LEFT 

Aligns with the left edge.

LE_HALIGN_CENTER 

Aligns with the center.

LE_HALIGN_RIGHT 

Aligns with the right edge.

◆ leOrientation

This enum represents the orientation modes for objects.

The orientation modes controls the horizontal and vertical of objects to other objects.

◆ leRelativePosition

This enum represents the relative position modes for objects.

The relative position modes controls the relative position of objects to other objects.

Enumerator
LE_RELATIVE_POSITION_LEFTOF 

Position to the left of object.

LE_RELATIVE_POSITION_ABOVE 

Positive to the right of object.

LE_RELATIVE_POSITION_BELOW 

Positive to the top of object.

LE_RELATIVE_POSITION_RIGHTOF 

Positive to the bottom of object.

LE_RELATIVE_POSITION_BEHIND 

Positive to the top of object.

◆ leResult

enum leResult

This enum represents function call results.

Results are used to report success and failure conditions. These are the various success and failure codes.

◆ leRotationDirection

This enum represents the two rotation direction modes for objects.

The two directions: counter clockwise, clockwise controls the rotation direction of objects.

Enumerator
LE_COUNTER_CLOCKWISE 

Specifies counter clockwise rotation.

LE_CLOCKWISE 

Specifies clockwise rotation.

◆ leVAlignment

This enum represents the vertical alignment mode of objects.

The vertical alignment mode controls how objects are positioned vertically.

Enumerator
LE_VALIGN_TOP 

Aligns with the top.

LE_VALIGN_MIDDLE 

Aligns with the middle.

LE_VALIGN_BOTTOM 

Aligns with the bottom.