Modules | |
Teletext and Closed Caption page render functions | |
Internal export module interface | |
Data Structures | |
struct | vbi_export_info |
Information about an export module. More... | |
union | vbi_option_value |
Result of an option query. More... | |
union | vbi_option_value_ptr |
Option menu types. More... | |
struct | vbi_option_info |
Information about an export option. More... | |
Typedefs | |
typedef vbi_export | vbi_export |
Export module instance, an opaque object. More... | |
typedef vbi_export_info | vbi_export_info |
Information about an export module. More... | |
Enumerations | |
enum | vbi_option_type { VBI_OPTION_BOOL = 1, VBI_OPTION_INT, VBI_OPTION_REAL, VBI_OPTION_STRING, VBI_OPTION_MENU } |
Functions | |
vbi_export_info * | vbi_export_info_enum (int index) |
vbi_export_info * | vbi_export_info_keyword (const char *keyword) |
vbi_export_info * | vbi_export_info_export (vbi_export *export) |
vbi_export * | vbi_export_new (const char *keyword, char **errstr) |
void | vbi_export_delete (vbi_export *export) |
vbi_option_info * | vbi_export_option_info_enum (vbi_export *export, int index) |
vbi_option_info * | vbi_export_option_info_keyword (vbi_export *export, const char *keyword) |
vbi_bool | vbi_export_option_set (vbi_export *export, const char *keyword,...) |
vbi_bool | vbi_export_option_get (vbi_export *export, const char *keyword, vbi_option_value *value) |
vbi_bool | vbi_export_option_menu_set (vbi_export *export, const char *keyword, int entry) |
vbi_bool | vbi_export_option_menu_get (vbi_export *export, const char *keyword, int *entry) |
vbi_bool | vbi_export_stdio (vbi_export *export, FILE *fp, vbi_page *pg) |
vbi_bool | vbi_export_file (vbi_export *export, const char *name, vbi_page *pg) |
char * | vbi_export_errstr (vbi_export *export) |
Fortunately you don't have to do it all by yourself. libzvbi provides export modules converting a vbi_page into the desired format or rendering directly into memory.
A minimalistic export example:
static void export_my_page (vbi_page *pg) { vbi_export *ex; char *errstr; if (!(ex = vbi_export_new ("html", &errstr))) { fprintf (stderr, "Cannot export as HTML: %s\n", errstr); free (errstr); return; } if (!vbi_export_file (ex, "my_page.html", pg)) puts (vbi_export_errstr (ex)); vbi_export_delete (ex); }
|
Export module instance, an opaque object.
Allocate with vbi_export_new(). |
|
Information about an export module.
Although export modules can be accessed by a static keyword (see vbi_export_new()) they are by definition opaque. The client can list export modules for the user and manipulate them without knowing about their availability or purpose. To do so, information about the module is necessary, given in this structure. You can obtain this information with vbi_export_info_enum(). |
|
|
Some modules may depend on machine features or the presence of certain libraries, thus the list can vary from session to session.
|
|
|
|
|
|
vbi_export_new ("keyword; quality=75.5, comment=\"example text\"");
|
|
|
|
|
|
|
|
Typical usage of vbi_export_option_set(): vbi_export_option_set (export, "quality", 75.5);
Mind that options of type
|
|
|
|
|
|
|
|
You can call this function as many times as you want, it does not change vbi_export state or the vbi_page.
|
|
You can call this function as many times as you want, it does not change vbi_export state or the vbi_page.
|
|
|