vdr/interface.h
Klaus Schmidinger 96ebdbf4b1 Version 1.1.18
- Fixed missing initialization of 'number' in cChannel (thanks to Martin Hammerschmid
  for reporting this one).
- Fixed a misplaced ')' in the fix about the stale lock files (thanks again to
  Oliver Endriss for pointing this out - it was my fault).
- Group delimiters in the 'channels.conf' file that have no text (like a simple ":"
  or ":@201") no longer show up in the Channels menu (suggested by Guy Roussin).
- Added "Tele 5" to 'channels.conf' (thanks to Georg Hitsch).
- Changed the source directory name for plugins from 'SRC' to 'src' (suggested by
  Clemens Kirchgatterer).
- Removed transponders 10788, 11739 and 12266 from 'channels.conf' (apparently they
  are no longer active).
- Deactivated some templates in tools.h in case some plugin needs to use the STL
  (suggested by Gerald Berwolf).
- Timers now accept channel IDs even if the 'source' is 0 (thanks to Stefan Huelswitt
  for reporting this one).
- Now taking an active SVDRP connection into account when doing shutdown or
  housekeeping (suggested by Emil Naepflein).
- Macros in 'keymacros.conf' can now use "@plugin" to directly access the main menu
  function of a given plugin (see man vdr(5) for details).
- The new plugin 'sky' can be used to integrate a Sky Digibox into the VDR system,
  using a Kfir MPEG2 encoder card (see PLUGINS/src/sky/README for details).
2002-12-01 18:00:00 +01:00

64 lines
2.1 KiB
C++

/*
* interface.h: Abstract user interface layer
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: interface.h 1.29 2002/11/30 14:37:04 kls Exp $
*/
#ifndef __INTERFACE_H
#define __INTERFACE_H
#include "config.h"
#include "osdbase.h"
#include "remote.h"
#include "svdrp.h"
class cInterface {
public:
enum { MaxCols = 5 };
private:
int width, height;
int open;
int cols[MaxCols];
bool interrupted;
cSVDRP *SVDRP;
void QueryKeys(cRemote *Remote);
void HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor);
eKeys Wait(int Seconds = 0, bool KeepChar = false);
public:
cInterface(int SVDRPport = 0);
~cInterface();
bool IsOpen(void) { return open > 0; }
void Open(int NumCols = 0, int NumLines = 0);
void Close(void);
bool HasSVDRPConnection(void) { return SVDRP && SVDRP->HasConnection(); }
void Interrupt(void) { interrupted = true; }
int Width(void) { return width; }
int Height(void) { return height; }
eKeys GetKey(bool Wait = true);
void Clear(void);
void ClearEol(int x, int y, eDvbColor Color = clrBackground);
void Fill(int x, int y, int w, int h, eDvbColor color = clrBackground);
void SetBitmap(int x, int y, const cBitmap &Bitmap);
void Flush(void);
void SetCols(int *c);
const int *GetCols(void) { return cols; }
eDvbFont SetFont(eDvbFont Font);
char *WrapText(const char *Text, int Width, int *Height);
void Write(int x, int y, const char *s, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
void WriteText(int x, int y, const char *s, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
void Title(const char *s);
void Status(const char *s, eDvbColor FgColor = clrBlack, eDvbColor BgColor = clrCyan);
void Info(const char *s);
void Error(const char *s);
bool Confirm(const char *s, int Seconds = 10, bool WaitForTimeout = false);
void Help(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL);
void LearnKeys(void);
};
extern cInterface *Interface;
#endif //__INTERFACE_H