MythTV  master
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2003-2005, Daniel Kristjansson
4 #ifndef CC708READER_H
5 #define CC708READER_H
7 #include <cstdint>
8 #include "format.h"
9 #include "compat.h"
10 #include "cc708window.h"
12 class MythPlayer;
14 const uint k708MaxServices = 64;
17 {
18  public:
19  explicit CC708Reader(MythPlayer *owner);
20  virtual ~CC708Reader();
22  void SetCurrentService(int service) { currentservice = service; }
24  void SetEnabled(bool enable) { enabled = enable; }
25  void ClearBuffers(void);
28  { return &(CC708services[service_num]); }
29  CC708Window &GetCCWin(uint service_num, uint window_id)
30  { return CC708services[service_num].windows[window_id]; }
32  { return GetCCWin(svc_num, CC708services[svc_num].current_window); }
34  // Window settings
35  virtual void SetCurrentWindow(uint service_num, int window_id);
36  virtual void DefineWindow(uint service_num, int window_id,
37  int priority, int visible,
38  int anchor_point, int relative_pos,
39  int anchor_vertical, int anchor_horizontal,
40  int row_count, int column_count,
41  int row_lock, int column_lock,
42  int pen_style, int window_style);
43  virtual void DeleteWindows( uint service_num, int window_map);
44  virtual void DisplayWindows(uint service_num, int window_map);
45  virtual void HideWindows( uint service_num, int window_map);
46  virtual void ClearWindows( uint service_num, int window_map);
47  virtual void ToggleWindows( uint service_num, int window_map);
48  virtual void SetWindowAttributes(uint service_num,
49  int fill_color, int fill_opacity,
50  int border_color, int border_type,
51  int scroll_dir, int print_dir,
52  int effect_dir,
53  int display_effect, int effect_speed,
54  int justify, int word_wrap);
56  // Pen settings
57  virtual void SetPenAttributes(uint service_num,
58  int pen_size, int offset,
59  int text_tag, int font_tag,
60  int edge_type,
61  int underline, int italics);
62  virtual void SetPenColor(uint service_num,
63  int fg_color, int fg_opacity,
64  int bg_color, int bg_opacity,
65  int edge_color);
66  virtual void SetPenLocation(uint service_num, int row, int column);
68  // Display State
69  virtual void Delay(uint service_num, int tenths_of_seconds);
70  virtual void DelayCancel(uint service_num);
71  virtual void Reset(uint service_num);
73  // Text
74  virtual void TextWrite(uint service_num,
75  short* unicode_string, short len);
77  // Data
78  unsigned char* buf[k708MaxServices];
90  QString osdfontname;
91  QString osdccfontname;
92  QString osd708fontnames[20];
93  QString osdprefix;
94  QString osdtheme;
97  bool enabled;
98 };
99 #endif // CC708READER_H
int CC708DelayedDeletes[k708MaxServices]
Definition: cc708reader.h:89
bool delayed[k708MaxServices]
Definition: cc708reader.h:81
CC708Service * GetCurrentService(void)
Definition: cc708reader.h:23
CC708Window & GetCCWin(uint svc_num)
Definition: cc708reader.h:31
QString osdfontname
Definition: cc708reader.h:90
void ClearBuffers(void)
Definition: cc708reader.cpp:40
virtual void SetWindowAttributes(uint service_num, int fill_color, int fill_opacity, int border_color, int border_type, int scroll_dir, int print_dir, int effect_dir, int display_effect, int effect_speed, int justify, int word_wrap)
CC708Reader(MythPlayer *owner)
Definition: cc708reader.cpp:14
virtual ~CC708Reader()
Definition: cc708reader.cpp:31
QString osd708fontnames[20]
Definition: cc708reader.h:92
uint buf_alloc[k708MaxServices]
Definition: cc708reader.h:79
virtual void ClearWindows(uint service_num, int window_map)
virtual void ToggleWindows(uint service_num, int window_map)
virtual void SetPenColor(uint service_num, int fg_color, int fg_opacity, int bg_color, int bg_opacity, int edge_color)
unsigned int uint
Definition: compat.h:140
virtual void Delay(uint service_num, int tenths_of_seconds)
void SetEnabled(bool enable)
Definition: cc708reader.h:24
virtual void DelayCancel(uint service_num)
virtual void SetPenLocation(uint service_num, int row, int column)
virtual void SetCurrentWindow(uint service_num, int window_id)
Definition: cc708reader.cpp:46
int temp_str_size[k708MaxServices]
Definition: cc708reader.h:85
short * temp_str[k708MaxServices]
Definition: cc708reader.h:83
virtual void HideWindows(uint service_num, int window_map)
CC708Window & GetCCWin(uint service_num, uint window_id)
Definition: cc708reader.h:29
int currentservice
Definition: cc708reader.h:87
virtual void DefineWindow(uint service_num, int window_id, int priority, int visible, int anchor_point, int relative_pos, int anchor_vertical, int anchor_horizontal, int row_count, int column_count, int row_lock, int column_lock, int pen_style, int window_style)
Definition: cc708reader.cpp:54
CC708Window windows[k708MaxWindows]
Definition: cc708window.h:319
virtual void SetPenAttributes(uint service_num, int pen_size, int offset, int text_tag, int font_tag, int edge_type, int underline, int italics)
uint buf_size[k708MaxServices]
Definition: cc708reader.h:80
int temp_str_alloc[k708MaxServices]
Definition: cc708reader.h:84
CC708Service CC708services[k708MaxServices]
Definition: cc708reader.h:88
QString osdtheme
Definition: cc708reader.h:94
virtual void Reset(uint service_num)
void SetCurrentService(int service)
Definition: cc708reader.h:22
MythPlayer * parent
Definition: cc708reader.h:96
CC708Service * GetService(uint service_num)
Definition: cc708reader.h:27
const uint k708MaxServices
Definition: cc708reader.h:14
virtual void DisplayWindows(uint service_num, int window_map)
unsigned char * buf[k708MaxServices]
Definition: cc708reader.h:78
QString osdprefix
Definition: cc708reader.h:93
QString osdccfontname
Definition: cc708reader.h:91
bool enabled
Definition: cc708reader.h:97
virtual void TextWrite(uint service_num, short *unicode_string, short len)
virtual void DeleteWindows(uint service_num, int window_map)
Definition: cc708reader.cpp:97