37
37
#include "zmodel.h"
40
TTX_NONE=0, /* No messages */
41
TTX_PAGE_RECEIVED, /* The monitored page has been received */
42
TTX_NETWORK_CHANGE, /* New network info feeded into the decoder */
43
TTX_PROG_INFO_CHANGE, /* New program info feeded into the decoder */
44
TTX_TRIGGER, /* Trigger event, ttx_message_data.link filled */
45
TTX_CHANNEL_SWITCHED, /* zvbi_channel_switched was called, the cache
47
TTX_BROKEN_PIPE /* No longer connected to the TTX decoder */
53
vbi_link link; /* A trigger link */
57
extern vbi_pgno zvbi_page; /* page, subpage for subtitles */
58
extern vbi_subno zvbi_subpage;
61
* Register a client as TTX receiver, and returns the id that the
62
* client should use to identify itself.
64
int register_ttx_client(void);
67
* Gets the next message in the queue, or TTX_NONE if nothing
69
* Provide a valid pointer in data, it can be filled in.
71
enum ttx_message peek_ttx_message(int id, ttx_message_data *data);
74
* Like peek, but waits until something is available
75
* Provide a valid pointer in data, it can be filled in.
77
enum ttx_message get_ttx_message(int id, ttx_message_data *data);
80
* Unregisters a client, telling that it won't continue porocessing
83
void unregister_ttx_client(int id);
86
* Tells the renderer whether to reveal hidden chars.
88
void set_ttx_parameters(int id, int reveal);
91
* Sets the given page as the page the client is interested in.
92
* Use ANY_SUB in subpage for getting all subpages
94
void monitor_ttx_page(int id/*client*/, int page, int subpage);
97
* Render the provided page to the client, and send the RECEIVED
98
* event. Set it as the currently monitored page.
100
void monitor_ttx_this(int id, vbi_page *pg);
103
* Freezes the current page, no more RECEIVED events are sent until
106
void ttx_freeze(int id);
109
* Allows sending RECEIVED events to the client.
111
void ttx_unfreeze(int id);
114
* Returns a pointer to the formatted page the client is rendering
116
vbi_page* get_ttx_fmt_page(int id);
119
* Returns a pointer to the scaled version of the page. Consider the
120
* returned pixbuf as volatile, i.e., any other ttx_ call on the same
121
* client can invalidate the returned pointer.
122
* Can return NULL if the scaled version doesn't exist, etc...
124
GdkPixbuf * get_scaled_ttx_page(int id);
127
* Resizes the rendered size of the page
129
void resize_ttx_page(int id, int w, int h);
132
* Renders the currently monitored page into the given drawable.
134
void render_ttx_page(int id, GdkDrawable *drawable, GdkGC *gc,
135
gint src_x, gint src_y,
136
gint dest_x, gint dest_y,
140
* Renders into the given bitmap (that must have appropiate
141
* dimensions) the transparency info of the current page.
143
void render_ttx_mask(int id, GdkBitmap *bitmap);
146
* Updates the blinking items in the page.
148
void refresh_ttx_page(int id, GtkWidget *drawable);
150
/* Startups the VBI engine (doesn't open devices) */
151
void startup_zvbi(void);
153
/* Shuts down the VBI engine */
154
void shutdown_zvbi(void);
38
#include "frequencies.h"
41
zvbi_decoder_fn (const vbi_sliced * sliced,
45
zvbi_chsw_fn (const tveng_tuned_channel *channel,
49
zvbi_add_decoder (zvbi_decoder_fn * decoder,
52
zvbi_remove_decoder (zvbi_decoder_fn * decoder,
156
60
/* Open the configured VBI device, FALSE on error */
158
zvbi_open_device(char *device);
62
zvbi_open_device (const char * dev_name);
160
63
/* Closes the VBI device */
162
zvbi_close_device(void);
165
Returns the global vbi object, or NULL if vbi isn't enabled or
166
doesn't work. You can safely use this function to test if VBI works
167
(it will return NULL if it doesn't).
65
zvbi_close_device (void);
66
/* Returns the global vbi object, or NULL if vbi isn't enabled or
67
doesn't work. You can safely use this function to test if VBI works
68
(it will return NULL if it doesn't). */
170
zvbi_get_object(void);
173
Returns the model for the vbi object. You can hook into this to know
174
when the vbi object is created or destroyed.
70
zvbi_get_object (void);
71
/* Returns the model for the vbi object. You can hook into this to know
72
when the vbi object is created or destroyed. */
177
zvbi_get_model(void);
180
Builds a dialog showing the info we get from the VBI device
181
a) network info, b) program info
183
GtkWidget *zvbi_build_network_info(void);
184
GtkWidget *zvbi_build_program_info(void);
187
Returns the g_strdup'ed name of the current station,
188
if known, or NULL. The returned value should be g_free'ed
194
Clears the station_name_known flag. Useful when you are changing
195
freqs fast and you want to know the current station
198
zvbi_name_unknown(void);
201
Called when changing channels, inputs, etc, tells the decoding engine
202
to flush the cache, triggers, etc.
205
zvbi_channel_switched(void);
208
Reset our knowledge about network and program,
209
update main title and info dialogs.
212
zvbi_reset_network_info(void);
214
zvbi_reset_program_info(void);
217
Returns the current program title ("Foo", "Bar", "Unknown"),
218
the returned string must be g_free'ed
221
zvbi_current_title(void);
224
Returns the current program rating ("TV-MA", "Not rated"),
225
don't free, just a pointer.
228
zvbi_current_rating(void);
231
Returns the currently selected
232
Teletext implementation level (for vbi_fetch_*)
74
zvbi_get_model (void);
75
/* Returns the g_strdup'ed name of the current station, if known, or
76
NULL. The returned value should be g_free'ed. */
80
zvbi_get_current_network_name (void);
81
/* Clears the station_name_known flag. Useful when you are changing
82
freqs fast and you want to know the current station */
84
zvbi_name_unknown (void);
85
/* Called when changing channels, inputs, etc, tells the decoding engine
86
to flush the cache, triggers, etc. */
88
zvbi_channel_switched (void);
89
/* Reset our knowledge about network and program,
90
update main title and info dialogs. */
92
zvbi_reset_network_info (void);
94
zvbi_reset_program_info (void);
95
/* Returns the current program title ("Foo", "Bar", "Unknown"),
96
the returned string must be g_free'ed */
98
zvbi_current_title (void);
99
/* Returns the current program rating ("TV-MA", "Not rated"),
100
don't free, just a pointer. */
102
zvbi_current_rating (void);
103
/* Returns the currently selected
104
Teletext implementation level (for vbi_fetch_*) */
235
zvbi_teletext_level (void);
237
#endif /* HAVE_LIBZVBI */
106
zvbi_teletext_level (void);
108
#else /* !HAVE_LIBZVBI */
110
/* Startups the VBI engine (doesn't open devices) */
113
/* Shuts down the VBI engine */
115
shutdown_zvbi (void);
117
typedef int vbi_pgno;
119
#endif /* !HAVE_LIBZVBI */
121
/* Modifies the gui according to VBI availability. */
123
vbi_gui_sensitive (gboolean on);
238
125
#endif /* zvbi.h */