From 5c71af9339a592ef3759b40614685c83537d3ac3 Mon Sep 17 00:00:00 2001 From: reinelt Date: Tue, 7 Feb 2006 05:36:14 +0000 Subject: [lcd4linux @ 2006-02-07 05:36:13 by reinelt] Layers added to Layout git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@634 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_generic_graphic.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'drv_generic_graphic.c') diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c index af209fd..6a4bdeb 100644 --- a/drv_generic_graphic.c +++ b/drv_generic_graphic.c @@ -23,6 +23,9 @@ * * * $Log: drv_generic_graphic.c,v $ + * Revision 1.19 2006/02/07 05:36:13 reinelt + * Layers added to Layout + * * Revision 1.18 2006/01/30 05:47:38 reinelt * graphic subsystem changed to full-color RGBA * @@ -136,6 +139,7 @@ #include "debug.h" #include "cfg.h" #include "plugin.h" +#include "layout.h" #include "widget.h" #include "widget_text.h" #include "widget_icon.h" @@ -149,9 +153,6 @@ #include #endif -/* number of layers */ -#define LAYERS 4 - int DROWS, DCOLS; /* display size (pixels!) */ int XRES, YRES; /* pixels of one char cell */ @@ -257,6 +258,7 @@ static void drv_generic_graphic_render(const int layer, const int row, const int /* sanity checks */ if (layer < 0 || layer >= LAYERS) { error("%s: layer %d out of bounds (0..%d)", Driver, layer, LAYERS - 1); + return; } len = strlen(txt); @@ -386,6 +388,7 @@ int drv_generic_graphic_icon_draw(WIDGET * W) /* sanity check */ if (layer < 0 || layer >= LAYERS) { error("%s: layer %d out of bounds (0..%d)", Driver, layer, LAYERS - 1); + return -1; } /* maybe grow layout framebuffer */ @@ -440,6 +443,7 @@ int drv_generic_graphic_bar_draw(WIDGET * W) /* sanity check */ if (layer < 0 || layer >= LAYERS) { error("%s: layer %d out of bounds (0..%d)", Driver, layer, LAYERS - 1); + return -1; } /* maybe grow layout framebuffer */ -- cgit v1.2.3