 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
44 #ifndef LEGATO_UTILS_H
45 #define LEGATO_UTILS_H
52 #define LE_TEST_FLAG(val, flag) ((val & flag) > 0)
283 uint8_t bottomMargin,
284 uint16_t rectMargin);
352 uint8_t bottomMargin,
353 uint16_t rectMargin);
355 #endif // LEGATO_UTILS_H
void leUtils_PointScreenToLocalSpace(const leWidget *widget, lePoint *pnt)
Convert point from layer space into the local space of a widget.
Definition: legato_utils.c:90
This struct represents a rectangle.
Definition: legato_common.h:405
uint32_t size
Definition: legato_array.h:63
This struct represents a list.
Definition: legato_list.h:91
int32_t leList_PushBack(leList *list, void *val)
Push value on back.
Definition: legato_list.c:141
int32_t leArray_Find(const leArray *arr, void *val)
Find a first index of value.
Definition: legato_array.c:242
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:206
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
void leUtils_RectToParentSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to widget parent space.
Definition: legato_utils.c:131
void leList_Clear(leList *list)
Clear array.
Definition: legato_list.c:421
LIB_EXPORT leBool leRectIntersects(const leRect *l_rect, const leRect *r_rect)
Determines if two rectangles are intersecting.
Definition: legato_rect.c:51
@ LE_HALIGN_CENTER
Definition: legato_common.h:208
int32_t leList_Copy(leList *l, leList *r)
Copy list.
Definition: legato_list.c:373
void ** values
Definition: legato_array.h:62
size_t size
Definition: legato_list.h:94
leBool
This enum represents booleans.
Definition: legato_common.h:157
LIB_EXPORT leBool leRectContainsRect(const leRect *l_rect, const leRect *r_rect)
Determines if a rectangle is completely inside another rectangle.
Definition: legato_rect.c:40
void leUtils_PointToScreenSpace(const leWidget *widget, lePoint *pnt)
Converts a point from widget space into screen space.
Definition: legato_utils.c:75
A linked list implementation.
@ LE_FALSE
Definition: legato_common.h:158
LIB_EXPORT leBool leRectContainsPoint(const leRect *rect, const lePoint *point)
Determines if a point is inside a rectangle.
Definition: legato_rect.c:31
leBool leUtils_ChildIntersectsParent(const leWidget *parent, const leWidget *child)
Determines if parent and child intersect.
Definition: legato_utils.c:166
@ LE_VALIGN_TOP
Definition: legato_common.h:182
leWidget * leUtils_PickFromWidget(const leWidget *wgt, int32_t x, int32_t y)
Finds the top-most visible widget in a layer at the given coordinates.
Definition: legato_utils.c:34
General internal utilities for the library.
@ LE_RELATIVE_POSITION_RIGHTOF
Definition: legato_common.h:317
@ LE_HALIGN_LEFT
Definition: legato_common.h:207
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
Rectangle functions and definitions.
void leUtils_ClipRectToParent(const leWidget *widget, leRect *rect)
Clips a rectangle to the parent of a widge.
Definition: legato_utils.c:112
LIB_EXPORT void leRectClip(const leRect *l_rect, const leRect *r_rect, leRect *result)
Clips a rectangle to the space of another rectangle.
Definition: legato_rect.c:122
leWidget * leUtils_GetNextHighestWidget(const leWidget *wgt)
Get next highest Z order widget in the tree from 'wgt'.
Definition: legato_utils.c:182
int32_t leList_Create(leList *list)
Create a new list.
Definition: legato_list.c:31
void leUtils_RectFromParentSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget parent space to widget local space.
Definition: legato_utils.c:141
void * leArray_Get(const leArray *arr, uint32_t idx)
Get entry at index.
Definition: legato_array.c:224
@ LE_RELATIVE_POSITION_LEFTOF
Definition: legato_common.h:314
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:313
@ 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
Common macros and definitions used by Legato.
void leUtils_ArrangeRectangle(leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin)
Calculates the position of a rectangle within the given bound.
Definition: legato_utils.c:213
void leUtils_ArrangeRectangleRelative(leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin)
Calculates the position of a rectangle within the given bounds.
Definition: legato_utils.c:286
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
void * leList_Get(const leList *list, uint32_t idx)
Get a value from the list.
Definition: legato_list.c:181