aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/basic
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-07 19:43:34 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-07 19:43:34 +1000
commitba264ef1add20e8ede39fde1ceae1d57687498d1 (patch)
treee7257e96275c5a5d164dc49ee6f8a736bbed7446 /demos/modules/gwin/basic
parent8681e85ba6028287bf202d8b8a86a7d0a0d49101 (diff)
downloaduGFX-ba264ef1add20e8ede39fde1ceae1d57687498d1.tar.gz
uGFX-ba264ef1add20e8ede39fde1ceae1d57687498d1.tar.bz2
uGFX-ba264ef1add20e8ede39fde1ceae1d57687498d1.zip
Update GWIN demos
Diffstat (limited to 'demos/modules/gwin/basic')
-rw-r--r--demos/modules/gwin/basic/main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/demos/modules/gwin/basic/main.c b/demos/modules/gwin/basic/main.c
index 5dc1bab7..c46e6969 100644
--- a/demos/modules/gwin/basic/main.c
+++ b/demos/modules/gwin/basic/main.c
@@ -40,8 +40,14 @@ int main(void) {
gdispClear(Lime);
/* Create two windows */
- GW1 = gwinCreateWindow(NULL, 20, 10, 200, 150);
- GW2 = gwinCreateWindow(NULL, 50, 190, 150, 100);
+ {
+ GWindowInit wi;
+
+ wi.show = TRUE; wi.x = 20; wi.y = 10; wi.width = 200; wi.height = 150;
+ GW1 = gwinWindowCreate(NULL, &wi);
+ wi.show = TRUE; wi.x = 50; wi.y = 190; wi.width = 150; wi.height = 100;
+ GW2 = gwinWindowCreate(NULL, &wi);
+ }
/* Set fore- and background colors for both windows */
gwinSetColor(GW1, Black);
@@ -53,9 +59,9 @@ int main(void) {
gwinClear(GW1);
gwinClear(GW2);
- gwinDrawLine (GW1, 5, 30, 150, 110);
+ gwinDrawLine(GW1, 5, 30, 150, 110);
for(i=5, j=0; i < 200 && j < 150; i+=3, j+=i/20)
- gwinDrawPixel (GW1, i, j);
+ gwinDrawPixel(GW1, i, j);
/*
* Draw two filled circles at the same coordinate