summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-04-15 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-04-15 18:00:00 +0200
commit37250a0568d5b1d689d5c59f983e9be228ed49c2 (patch)
treef5b3cb133d5ec1ede63de04cf9c394bcf4a514a2 /interface.c
parent6feebe674c09b65e43012bf439c201cfb65aa82c (diff)
downloadvdr-patch-lnbsharing-37250a0568d5b1d689d5c59f983e9be228ed49c2.tar.gz
vdr-patch-lnbsharing-37250a0568d5b1d689d5c59f983e9be228ed49c2.tar.bz2
Version 0.03vdr_osm-0.03
- Actual record/replay now works. - Dropped the idea of different "recording qualities" (a 36GB harddisk is able to store some 18 hours in full quality, so we don't really need that). - Termination signals are now caught and the program cleans up before exiting. - Support for CICAM.
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/interface.c b/interface.c
index 6a4b2a4..a546513 100644
--- a/interface.c
+++ b/interface.c
@@ -4,7 +4,7 @@
* See the main source file 'osm.c' for copyright information and
* how to reach the author.
*
- * $Id: interface.c 1.2 2000/03/06 19:45:03 kls Exp $
+ * $Id: interface.c 1.3 2000/04/15 17:38:11 kls Exp $
*/
#include "interface.h"
@@ -15,10 +15,10 @@
#define MenuColumns 40
#ifndef DEBUG_REMOTE
-cRcIo RcIo("/dev/ttyS1");//XXX
+cRcIo RcIo("/dev/ttyS1");
#endif
-cDvbOsd DvbOsd; //XXX member of cInterface???
+cDvbApi DvbApi; //XXX member of cInterface???
cInterface Interface;
@@ -38,19 +38,22 @@ void cInterface::Init(void)
void cInterface::Open(void)
{
if (!open++)
- DvbOsd.Open(MenuColumns, MenuLines);
+ DvbApi.Open(MenuColumns, MenuLines);
}
void cInterface::Close(void)
{
+ if (open == 1)
+ Clear();
if (!--open)
- DvbOsd.Close();
+ DvbApi.Close();
}
unsigned int cInterface::GetCh(void)
{
#ifdef DEBUG_REMOTE
- return getch();
+ int c = getch();
+ return (c > 0) ? c : 0;
#else
//XXX #ifdef DEBUG_OSD
//XXX wrefresh(window);//XXX
@@ -80,13 +83,13 @@ eKeys cInterface::Wait(int Seconds)
void cInterface::Clear(void)
{
if (open)
- DvbOsd.Clear();
+ DvbApi.Clear();
}
void cInterface::ClearEol(int x, int y, eDvbColor Color)
{
if (open)
- DvbOsd.ClrEol(x, y, Color);
+ DvbApi.ClrEol(x, y, Color);
}
void cInterface::SetCols(int *c)
@@ -101,7 +104,7 @@ void cInterface::SetCols(int *c)
void cInterface::Write(int x, int y, const char *s, eDvbColor FgColor, eDvbColor BgColor)
{
if (open)
- DvbOsd.Text(x, y, s, FgColor, BgColor);
+ DvbApi.Text(x, y, s, FgColor, BgColor);
}
void cInterface::WriteText(int x, int y, const char *s, bool Current)
@@ -187,8 +190,8 @@ void cInterface::HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvb
int l = (w - strlen(Text)) / 2;
if (l < 0)
l = 0;
- DvbOsd.Fill(Index * w, -1, w, 1, BgColor);
- DvbOsd.Text(Index * w + l, -1, Text, FgColor, BgColor);
+ DvbApi.Fill(Index * w, -1, w, 1, BgColor);
+ DvbApi.Text(Index * w + l, -1, Text, FgColor, BgColor);
}
}