 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
56 #ifndef LEGATO_COMMON_H
57 #define LEGATO_COMMON_H
59 #include "gfx/legato/legato_config.h"
67 typedef signed __int8 int8_t;
68 typedef signed __int16 int16_t;
69 typedef signed __int32 int32_t;
70 typedef unsigned __int8 uint8_t;
71 typedef unsigned __int16 uint16_t;
72 typedef unsigned __int32 uint32_t;
73 typedef signed __int64 int64_t;
74 typedef unsigned __int64 uint64_t;
83 #define LIB_EXPORT __declspec( dllexport )
85 #define LIB_EXPORT __declspec( dllimport )
100 #ifndef LE_DEFAULT_SCHEME_COLOR_MODE
101 #define LE_DEFAULT_SCHEME_COLOR_MODE LE_COLOR_MODE_RGB_565
242 static const leMargin leMargin_Zero = {0, 0, 0, 0};
341 LE_ORIENTATION_HORIZONTAL,
342 LE_ORIENTATION_VERTICAL,
366 static const lePoint lePoint_Zero = {0, 0};
390 static const leSize leSize_Zero = {0, 0};
426 #define LE_UNKNOWN_GLYPH 0xFFFF
432 #define ASSIGN_VIRTUAL_FUNCTION(name) .name = name
433 #define ASSIGN_VTABLE_FUNCTION(vtable, name) vtable.name = name
434 #endif // LEGATO_COMMON_H
@ LE_HALIGN_RIGHT
Definition: legato_common.h:209
Defines common math functions for general use.
leResult
This enum represents function call results.
Definition: legato_common.h:134
LIB_EXPORT int32_t leLerp(int32_t x, int32_t y, uint32_t per)
Calculates a linear interpolation of an integer based on a percentage between two signed points.
Definition: legato_math.c:290
leColorMode
This enum represents the supported RGB color formats.
Definition: legato_color.h:146
This struct represents a rectangle.
Definition: legato_common.h:405
Color definitions and functions.
uint8_t left
Definition: legato_common.h:232
leDirection
This enum represents the four directions modes for objects.
Definition: legato_common.h:263
Pixel Buffer functions and definitions.
leColorName
This enum represents predefined color options.
Definition: legato_color.h:262
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:206
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
@ LE_DIRECTION_LEFT
Definition: legato_common.h:266
LIB_EXPORT uint32_t lePercent(uint32_t l, uint32_t r)
Calculate percent of number.
Definition: legato_math.c:199
LIB_EXPORT leColor leColorLerp(leColor l, leColor r, uint32_t percent, leColorMode mode)
Get color from linear interpolate of two colors.
Definition: legato_color_lerp.c:284
int32_t width
Definition: legato_common.h:382
struct leSize leSize
This structure is used represents the size of an item.
@ LE_COUNTER_CLOCKWISE
Definition: legato_common.h:290
@ LE_HALIGN_CENTER
Definition: legato_common.h:208
LIB_EXPORT leColor leColorBlend_RGBA_8888(leColor fore, leColor back)
Get color from RGBA blend.
Definition: legato_color_blend.c:77
leOrientation
This enum represents the orientation modes for objects.
Definition: legato_common.h:340
@ LE_RELATIVE_POSITION_BEHIND
Definition: legato_common.h:318
struct leRect leRect
This struct represents a rectangle.
LIB_EXPORT leColor leColorBlend_ARGB_8888(leColor fore, leColor back)
Get color from ARGB blend.
Definition: legato_color_blend.c:125
leBool
This enum represents booleans.
Definition: legato_common.h:157
@ LE_DIRECTION_DOWN
Definition: legato_common.h:265
@ LE_FALSE
Definition: legato_common.h:158
@ LE_VALIGN_TOP
Definition: legato_common.h:182
This structure is used represents the size of an item.
Definition: legato_common.h:381
@ LE_RELATIVE_POSITION_RIGHTOF
Definition: legato_common.h:317
@ LE_HALIGN_LEFT
Definition: legato_common.h:207
leRotationDirection
This enum represents the two rotation direction modes for objects.
Definition: legato_common.h:289
struct lePoint lePoint
This structure represents a integer Cartesian point.
LIB_EXPORT leColor leColorConvert(leColorMode mode_in, leColorMode mode_out, leColor color)
Convert to color value.
Definition: legato_color_convert.c:579
This struct represents the four margin settings for objects.
Definition: legato_common.h:231
uint8_t right
Definition: legato_common.h:234
@ LE_VALIGN_BOTTOM
Definition: legato_common.h:184
@ LE_DIRECTION_UP
Definition: legato_common.h:267
uint16_t leChar
This typedef represents Legato character.
Definition: legato_common.h:424
@ LE_RELATIVE_POSITION_LEFTOF
Definition: legato_common.h:314
LIB_EXPORT uint32_t leScaleInteger(uint32_t num, uint32_t oldMax, uint32_t newMax)
Calculate the scale of an integer.
Definition: legato_math.c:256
uint8_t top
Definition: legato_common.h:233
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:313
LIB_EXPORT leColor leColorValue(leColorMode mode, leColorName name)
Get color by name and mode.
Definition: legato_color_value.c:51
@ LE_TRUE
Definition: legato_common.h:159
@ LE_RELATIVE_POSITION_BELOW
Definition: legato_common.h:316
@ LE_RELATIVE_POSITION_ABOVE
Definition: legato_common.h:315
int32_t height
Definition: legato_common.h:383
@ LE_DIRECTION_RIGHT
Definition: legato_common.h:264
struct leMargin leMargin
This struct represents the four margin settings for objects.
void * leBuffer
This typedef represents general-purpose buffer.
Definition: legato_common.h:417
uint8_t bottom
Definition: legato_common.h:235
@ LE_CLOCKWISE
Definition: legato_common.h:291
leVAlignment
This enum represents the vertical alignment mode of objects.
Definition: legato_common.h:181
This structure represents a integer Cartesian point.
Definition: legato_common.h:357
LIB_EXPORT leColor leColorBilerp(leColor c00, leColor c01, leColor c10, leColor c11, uint32_t xper, uint32_t yper, leColorMode mode)
Get color from bi-linear interpolation of four colors.
Definition: legato_color_lerp.c:301