blob: 8e9e8352b7ae6f33eaf56bde5cd04546fd363e86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#include "gfx.h"
GHandle ghProgressbar;
static void _createWidget(void) {
GWidgetInit wi;
gwinWidgetClearInit(&wi);
wi.g.show = TRUE;
wi.g.y = 10; wi.g.x = 10; wi.g.width = 200; wi.g.height = 20; wi.text = "Progress 1";
ghProgressbar = gwinProgressbarCreate(0, &wi);
}
int main(void) {
gfxInit();
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
gdispClear(White);
_createWidget();
#if 1
gwinProgressbarSetResolution(ghProgressbar, 10);
gwinProgressbarStart(ghProgressbar, 500);
gfxSleepMilliseconds(3000);
gwinProgressbarReset(ghProgressbar);
gfxSleepMilliseconds(3000);
gwinDestroy(ghProgressbar);
#else
gwinProgressbarSetPosition(ghProgressbar, 42);
gwinProgressbarIncrement(ghProgressbar);
gwinProgressbarDecrement(ghProgressbar);
#endif
while (1) {
gfxSleepMilliseconds(500);
}
return 0;
}
|