~ubuntu-branches/ubuntu/maverick/tvtime/maverick

« back to all changes in this revision

Viewing changes to src/tvtimeosd.h

  • Committer: Bazaar Package Importer
  • Author(s): Simon Law
  • Date: 2004-01-13 18:00:36 UTC
  • Revision ID: james.westby@ubuntu.com-20040113180036-h996q67t476jymsu
Tags: upstream-0.9.12
ImportĀ upstreamĀ versionĀ 0.9.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Copyright (C) 2002, 2003 Billy Biggs <vektor@dumbterm.net>.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2, or (at your option)
 
7
 * any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software Foundation,
 
16
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#ifndef TVTIMEOSD_H_INCLUDED
 
20
#define TVTIMEOSD_H_INCLUDED
 
21
 
 
22
#if defined (__SVR4) && defined (__sun)
 
23
# include <sys/int_types.h>
 
24
#else
 
25
# include <stdint.h>
 
26
#endif
 
27
 
 
28
#ifdef __cplusplus
 
29
extern "C" {
 
30
#endif
 
31
 
 
32
/**
 
33
 * This object is the master on-screen-display controler.  It's basically
 
34
 * the high-level API to control the simple OSD items like the channel
 
35
 * number, volume bar, etc.
 
36
 *
 
37
 * The OSD currently lays out the screen as follows:
 
38
 *
 
39
 * +-----------                     ------+
 
40
 * |                                      |
 
41
 * |   Channel             Channel Info
 
42
 * |   Number              Channel Logo
 
43
 * |
 
44
 * |
 
45
 *
 
46
 * |
 
47
 * |  [ Muted - Volume Bar - Data Bar   ]
 
48
 * |                                      |
 
49
 * +----                            ------+
 
50
 */
 
51
 
 
52
typedef struct tvtime_osd_s tvtime_osd_t;
 
53
 
 
54
tvtime_osd_t *tvtime_osd_new( int width, int height, double pixel_aspect,
 
55
                              int fieldtime, unsigned int channel_rgb,
 
56
                              unsigned int other_rgb );
 
57
void tvtime_osd_delete( tvtime_osd_t *osd );
 
58
void tvtime_osd_set_pixel_aspect( tvtime_osd_t *osd, double pixel_aspect );
 
59
 
 
60
void tvtime_osd_show_info( tvtime_osd_t *osd );
 
61
 
 
62
void tvtime_osd_hold( tvtime_osd_t *osd, int hold );
 
63
void tvtime_osd_clear( tvtime_osd_t *osd );
 
64
 
 
65
void tvtime_osd_set_norm( tvtime_osd_t *osd, const char *norm );
 
66
void tvtime_osd_set_freq_table( tvtime_osd_t *osd, const char *freqtable );
 
67
void tvtime_osd_set_audio_mode( tvtime_osd_t *osd, const char *audiomode );
 
68
void tvtime_osd_set_input( tvtime_osd_t *osd, const char *text );
 
69
void tvtime_osd_set_channel_number( tvtime_osd_t *osd, const char *text );
 
70
void tvtime_osd_set_channel_name( tvtime_osd_t *osd, const char *text );
 
71
void tvtime_osd_set_hold_message( tvtime_osd_t *osd, const char *text );
 
72
void tvtime_osd_set_deinterlace_method( tvtime_osd_t *osd, const char *method );
 
73
void tvtime_osd_set_film_mode( tvtime_osd_t *osd, int mode );
 
74
void tvtime_osd_set_info_available( tvtime_osd_t *osd, int mode );
 
75
void tvtime_osd_set_pulldown( tvtime_osd_t *osd, int mode );
 
76
void tvtime_osd_volume_muted( tvtime_osd_t *osd, int mutestate );
 
77
void tvtime_osd_signal_present( tvtime_osd_t *osd, int signal );
 
78
 
 
79
void tvtime_osd_set_timeformat( tvtime_osd_t *osd, const char *format );
 
80
 
 
81
int tvtime_osd_data_bar_visible( tvtime_osd_t *osd );
 
82
void tvtime_osd_show_data_bar( tvtime_osd_t *osd, const char *barname,
 
83
                               int percentage );
 
84
void tvtime_osd_show_data_bar_centered( tvtime_osd_t *osd, const char *barname,
 
85
                                        int percentage );
 
86
void tvtime_osd_show_message( tvtime_osd_t *osd, const char *message );
 
87
 
 
88
 
 
89
void tvtime_osd_show_list( tvtime_osd_t *osd, int showlist, int chinfo );
 
90
int tvtime_osd_list_get_hilight( tvtime_osd_t *osd );
 
91
int tvtime_osd_list_get_numlines( tvtime_osd_t *osd );
 
92
int tvtime_osd_list_get_line_pos( tvtime_osd_t *osd, int y );
 
93
void tvtime_osd_list_set_hilight( tvtime_osd_t *osd, int pos );
 
94
void tvtime_osd_list_set_text( tvtime_osd_t *osd, int line, const char *text );
 
95
void tvtime_osd_list_set_lines( tvtime_osd_t *osd, int numlines );
 
96
void tvtime_osd_list_hold( tvtime_osd_t *osd, int hold );
 
97
 
 
98
/**
 
99
 * This function must be called every frame to update the state of the OSD.
 
100
 */
 
101
void tvtime_osd_advance_frame( tvtime_osd_t *osd );
 
102
 
 
103
/**
 
104
 * Asks the OSD object to composite itself onto the given scanline.
 
105
 * xpos indicates the x position that the output pointer points at,
 
106
 * width is the maximum width we should composite to, and scanline
 
107
 * is which scanline of the output frame this request is for.
 
108
 */
 
109
void tvtime_osd_composite_packed422_scanline( tvtime_osd_t *osd,
 
110
                                              uint8_t *output,
 
111
                                              int width, int xpos,
 
112
                                              int scanline );
 
113
 
 
114
void tvtime_osd_set_network_call( tvtime_osd_t* osd, const char *str );
 
115
void tvtime_osd_set_network_name( tvtime_osd_t* osd, const char *str );
 
116
void tvtime_osd_set_show_name( tvtime_osd_t* osd, const char *str );
 
117
void tvtime_osd_set_show_rating( tvtime_osd_t* osd, const char *str );
 
118
void tvtime_osd_set_show_start( tvtime_osd_t* osd, const char *str );
 
119
void tvtime_osd_set_show_length( tvtime_osd_t* osd, const char *str );
 
120
 
 
121
void tvtime_osd_show_program_info( tvtime_osd_t *osd, const char *title,
 
122
                                   const char *subtitle, const char *next );
 
123
int tvtime_osd_list_set_multitext( tvtime_osd_t *osd, int cur,
 
124
                                   const char *text, int numlines );
 
125
#ifdef __cplusplus
 
126
};
 
127
#endif
 
128
#endif /* TVTIMEOSD_H_INCLUDED */