MPLABĀ® Harmony Graphics Suite
GFX v3.13.0
Legato API Documentation
|
Legato widget definitions. More...
#include "gfx/legato/common/legato_common.h"
#include "gfx/legato/common/legato_rect.h"
#include "gfx/legato/core/legato_event.h"
#include "gfx/legato/core/legato_scheme.h"
#include "gfx/legato/datastructure/legato_array.h"
Go to the source code of this file.
Data Structures | |
struct | leWidget_MoveEvent |
Used to define widget move event. More... | |
struct | leWidget_ResizeEvent |
Used to define widget resize event. More... | |
struct | leWidgetEvent |
Used to define widget event. More... | |
struct | leWidgetEvent_TouchDown |
Used to define widget touch down event. More... | |
struct | leWidgetEvent_TouchUp |
Used to define widget touch up event. More... | |
struct | leWidgetEvent_TouchMove |
Used to define widget touch move event. More... | |
struct | leWidgetEventFilter |
Used to define widget touch event filter. More... | |
struct | leWidget |
Used to define a widget. More... | |
Typedefs | |
typedef enum leWidgetType | leWidgetType |
Used to define widget types. More... | |
typedef enum leBackgroundType | leBackgroundType |
Used to define widget background types. More... | |
typedef enum leBorderType | leBorderType |
Used to define widget border types. More... | |
typedef enum leWidgetDirtyState | leWidgetDirtyState |
Used to define widget dirty state. More... | |
typedef enum leWidgetDrawState | leWidgetDrawState |
Used to define widget dirty state. More... | |
typedef struct leWidget_MoveEvent | leWidget_MoveEvent |
Used to define widget move event. More... | |
typedef struct leWidget_ResizeEvent | leWidget_ResizeEvent |
Used to define widget resize event. More... | |
typedef struct leWidget | leWidget |
Used to define a widget. More... | |
typedef struct leWidgetEvent | leWidgetEvent |
Used to define widget event. | |
typedef struct leWidgetEvent_TouchDown | leWidgetEvent_TouchDown |
Used to define widget touch down event. More... | |
typedef struct leWidgetEvent_TouchUp | leWidgetEvent_TouchUp |
Used to define widget touch up event. More... | |
typedef struct leWidgetEvent_TouchMove | leWidgetEvent_TouchMove |
Used to define widget touch move event. More... | |
Enumerations | |
enum | leWidgetType { LE_WIDGET_WIDGET, LE_WIDGET_ARC } |
Used to define widget types. More... | |
enum | leBackgroundType { LE_WIDGET_BACKGROUND_NONE, LE_WIDGET_BACKGROUND_FILL, LE_WIDGET_BACKGROUND_LAST = LE_WIDGET_BACKGROUND_FILL } |
Used to define widget background types. More... | |
enum | leBorderType { LE_WIDGET_BORDER_NONE, LE_WIDGET_BORDER_LINE, LE_WIDGET_BORDER_BEVEL, LE_WIDGET_BORDER_LAST = LE_WIDGET_BORDER_BEVEL } |
Used to define widget border types. More... | |
enum | leWidgetDirtyState { LE_WIDGET_DIRTY_STATE_CLEAN, LE_WIDGET_DIRTY_STATE_CHILD, LE_WIDGET_DIRTY_STATE_DIRTY } |
Used to define widget dirty state. More... | |
enum | leWidgetDrawState { LE_WIDGET_DRAW_STATE_READY, LE_WIDGET_DRAW_STATE_DONE } |
Used to define widget dirty state. More... | |
Functions | |
void | leWidgetEvent_Accept (leWidgetEvent *evt, leWidget *owner) |
leWidget * | leWidget_New (void) |
Create widget. More... | |
void | leWidget_Constructor (leWidget *wgt) |
Initialize widget. More... | |
void | leWidget_Delete (leWidget *wgt) |
Delete widget. More... | |
leWidgetType | _leWidget_GetType (const leWidget *_this) |
Get widget type. More... | |
int32_t | _leWidget_GetX (const leWidget *_this) |
Get widget x position. More... | |
leResult | _leWidget_SetX (leWidget *_this, int32_t x) |
Set widget x position. More... | |
int32_t | _leWidget_GetY (const leWidget *_this) |
Get widget y position. More... | |
leResult | _leWidget_SetY (leWidget *_this, int32_t y) |
Set widget y position. More... | |
leResult | _leWidget_SetPosition (leWidget *_this, int32_t x, int32_t y) |
Set widget x and y position. More... | |
leResult | _leWidget_Translate (leWidget *_this, int32_t x, int32_t y) |
Translate widget x and y position. More... | |
uint32_t | _leWidget_GetWidth (const leWidget *_this) |
Get widget width. More... | |
leResult | _leWidget_SetWidth (leWidget *_this, uint32_t width) |
Set the widget width. More... | |
uint32_t | _leWidget_GetHeight (const leWidget *_this) |
Get widget height. More... | |
leResult | _leWidget_SetHeight (leWidget *_this, uint32_t height) |
Set widget height. More... | |
leResult | _leWidget_SetSize (leWidget *_this, uint32_t width, uint32_t height) |
Set widget height. More... | |
leResult | _leWidget_Resize (leWidget *_this, int32_t width, int32_t height) |
Resize widget. More... | |
leBool | _leWidget_GetAlphaEnabled (const leWidget *_this) |
Get alpha enable status. More... | |
leBool | _leWidget_GetCumulativeAlphaEnabled (const leWidget *_this) |
Get cumulative alpha enable status. More... | |
leResult | _leWidget_SetAlphaEnabled (leWidget *_this, leBool enable) |
Set cumulative alpha enable status. More... | |
uint32_t | _leWidget_GetAlphaAmount (const leWidget *_this) |
Get alpha amount. More... | |
uint32_t | _leWidget_GetCumulativeAlphaAmount (const leWidget *_this) |
Get cumulative alpha amount. More... | |
leResult | _leWidget_SetAlphaAmount (leWidget *_this, uint32_t alpha) |
Set alpha amount. More... | |
leBool | _leWidget_IsOpaque (const leWidget *_this) |
Determine is widget is opaque. More... | |
leBool | _leWidget_GetEnabled (const leWidget *_this) |
Get widget enabled flag. More... | |
leResult | _leWidget_SetEnabled (leWidget *_this, leBool enable) |
Set widget enabled flag. More... | |
leBool | _leWidget_GetVisible (const leWidget *_this) |
Get widget visible status. More... | |
leResult | _leWidget_SetVisible (leWidget *_this, leBool visible) |
Set widget visible status. More... | |
void | _leWidget_LocalRect (const leWidget *_this, leRect *res) |
Get widget rectangle. More... | |
void | _leWidget_RectToParentSpace (const leWidget *_this, leRect *res) |
Get widget rectangle. More... | |
void | _leWidget_RectToScreenSpace (const leWidget *_this, leRect *res) |
Get widget rectangle. More... | |
leResult | _leWidget_AddChild (leWidget *_this, leWidget *child) |
Add child to widget. More... | |
leResult | _leWidget_InsertChild (leWidget *_this, leWidget *child, uint32_t idx) |
Adds child to widget at index. More... | |
leResult | _leWidget_RemoveChild (leWidget *_this, leWidget *child) |
Remove child from widget. More... | |
leResult | _leWidget_RemoveChildAt (leWidget *_this, uint32_t idx) |
Remove child from widget at index. More... | |
void | _leWidget_RemoveAllChildren (leWidget *_this) |
Remove all children from widget. More... | |
void | _leWidget_setChildIndex (leWidget *_this, leWidget *child, uint32_t idx) |
Sets a child's index. More... | |
leWidget * | _leWidget_GetRootWidget (const leWidget *_this) |
Get root widget. More... | |
leResult | _leWidget_SetParent (leWidget *_this, leWidget *parent) |
Set parent widget. More... | |
uint32_t | _leWidget_GetChildCount (const leWidget *_this) |
Get child count. More... | |
leWidget * | _leWidget_GetChildAtIndex (const leWidget *_this, uint32_t idx) |
Get child at index. More... | |
uint32_t | _leWidget_GetIndexOfChild (const leWidget *_this, const leWidget *child) |
Get index of child. More... | |
leBool | _leWidget_ContainsDescendant (const leWidget *_this, const leWidget *wgt) |
Determine widget exists. More... | |
leScheme * | _leWidget_GetScheme (const leWidget *_this) |
Get widget scheme. More... | |
leResult | _leWidget_SetScheme (leWidget *_this, const leScheme *scheme) |
Set widget scheme. More... | |
leBorderType | _leWidget_GetBorderType (const leWidget *_this) |
Get widget bordertype. More... | |
leResult | _leWidget_SetBorderType (leWidget *_this, leBorderType type) |
Set widget scheme. More... | |
leBackgroundType | _leWidget_GetBackgroundType (const leWidget *_this) |
Get widget background type. More... | |
leResult | _leWidget_SetBackgroundType (leWidget *_this, leBackgroundType type) |
Set widget scheme. More... | |
leHAlignment | _leWidget_GetHAlignment (const leWidget *_this) |
Get widget horizontal alignment. More... | |
leResult | _leWidget_SetHAlignment (leWidget *_this, leHAlignment align) |
Set widget scheme. More... | |
leVAlignment | _leWidget_GetVAlignment (const leWidget *_this) |
Get widget vertical alignment. More... | |
leResult | _leWidget_SetVAlignment (leWidget *_this, leVAlignment align) |
Set widget vertical alignment. More... | |
leResult | _leWidget_GetMargins (const leWidget *_this, leMargin *mg) |
Get widget margins. More... | |
leResult | _leWidget_SetMargins (leWidget *_this, uint32_t l, uint32_t t, uint32_t r, uint32_t b) |
Set widget margins. More... | |
uint32_t | _leWidget_GetCornerRadius (const leWidget *_this) |
Get widget corner radius. More... | |
leResult | _leWidget_SetCornerRadius (leWidget *_this, uint32_t radius) |
Set widget scheme. More... | |
leBool | _leWidget_HasFocus (const leWidget *_this) |
Determines the focus status. More... | |
leResult | _leWidget_SetFocus (leWidget *_this) |
Set widget scheme. More... | |
void | _leWidget_Invalidate (const leWidget *_this) |
Invalidate widget. More... | |
void | _leWidget_InvalidateContents (const leWidget *_this) |
Invalidate widget contents. More... | |
leResult | _leWidget_InstallEventFilter (leWidget *_this, leWidgetEventFilter fltr) |
Install event filter. More... | |
leResult | _leWidget_RemoveEventFilter (leWidget *_this, leWidgetEventFilter fltr) |
Remove event filter. More... | |
void | _leWidget_Update (leWidget *_this, uint32_t dt) |
Update widget. More... | |
void | _leWidget_HandleEvent (leWidget *, leEvent *) |
void | _leWidget_ValidateChildren (leWidget *) |
void | _leWidget_IncreaseDirtyState (leWidget *, uint32_t) |
void | _leWidget_SetDirtyState (leWidget *, uint32_t) |
void | _leWidget_ClearDirtyState (leWidget *) |
void | _leWidget_InvalidateBorderAreas (const leWidget *) |
void | _leWidget_DamageArea (const leWidget *, leRect *) |
void | _leWidget_TouchDownEvent (leWidget *, leWidgetEvent_TouchDown *) |
void | _leWidget_TouchUpEvent (leWidget *, leWidgetEvent_TouchUp *) |
void | _leWidget_TouchMoveEvent (leWidget *, leWidgetEvent_TouchMove *) |
void | _leWidget_MoveEvent (leWidget *, leWidget_MoveEvent *) |
void | _leWidget_ResizeEvent (leWidget *, leWidget_ResizeEvent *) |
void | _leWidget_FocusLostEvent (leWidget *) |
void | _leWidget_FocusGainedEvent (leWidget *) |
void | _leWidget_LanguageChangeEvent (leWidget *) |
Legato widget definitions.
Defines the widget that are used in the UI library. Widgets are created and stored for later processing during a library context's update loop.
typedef enum leBackgroundType leBackgroundType |
Used to define widget background types.
Specifies the different background types used for the widgets in the library. None - No background fill. Widget must defer to its parent to erase dirty pixels. This may cause additional overhead as clean pixels may be repainted as well. Fill - a scheme color is used to fill the widget rectangle.
typedef enum leBorderType leBorderType |
Used to define widget border types.
Specifies the different background types used for the widgets in the library.
typedef struct leWidget_MoveEvent leWidget_MoveEvent |
Used to define widget move event.
Specifies the old a new position of a widget..
typedef struct leWidget_ResizeEvent leWidget_ResizeEvent |
Used to define widget resize event.
Specifies the old a new size of a widget.
typedef enum leWidgetDirtyState leWidgetDirtyState |
Used to define widget dirty state.
Specifies the different dirty states the widget can be assigned. This decides whether the particular widget would be re-drawn or not. Dirty widget are re-drawn and clean are not painted over.
typedef enum leWidgetDrawState leWidgetDrawState |
Used to define widget dirty state.
Specifies the different dirty states the widget can be assigned. This decides whether the particular widget would be re-drawn or not. Dirty widget are re-drawn and clean are not painted over.
typedef struct leWidgetEvent_TouchDown leWidgetEvent_TouchDown |
Used to define widget touch down event.
Specifies event, id and location.
typedef struct leWidgetEvent_TouchMove leWidgetEvent_TouchMove |
Used to define widget touch move event.
Specifies event, id and location.
typedef struct leWidgetEvent_TouchUp leWidgetEvent_TouchUp |
Used to define widget touch up event.
Specifies event, id and location.
typedef enum leWidgetType leWidgetType |
Used to define widget types.
Used to define widget types.
enum leBackgroundType |
Used to define widget background types.
Specifies the different background types used for the widgets in the library. None - No background fill. Widget must defer to its parent to erase dirty pixels. This may cause additional overhead as clean pixels may be repainted as well. Fill - a scheme color is used to fill the widget rectangle.
Enumerator | |
---|---|
LE_WIDGET_BACKGROUND_NONE | No background fill. |
LE_WIDGET_BACKGROUND_FILL | Uses scheme color. |
LE_WIDGET_BACKGROUND_LAST | Uses Cache. |
enum leBorderType |
Used to define widget border types.
Specifies the different background types used for the widgets in the library.
enum leWidgetDirtyState |
Used to define widget dirty state.
Specifies the different dirty states the widget can be assigned. This decides whether the particular widget would be re-drawn or not. Dirty widget are re-drawn and clean are not painted over.
enum leWidgetDrawState |
Used to define widget dirty state.
Specifies the different dirty states the widget can be assigned. This decides whether the particular widget would be re-drawn or not. Dirty widget are re-drawn and clean are not painted over.
enum leWidgetType |
Used to define widget types.
Used to define widget types.
Add child to widget.
Adds child widget to wgt.
param1 | wgt is the widget to query |
param2 | child is the widget to add |
Determine widget exists.
Returns the existence status of wgt in _this.
param1 | wgt is the widget to query |
param2 | child is the child to get index |
uint32_t _leWidget_GetAlphaAmount | ( | const leWidget * | _this | ) |
Get alpha amount.
Gets the alpha amount of wgt.
param1 | wgt is the widget to query |
leBackgroundType _leWidget_GetBackgroundType | ( | const leWidget * | _this | ) |
Get widget background type.
Returns the background type of wgt.
param1 | wgt is the widget to query |
leBorderType _leWidget_GetBorderType | ( | const leWidget * | _this | ) |
Get widget bordertype.
Returns the border type of wgt.
param1 | wgt is the widget to query |
uint32_t _leWidget_GetChildCount | ( | const leWidget * | _this | ) |
uint32_t _leWidget_GetCornerRadius | ( | const leWidget * | _this | ) |
Get widget corner radius.
Returns the corner radius of wgt.
param1 | wgt is the widget to query |
uint32_t _leWidget_GetCumulativeAlphaAmount | ( | const leWidget * | _this | ) |
Get cumulative alpha amount.
Gets the cumulative alpha amount of wgt.
param1 | wgt is the widget to query |
Get cumulative alpha enable status.
Gets the cumulative alpha enable status of wgt.
param1 | wgt is the widget to modify |
Get widget enabled flag.
Gets the enabled status of wgt.
param1 | wgt is the widget to query |
leHAlignment _leWidget_GetHAlignment | ( | const leWidget * | _this | ) |
Get widget horizontal alignment.
Returns the horizontal alignment of wgt.
param1 | wgt is the widget to query |
uint32_t _leWidget_GetHeight | ( | const leWidget * | _this | ) |
Get widget height.
Gets the height of wgt.
param1 | wgt is the widget to modify |
Get index of child.
Returns the index of child in wgt.
param1 | wgt is the widget to query |
param2 | child is the child to get index |
leWidgetType _leWidget_GetType | ( | const leWidget * | _this | ) |
Get widget type.
Returns the widget type from wgt.
param1 | wgt is the widget to query |
leVAlignment _leWidget_GetVAlignment | ( | const leWidget * | _this | ) |
Get widget vertical alignment.
Returns the horizontal alignment of wgt.
param1 | wgt is the widget to query |
Get widget visible status.
Gets the visible status of wgt.
param1 | wgt is the widget to query |
uint32_t _leWidget_GetWidth | ( | const leWidget * | _this | ) |
Get widget width.
Gets the width of wgt.
param1 | wgt is the widget to modify |
int32_t _leWidget_GetX | ( | const leWidget * | _this | ) |
Get widget x position.
Returns the widget x position from wgt.
param1 | wgt is the widget to query |
int32_t _leWidget_GetY | ( | const leWidget * | _this | ) |
Get widget y position.
Returns the y position from wgt.
param1 | wgt is the widget to query |
Determines the focus status.
Returns the focus status of wgt.
param1 | wgt is the widget to modify |
Adds child to widget at index.
Adds child widget to wgt at the given index.
param1 | wgt is the widget to modify |
param2 | child is the widget to add |
param3 | idx is the index to insert at |
leResult _leWidget_InstallEventFilter | ( | leWidget * | _this, |
leWidgetEventFilter | fltr | ||
) |
Install event filter.
Sets the event filter of wgt to fltr.
param1 | wgt is the widget to modify |
param2 | fltr is the filter to install |
void _leWidget_Invalidate | ( | const leWidget * | _this | ) |
Invalidate widget.
Invalidate wgt. The invalidation will cause the widget to be redrawn.
param1 | wgt is the widget to invalidate |
void _leWidget_InvalidateContents | ( | const leWidget * | _this | ) |
Invalidate widget contents.
Invalidate contents of wgt contents.
param1 | wgt is the widget to invalidate |
Determine is widget is opaque.
Returns the opaque status of wgt.
param1 | wgt is the widget to query |
void _leWidget_RemoveAllChildren | ( | leWidget * | _this | ) |
Remove all children from widget.
Removes all children from wgt.
param1 | wgt is the widget to query |
Remove child from widget.
Remove child widget from wgt.
param1 | wgt is the widget to query |
param2 | child is the widget to remove |
Remove child from widget at index.
Remove child widget from wgt.
param1 | wgt is the widget to query |
param2 | idx is the index of the child to remove |
leResult _leWidget_RemoveEventFilter | ( | leWidget * | _this, |
leWidgetEventFilter | fltr | ||
) |
Remove event filter.
Removes the event filter fltr from wgt.
param1 | wgt is the widget to modify |
param2 | fltr is the filter to install |
Resize widget.
Resizes the size of wgt to width and height.
param1 | wgt is the widget to modify |
param2 | width is the new width of widget |
param3 | height is the new height of widget |
Set alpha amount.
Sets the alpha amount of wgt.
param1 | wgt is the widget to query |
Set cumulative alpha enable status.
Sets the cumulative alpha enable status of wgt.
param1 | wgt is the widget to modify |
leResult _leWidget_SetBackgroundType | ( | leWidget * | _this, |
leBackgroundType | type | ||
) |
Set widget scheme.
Sets the scheme of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the scheme to set |
leResult _leWidget_SetBorderType | ( | leWidget * | _this, |
leBorderType | type | ||
) |
Set widget scheme.
Sets the scheme of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the scheme to set |
Sets a child's index.
Set's a child's index.
param1 | wgt is the parent widget |
param2 | child is the widget to move |
param3 | idx is child's new position |
Set widget scheme.
Sets the scheme of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the scheme to set |
Set widget enabled flag.
Sets the enabled status of wgt to the value of enable.
param1 | wgt is the widget to query |
Set widget scheme.
Sets the scheme of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the scheme to set |
leResult _leWidget_SetHAlignment | ( | leWidget * | _this, |
leHAlignment | align | ||
) |
Set widget scheme.
Sets the scheme of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the scheme to set |
Set widget height.
Sets the widget height of wgt to width.
param1 | wgt is the widget to modify |
param2 | height is the new height of widget |
Set widget margins.
Sets the margins for wgt to the specified values left top right bottom.
param1 | wgt is the widget to modify |
Set parent widget.
Sets the parent widget of wgt to parent.
param1 | wgt is the widget to modify |
param2 | parent is the new parent widget |
Set widget x and y position.
Sets the x and y position of wgt to x and y.
param1 | wgt is the widget to modify |
param1 | x is the new x position |
param1 | y is the new y position |
Set widget scheme.
Sets the scheme of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the scheme to set |
Set widget height.
Sets the widget height of wgt to width.
param1 | wgt is the widget to modify |
param2 | height is the new height of widget |
leResult _leWidget_SetVAlignment | ( | leWidget * | _this, |
leVAlignment | align | ||
) |
Set widget vertical alignment.
Sets the vertical alignment of wgt to scheme.
param1 | wgt is the widget to modify |
param1 | scheme is the alignment to set |
Set widget visible status.
Sets the visible status of wgt to the value of visible.
param1 | wgt is the widget to query |
param1 | visible is the new flag status |
Set the widget width.
Sets the width of wgt to width.
param1 | wgt is the widget to modify |
param2 | width is the new width of widget |
Translate widget x and y position.
Translates the x and y position of wgt to x and y.
param1 | wgt is the widget to modify |
param1 | x is the new x position |
param1 | y is the new y position |
void _leWidget_Update | ( | leWidget * | _this, |
uint32_t | dt | ||
) |
Update widget.
Updates wgt. This is automatically called from the task machine.
param1 | wgt is the widget to modify |
param2 | dt is |
void leWidget_Constructor | ( | leWidget * | wgt | ) |
Initialize widget.
Initializes wgt.
wgt | is the widget to initialize |
void leWidget_Delete | ( | leWidget * | wgt | ) |
Delete widget.
Deletes wgt.
param1 | wgt is the widget to delete |
leWidget* leWidget_New | ( | void | ) |
Create widget.
Creates a new widget and allocates memory for the widget through the current active context. Application is responsible for managing the widget pointer until the widget is added to a widget tree.