aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-10-28 00:42:38 +0100
committerJoel Bodenmann <joel@unormal.org>2013-10-28 00:42:38 +0100
commit630989d6b4a367ed16517be44f282b13a001c611 (patch)
treeff4b8751f62d2719eaa83c7d18a3f0b5558311d6 /demos/modules/gwin
parentcf616ae80412f20ddf0a534284b67010b4937969 (diff)
downloaduGFX-630989d6b4a367ed16517be44f282b13a001c611.tar.gz
uGFX-630989d6b4a367ed16517be44f282b13a001c611.tar.bz2
uGFX-630989d6b4a367ed16517be44f282b13a001c611.zip
updated GDISP and GWIN demos
Diffstat (limited to 'demos/modules/gwin')
-rw-r--r--demos/modules/gwin/basic/gfxconf.h18
-rw-r--r--demos/modules/gwin/basic/main.c4
-rw-r--r--demos/modules/gwin/button/gfxconf.h58
-rw-r--r--demos/modules/gwin/button/main.c29
-rw-r--r--demos/modules/gwin/checkbox/gfxconf.h58
-rw-r--r--demos/modules/gwin/checkbox/main.c29
-rw-r--r--demos/modules/gwin/console/gfxconf.h29
-rw-r--r--demos/modules/gwin/console/main.c4
-rw-r--r--demos/modules/gwin/graph/gfxconf.h25
-rw-r--r--demos/modules/gwin/graph/main.c1
-rw-r--r--demos/modules/gwin/list/gfxconf.h160
-rw-r--r--demos/modules/gwin/list/main.c31
-rw-r--r--demos/modules/gwin/radio/gfxconf.h58
-rw-r--r--demos/modules/gwin/radio/main.c29
-rw-r--r--demos/modules/gwin/slider/gfxconf.h58
-rw-r--r--demos/modules/gwin/slider/main.c29
-rw-r--r--demos/modules/gwin/widgets/gfxconf.h54
-rw-r--r--demos/modules/gwin/widgets/main.c1
18 files changed, 299 insertions, 376 deletions
diff --git a/demos/modules/gwin/basic/gfxconf.h b/demos/modules/gwin/basic/gfxconf.h
index 3ef9c784..1e6784fd 100644
--- a/demos/modules/gwin/basic/gfxconf.h
+++ b/demos/modules/gwin/basic/gfxconf.h
@@ -31,9 +31,10 @@
#define _GFXCONF_H
/* The operating system to use - one of these must be defined */
-#define GFX_USE_OS_CHIBIOS TRUE
+#define GFX_USE_OS_CHIBIOS FALSE
#define GFX_USE_OS_WIN32 FALSE
-#define GFX_USE_OS_POSIX FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
@@ -42,15 +43,10 @@
/* Features for the GDISP sub-system. */
#define GDISP_NEED_VALIDATION TRUE
#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT FALSE
#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_MULTITHREAD FALSE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
+
+/* Features for the GWIN subsystem. */
+#define GWIN_NEED_WINDOWMANAGER TRUE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/basic/main.c b/demos/modules/gwin/basic/main.c
index c46e6969..eee22f29 100644
--- a/demos/modules/gwin/basic/main.c
+++ b/demos/modules/gwin/basic/main.c
@@ -37,7 +37,7 @@ int main(void) {
/* Initialize and clear the display */
gfxInit();
- gdispClear(Lime);
+ gdispClear(White);
/* Create two windows */
{
@@ -60,7 +60,7 @@ int main(void) {
gwinClear(GW2);
gwinDrawLine(GW1, 5, 30, 150, 110);
- for(i=5, j=0; i < 200 && j < 150; i+=3, j+=i/20)
+ for(i = 5, j = 0; i < 200 && j < 150; i += 3, j += i/20)
gwinDrawPixel(GW1, i, j);
/*
diff --git a/demos/modules/gwin/button/gfxconf.h b/demos/modules/gwin/button/gfxconf.h
index 256ba2ed..6d0aa41d 100644
--- a/demos/modules/gwin/button/gfxconf.h
+++ b/demos/modules/gwin/button/gfxconf.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
* Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,62 +30,35 @@
#ifndef _GFXCONF_H
#define _GFXCONF_H
-#define GFX_USE_OS_CHIBIOS TRUE
-//#define GFX_USE_OS_WIN32 TRUE
-//#define GFX_USE_OS_POSIX TRUE
+/* The operating system to use - one of these must be defined */
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GWIN TRUE
+#define GFX_USE_GINPUT TRUE
#define GFX_USE_GEVENT TRUE
#define GFX_USE_GTIMER TRUE
-#define GFX_USE_GINPUT TRUE
/* Features for the GDISP sub-system. */
-#define GDISP_NEED_VALIDATION TRUE
-#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_CONVEX_POLYGON FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_IMAGE TRUE
-#define GDISP_NEED_MULTITHREAD TRUE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
+#define GDISP_NEED_VALIDATION TRUE
+#define GDISP_NEED_CLIP TRUE
+#define GDISP_NEED_CIRCLE TRUE
+#define GDISP_NEED_TEXT TRUE
-/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
-/* GDISP image decoders */
-#define GDISP_NEED_IMAGE_NATIVE FALSE
-#define GDISP_NEED_IMAGE_GIF FALSE
-#define GDISP_NEED_IMAGE_BMP FALSE
-#define GDISP_NEED_IMAGE_JPG FALSE
-#define GDISP_NEED_IMAGE_PNG FALSE
-
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
#define GWIN_NEED_WINDOWMANAGER TRUE
-#define GWIN_NEED_CONSOLE FALSE
-#define GWIN_NEED_GRAPH FALSE
#define GWIN_NEED_WIDGET TRUE
#define GWIN_NEED_BUTTON TRUE
-#define GWIN_NEED_SLIDER FALSE
-#define GWIN_NEED_CHECKBOX FALSE
-#define GWIN_NEED_LABEL FALSE
-#define GWIN_NEED_IMAGE FALSE
-#define GWIN_NEED_RADIO FALSE
-/* Features for the GINPUT sub-system. */
+/* Features for the GINPUT subsystem. */
#define GINPUT_NEED_MOUSE TRUE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/button/main.c b/demos/modules/gwin/button/main.c
index 1ed2ac43..f210d84c 100644
--- a/demos/modules/gwin/button/main.c
+++ b/demos/modules/gwin/button/main.c
@@ -1,3 +1,32 @@
+/*
+ * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
+ * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#include "gfx.h"
static GListener gl;
diff --git a/demos/modules/gwin/checkbox/gfxconf.h b/demos/modules/gwin/checkbox/gfxconf.h
index 0864b6f9..9bcda6be 100644
--- a/demos/modules/gwin/checkbox/gfxconf.h
+++ b/demos/modules/gwin/checkbox/gfxconf.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
* Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,62 +30,35 @@
#ifndef _GFXCONF_H
#define _GFXCONF_H
-#define GFX_USE_OS_CHIBIOS TRUE
-//#define GFX_USE_OS_WIN32 TRUE
-//#define GFX_USE_OS_POSIX TRUE
+/* The operating system to use - one of these must be defined */
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GWIN TRUE
+#define GFX_USE_GINPUT TRUE
#define GFX_USE_GEVENT TRUE
#define GFX_USE_GTIMER TRUE
-#define GFX_USE_GINPUT TRUE
/* Features for the GDISP sub-system. */
-#define GDISP_NEED_VALIDATION TRUE
-#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_CONVEX_POLYGON FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_IMAGE TRUE
-#define GDISP_NEED_MULTITHREAD TRUE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
+#define GDISP_NEED_VALIDATION TRUE
+#define GDISP_NEED_CLIP TRUE
+#define GDISP_NEED_CIRCLE TRUE
+#define GDISP_NEED_TEXT TRUE
-/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
-/* GDISP image decoders */
-#define GDISP_NEED_IMAGE_NATIVE FALSE
-#define GDISP_NEED_IMAGE_GIF FALSE
-#define GDISP_NEED_IMAGE_BMP FALSE
-#define GDISP_NEED_IMAGE_JPG FALSE
-#define GDISP_NEED_IMAGE_PNG FALSE
-
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
#define GWIN_NEED_WINDOWMANAGER TRUE
-#define GWIN_NEED_CONSOLE FALSE
-#define GWIN_NEED_GRAPH FALSE
#define GWIN_NEED_WIDGET TRUE
-#define GWIN_NEED_BUTTON FALSE
-#define GWIN_NEED_SLIDER FALSE
#define GWIN_NEED_CHECKBOX TRUE
-#define GWIN_NEED_LABEL FALSE
-#define GWIN_NEED_IMAGE FALSE
-#define GWIN_NEED_RADIO FALSE
-/* Features for the GINPUT sub-system. */
+/* Features for the GINPUT subsystem. */
#define GINPUT_NEED_MOUSE TRUE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/checkbox/main.c b/demos/modules/gwin/checkbox/main.c
index c6094323..23d3cb17 100644
--- a/demos/modules/gwin/checkbox/main.c
+++ b/demos/modules/gwin/checkbox/main.c
@@ -1,3 +1,32 @@
+/*
+ * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
+ * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#include "gfx.h"
static GListener gl;
diff --git a/demos/modules/gwin/console/gfxconf.h b/demos/modules/gwin/console/gfxconf.h
index 90dbc7cb..c1307302 100644
--- a/demos/modules/gwin/console/gfxconf.h
+++ b/demos/modules/gwin/console/gfxconf.h
@@ -31,9 +31,10 @@
#define _GFXCONF_H
/* The operating system to use - one of these must be defined */
-//#define GFX_USE_OS_CHIBIOS FALSE
-//#define GFX_USE_OS_WIN32 FALSE
-//#define GFX_USE_OS_POSIX FALSE
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
@@ -43,24 +44,14 @@
#define GDISP_NEED_VALIDATION TRUE
#define GDISP_NEED_CLIP TRUE
#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE FALSE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_MULTITHREAD FALSE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
-/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
+#define GDISP_INCLUDE_FONT_DEJAVUSANS12 TRUE
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
+#define GWIN_NEED_WINDOWMANAGER TRUE
#define GWIN_NEED_CONSOLE TRUE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/console/main.c b/demos/modules/gwin/console/main.c
index 2175ce04..0efd1c99 100644
--- a/demos/modules/gwin/console/main.c
+++ b/demos/modules/gwin/console/main.c
@@ -41,7 +41,7 @@ int main(void) {
/* Set some fonts */
font1 = gdispOpenFont("UI2");
- font2 = gdispOpenFont("UI2 Double");
+ font2 = gdispOpenFont("DejaVu Sans 12");
gwinSetDefaultFont(font1);
/* create the three console windows */
@@ -75,7 +75,7 @@ int main(void) {
/* Output some data on the first console */
for(i = 0; i < 10; i++) {
- gwinPrintf(GW1, "Hello ChibiOS/GFX!\r\n");
+ gwinPrintf(GW1, "Hello uGFX!\r\n");
}
/* Output some data on the second console */
diff --git a/demos/modules/gwin/graph/gfxconf.h b/demos/modules/gwin/graph/gfxconf.h
index 51c5bdc4..e829605a 100644
--- a/demos/modules/gwin/graph/gfxconf.h
+++ b/demos/modules/gwin/graph/gfxconf.h
@@ -31,33 +31,22 @@
#define _GFXCONF_H
/* The operating system to use - one of these must be defined */
-//#define GFX_USE_OS_CHIBIOS TRUE
-//#define GFX_USE_OS_WIN32 FALSE
-//#define GFX_USE_OS_POSIX FALSE
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GWIN TRUE
-#define GFX_USE_GMISC TRUE
/* Features for the GDISP sub-system. */
#define GDISP_NEED_VALIDATION TRUE
#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT FALSE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_MULTITHREAD FALSE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
+#define GWIN_NEED_WINDOWMANAGER TRUE
#define GWIN_NEED_GRAPH TRUE
-/* Turn on fast trig */
-#define GMISC_NEED_FASTTRIG TRUE
-
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/graph/main.c b/demos/modules/gwin/graph/main.c
index c5b7b352..4dd67ae8 100644
--- a/demos/modules/gwin/graph/main.c
+++ b/demos/modules/gwin/graph/main.c
@@ -100,3 +100,4 @@ int main(void) {
}
}
+
diff --git a/demos/modules/gwin/list/gfxconf.h b/demos/modules/gwin/list/gfxconf.h
index cf5f8690..19d395c0 100644
--- a/demos/modules/gwin/list/gfxconf.h
+++ b/demos/modules/gwin/list/gfxconf.h
@@ -1,150 +1,64 @@
-/**
- * This file has a different license to the rest of the GFX system.
- * You can copy, modify and distribute this file as you see fit.
- * You do not need to publish your source modifications to this file.
- * The only thing you are not permitted to do is to relicense it
- * under a different license.
- */
-
-/**
- * Copy this file into your project directory and rename it as gfxconf.h
- * Edit your copy to turn on the GFX features you want to use.
+/*
+ * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
+ * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _GFXCONF_H
#define _GFXCONF_H
/* The operating system to use - one of these must be defined */
-//#define GFX_USE_OS_CHIBIOS FALSE
-//#define GFX_USE_OS_WIN32 FALSE
-//#define GFX_USE_OS_LINUX TRUE
-//#define GFX_USE_OS_OSX FALSE
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
-/* GFX subsystems to turn on */
+/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
-#define GFX_USE_TDISP FALSE
#define GFX_USE_GWIN TRUE
+#define GFX_USE_GINPUT TRUE
#define GFX_USE_GEVENT TRUE
#define GFX_USE_GTIMER TRUE
-#define GFX_USE_GQUEUE TRUE
-#define GFX_USE_GINPUT TRUE
-#define GFX_USE_GADC FALSE
-#define GFX_USE_GAUDIN FALSE
-#define GFX_USE_GAUDOUT FALSE
-#define GFX_USE_GMISC FALSE
-/* Features for the GDISP subsystem */
+/* Features for the GDISP sub-system. */
#define GDISP_NEED_VALIDATION TRUE
#define GDISP_NEED_CLIP TRUE
#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE TRUE
-#define GDISP_NEED_ARC FALSE
#define GDISP_NEED_CONVEX_POLYGON TRUE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_QUERY FALSE
-#define GDISP_NEED_IMAGE FALSE
-#define GDISP_NEED_MULTITHREAD FALSE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
-
-/* GDISP - builtin fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
-/* GDISP image decoders */
-#define GDISP_NEED_IMAGE_NATIVE FALSE
-#define GDISP_NEED_IMAGE_GIF FALSE
-#define GDISP_NEED_IMAGE_BMP FALSE
-#define GDISP_NEED_IMAGE_JPG FALSE
-#define GDISP_NEED_IMAGE_PNG FALSE
-#define GDISP_NEED_IMAGE_ACCOUNTING FALSE
-
-/* Optional image support that can be turned off */
-/*
- #define GDISP_NEED_IMAGE_BMP_1 TRUE
- #define GDISP_NEED_IMAGE_BMP_4 TRUE
- #define GDISP_NEED_IMAGE_BMP_4_RLE TRUE
- #define GDISP_NEED_IMAGE_BMP_8 TRUE
- #define GDISP_NEED_IMAGE_BMP_8_RLE TRUE
- #define GDISP_NEED_IMAGE_BMP_16 TRUE
- #define GDISP_NEED_IMAGE_BMP_24 TRUE
- #define GDISP_NEED_IMAGE_BMP_32 TRUE
-*/
-
-/* Features for the TDISP subsystem. */
-#define TDISP_NEED_MULTITHREAD FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
/* Features for the GWIN subsystem. */
#define GWIN_NEED_WINDOWMANAGER TRUE
-#define GWIN_NEED_CONSOLE FALSE
-#define GWIN_NEED_GRAPH FALSE
#define GWIN_NEED_WIDGET TRUE
-#define GWIN_NEED_BUTTON FALSE
-#define GWIN_NEED_SLIDER FALSE
-#define GWIN_NEED_CHECKBOX FALSE
-#define GWIN_NEED_IMAGE FALSE
-#define GWIN_NEED_RADIO FALSE
#define GWIN_NEED_LIST TRUE
-/* Features for the GEVENT subsystem. */
-#define GEVENT_ASSERT_NO_RESOURCE FALSE
-
-/* Features for the GTIMER subsystem. */
-/* NONE */
-
-/* Features for the GQUEUE subsystem. */
-#define GQUEUE_NEED_ASYNC TRUE
-#define GQUEUE_NEED_GSYNC FALSE
-#define GQUEUE_NEED_FSYNC FALSE
-
/* Features for the GINPUT subsystem. */
#define GINPUT_NEED_MOUSE TRUE
-#define GINPUT_NEED_KEYBOARD FALSE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
-
-/* Features for the GADC subsystem. */
-/* NONE */
-
-/* Features for the GAUDIN subsystem. */
-/* NONE */
-
-/* Features for the GAUDOUT subsystem. */
-/* NONE */
-
-/* Features for the GMISC subsystem. */
-#define GMISC_NEED_ARRAYOPS FALSE
-#define GMISC_NEED_FASTTRIG FALSE
-#define GMISC_NEED_FIXEDTRIG FALSE
-
-/* Optional Parameters for various subsystems */
-/*
- #define GDISP_MAX_FONT_HEIGHT 16
- #define GEVENT_MAXIMUM_SIZE 32
- #define GEVENT_MAX_SOURCE_LISTENERS 32
- #define GTIMER_THREAD_WORKAREA_SIZE 512
- #define GADC_MAX_LOWSPEED_DEVICES 4
- #define GWIN_BUTTON_LAZY_RELEASE FALSE
- #define GWIN_CONSOLE_USE_BASESTREAM FALSE
- #define GWIN_CONSOLE_USE_FLOAT FALSE
- #define GWIN_NEED_IMAGE_ANIMATION FALSE
-*/
-
-/* Optional Low Level Driver Definitions */
-/*
- #define GDISP_USE_CUSTOM_BOARD FALSE
- #define GDISP_SCREEN_WIDTH 320
- #define GDISP_SCREEN_HEIGHT 240
- #define GDISP_USE_FSMC
- #define GDISP_USE_GPIO
- #define TDISP_COLUMNS 16
- #define TDISP_ROWS 2
-*/
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/list/main.c b/demos/modules/gwin/list/main.c
index 21afa544..e99c2448 100644
--- a/demos/modules/gwin/list/main.c
+++ b/demos/modules/gwin/list/main.c
@@ -1,3 +1,32 @@
+/*
+ * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
+ * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#include "gfx.h"
static GListener gl;
@@ -32,7 +61,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(Red);
+ gdispClear(White);
// Attach the mouse input
gwinAttachMouse(0);
diff --git a/demos/modules/gwin/radio/gfxconf.h b/demos/modules/gwin/radio/gfxconf.h
index 4bb82816..0e41b7ae 100644
--- a/demos/modules/gwin/radio/gfxconf.h
+++ b/demos/modules/gwin/radio/gfxconf.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
* Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,62 +30,35 @@
#ifndef _GFXCONF_H
#define _GFXCONF_H
-#define GFX_USE_OS_CHIBIOS TRUE
-//#define GFX_USE_OS_WIN32 TRUE
-//#define GFX_USE_OS_POSIX TRUE
+/* The operating system to use - one of these must be defined */
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GWIN TRUE
+#define GFX_USE_GINPUT TRUE
#define GFX_USE_GEVENT TRUE
#define GFX_USE_GTIMER TRUE
-#define GFX_USE_GINPUT TRUE
/* Features for the GDISP sub-system. */
-#define GDISP_NEED_VALIDATION TRUE
-#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_CONVEX_POLYGON FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_IMAGE TRUE
-#define GDISP_NEED_MULTITHREAD TRUE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
+#define GDISP_NEED_VALIDATION TRUE
+#define GDISP_NEED_CLIP TRUE
+#define GDISP_NEED_CIRCLE TRUE
+#define GDISP_NEED_TEXT TRUE
-/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
-/* GDISP image decoders */
-#define GDISP_NEED_IMAGE_NATIVE FALSE
-#define GDISP_NEED_IMAGE_GIF FALSE
-#define GDISP_NEED_IMAGE_BMP FALSE
-#define GDISP_NEED_IMAGE_JPG FALSE
-#define GDISP_NEED_IMAGE_PNG FALSE
-
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
#define GWIN_NEED_WINDOWMANAGER TRUE
-#define GWIN_NEED_CONSOLE FALSE
-#define GWIN_NEED_GRAPH FALSE
#define GWIN_NEED_WIDGET TRUE
-#define GWIN_NEED_BUTTON FALSE
-#define GWIN_NEED_SLIDER FALSE
-#define GWIN_NEED_CHECKBOX FALSE
-#define GWIN_NEED_LABEL FALSE
-#define GWIN_NEED_IMAGE FALSE
#define GWIN_NEED_RADIO TRUE
-/* Features for the GINPUT sub-system. */
+/* Features for the GINPUT subsystem. */
#define GINPUT_NEED_MOUSE TRUE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/radio/main.c b/demos/modules/gwin/radio/main.c
index c64b2068..b7504535 100644
--- a/demos/modules/gwin/radio/main.c
+++ b/demos/modules/gwin/radio/main.c
@@ -1,3 +1,32 @@
+/*
+ * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
+ * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#include "gfx.h"
#define GROUP1 0 // this will be the first radio button group
diff --git a/demos/modules/gwin/slider/gfxconf.h b/demos/modules/gwin/slider/gfxconf.h
index af5eeaa8..5442c508 100644
--- a/demos/modules/gwin/slider/gfxconf.h
+++ b/demos/modules/gwin/slider/gfxconf.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
* Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,62 +30,35 @@
#ifndef _GFXCONF_H
#define _GFXCONF_H
-#define GFX_USE_OS_CHIBIOS TRUE
-//#define GFX_USE_OS_WIN32 TRUE
-//#define GFX_USE_OS_POSIX TRUE
+/* The operating system to use - one of these must be defined */
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GWIN TRUE
+#define GFX_USE_GINPUT TRUE
#define GFX_USE_GEVENT TRUE
#define GFX_USE_GTIMER TRUE
-#define GFX_USE_GINPUT TRUE
/* Features for the GDISP sub-system. */
-#define GDISP_NEED_VALIDATION TRUE
-#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_CONVEX_POLYGON FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_IMAGE TRUE
-#define GDISP_NEED_MULTITHREAD TRUE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
+#define GDISP_NEED_VALIDATION TRUE
+#define GDISP_NEED_CLIP TRUE
+#define GDISP_NEED_CIRCLE TRUE
+#define GDISP_NEED_TEXT TRUE
-/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
-/* GDISP image decoders */
-#define GDISP_NEED_IMAGE_NATIVE FALSE
-#define GDISP_NEED_IMAGE_GIF FALSE
-#define GDISP_NEED_IMAGE_BMP FALSE
-#define GDISP_NEED_IMAGE_JPG FALSE
-#define GDISP_NEED_IMAGE_PNG FALSE
-
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
#define GWIN_NEED_WINDOWMANAGER TRUE
-#define GWIN_NEED_CONSOLE FALSE
-#define GWIN_NEED_GRAPH FALSE
#define GWIN_NEED_WIDGET TRUE
-#define GWIN_NEED_BUTTON FALSE
#define GWIN_NEED_SLIDER TRUE
-#define GWIN_NEED_CHECKBOX FALSE
-#define GWIN_NEED_LABEL FALSE
-#define GWIN_NEED_IMAGE FALSE
-#define GWIN_NEED_RADIO FALSE
-/* Features for the GINPUT sub-system. */
+/* Features for the GINPUT subsystem. */
#define GINPUT_NEED_MOUSE TRUE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/slider/main.c b/demos/modules/gwin/slider/main.c
index 4532ba01..ed936f12 100644
--- a/demos/modules/gwin/slider/main.c
+++ b/demos/modules/gwin/slider/main.c
@@ -1,3 +1,32 @@
+/*
+ * Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
+ * Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#include "gfx.h"
static GListener gl;
diff --git a/demos/modules/gwin/widgets/gfxconf.h b/demos/modules/gwin/widgets/gfxconf.h
index 50fcbf58..57cf8285 100644
--- a/demos/modules/gwin/widgets/gfxconf.h
+++ b/demos/modules/gwin/widgets/gfxconf.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2012, 2013, Joel Bodenmann aka Tectu <joel@unormal.org>
* Copyright (c) 2012, 2013, Andrew Hannam aka inmarket
+ *
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,62 +30,51 @@
#ifndef _GFXCONF_H
#define _GFXCONF_H
-//#define GFX_USE_OS_CHIBIOS TRUE
-//#define GFX_USE_OS_WIN32 TRUE
-//#define GFX_USE_OS_POSIX TRUE
+/* The operating system to use - one of these must be defined */
+#define GFX_USE_OS_CHIBIOS FALSE
+#define GFX_USE_OS_WIN32 FALSE
+#define GFX_USE_OS_LINUX FALSE
+#define GFX_USE_OS_OSX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
#define GFX_USE_GWIN TRUE
+#define GFX_USE_GINPUT TRUE
#define GFX_USE_GEVENT TRUE
#define GFX_USE_GTIMER TRUE
-#define GFX_USE_GINPUT TRUE
/* Features for the GDISP sub-system. */
-#define GDISP_NEED_VALIDATION TRUE
-#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE FALSE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_CONVEX_POLYGON TRUE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_IMAGE TRUE
-#define GDISP_NEED_MULTITHREAD TRUE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
+#define GDISP_NEED_VALIDATION TRUE
+#define GDISP_NEED_CLIP TRUE
+#define GDISP_NEED_CIRCLE TRUE
+#define GDISP_NEED_TEXT TRUE
+#define GDISP_NEED_IMAGE TRUE
-/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_NEED_ANTIALIAS FALSE
+/* GDISP fonts to include */
+#define GDISP_INCLUDE_FONT_UI2 TRUE
/* GDISP image decoders */
-#define GDISP_NEED_IMAGE_NATIVE FALSE
#define GDISP_NEED_IMAGE_GIF TRUE
-#define GDISP_NEED_IMAGE_BMP FALSE
-#define GDISP_NEED_IMAGE_JPG FALSE
-#define GDISP_NEED_IMAGE_PNG FALSE
+#define GDISP_NEED_IMAGE_BMP TRUE
-/* Features for the GWIN sub-system. */
+/* Features for the GWIN subsystem. */
#define GWIN_NEED_WINDOWMANAGER TRUE
#define GWIN_NEED_CONSOLE TRUE
#define GWIN_NEED_GRAPH TRUE
#define GWIN_NEED_WIDGET TRUE
+#define GWIN_NEED_LABEL TRUE
#define GWIN_NEED_BUTTON TRUE
#define GWIN_NEED_SLIDER TRUE
#define GWIN_NEED_CHECKBOX TRUE
-#define GWIN_NEED_LABEL TRUE
#define GWIN_NEED_IMAGE TRUE
#define GWIN_NEED_RADIO TRUE
#define GWIN_NEED_LIST TRUE
-#define GWIN_NEED_IMAGE_ANIMATION TRUE
-#define GWIN_NEED_LIST_IMAGES TRUE
-/* Features for the GINPUT sub-system. */
+/* Features for the GINPUT subsystem. */
#define GINPUT_NEED_MOUSE TRUE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
+
+/* Optional parameters for various subsystems */
+#define GWIN_NEED_LIST_IMAGES TRUE
#endif /* _GFXCONF_H */
+
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c
index dde955f3..2b14d79e 100644
--- a/demos/modules/gwin/widgets/main.c
+++ b/demos/modules/gwin/widgets/main.c
@@ -382,3 +382,4 @@ int main(void) {
}
return 0;
}
+