 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
46 #ifndef LEGATO_IMAGE_H
47 #define LEGATO_IMAGE_H
51 #if LE_IMAGE_WIDGET_ENABLED
55 typedef struct leImageWidget leImageWidget;
63 #if LE_IMAGE_WIDGET_DEBUG_CB == 1
64 typedef void (*leImageWidget_DrawEventCallback)(leImageWidget* );
66 #define DEBUG_START_VFN void (*setDebugDrawStartCallback)(THIS_TYPE* _this, leImageWidget_DrawEventCallback cb);
67 #define DEBUG_END_VFN void (*setDebugDrawEndCallback)(THIS_TYPE* _this, leImageWidget_DrawEventCallback cb);
69 #define DEBUG_START_VFN
79 #define LE_IMAGEWIDGET_VTABLE(THIS_TYPE) \
80 LE_WIDGET_VTABLE(THIS_TYPE) \
82 leImage* (*getImage)(const THIS_TYPE* _this); \
83 leResult (*setImage)(THIS_TYPE* _this, leImage* img); \
87 typedef struct leImageWidgetVTable
89 LE_IMAGEWIDGET_VTABLE(leImageWidget)
90 } leImageWidgetVTable;
114 typedef struct leImageWidget
118 const leImageWidgetVTable* fn;
140 LIB_EXPORT leImageWidget* leImageWidget_New();
152 LIB_EXPORT
void leImageWidget_Constructor(leImageWidget* img);
155 #define THIS_TYPE struct leWidget
167 virtual leImage* getImage(
const leImageWidget* _this);
183 virtual leResult setImage(leImageWidget* _this,
199 virtual leResult setDebugDrawStartCallback(leImageWidget* _this,
200 leImageWidget_DrawEventCallback cb);
215 virtual void setDebugDrawEndCallback(leImageWidget* _this,
216 leImageWidget_DrawEventCallback cb);
222 #endif // LE_IMAGE_WIDGET_ENABLED
leResult
This enum represents function call results.
Definition: legato_common.h:134
This struct represents a rectangle.
Definition: legato_common.h:405
Image functions and defintions.
Memory functions and definitions.
Definition: legato_image.h:180
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
@ LE_FALSE
Definition: legato_common.h:158
@ LE_VALIGN_TOP
Definition: legato_common.h:182
General internal utilities for the library.
Fixed string functions and definitions.
@ 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
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
leColor leScheme_GetRenderColor(const leScheme *schm, leSchemeColor clr)
Gets a scheme render color for the current layer color mode.
Definition: legato_scheme.c:68
@ LE_TRUE
Definition: legato_common.h:159
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:286