44 #ifndef LEGATO_UTILS_H 45 #define LEGATO_UTILS_H 58 #define LE_TEST_FLAG(val, flag) ((val & flag) > 0) 302 uint8_t bottomMargin,
303 uint16_t rectMargin);
371 uint8_t bottomMargin,
372 uint16_t rectMargin);
374 void leUtils_PointLogicalToScratch(int16_t* x,
377 void leUtils_RectLogicalToScratch(
leRect* rect);
388 #endif // LEGATO_UTILS_H Color definitions and functions.
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:239
void leUtils_PointScreenToLocalSpace(const leWidget *widget, lePoint *pnt)
Convert point from layer space into the local space of a widget.
Definition: legato_utils.c:91
Common macros and definitions used by Legato.
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:312
void leUtils_RectToParentSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to widget parent space.
Definition: legato_utils.c:132
void leUtils_ClipRectToAncestors(const leWidget *wgt, struct leRect *rct)
Clips a widget's rectangle to the widget tree hierarchy.
Definition: legato_utils.c:183
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:35
This struct represents a rectangle.
Definition: legato_common.h:394
leBool leUtils_ChildIntersectsParent(const leWidget *parent, const leWidget *child)
Determines if parent and child intersect.
Definition: legato_utils.c:167
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:152
This struct represents a list.
Definition: legato_list.h:94
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:195
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:302
void leUtils_PointToScreenSpace(const leWidget *widget, lePoint *pnt)
Converts a point from widget space into screen space.
Definition: legato_utils.c:76
This struct represents a blend color lookup table.
Definition: legato_color.h:293
void leUtils_RectFromParentSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget parent space to widget local space.
Definition: legato_utils.c:142
This structure represents a integer Cartesian point.
Definition: legato_common.h:346
leBool
This enum represents booleans.
Definition: legato_common.h:146
void leUtils_ClipRectToParent(const leWidget *widget, leRect *rect)
Clips a rectangle to the parent of a widge.
Definition: legato_utils.c:113
leWidget * leUtils_GetNextHighestWidget(const leWidget *wgt)
Get next highest Z order widget in the tree from 'wgt'.
Definition: legato_utils.c:208
Definition: legato_scheme.h:154
Schemes support various properties that make it possible to customize the color of widgets...
leVAlignment
This enum represents the vertical alignment mode of objects.
Definition: legato_common.h:170