blob: 0aaf3d142b9b4126dd07fd9da4a102d2ae592cc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/***************************************************************************
* Copyright (c) 2003,2004 by Marcel Wiesweg *
* *
* 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 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef OSDTELETEXT_MENU__H
#define OSDTELETEXT_MENU__H
#include <time.h>
#include <vdr/osd.h>
#include <vdr/osdbase.h>
#include <vdr/status.h>
#include "txtrecv.h"
#include "setup.h"
extern int Stretch;
class ChannelStatus : public cStatus {
public:
ChannelStatus();
protected:
virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
};
class TeletextBrowser : public cOsdObject {
public:
TeletextBrowser(cTxtStatus *txtSt);
~TeletextBrowser();
void Show(void);
static void ChannelSwitched(int ChannelNumber);
virtual eOSState ProcessKey(eKeys Key);
protected:
enum Direction { DirectionForward, DirectionBackward };
void SetNumber(int i);
void ShowPage();
void UpdateClock();
bool DecodePage();
void ChangePageRelative(Direction direction);
void ChangeSubPageRelative(Direction direction);
bool CheckPage();
void ShowAskForChannel();
bool CheckFirstSubPage(int startWith);
void SetPreviousPage(int oldPage, int oldSubPage, int newPage);
bool CheckIsValidChannel(int number);
int PageCheckSum();
void ShowPageNumber();
void ExecuteAction(eTeletextAction e);
int nextValidPageNumber(int start, Direction direction);
char fileName[PATH_MAX];
char page[40][24];
int cursorPos;
eTeletextAction TranslateKey(eKeys Key);
bool pageFound;
bool selectingChannel;
bool needClearMessage;
int selectingChannelNumber;
int checkSum;
cTxtStatus *txtStatus;
bool suspendedReceiving;
int previousPage;
int previousSubPage;
int pageBeforeNumberInput;
time_t lastActivity;
int inactivityTimeout;
static int currentPage;
static int currentSubPage;
static tChannelID channel;
static int currentChannelNumber;
static TeletextBrowser* self;
};
#endif
|