/* $Id$ * $URL$ * * icon widget handling * * Copyright (C) 2003, 2004 Michael Reinelt * Copyright (C) 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 * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * exported functions: * * WIDGET_CLASS Widget_Icon * the icon widget * */ #include "config.h" #include #include #include #include #include "debug.h" #include "cfg.h" #include "qprintf.h" #include "property.h" #include "timer.h" #include "widget.h" #include "widget_icon.h" #ifdef WITH_DMALLOC #include #endif /* icons size is same as char size */ extern int XRES, YRES; static void widget_icon_read_bitmap(const char *section, WIDGET_ICON * Icon) { int row, n; char key[15]; char *val, *v; unsigned char *map; for (row = 0; row < YRES; row++) { qprintf(key, sizeof(key), "Bitmap.Row%d", row + 1); val = cfg_get(section, key, ""); map = Icon->bitmap + row; n = 0; for (v = val; *v != '\0'; v++) { if (n >= Icon->maxmap) { Icon->maxmap++; Icon->bitmap = realloc(Icon->bitmap, Icon->maxmap * YRES * sizeof(char)); memset(Icon->bitmap + n * YRES, 0, YRES * sizeof(char)); map = Icon->bitmap + n * YRES + row; } switch (*v) { case '|': n++; map += YRES; break; case '*': (*map) <<= 1; (*map) |= 1; break; default: (*map) <<= 1; } } free(val); } } void widget_icon_update(void *Self) { WIDGET *W = (WIDGET *) Self; WIDGET_ICON *Icon = W->data; /* process the parent only */ if (W->parent == NULL) { /* evaluate properties */ property_eval(&Icon->speed); property_eval(&Icon->visible); property_eval(&Icon->frame); int frame = P2N(&Icon->frame); if ((frame >= 0) && (frame <= Icon->maxmap)) { /* select icon bitmap by evaluated frame number */ Icon->curmap = frame; } else { /* rotate icon bitmap */ Icon->curmap++; if (Icon->curmap >= Icon->maxmap) Icon->curmap = 0; } } /* finally, draw it! */ if (W->class->draw) W->class->draw(W); /* add a new one-shot timer */ if (P2N(&Icon->speed) > 0) { timer_add(widget_icon_update, Self, P2N(&Icon->speed), 1); } } int widget_icon_init(WIDGET * Self) { char *section; WIDGET_ICON *Icon; /* re-use the parent if one exists */ if (Self->parent == NULL) { /* prepare config section */ /* strlen("Widget:")=7 */ section = malloc(strlen(Self->name) + 8); strcpy(section, "Widget:"); strcat(section, Self->name); Icon = malloc(sizeof(WIDGET_ICON)); memset(Icon, 0, sizeof(WIDGET_ICON)); /* load p
# 2012-07-23 Antti Palosaari <crope@iki.fi>
# generated from http://www.digita.fi/kuluttajat/tv/nakyvyysalueet/kanavanumerot_ja_taajuudet
T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE