Modules | |
Internal export module interface | |
Teletext and Closed Caption page render functions | |
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. | |
typedef vbi_export_info | vbi_export_info |
Information about an export module. | |
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 *) |
vbi_export * | vbi_export_new (const char *keyword, char **errstr) |
void | vbi_export_delete (vbi_export *) |
vbi_option_info * | vbi_export_option_info_enum (vbi_export *, int index) |
vbi_option_info * | vbi_export_option_info_keyword (vbi_export *, const char *keyword) |
vbi_bool | vbi_export_option_set (vbi_export *, const char *keyword,...) |
vbi_bool | vbi_export_option_get (vbi_export *, const char *keyword, vbi_option_value *value) |
vbi_bool | vbi_export_option_menu_set (vbi_export *, const char *keyword, int entry) |
vbi_bool | vbi_export_option_menu_get (vbi_export *, const char *keyword, int *entry) |
ssize_t | vbi_export_mem (vbi_export *e, void *buffer, size_t buffer_size, const vbi_page *pg) _vbi_nonnull((1)) |
void * | vbi_export_alloc (vbi_export *e, void **buffer, size_t *buffer_size, const vbi_page *pg) _vbi_nonnull((1)) |
vbi_bool | vbi_export_stdio (vbi_export *, FILE *fp, vbi_page *pg) |
vbi_bool | vbi_export_file (vbi_export *, const char *name, vbi_page *pg) |
char * | vbi_export_errstr (vbi_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 repeatedly, it does not change the state of the vbi_export or vbi_page structure.
|
|
You can call this function repeatedly, it does not change the state of the vbi_export or vbi_page structure.
|
|
You can call this function repeatedly, it does not change the state of the vbi_export or vbi_page structure.
|
|
You can call this function repeatedly, it does not change the state of the vbi_export or vbi_page structure.
|
|
|