45 #ifndef LEGATO_PROGRESSBAR_H 46 #define LEGATO_PROGRESSBAR_H 50 #if LE_PROGRESSBAR_WIDGET_ENABLED == 1 82 typedef enum leProgressBarDirection
84 LE_PROGRESSBAR_DIRECTION_RIGHT,
85 LE_PROGRESSBAR_DIRECTION_UP,
86 LE_PROGRESSBAR_DIRECTION_LEFT,
87 LE_PROGRESSBAR_DIRECTION_DOWN
88 } leProgressBarDirection;
90 typedef struct leProgressBarWidget leProgressBar;
113 typedef void (* leProgressBar_ValueChangedEventCallback)(leProgressBar*, uint32_t);
115 typedef struct leProgressBarWidget leProgressBarWidget;
121 #define LE_PROGRESSBARWIDGET_VTABLE(THIS_TYPE) \ 122 LE_WIDGET_VTABLE(THIS_TYPE) \ 124 leProgressBarDirection (*getDirection)(const THIS_TYPE* _this); \ 125 leResult (*setDirection)(THIS_TYPE* _this, leProgressBarDirection dir); \ 126 uint32_t (*getValue)(const THIS_TYPE* _this); \ 127 leResult (*setValue)(THIS_TYPE* _this, uint32_t value); \ 128 leProgressBar_ValueChangedEventCallback (*getValueChangedEventCallback)(const THIS_TYPE* _this); \ 129 leResult (*setValueChangedCallback)(THIS_TYPE* _this, leProgressBar_ValueChangedEventCallback cb); \ 131 typedef struct leProgressBarWidgetVTable
133 LE_PROGRESSBARWIDGET_VTABLE(leProgressBarWidget)
134 } leProgressBarWidgetVTable;
148 typedef struct leProgressBarWidget
152 const leProgressBarWidgetVTable* fn;
154 leProgressBarDirection direction;
158 leProgressBar_ValueChangedEventCallback cb;
159 } leProgressBarWidget;
179 leProgressBarWidget* leProgressBarWidget_New(
void);
191 void leProgressBarWidget_Constructor(leProgressBarWidget* wgt);
194 #define THIS_TYPE struct leWidget 207 virtual leProgressBarDirection getDirection(
const leProgressBarWidget* _this);
224 virtual leResult setDirection(leProgressBarWidget* _this,
225 leProgressBarDirection dir);
241 virtual int32_t getValue(
const leProgressBarWidget* _this);
258 virtual leResult setValue(leProgressBarWidget* _this,
272 virtual leProgressBar_ValueChangedEventCallback getValueChangedEventCallback
273 (
const leProgressBarWidget* _this);
288 virtual leResult setValueChangedCallback(leProgressBarWidget* _this,
289 leProgressBar_ValueChangedEventCallback cb);
298 #endif // LE_PROGRESSBAR_WIDGET_ENABLED Common macros and definitions used by Legato.
leResult
This enum represents function call results.
Definition: legato_common.h:123