46 #ifndef LEGATO_IMAGESEQUENCE_H 47 #define LEGATO_IMAGESEQUENCE_H 51 #if LE_IMAGESEQUENCE_WIDGET_ENABLED 66 #define LE_IMAGESEQ_RESTART -1 72 typedef struct leImageSequenceWidget leImageSequenceWidget;
86 typedef void (*leImageSequenceImageChangedEvent_FnPtr)(leImageSequenceWidget*);
111 typedef struct leImageSequenceEntry
119 } leImageSequenceEntry;
126 #define LE_IMAGESEQUENCEWIDGET_VTABLE(THIS_TYPE) \ 127 LE_WIDGET_VTABLE(THIS_TYPE) \ 129 uint32_t (*getImageCount)(const THIS_TYPE* _this); \ 130 leResult (*setImageCount)(THIS_TYPE* _this, uint32_t cnt); \ 131 leImage* (*getImage)(const THIS_TYPE* _this, uint32_t idx); \ 132 leResult (*setImage)(THIS_TYPE* _this, uint32_t idx, const leImage* img); \ 133 uint32_t (*getImageDelay)(const THIS_TYPE* _this, uint32_t idx); \ 134 leResult (*setImageDelay)(THIS_TYPE* _this, uint32_t idx, uint32_t dly); \ 135 leHAlignment (*getImageHAlignment)(const THIS_TYPE* _this, uint32_t idx); \ 136 leResult (*setImageHAlignment)(THIS_TYPE* _this, uint32_t idx, leHAlignment align); \ 137 leVAlignment (*getImageVAlignment)(const THIS_TYPE* _this, uint32_t idx); \ 138 leResult (*setImageVAlignment)(THIS_TYPE* _this, uint32_t idx, leVAlignment align); \ 139 leResult (*stop)(THIS_TYPE* _this); \ 140 leResult (*play)(THIS_TYPE* _this); \ 141 leResult (*rewind)(THIS_TYPE* _this); \ 142 leBool (*isPlaying)(const THIS_TYPE* _this); \ 143 leBool (*getRepeat)(const THIS_TYPE* _this); \ 144 leResult (*setRepeat)(THIS_TYPE* _this, leBool rpt); \ 145 leResult (*showImage)(THIS_TYPE* _this, uint32_t idx); \ 146 leResult (*showNextImage)(THIS_TYPE* _this); \ 147 leResult (*showPreviousImage)(THIS_TYPE* _this); \ 148 leImageSequenceImageChangedEvent_FnPtr (*getImageChangedEventCallback)(const THIS_TYPE* _this); \ 149 leResult (*setImageChangedEventCallback)(THIS_TYPE* _this, leImageSequenceImageChangedEvent_FnPtr cb); \ 151 typedef struct leImageSequenceWidgetVTable
153 LE_IMAGESEQUENCEWIDGET_VTABLE(leImageSequenceWidget)
154 } leImageSequenceWidgetVTable;
170 typedef struct leImageSequenceWidget
174 const leImageSequenceWidgetVTable* fn;
177 leImageSequenceEntry* images;
187 leImageSequenceImageChangedEvent_FnPtr cb;
188 } leImageSequenceWidget;
207 leImageSequenceWidget* leImageSequenceWidget_New(
void);
219 void leImageSequenceWidget_Constructor(leImageSequenceWidget* wgt);
222 #define THIS_TYPE struct leWidget 253 virtual uint32_t getImageCount(
const leImageSequenceWidget* _this);
290 virtual leResult setImageCount(leImageSequenceWidget* _this,
324 virtual leImage* getImage(
const leImageSequenceWidget* _this,
365 virtual leResult setImage(leImageSequenceWidget* _this,
401 virtual uint32_t getImageDelay(
const leImageSequenceWidget* _this,
443 virtual leResult setImageDelay(leImageSequenceWidget* _this,
481 virtual leHAlignment getImageHAlignment(
const leImageSequenceWidget* _this,
523 virtual leResult setImageHAlignment(leImageSequenceWidget* _this,
560 virtual leVAlignment getImageVAlignment(
const leImageSequenceWidget* _this,
602 virtual leResult setImageVAlignment(leImageSequenceWidget* _this,
636 virtual leResult stop(leImageSequenceWidget* _this);
668 leResult play(leImageSequenceWidget* _this);
700 leResult play(leImageSequenceWidget* _this);
732 virtual leBool isPlaying(
const leImageSequenceWidget* _this);
763 virtual leBool getRepeat(
const leImageSequenceWidget* _this);
798 virtual leResult setRepeat(leImageSequenceWidget* _this,
834 virtual leResult showImage(leImageSequenceWidget* _this,
867 virtual leResult showNextImage(leImageSequenceWidget* _this);
898 virtual leResult showPreviousImage(leImageSequenceWidget* _this);
910 virtual leImageSequenceImageChangedEvent_FnPtr getImageChangedEventCallback(
const leImageSequenceWidget* _this);
925 virtual leResult setImageChangedEventCallback(leImageSequenceWidget* _this,
926 leImageSequenceImageChangedEvent_FnPtr cb);
935 #endif // LE_IMAGESEQUENCE_WIDGET_ENABLED Common macros and definitions used by Legato.
Image functions and defintions.
Definition: legato_image.h:181
leResult
This enum represents function call results.
Definition: legato_common.h:123
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:195
leBool
This enum represents booleans.
Definition: legato_common.h:146
leVAlignment
This enum represents the vertical alignment mode of objects.
Definition: legato_common.h:170
Fixed string functions and definitions.