From f3f0b72ff2607397a1d3f6d9523ad85ae271b80c Mon Sep 17 00:00:00 2001 From: reinelt Date: Wed, 10 Sep 2003 14:01:53 +0000 Subject: [lcd4linux @ 2003-09-10 14:01:52 by reinelt] icons nearly finished\! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@237 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- Raster.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Raster.c') diff --git a/Raster.c b/Raster.c index 99a63c1..406e7c8 100644 --- a/Raster.c +++ b/Raster.c @@ -1,4 +1,4 @@ -/* $Id: Raster.c,v 1.26 2003/09/09 06:54:43 reinelt Exp $ +/* $Id: Raster.c,v 1.27 2003/09/10 14:01:52 reinelt Exp $ * * driver for raster formats * @@ -20,6 +20,9 @@ * * * $Log: Raster.c,v $ + * Revision 1.27 2003/09/10 14:01:52 reinelt + * icons nearly finished\! + * * Revision 1.26 2003/09/09 06:54:43 reinelt * new function 'cfg_number()' * @@ -158,6 +161,7 @@ #include "cfg.h" #include "display.h" #include "bar.h" +#include "icon.h" #include "pixmap.h" static LCD Lcd; @@ -167,6 +171,7 @@ static int pgap=0; static int rgap=0; static int cgap=0; static int border=0; +static int icons; static unsigned int foreground=0; static unsigned int halfground=0; @@ -392,10 +397,17 @@ int Raster_init (LCD *Self) return -1; } + if (cfg_number("Icons", 0, 0, 8, &icons) < 0) return -1; + if (icons>0) { + info ("allocating %d icons", icons); + icon_init(rows, cols, xres, yres, 8, icons, pix_icon); + } + Self->rows=rows; Self->cols=cols; Self->xres=xres; Self->yres=yres; + Self->icons=icons; Lcd=*Self; pix_clear(); @@ -412,6 +424,11 @@ int Raster_bar (int type, int row, int col, int max, int len1, int len2) return pix_bar (type, row, col, max, len1, len2); } +int Raster_icon (int num, int seq, int row, int col) +{ + return icon_draw (num, seq, row, col); +} + LCD Raster[] = { #ifdef WITH_PPM @@ -421,11 +438,13 @@ LCD Raster[] = { xres: 0, yres: 0, bars: BAR_L | BAR_R | BAR_U | BAR_D | BAR_H2 | BAR_V2 | BAR_T, + icons: 0, gpos: 0, init: Raster_init, clear: Raster_clear, put: Raster_put, bar: Raster_bar, + icon: Raster_icon, gpo: NULL, flush: PPM_flush }, #endif @@ -436,11 +455,13 @@ LCD Raster[] = { xres: 0, yres: 0, bars: BAR_L | BAR_R | BAR_U | BAR_D | BAR_H2 | BAR_V2 | BAR_T, + icons: 0, gpos: 0, init: Raster_init, clear: Raster_clear, put: Raster_put, bar: Raster_bar, + icon: Raster_icon, gpo: NULL, flush: PNG_flush }, #endif -- cgit v1.2.3