blob: 6217f4c1cbbfdf144f426fb626621683fae864d0 (
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
 | #include "gfx.h"
GHandle 	ghProgressbar;
static void _createWidget(void) {
	GWidgetInit	wi;
 
	wi.customDraw = 0;
	wi.customParam = 0;
	wi.customStyle = 0;
	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(NULL, &wi);
}
int main(void) {
	gfxInit();
	gwinSetDefaultFont(gdispOpenFont("UI2"));
	gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
	gdispClear(White);
	_createWidget();
	gwinProgressbarSetResolution(ghProgressbar, 10);
	gwinProgressbarStart(ghProgressbar, 500);
	//gwinProgressbarSetPosition(ghProgressbar, 42);
	//gwinProgressbarIncrement(ghProgressbar);
	//gwinProgressbarDecrement(ghProgressbar);
	while (1) {
		gfxSleepMilliseconds(500);
	}
	return 0;
}
 |