diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-04-22 13:51:48 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-04-22 13:51:48 +0200 |
commit | c32864756051a976e87879cd5827f4d95b5d55d5 (patch) | |
tree | a33220d629f2a5108957f1f42547d4cdd0e70f6f /dvbapi.c | |
parent | ec9cb35acb536540003caed72b56156b960458d5 (diff) | |
download | vdr-c32864756051a976e87879cd5827f4d95b5d55d5.tar.gz vdr-c32864756051a976e87879cd5827f4d95b5d55d5.tar.bz2 |
Implemented Channel Display
Diffstat (limited to 'dvbapi.c')
-rw-r--r-- | dvbapi.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -4,7 +4,7 @@ * See the main source file 'osm.c' for copyright information and * how to reach the author. * - * $Id: dvbapi.c 1.3 2000/04/15 14:45:04 kls Exp $ + * $Id: dvbapi.c 1.4 2000/04/22 13:09:49 kls Exp $ */ #include "dvbapi.h" @@ -1001,7 +1001,7 @@ cDvbApi::cDvbApi(void) memset(&colorPairs, 0, sizeof(colorPairs)); start_color(); leaveok(stdscr, TRUE); - window = stdscr; + window = NULL; #endif } @@ -1054,19 +1054,21 @@ void cDvbApi::Cmd(OSD_Command cmd, int color, int x0, int y0, int x1, int y1, co } #endif -void cDvbApi::Open(int w, int h) +void cDvbApi::Open(int w, int h, int d) { cols = w; rows = h; #ifdef DEBUG_OSD - //XXX size... + window = subwin(stdscr, h, w, d, 0); + syncok(window, TRUE); #define B2C(b) (((b) * 1000) / 255) #define SETCOLOR(n, r, g, b, o) init_color(n, B2C(r), B2C(g), B2C(b)) #else w *= charWidth; h *= lineHeight; - int x = (720 - w) / 2; //TODO PAL vs. NTSC??? - int y = (576 - h) / 2; + d *= lineHeight; + int x = (720 - MenuColumns * charWidth) / 2; //TODO PAL vs. NTSC??? + int y = (576 - MenuLines * lineHeight) / 2 + d; Cmd(OSD_Open, 4, x, y, x + w - 1, y + h - 1); #define SETCOLOR(n, r, g, b, o) Cmd(OSD_SetColor, n, r, g, b, o) #endif @@ -1108,6 +1110,7 @@ void cDvbApi::Fill(int x, int y, int w, int h, eDvbColor color) wmove(window, y + r, x); // ncurses wants 'y' before 'x'! whline(window, ' ', w); } + wsyncup(window); // shouldn't be necessary because of 'syncok()', but w/o it doesn't work #else Cmd(OSD_FillBlock, color, x * charWidth, y * lineHeight, (x + w) * charWidth - 1, (y + h) * lineHeight - 1); #endif |