aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <>2006-06-20 08:50:59 +0000
committerreinelt <>2006-06-20 08:50:59 +0000
commit6293cd693540d5541b052e3a9c5770af4ea11762 (patch)
tree7969518a49328b352cfc365e3d6f612454e09390
parente5509628c90fe0602d8b29677dc03212c3bea3ec (diff)
downloadlcd4linux-6293cd693540d5541b052e3a9c5770af4ea11762.tar.gz
[lcd4linux @ 2006-06-20 08:50:58 by reinelt]
widget_image linker error hopefully finally fixed
-rw-r--r--config.h.in7
-rwxr-xr-xconfigure17
-rw-r--r--drivers.m417
-rw-r--r--drv_generic_graphic.c5
-rw-r--r--widget_image.c15
5 files changed, 44 insertions, 17 deletions
diff --git a/config.h.in b/config.h.in
index 278b78b..9ec12f4 100644
--- a/config.h.in
+++ b/config.h.in
@@ -380,6 +380,9 @@
/* I2C bus driver */
#undef WITH_I2C
+/* image widget */
+#undef WITH_IMAGE
+
/* LCD2USB driver */
#undef WITH_LCD2USB
@@ -410,10 +413,10 @@
/* NULL driver */
#undef WITH_NULL
-/* driver */
+/* PNG driver */
#undef WITH_PNG
-/* driver */
+/* PPM driver */
#undef WITH_PPM
/* RouterBoard driver */
diff --git a/configure b/configure
index 7704190..a13a356 100755
--- a/configure
+++ b/configure
@@ -7340,6 +7340,7 @@ echo "${ECHO_T}done" >&6; }
# generic display drivers
TEXT="no"
GRAPHIC="no"
+IMAGE="no"
GPIO="no"
# generiv I/O drivers
@@ -7579,7 +7580,7 @@ fi
if test "$PNG" = "yes"; then
if test "$has_gd" = "true"; then
- GRAPHIC="yes"
+ IMAGE="yes"
cat >>confdefs.h <<\_ACEOF
#define WITH_PNG 1
@@ -7592,7 +7593,7 @@ echo "$as_me: WARNING: gd.h not found: PNG driver disabled" >&2;}
fi
if test "$PPM" = "yes"; then
- GRAPHIC="yes"
+ IMAGE="yes"
cat >>confdefs.h <<\_ACEOF
#define WITH_PPM 1
@@ -7735,18 +7736,28 @@ echo "$as_me: error: You should activate at least one driver..." >&2;}
{ (exit 1); exit 1; }; }
fi
-
# generic text driver
if test "$TEXT" = "yes"; then
DRIVERS="$DRIVERS drv_generic_text.o"
fi
+# Image driver
+if test "$IMAGE" = "yes"; then
+ GRAPHIC="yes"
+ DRIVERS="$DRIVERS drv_Image.o"
+fi
+
# generic graphic driver
if test "$GRAPHIC" = "yes"; then
DRIVERS="$DRIVERS drv_generic_graphic.o"
if test "$has_gd" = "true"; then
DRIVERS="$DRIVERS widget_image.o"
DRVLIBS="$DRVLIBS -lgd"
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_IMAGE 1
+_ACEOF
+
fi
fi
diff --git a/drivers.m4 b/drivers.m4
index 8f25651..78b9907 100644
--- a/drivers.m4
+++ b/drivers.m4
@@ -179,6 +179,7 @@ AC_MSG_RESULT([done])
# generic display drivers
TEXT="no"
GRAPHIC="no"
+IMAGE="no"
GPIO="no"
# generiv I/O drivers
@@ -344,16 +345,16 @@ fi
if test "$PNG" = "yes"; then
if test "$has_gd" = "true"; then
- GRAPHIC="yes"
- AC_DEFINE(WITH_PNG,1,[ driver])
+ IMAGE="yes"
+ AC_DEFINE(WITH_PNG,1,[PNG driver])
else
AC_MSG_WARN(gd.h not found: PNG driver disabled)
fi
fi
if test "$PPM" = "yes"; then
- GRAPHIC="yes"
- AC_DEFINE(WITH_PPM,1,[ driver])
+ IMAGE="yes"
+ AC_DEFINE(WITH_PPM,1,[PPM driver])
fi
if test "$ROUTERBOARD" = "yes"; then
@@ -450,18 +451,24 @@ if test "$DRIVERS" = ""; then
AC_MSG_ERROR([You should activate at least one driver...])
fi
-
# generic text driver
if test "$TEXT" = "yes"; then
DRIVERS="$DRIVERS drv_generic_text.o"
fi
+# Image driver
+if test "$IMAGE" = "yes"; then
+ GRAPHIC="yes"
+ DRIVERS="$DRIVERS drv_Image.o"
+fi
+
# generic graphic driver
if test "$GRAPHIC" = "yes"; then
DRIVERS="$DRIVERS drv_generic_graphic.o"
if test "$has_gd" = "true"; then
DRIVERS="$DRIVERS widget_image.o"
DRVLIBS="$DRVLIBS -lgd"
+ AC_DEFINE(WITH_IMAGE, 1, [image widget])
fi
fi
diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c
index 56de80c..bf11a24 100644
--- a/drv_generic_graphic.c
+++ b/drv_generic_graphic.c
@@ -23,6 +23,9 @@
*
*
* $Log: drv_generic_graphic.c,v $
+ * Revision 1.28 2006/06/20 08:50:58 reinelt
+ * widget_image linker error hopefully finally fixed
+ *
* Revision 1.27 2006/04/09 17:46:14 reinelt
* vertical bar patch fro graphic displays by Ronald Hopfer
*
@@ -685,9 +688,11 @@ int drv_generic_graphic_init(const char *section, const char *driver)
widget_register(&wc);
/* register image widget */
+#ifdef WITH_IMAGE
wc = Widget_Image;
wc.draw = drv_generic_graphic_image_draw;
widget_register(&wc);
+#endif
/* clear framebuffer */
drv_generic_graphic_clear();
diff --git a/widget_image.c b/widget_image.c
index 63e20ad..d4ee1f4 100644
--- a/widget_image.c
+++ b/widget_image.c
@@ -1,4 +1,4 @@
-/* $Id: widget_image.c,v 1.7 2006/04/15 05:22:52 reinelt Exp $
+/* $Id: widget_image.c,v 1.8 2006/06/20 08:50:59 reinelt Exp $
*
* image widget handling
*
@@ -21,6 +21,9 @@
*
*
* $Log: widget_image.c,v $
+ * Revision 1.8 2006/06/20 08:50:59 reinelt
+ * widget_image linker error hopefully finally fixed
+ *
* Revision 1.7 2006/04/15 05:22:52 reinelt
* mpd plugin from Stefan Kuhne
*
@@ -72,11 +75,12 @@
#ifdef HAVE_GD_GD_H
#include <gd/gd.h>
-#define WITH_GD
#else
#ifdef HAVE_GD_H
#include <gd.h>
-#define WITH_GD
+#else
+#error "gd.h not found!"
+#error "cannot compile image widget"
#endif
#endif
@@ -85,7 +89,6 @@
#endif
-#ifdef WITH_GD
static void widget_image_render(const char *Name, WIDGET_IMAGE * Image)
{
int x, y;
@@ -168,7 +171,6 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image)
}
}
}
-#endif
static void widget_image_update(void *Self)
@@ -215,10 +217,9 @@ static void widget_image_update(void *Self)
Image->inverted = Image->inverted > 0;
DelResult(&result);
}
-#ifdef WITH_GD
+
/* render image into bitmap */
widget_image_render(W->name, Image);
-#endif
}