diff options
author | Reinhard Tartler <siretart@tauware.de> | 2007-04-05 15:25:19 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2007-04-05 15:25:19 +0200 |
commit | d0c7529cb9833ede3595051df5599a11fe03be48 (patch) | |
tree | 4e63b581f10aa58e714cbf5f08f8c4ade0c09fff /drv_generic_text.c | |
parent | 3811bca55e79006fb5c3dc8f25d8ef29ccdda758 (diff) | |
download | lcd4linux-d0c7529cb9833ede3595051df5599a11fe03be48.tar.gz |
import new upstream
Diffstat (limited to 'drv_generic_text.c')
-rw-r--r-- | drv_generic_text.c | 153 |
1 files changed, 8 insertions, 145 deletions
diff --git a/drv_generic_text.c b/drv_generic_text.c index 4bcbb51..24837d8 100644 --- a/drv_generic_text.c +++ b/drv_generic_text.c @@ -1,4 +1,5 @@ -/* $Id: drv_generic_text.c,v 1.36 2006/07/31 03:48:09 reinelt Exp $ +/* $Id: drv_generic_text.c 745 2007-01-19 05:25:07Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_generic_text.c $ * * generic driver helper for text-based displays * @@ -21,148 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: drv_generic_text.c,v $ - * Revision 1.36 2006/07/31 03:48:09 reinelt - * preparations for scrolling - * - * Revision 1.35 2006/03/29 08:57:58 reinelt - * vertical bar patch from Manuel Lausch - * - * Revision 1.34 2006/02/27 08:12:34 reinelt - * use serdisplib's full color support - * - * Revision 1.33 2006/02/27 06:15:55 reinelt - * indent... - * - * Revision 1.32 2006/02/25 13:36:33 geronet - * updated indent.sh, applied coding style - * - * Revision 1.31 2006/01/30 05:47:38 reinelt - * graphic subsystem changed to full-color RGBA - * - * Revision 1.30 2006/01/03 06:13:46 reinelt - * GPIO's for MatrixOrbital - * - * Revision 1.29 2005/11/06 09:54:43 reinelt - * fixed icon size removed, uses XRES & YRES (I hope this doesn't lead to problemes...) - * - * Revision 1.28 2005/08/22 05:44:43 reinelt - * new driver 'WincorNixdorf' - * some fixes to the bar code - * - * Revision 1.27 2005/05/08 04:32:44 reinelt - * CodingStyle added and applied - * - * Revision 1.26 2005/05/06 06:37:34 reinelt - * hollow bar patch from geronet - * - * Revision 1.25 2005/02/24 07:06:48 reinelt - * SimpleLCD driver added - * - * Revision 1.24 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.23 2005/01/09 10:53:24 reinelt - * small type in plugin_uname fixed - * new homepage lcd4linux.bulix.org - * - * Revision 1.22 2004/11/28 15:50:24 reinelt - * Cwlinux fixes (invalidation of user-defined chars) - * - * Revision 1.21 2004/06/26 12:04:59 reinelt - * - * uh-oh... the last CVS log message messed up things a lot... - * - * Revision 1.20 2004/06/26 09:27:21 reinelt - * - * added '-W' to CFLAGS - * changed all C++ comments to C ones - * cleaned up a lot of signed/unsigned mistakes - * - * Revision 1.19 2004/06/26 06:12:15 reinelt - * - * support for Beckmann+Egle Compact Terminals - * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver - * added debugging to the generic serial driver - * fixed a bug in the generic text driver where icons could be drawn outside - * the display bounds - * - * Revision 1.18 2004/06/20 10:09:55 reinelt - * - * 'const'ified the whole source - * - * Revision 1.17 2004/06/05 06:41:40 reinelt - * - * chancged splash screen again - * - * Revision 1.16 2004/06/02 10:09:22 reinelt - * - * splash screen for HD44780 - * - * Revision 1.15 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.14 2004/05/26 11:37:36 reinelt - * - * Curses driver ported. - * - * Revision 1.13 2004/03/19 09:17:46 reinelt - * - * removed the extra 'goto' function, row and col are additional parameters - * of the write() function now. - * - * Revision 1.12 2004/03/03 03:47:04 reinelt - * big patch from Martin Hejl: - * - use qprintf() where appropriate - * - save CPU cycles on gettimeofday() - * - add quit() functions to free allocated memory - * - fixed lots of memory leaks - * - * Revision 1.11 2004/02/15 21:43:43 reinelt - * T6963 driver nearly finished - * framework for graphic displays done - * i2c_sensors patch from Xavier - * some more old generation files removed - * - * Revision 1.10 2004/02/14 11:56:17 reinelt - * M50530 driver ported - * changed lots of 'char' to 'unsigned char' - * - * Revision 1.9 2004/02/07 13:45:23 reinelt - * icon visibility patch #2 from Xavier - * - * Revision 1.8 2004/01/30 20:57:56 reinelt - * HD44780 patch from Martin Hejl - * dmalloc integrated - * - * Revision 1.7 2004/01/29 04:40:02 reinelt - * every .c file includes "config.h" now - * - * Revision 1.6 2004/01/23 07:04:23 reinelt - * icons finished! - * - * Revision 1.5 2004/01/23 04:53:54 reinelt - * icon widget added (not finished yet!) - * - * Revision 1.4 2004/01/22 07:57:45 reinelt - * several bugs fixed where segfaulting on layout>display - * Crystalfontz driver optimized, 632 display already works - * - * Revision 1.3 2004/01/20 14:25:12 reinelt - * some reorganization - * moved drv_generic to drv_generic_serial - * moved port locking stuff to drv_generic_serial - * - * Revision 1.2 2004/01/20 12:45:47 reinelt - * "Default screen" working with MatrixOrbital - * - * Revision 1.1 2004/01/20 05:36:59 reinelt - * moved text-display-specific stuff to drv_generic_text - * moved all the bar stuff from drv_generic_bar to generic_text - * */ /* @@ -590,6 +449,7 @@ int drv_generic_text_icon_draw(WIDGET * W) static int icon_counter = 0; WIDGET_ICON *Icon = W->data; int row, col; + int visible; int invalidate = 0; unsigned char ascii; @@ -614,8 +474,11 @@ int drv_generic_text_icon_draw(WIDGET * W) Icon->ascii = CHAR0 + CHARS - icon_counter; } + /* Icon visible? */ + visible = P2N(&Icon->visible) > 0; + /* maybe redefine icon */ - if (Icon->curmap != Icon->prvmap && Icon->visible) { + if (Icon->curmap != Icon->prvmap && visible) { Icon->prvmap = Icon->curmap; if (drv_generic_text_real_defchar) drv_generic_text_real_defchar(Icon->ascii, Icon->bitmap + YRES * Icon->curmap); @@ -623,7 +486,7 @@ int drv_generic_text_icon_draw(WIDGET * W) } /* use blank if invisible */ - ascii = Icon->visible ? Icon->ascii : ' '; + ascii = visible ? Icon->ascii : ' '; /* transfer icon into layout buffer */ LayoutFB[row * LCOLS + col] = ascii; |