MythTV  master
cc708reader.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2003-2005, Daniel Kristjansson
3 
4 #ifndef CC708READER_H
5 #define CC708READER_H
6 
7 #include <cstdint>
8 #include "format.h"
9 #include "compat.h"
10 #include "cc708window.h"
11 
12 class MythPlayer;
13 
14 const uint k708MaxServices = 64;
15 
17 {
18  public:
19  explicit CC708Reader(MythPlayer *owner);
20  virtual ~CC708Reader();
21 
22  void SetCurrentService(int service) { m_currentservice = service; }
24  void SetEnabled(bool enable) { m_enabled = enable; }
25  void ClearBuffers(void);
26 
28  { return &(CC708services[service_num]); }
29  CC708Window &GetCCWin(uint service_num, uint window_id)
30  { return CC708services[service_num].m_windows[window_id]; }
32  { return GetCCWin(svc_num, CC708services[svc_num].m_current_window); }
33 
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, bool 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);
55 
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);
67 
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);
72 
73  // Text
74  virtual void TextWrite(uint service_num,
75  short* unicode_string, short len);
76 
77  // Data
78  unsigned char *m_buf[k708MaxServices];
82 
86 
90  QString m_osdfontname;
91  QString m_osdccfontname;
92  QString m_osd708fontnames[20];
93  QString m_osdprefix;
94  QString m_osdtheme;
95 
96  MythPlayer *m_parent {nullptr};
97  bool m_enabled {false};
98 };
99 #endif // CC708READER_H
int CC708DelayedDeletes[k708MaxServices]
Definition: cc708reader.h:89
CC708Service * GetCurrentService(void)
Definition: cc708reader.h:23
CC708Window m_windows[k708MaxWindows]
Definition: cc708window.h:309
CC708Window & GetCCWin(uint svc_num)
Definition: cc708reader.h:31
virtual void DefineWindow(uint service_num, int window_id, int priority, bool 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
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
uint m_buf_alloc[k708MaxServices]
Definition: cc708reader.h:79
virtual ~CC708Reader()
Definition: cc708reader.cpp:31
int m_temp_str_alloc[k708MaxServices]
Definition: cc708reader.h:84
QString m_osdprefix
Definition: cc708reader.h:93
bool m_delayed[k708MaxServices]
Definition: cc708reader.h:81
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
uint m_buf_size[k708MaxServices]
Definition: cc708reader.h:80
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)
int m_temp_str_size[k708MaxServices]
Definition: cc708reader.h:85
virtual void SetCurrentWindow(uint service_num, int window_id)
Definition: cc708reader.cpp:46
QString m_osdtheme
Definition: cc708reader.h:94
virtual void HideWindows(uint service_num, int window_map)
CC708Window & GetCCWin(uint service_num, uint window_id)
Definition: cc708reader.h:29
int m_currentservice
Definition: cc708reader.h:87
MythPlayer * m_parent
Definition: cc708reader.h:96
virtual void SetPenAttributes(uint service_num, int pen_size, int offset, int text_tag, int font_tag, int edge_type, int underline, int italics)
CC708Service CC708services[k708MaxServices]
Definition: cc708reader.h:88
QString m_osdfontname
Definition: cc708reader.h:90
QString m_osd708fontnames[20]
Definition: cc708reader.h:92
virtual void Reset(uint service_num)
void SetCurrentService(int service)
Definition: cc708reader.h:22
QString m_osdccfontname
Definition: cc708reader.h:91
short * m_temp_str[k708MaxServices]
Definition: cc708reader.h:83
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)
virtual void TextWrite(uint service_num, short *unicode_string, short len)
bool m_enabled
Definition: cc708reader.h:97
virtual void DeleteWindows(uint service_num, int window_map)
Definition: cc708reader.cpp:97
unsigned char * m_buf[k708MaxServices]
Definition: cc708reader.h:78