caca_importexport(3caca) | libcaca | caca_importexport(3caca) |
caca_importexport - libcaca importers/exporters from/to various
libcaca display functions
__extern ssize_t caca_import_canvas_from_memory
(caca_canvas_t *, void const *, size_t, char const *)
Import a memory buffer into a canvas. __extern ssize_t
caca_import_canvas_from_file (caca_canvas_t *, char const *,
char const *)
Import a file into a canvas. __extern ssize_t
caca_import_area_from_memory (caca_canvas_t *, int, int, void
const *, size_t, char const *)
Import a memory buffer into a canvas area. __extern ssize_t
caca_import_area_from_file (caca_canvas_t *, int, int, char
const *, char const *)
Import a file into a canvas area. __extern char const *const *
caca_get_import_list (void)
Get available import formats. __extern void *
caca_export_canvas_to_memory (caca_canvas_t const *, char
const *, size_t *)
Export a canvas into a foreign format. __extern void *
caca_export_area_to_memory (caca_canvas_t const *, int, int,
int, int, char const *, size_t *)
Export a canvas portion into a foreign format. __extern char const *const *
caca_get_export_list (void)
Get available export formats.
formats
These functions import various file formats into a new canvas, or export the current canvas to various text formats.
Import a memory buffer into the given libcaca canvas's current frame. The current frame is resized accordingly and its contents are replaced with the imported data.
Valid values for format are:
The number of bytes read is returned. If the file format is valid, but not enough data was available, 0 is returned.
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
Referenced by caca_import_area_from_memory(), and caca_import_canvas_from_file().
Import a file into the given libcaca canvas's current frame. The current frame is resized accordingly and its contents are replaced with the imported data.
Valid values for format are:
The number of bytes read is returned. If the file format is valid, but not enough data was available, 0 is returned.
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
References caca_file_close(), caca_file_eof(), caca_file_open(), caca_file_read(), and caca_import_canvas_from_memory().
Referenced by caca_import_area_from_file().
Import a memory buffer into the given libcaca canvas's current frame, at the specified position. For more information, see caca_import_canvas_from_memory().
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
References caca_blit(), caca_create_canvas(), caca_free_canvas(), and caca_import_canvas_from_memory().
Import a file into the given libcaca canvas's current frame, at the specified position. For more information, see caca_import_canvas_from_file().
If an error occurs, -1 is returned and errno is set accordingly:
Parameters
Returns
References caca_blit(), caca_create_canvas(), caca_free_canvas(), and caca_import_canvas_from_file().
Return a list of available import formats. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the import format, to be used with caca_import_canvas(), and a string containing the natural language description for that import format.
This function never fails.
Returns
This function exports a libcaca canvas into various foreign formats such as ANSI art, HTML, IRC colours, etc. The returned pointer should be passed to free() to release the allocated storage when it is no longer needed.
Valid values for format are:
If an error occurs, NULL is returned and errno is set accordingly:
Parameters
Returns
Referenced by caca_export_area_to_memory().
This function exports a portion of a libcaca canvas into various formats. For more information, see caca_export_canvas_to_memory().
If an error occurs, NULL is returned and errno is set accordingly:
Parameters
Returns
References caca_blit(), caca_create_canvas(), caca_export_canvas_to_memory(), and caca_free_canvas().
Return a list of available export formats. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the export format, to be used with caca_export_memory(), and a string containing the natural language description for that export format.
This function never fails.
Returns
Generated automatically by Doxygen for libcaca from the source code.
Tue Jul 12 2022 | Version 0.99.beta20 |