aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/progressbar/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/modules/gwin/progressbar/main.c')
-rw-r--r--demos/modules/gwin/progressbar/main.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/demos/modules/gwin/progressbar/main.c b/demos/modules/gwin/progressbar/main.c
new file mode 100644
index 00000000..6217f4c1
--- /dev/null
+++ b/demos/modules/gwin/progressbar/main.c
@@ -0,0 +1,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;
+}
+