MPLABĀ® Harmony Graphics Suite
legato_widget_imagesequence.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
3 *
4 * Subject to your compliance with these terms, you may use Microchip software
5 * and any derivatives exclusively with Microchip products. It is your
6 * responsibility to comply with third party license terms applicable to your
7 * use of third party software (including open source software) that may
8 * accompany Microchip software.
9 *
10 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 * PARTICULAR PURPOSE.
14 *
15 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 *******************************************************************************/
23 
24 /*******************************************************************************
25  Module for Microchip Graphics Library - Legato User Interface Library
26 
27  Company:
28  Microchip Technology Inc.
29 
30  File Name:
31  legato_widget_imagesequence.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements image sequence (slide show) widget drawing functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_IMAGESEQUENCE_H
47 #define LEGATO_IMAGESEQUENCE_H
48 
50 
51 #if LE_IMAGESEQUENCE_WIDGET_ENABLED
52 
56 
57 /* internal use only */
62 #define LE_IMAGESEQ_RESTART -1
63 
68 typedef struct leImageSequenceWidget leImageSequenceWidget;
69 
70 // *****************************************************************************
71 /* Function Pointer:
72  leImageSequenceImageChangedEvent_FnPtr
73 
74  Summary:
75  Image changed event function callback type
76 */
82 typedef void (*leImageSequenceImageChangedEvent_FnPtr)(leImageSequenceWidget*);
83 
84 // *****************************************************************************
85 // *****************************************************************************
86 // Section: Data Types and Constants
87 // *****************************************************************************
88 // *****************************************************************************
89 
90 // *****************************************************************************
91 /* Enumeration:
92  leImageSequenceEntry
93 
94  Summary:
95  Image sequence entry definition
96 
97  Description:
98  Defines a single entry for the image sequence widget
99 
100  Remarks:
101  None.
102 */
107 typedef struct leImageSequenceEntry
108 {
109  const leImage* image; // image asset pointer
110 
111  uint32_t delay; // how many time units to display this entry
112 
113  leHAlignment halign; // the horizontal alignment for this entry
114  leVAlignment valign; // the vertical alignment for this entry
115 } leImageSequenceEntry;
116 
117 /* internal use only */
122 #define LE_IMAGESEQUENCEWIDGET_VTABLE(THIS_TYPE) \
123  LE_WIDGET_VTABLE(THIS_TYPE) \
124  \
125  uint32_t (*getImageCount)(const THIS_TYPE* _this); \
126  leResult (*setImageCount)(THIS_TYPE* _this, uint32_t cnt); \
127  leImage* (*getImage)(const THIS_TYPE* _this, uint32_t idx); \
128  leResult (*setImage)(THIS_TYPE* _this, uint32_t idx, const leImage* img); \
129  uint32_t (*getImageDelay)(const THIS_TYPE* _this, uint32_t idx); \
130  leResult (*setImageDelay)(THIS_TYPE* _this, uint32_t idx, uint32_t dly); \
131  leHAlignment (*getImageHAlignment)(const THIS_TYPE* _this, uint32_t idx); \
132  leResult (*setImageHAlignment)(THIS_TYPE* _this, uint32_t idx, leHAlignment align); \
133  leVAlignment (*getImageVAlignment)(const THIS_TYPE* _this, uint32_t idx); \
134  leResult (*setImageVAlignment)(THIS_TYPE* _this, uint32_t idx, leVAlignment align); \
135  leResult (*stop)(THIS_TYPE* _this); \
136  leResult (*play)(THIS_TYPE* _this); \
137  leResult (*rewind)(THIS_TYPE* _this); \
138  leBool (*isPlaying)(const THIS_TYPE* _this); \
139  leBool (*getRepeat)(const THIS_TYPE* _this); \
140  leResult (*setRepeat)(THIS_TYPE* _this, leBool rpt); \
141  leResult (*showImage)(THIS_TYPE* _this, uint32_t idx); \
142  leResult (*showNextImage)(THIS_TYPE* _this); \
143  leResult (*showPreviousImage)(THIS_TYPE* _this); \
144  leImageSequenceImageChangedEvent_FnPtr (*getImageChangedEventCallback)(const THIS_TYPE* _this); \
145  leResult (*setImageChangedEventCallback)(THIS_TYPE* _this, leImageSequenceImageChangedEvent_FnPtr cb); \
146 
147 typedef struct leImageSequenceWidgetVTable
148 {
149  LE_IMAGESEQUENCEWIDGET_VTABLE(leImageSequenceWidget)
150 } leImageSequenceWidgetVTable;
151 
157 // *****************************************************************************
166 typedef struct leImageSequenceWidget
167 {
168  leWidget widget; // widget base class
169 
170  const leImageSequenceWidgetVTable* fn;
171 
172  uint32_t count; // number of image entries for this widget
173  leImageSequenceEntry* images; // image entry array
174 
175  int32_t activeIdx; // currently displayed entry
176 
177  leBool playing; // indicates that the widget is automatically cycling
178  uint32_t time; // current cycle time
179 
180  leBool repeat; // indicates that the sequence should repeat when it
181  // reaches the end of the sequence
182 
183  leImageSequenceImageChangedEvent_FnPtr cb; // callback when the image changes
184 } leImageSequenceWidget;
185 
186 // *****************************************************************************
187 // *****************************************************************************
188 // Section: Routines
189 // *****************************************************************************
190 // *****************************************************************************
191 
203 LIB_EXPORT leImageSequenceWidget* leImageSequenceWidget_New();
204 
215 LIB_EXPORT void leImageSequenceWidget_Constructor(leImageSequenceWidget* wgt);
216 
217 #ifdef _DOXYGEN_
218 #define THIS_TYPE struct leWidget
219 
220 // *****************************************************************************
221 /* Virtual Member Function:
222  uint32_t getImageCount(const leImageSequenceWidget* _this)
223 
224  Summary:
225  Gets the image count
226 
227  Description:
228  Gets the image count
229 
230  Parameters:
231  const leImageSequenceWidget* _this - The image sequence widget to operate on
232 
233  Remarks:
234  Usage - _this->fn->getImageCount(_this);
235 
236  Returns:
237  uint32_t - the image count
238 */
249 virtual uint32_t getImageCount(const leImageSequenceWidget* _this);
250 
251 
252 // *****************************************************************************
253 /* Virtual Member Function:
254  leResult setImageCount(leImageSequenceWidget* _this,
255  uint32_t cnt)
256 
257  Summary:
258  Sets the image count
259 
260  Description:
261  Sets the image count
262 
263  Parameters:
264  leImageSequenceWidget* _this - The image sequence widget to operate on
265  uint32_t cnt - the image count
266 
267  Remarks:
268  Usage - _this->fn->setImageCount(_this, cnt);
269 
270  Returns:
271  leResult - the result of the operation
272 */
286 virtual leResult setImageCount(leImageSequenceWidget* _this,
287  uint32_t cnt);
288 
289 // *****************************************************************************
290 /* Virtual Member Function:
291  leImage* getImage(const leImageSequenceWidget* _this,
292  uint32_t idx)
293 
294  Summary:
295  Gets the image pointer
296 
297  Description:
298  Gets the image pointer
299 
300  Parameters:
301  const leImageSequenceWidget* _this - The image sequence widget to operate on
302  uint32_t idx - the index
303 
304  Remarks:
305  Usage - _this->fn->getImage(_this, idx);
306 
307  Returns:
308  leImage* - the image pointer
309 */
320 virtual leImage* getImage(const leImageSequenceWidget* _this,
321  uint32_t idx);
322 
323 // *****************************************************************************
324 /* Virtual Member Function:
325  leResult setImage(leImageSequenceWidget* _this,
326  uint32_t idx,
327  const leImage* img)
328 
329  Summary:
330  Sets the image pointer
331 
332  Description:
333  Sets the image pointer
334 
335  Parameters:
336  leImageSequenceWidget* _this - The image sequence widget to operate on
337  uint32_t idx - the index
338  const leImage* img - the image pointer
339 
340  Remarks:
341  Usage - _this->fn->setImage(_this, idx, img);
342 
343  Returns:
344  leResult - the result of the operation
345 */
361 virtual leResult setImage(leImageSequenceWidget* _this,
362  uint32_t idx,
363  const leImage* img);
364 
365 
366 // *****************************************************************************
367 /* Virtual Member Function:
368  uint32_t getImageDelay(const leImageSequenceWidget* _this,
369  uint32_t idx)
370 
371  Summary:
372  Gets the image cycle delay
373 
374  Description:
375  Gets the image cycle delay
376 
377  Parameters:
378  const leImageSequenceWidget* _this - The image sequence widget to operate on
379  uint32_t idx - the index
380 
381  Remarks:
382  Usage - _this->fn->getImageDelay(_this, idx);
383 
384  Returns:
385  uint32_t - the image delay
386 */
397 virtual uint32_t getImageDelay(const leImageSequenceWidget* _this,
398  uint32_t idx);
399 
400 // *****************************************************************************
401 /* Virtual Member Function:
402  leResult setImageDelay(leImageSequenceWidget* _this,
403  uint32_t idx,
404  uint32_t dly)
405 
406  Summary:
407  Sets the image cycle delay
408 
409  Description:
410  Sets the image cycle delay
411 
412  Parameters:
413  leImageSequenceWidget* _this - The image sequence widget to operate on
414  uint32_t idx - the index
415  uint32_t dly - the image delay
416 
417  Remarks:
418  Usage - _this->fn->setImageDelay(_this, idx, dly);
419 
420  Returns:
421  leResult - the result of the operation
422 */
439 virtual leResult setImageDelay(leImageSequenceWidget* _this,
440  uint32_t idx,
441  uint32_t dly);
442 
443 
444 // *****************************************************************************
445 /* Virtual Member Function:
446  leHAlignment getImageHAlignment(const leImageSequenceWidget* _this,
447  uint32_t idx)
448 
449  Summary:
450  Gets the image horizontal alignment
451 
452  Description:
453  Gets the image horizontal alignment
454 
455  Parameters:
456  const leImageSequenceWidget* _this - The image sequence widget to operate on
457  uint32_t idx - the index
458 
459  Remarks:
460  Usage - _this->fn->getImageHAlignment(_this, idx);
461 
462  Returns:
463  leHAlignment - the alignment
464 */
477 virtual leHAlignment getImageHAlignment(const leImageSequenceWidget* _this,
478  uint32_t idx);
479 
480 // *****************************************************************************
481 /* Virtual Member Function:
482  leResult setImageHAlignment(leImageSequenceWidget* _this,
483  uint32_t idx,
484  leHAlignment align)
485 
486  Summary:
487  Sets the image horizontal alignment
488 
489  Description:
490  Sets the image horizontal alignment
491 
492  Parameters:
493  leImageSequenceWidget* _this - The image sequence widget to operate on
494  uint32_t idx - the index
495  leHAlignment align - the alignment
496 
497  Remarks:
498  Usage - _this->fn->setImageHAlignment(_this, idx, align);
499 
500  Returns:
501  leResult - the result of the operation
502 */
519 virtual leResult setImageHAlignment(leImageSequenceWidget* _this,
520  uint32_t idx,
521  leHAlignment align);
522 
523 // *****************************************************************************
524 /* Virtual Member Function:
525  leVAlignment getImageVAlignment(const leImageSequenceWidget* _this,
526  uint32_t idx)
527 
528  Summary:
529  Gets the image vertical alignment
530 
531  Description:
532  Gets the image vertical alignment
533 
534  Parameters:
535  const leImageSequenceWidget* _this - The image sequence widget to operate on
536  uint32_t idx - the index
537 
538  Remarks:
539  Usage - _this->fn->getImageVAlignment(_this, idx);
540 
541  Returns:
542  leVAlignment - the alignment
543 */
556 virtual leVAlignment getImageVAlignment(const leImageSequenceWidget* _this,
557  uint32_t idx);
558 
559 // *****************************************************************************
560 /* Virtual Member Function:
561  leResult setImageVAlignment(leImageSequenceWidget* _this,
562  uint32_t idx,
563  leVAlignment align)
564 
565  Summary:
566  Sets the image vertical alignment
567 
568  Description:
569  Sets the image vertical alignment
570 
571  Parameters:
572  leImageSequenceWidget* _this - The image sequence widget to operate on
573  uint32_t idx - the index
574  leVAlignment align - the alignment
575 
576  Remarks:
577  Usage - _this->fn->setImageVAlignment(_this, idx, align);
578 
579  Returns:
580  leResult - the result of the operation
581 */
598 virtual leResult setImageVAlignment(leImageSequenceWidget* _this,
599  uint32_t idx,
600  leVAlignment align);
601 
602 // *****************************************************************************
603 /* Virtual Member Function:
604  leResult stop(leImageSequenceWidget* _this)
605 
606  Summary:
607  Stops the sequence from automatically cycling
608 
609  Description:
610  Stops the sequence from automatically cycling
611 
612  Parameters:
613  leImageSequenceWidget* _this - The image sequence widget to operate on
614 
615  Remarks:
616  Usage - _this->fn->stop(_this);
617 
618  Returns:
619  leResult - the result of the operation
620 */
632 virtual leResult stop(leImageSequenceWidget* _this);
633 
634 // *****************************************************************************
635 /* Virtual Member Function:
636  leResult play(leImageSequenceWidget* _this)
637 
638  Summary:
639  Starts the sequence automatic cycle
640 
641  Description:
642  Starts the sequence automatic cycle
643 
644  Parameters:
645  leImageSequenceWidget* _this - The image sequence widget to operate on
646 
647  Remarks:
648  Usage - _this->fn->play(_this);
649 
650  Returns:
651  leResult - the result of the operation
652 */
664 leResult play(leImageSequenceWidget* _this);
665 
666 // *****************************************************************************
667 /* Virtual Member Function:
668  leResult rewind(leImageSequenceWidget* _this)
669 
670  Summary:
671  Returns the sequence to the first image
672 
673  Description:
674  Returns the sequence to the first image
675 
676  Parameters:
677  leImageSequenceWidget* _this - The image sequence widget to operate on
678 
679  Remarks:
680  Usage - _this->fn->rewind(_this);
681 
682  Returns:
683  leResult - the result of the operation
684 */
696 leResult play(leImageSequenceWidget* _this);
697 
698 
699 // *****************************************************************************
700 /* Virtual Member Function:
701  leBool isPlaying(const leImageSequenceWidget* _this)
702 
703  Summary:
704  Indicates of the sequence is automatically cycling
705 
706  Description:
707  Indicates of the sequence is automatically cycling
708 
709  Parameters:
710  const leImageSequenceWidget* _this - The image sequence widget to operate on
711 
712  Remarks:
713  Usage - _this->fn->isPlaying(_this);
714 
715  Returns:
716  leBool - the setting value
717 */
728 virtual leBool isPlaying(const leImageSequenceWidget* _this);
729 
730 // *****************************************************************************
731 /* Virtual Member Function:
732  leBool getRepeat(const leImageSequenceWidget* _this)
733 
734  Summary:
735  Indicates if the sequence will repeat the cycle
736 
737  Description:
738  Indicates if the sequence will repeat the cycle
739 
740  Parameters:
741  const leImageSequenceWidget* _this - The image sequence widget to operate on
742 
743  Remarks:
744  Usage - _this->fn->getRepeat(_this);
745 
746  Returns:
747  leBool - the setting value
748 */
759 virtual leBool getRepeat(const leImageSequenceWidget* _this);
760 
761 // *****************************************************************************
762 /* Virtual Member Function:
763  leResult setRepeat(leImageSequenceWidget* _this,
764  leBool rpt)
765 
766  Summary:
767  Sets the repeat flag
768 
769  Description:
770  Sets the repeat flag
771 
772  Parameters:
773  leImageSequenceWidget* _this - The image sequence widget to operate on
774  leBool rpt - the setting value
775 
776  Remarks:
777  Usage - _this->fn->setRepeat(_this, rpt);
778 
779  Returns:
780  leResult - the result of the operation
781 */
794 virtual leResult setRepeat(leImageSequenceWidget* _this,
795  leBool rpt);
796 
797 // *****************************************************************************
798 /* Virtual Member Function:
799  leResult showImage(leImageSequenceWidget* _this,
800  uint32_t idx)
801 
802  Summary:
803  Sets the current visible image index
804 
805  Description:
806  Sets the current visible image index
807 
808  Parameters:
809  leImageSequenceWidget* _this - The image sequence widget to operate on
810  uint32_t idx - the index
811 
812  Remarks:
813  Usage - _this->fn->showImage(_this, idx);
814 
815  Returns:
816  leResult - the result of the operation
817 */
830 virtual leResult showImage(leImageSequenceWidget* _this,
831  uint32_t idx);
832 
833 
834 // *****************************************************************************
835 /* Virtual Member Function:
836  leResult showNextImage(leImageSequenceWidget* _this)
837 
838  Summary:
839  Advance to the next image
840 
841  Description:
842  Advance to the next image
843 
844  Parameters:
845  leImageSequenceWidget* _this - The image sequence widget to operate on
846 
847  Remarks:
848  Usage - _this->fn->showNextImage(_this);
849 
850  Returns:
851  leResult - the result of the operation
852 */
863 virtual leResult showNextImage(leImageSequenceWidget* _this);
864 
865 // *****************************************************************************
866 /* Virtual Member Function:
867  leResult showPreviousImage(leImageSequenceWidget* _this)
868 
869  Summary:
870  Return to the previous image
871 
872  Description:
873  Return to the previous image
874 
875  Parameters:
876  leImageSequenceWidget* _this - The image sequence widget to operate on
877 
878  Remarks:
879  Usage - _this->fn->showPreviousImage(_this);
880 
881  Returns:
882  leResult - the result of the operation
883 */
894 virtual leResult showPreviousImage(leImageSequenceWidget* _this);
895 
906 virtual leImageSequenceImageChangedEvent_FnPtr getImageChangedEventCallback(const leImageSequenceWidget* _this);
907 
921 virtual leResult setImageChangedEventCallback(leImageSequenceWidget* _this,
922  leImageSequenceImageChangedEvent_FnPtr cb);
923 
924 #undef THIS_TYPE
925 #endif
926 
927 #endif // LE_IMAGESEQUENCE_WIDGET_ENABLED
928 #endif /* LEGATO_IMAGESEQUENCE_H */
_leWidget_SetAlphaAmount
leResult _leWidget_SetAlphaAmount(leWidget *_this, uint32_t alpha)
Set alpha amount.
Definition: legato_widget.c:570
legato_math.h
Defines common math functions for general use.
legato_error.h
Error functions, macros and definitions.
_leWidget_GetType
leWidgetType _leWidget_GetType(const leWidget *_this)
Get widget type.
Definition: legato_widget.c:176
_leWidget_GetScheme
leScheme * _leWidget_GetScheme(const leWidget *_this)
Get widget scheme.
Definition: legato_widget.c:938
leResult
leResult
This enum represents function call results.
Definition: legato_common.h:134
lePercentWholeRounded
LIB_EXPORT uint32_t lePercentWholeRounded(uint32_t l, uint32_t r)
Calculate percent whole rounded.
Definition: legato_math.c:204
_leWidget_RectToScreenSpace
leRect _leWidget_RectToScreenSpace(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:701
leRect
This struct represents a rectangle.
Definition: legato_common.h:405
_leWidget_IsOpaque
leBool _leWidget_IsOpaque(const leWidget *_this)
Determine is widget is opaque.
Definition: legato_widget.c:594
_leWidget_SetBorderType
leResult _leWidget_SetBorderType(leWidget *_this, leBorderType type)
Set widget scheme.
Definition: legato_widget.c:967
_leWidget_RemoveAllChildren
void _leWidget_RemoveAllChildren(leWidget *_this)
Remove all children from widget.
Definition: legato_widget.c:823
_leWidget_SetParent
leResult _leWidget_SetParent(leWidget *_this, leWidget *parent)
Set parent widget.
Definition: legato_widget.c:862
legato_image.h
Image functions and defintions.
_leWidget_InvalidateContents
void _leWidget_InvalidateContents(const leWidget *_this)
Invalidate widget contents.
Definition: legato_widget.c:1210
_leWidget_SetCornerRadius
leResult _leWidget_SetCornerRadius(leWidget *_this, uint32_t radius)
Set widget scheme.
Definition: legato_widget.c:1091
_leWidget_InstallEventFilter
leResult _leWidget_InstallEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Install event filter.
Definition: legato_widget.c:1215
_leWidget_SetX
leResult _leWidget_SetX(leWidget *_this, int32_t x)
Set widget x position.
Definition: legato_widget.c:190
_leWidget_SetSize
leResult _leWidget_SetSize(leWidget *_this, uint32_t width, uint32_t height)
Set widget height.
Definition: legato_widget.c:381
_leWidget_HasFocus
leBool _leWidget_HasFocus(const leWidget *_this)
Determines the focus status.
Definition: legato_widget.c:1110
legato_memory.h
Memory functions and definitions.
_leWidget_Resize
leResult _leWidget_Resize(leWidget *_this, int32_t width, int32_t height)
Resize widget.
Definition: legato_widget.c:426
_leWidget_SetAlphaEnabled
leResult _leWidget_SetAlphaEnabled(leWidget *_this, leBool enable)
Set cumulative alpha enable status.
Definition: legato_widget.c:501
lePercentOf
LIB_EXPORT uint32_t lePercentOf(uint32_t num, uint32_t percent)
Calculate percent of a number.
Definition: legato_math.c:218
leHAlignment
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:206
_leWidget_ContainsDescendant
leBool _leWidget_ContainsDescendant(const leWidget *_this, const leWidget *wgt)
Determine widget exists.
Definition: legato_widget.c:910
_leWidget_SetBackgroundType
leResult _leWidget_SetBackgroundType(leWidget *_this, leBackgroundType type)
Set widget scheme.
Definition: legato_widget.c:989
_leWidget_GetWidth
uint32_t _leWidget_GetWidth(const leWidget *_this)
Get widget width.
Definition: legato_widget.c:317
leImage
Definition: legato_image.h:180
LE_VALIGN_MIDDLE
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
_leWidget_GetCumulativeAlphaEnabled
leBool _leWidget_GetCumulativeAlphaEnabled(const leWidget *_this)
Get cumulative alpha enable status.
Definition: legato_widget.c:484
_leWidget_RectToParentSpace
leRect _leWidget_RectToParentSpace(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:684
_leWidget_Translate
leResult _leWidget_Translate(leWidget *_this, int32_t x, int32_t y)
Translate widget x and y position.
Definition: legato_widget.c:282
legato_renderer.h
_leWidget_SetHeight
leResult _leWidget_SetHeight(leWidget *_this, uint32_t height)
Set widget height.
Definition: legato_widget.c:356
_leWidget_SetWidth
leResult _leWidget_SetWidth(leWidget *_this, uint32_t width)
Set the widget width.
Definition: legato_widget.c:324
LE_WIDGET_BACKGROUND_FILL
@ LE_WIDGET_BACKGROUND_FILL
Definition: legato_widget.h:226
_leWidget_SetVisible
leResult _leWidget_SetVisible(leWidget *_this, leBool visible)
Set widget visible status.
Definition: legato_widget.c:649
_leWidget_GetRootWidget
leWidget * _leWidget_GetRootWidget(const leWidget *_this)
Get root widget.
Definition: legato_widget.c:843
LE_HALIGN_CENTER
@ LE_HALIGN_CENTER
Definition: legato_common.h:208
legato_widget.h
Legato widget definitions.
_leWidget_GetHAlignment
leHAlignment _leWidget_GetHAlignment(const leWidget *_this)
Get widget horizontal alignment.
Definition: legato_widget.c:1003
legato_widget_imagesequence.h
Imagesequence widget functions and definitions.
_leWidget_GetHeight
uint32_t _leWidget_GetHeight(const leWidget *_this)
Get widget height.
Definition: legato_widget.c:349
_leWidget_LocalRect
leRect _leWidget_LocalRect(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:670
leBool
leBool
This enum represents booleans.
Definition: legato_common.h:157
_leWidget_GetBackgroundType
leBackgroundType _leWidget_GetBackgroundType(const leWidget *_this)
Get widget background type.
Definition: legato_widget.c:982
_leWidget_SetScheme
leResult _leWidget_SetScheme(leWidget *_this, const leScheme *scheme)
Set widget scheme.
Definition: legato_widget.c:945
_leWidget_SetHAlignment
leResult _leWidget_SetHAlignment(leWidget *_this, leHAlignment align)
Set widget scheme.
Definition: legato_widget.c:1010
_leWidget_GetEnabled
leBool _leWidget_GetEnabled(const leWidget *_this)
Get widget enabled flag.
Definition: legato_widget.c:615
_leWidget_SetFocus
leResult _leWidget_SetFocus(leWidget *_this)
Set widget scheme.
Definition: legato_widget.c:1117
LE_FALSE
@ LE_FALSE
Definition: legato_common.h:158
_leWidget_GetAlphaEnabled
leBool _leWidget_GetAlphaEnabled(const leWidget *_this)
Get alpha enable status.
Definition: legato_widget.c:473
_leWidget_GetChildAtIndex
leWidget * _leWidget_GetChildAtIndex(const leWidget *_this, uint32_t idx)
Get child at index.
Definition: legato_widget.c:888
_leWidget_GetCumulativeAlphaAmount
uint32_t _leWidget_GetCumulativeAlphaAmount(const leWidget *_this)
Get cumulative alpha amount.
Definition: legato_widget.c:538
_leWidget_SetY
leResult _leWidget_SetY(leWidget *_this, int32_t y)
Set widget y position.
Definition: legato_widget.c:222
_leWidget_GetBorderType
leBorderType _leWidget_GetBorderType(const leWidget *_this)
Get widget bordertype.
Definition: legato_widget.c:960
_leWidget_SetMargins
leResult _leWidget_SetMargins(leWidget *_this, uint32_t l, uint32_t t, uint32_t r, uint32_t b)
Set widget margins.
Definition: legato_widget.c:1058
legato_utils.h
General internal utilities for the library.
_leWidget_GetVAlignment
leVAlignment _leWidget_GetVAlignment(const leWidget *_this)
Get widget vertical alignment.
Definition: legato_widget.c:1027
legato_string.h
Fixed string functions and definitions.
LE_WIDGET_BACKGROUND_NONE
@ LE_WIDGET_BACKGROUND_NONE
Definition: legato_widget.h:225
leWidget
Used to define a widget.
Definition: legato_widget.h:623
leUtils_RectToScreenSpace
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
_leWidget_GetX
int32_t _leWidget_GetX(const leWidget *_this)
Get widget x position.
Definition: legato_widget.c:183
leRectClip
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_SetVAlignment
leResult _leWidget_SetVAlignment(leWidget *_this, leVAlignment align)
Set widget vertical alignment.
Definition: legato_widget.c:1034
_leWidget_GetVisible
leBool _leWidget_GetVisible(const leWidget *_this)
Get widget visible status.
Definition: legato_widget.c:642
_leWidget_AddChild
leResult _leWidget_AddChild(leWidget *_this, leWidget *child)
Add child to widget.
Definition: legato_widget.c:734
leImage_ResizeDraw
LIB_EXPORT leResult leImage_ResizeDraw(const leImage *src, const leRect *sourceRect, leImageFilterMode mode, uint32_t sizeX, uint32_t sizeY, int32_t x, int32_t y, uint32_t a)
Resize draw image.
Definition: legato_image.c:211
_leWidget_GetIndexOfChild
uint32_t _leWidget_GetIndexOfChild(const leWidget *_this, const leWidget *child)
Get index of child.
Definition: legato_widget.c:899
_leWidget_GetChildCount
uint32_t _leWidget_GetChildCount(const leWidget *_this)
Get child count.
Definition: legato_widget.c:881
_leWidget_GetMargins
leMargin _leWidget_GetMargins(const leWidget *_this)
Get widget margins.
Definition: legato_widget.c:1051
leWidget_Constructor
LIB_EXPORT void leWidget_Constructor(leWidget *wgt)
Initialize widget.
Definition: legato_widget.c:67
LE_TRUE
@ LE_TRUE
Definition: legato_common.h:159
_leWidget_GetAlphaAmount
uint32_t _leWidget_GetAlphaAmount(const leWidget *_this)
Get alpha amount.
Definition: legato_widget.c:527
_leWidget_GetCornerRadius
uint32_t _leWidget_GetCornerRadius(const leWidget *_this)
Get widget corner radius.
Definition: legato_widget.c:1084
legato_common.h
Common macros and definitions used by Legato.
_leWidget_RemoveEventFilter
leResult _leWidget_RemoveEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Remove event filter.
Definition: legato_widget.c:1238
_leWidget_RemoveChild
leResult _leWidget_RemoveChild(leWidget *_this, leWidget *child)
Remove child from widget.
Definition: legato_widget.c:785
destructor
virtual void destructor(leString *_this)
Destruct string.
_leWidget_SetEnabled
leResult _leWidget_SetEnabled(leWidget *_this, leBool enable)
Set widget enabled flag.
Definition: legato_widget.c:620
_leWidget_SetPosition
leResult _leWidget_SetPosition(leWidget *_this, int32_t x, int32_t y)
Set widget x and y position.
Definition: legato_widget.c:247
leVAlignment
leVAlignment
This enum represents the vertical alignment mode of objects.
Definition: legato_common.h:181
_leWidget_Invalidate
void _leWidget_Invalidate(const leWidget *_this)
Invalidate widget.
Definition: legato_widget.c:1142
_leWidget_GetY
int32_t _leWidget_GetY(const leWidget *_this)
Get widget y position.
Definition: legato_widget.c:215