From cb95898b90081079571dfbff493f9f8611637590 Mon Sep 17 00:00:00 2001 From: reinelt Date: Sat, 10 Jan 2004 17:34:40 +0000 Subject: [lcd4linux @ 2004-01-10 17:34:40 by reinelt] further matrixOrbital changes widgets initialized git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@301 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- widget.c | 66 ++++++++-------------------------------------------------------- 1 file changed, 8 insertions(+), 58 deletions(-) (limited to 'widget.c') diff --git a/widget.c b/widget.c index ccfa46c..d2bb73d 100644 --- a/widget.c +++ b/widget.c @@ -1,8 +1,9 @@ -/* $Id: widget.c,v 1.2 2003/10/05 17:58:50 reinelt Exp $ +/* $Id: widget.c,v 1.3 2004/01/10 17:34:40 reinelt Exp $ * * generic widget handling * - * Copyright 2003 Michael Reinelt + * Copyright 2003,2004 Michael Reinelt + * Copyright 2004 The LCD4Linux Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +21,10 @@ * * * $Log: widget.c,v $ + * Revision 1.3 2004/01/10 17:34:40 reinelt + * further matrixOrbital changes + * widgets initialized + * * Revision 1.2 2003/10/05 17:58:50 reinelt * libtool junk; copyright messages cleaned up * @@ -45,61 +50,6 @@ #include "cfg.h" #include "widget.h" -static int ROWS=0; -static int COLS=0; -static int XRES=0; -static int YRES=0; - -static int *Screen=NULL; -static WIDGET *Widget=NULL; -static int nWidget=0; - - -int widget_init (int rows, int cols, int xres, int yres) -{ - if (rows<1 || cols<1) - return -1; - - ROWS=rows; - COLS=cols; - XRES=xres; - YRES=yres; - - if ((Screen=malloc(ROWS*COLS*sizeof(*Screen)))==NULL) { - error ("widget buffer allocation failed: out of memory?"); - return -1; - } - - nWidget=0; - Widget=NULL; -return 0; -} - - -void widget_clear (void) -{ - int n; - - for (n=0; n