mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Fixed minimum lifespan of deleted recordings (thanks to Jaakko Hyvätti). - Updated French OSD texts (thanks to Olivier Jacques). - Fixed paging through lists with repeated Left/Right keys. - Fixed setting the PCR-PID in case it is equal to one of the other PIDs (thanks to Oliver Endriss for reporting this one). - Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey (thanks to Kai Moeller for reporting this one). - Fixed handling dedicated keys. - Now turning off live PIDs when replaying. This avoids short spikes from other channels when switching between Transfer Mode channels, and also lets an ongoing replay continue even if a recording is started on the primary device. - The RCU channel display no longer changes when a recording on a different channel starts on the primary device. - Restoring the current channel in case a recording has switched the transponder. If all devices are busy and none of them can provide the current channel, the message "Channel not available!" will be displayed. - Removed the (no longer necessary) 'panic' stuff from cThread. - Added cStatus::OsdItem() to provide the entire list of menu items to a plugin (thanks to Carsten Siebholz). - The red ("Record") and yellow ("Pause") button in the "Main" menu are no longer available when replaying.
99 lines
2.1 KiB
C++
99 lines
2.1 KiB
C++
/*
|
|
* remote.h: General Remote Control handling
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: remote.h 1.28 2003/05/02 10:41:35 kls Exp $
|
|
*/
|
|
|
|
#ifndef __REMOTE_H
|
|
#define __REMOTE_H
|
|
|
|
#include <stdio.h>
|
|
#include <termios.h>
|
|
#include <time.h>
|
|
#include "keys.h"
|
|
#include "thread.h"
|
|
#include "tools.h"
|
|
|
|
class cRemote : public cListObject {
|
|
private:
|
|
enum { MaxKeys = MAXKEYSINMACRO };
|
|
static eKeys keys[MaxKeys];
|
|
static int in;
|
|
static int out;
|
|
static cRemote *learning;
|
|
static char *unknownCode;
|
|
static cMutex mutex;
|
|
static cCondVar keyPressed;
|
|
static const char *plugin;
|
|
char *name;
|
|
protected:
|
|
cRemote(const char *Name);
|
|
const char *GetSetup(void);
|
|
void PutSetup(const char *Setup);
|
|
bool Put(uint64 Code, bool Repeat = false, bool Release = false);
|
|
bool Put(const char *Code, bool Repeat = false, bool Release = false);
|
|
public:
|
|
virtual ~cRemote();
|
|
virtual bool Ready(void) { return true; }
|
|
virtual bool Initialize(void) { return true; }
|
|
const char *Name(void) { return name; }
|
|
static void SetLearning(cRemote *Learning) { learning = Learning; }
|
|
static void Clear(void);
|
|
static bool Put(eKeys Key, bool AtFront = false);
|
|
static bool PutMacro(eKeys Key);
|
|
static const char *GetPlugin(void) { return plugin; }
|
|
static bool HasKeys(void);
|
|
static eKeys Get(int WaitMs = 1000, char **UnknownCode = NULL);
|
|
};
|
|
|
|
class cRemotes : public cList<cRemote> {};
|
|
|
|
extern cRemotes Remotes;
|
|
|
|
enum eKbdFunc {
|
|
kfNone,
|
|
kfF1 = 0x100,
|
|
kfF2,
|
|
kfF3,
|
|
kfF4,
|
|
kfF5,
|
|
kfF6,
|
|
kfF7,
|
|
kfF8,
|
|
kfF9,
|
|
kfF10,
|
|
kfF11,
|
|
kfF12,
|
|
kfUp,
|
|
kfDown,
|
|
kfLeft,
|
|
kfRight,
|
|
kfHome,
|
|
kfEnd,
|
|
kfPgUp,
|
|
kfPgDown,
|
|
kfIns,
|
|
kfDel,
|
|
};
|
|
|
|
class cKbdRemote : public cRemote, private cThread {
|
|
private:
|
|
bool active;
|
|
static bool kbdAvailable;
|
|
static bool rawMode;
|
|
struct termios savedTm;
|
|
virtual void Action(void);
|
|
int MapCodeToFunc(uint64 Code);
|
|
public:
|
|
cKbdRemote(void);
|
|
virtual ~cKbdRemote();
|
|
static bool KbdAvailable(void) { return kbdAvailable; }
|
|
static uint64 MapFuncToCode(int Func);
|
|
static void SetRawMode(bool RawMode);
|
|
};
|
|
|
|
#endif //__REMOTE_H
|