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. |
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
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:
|
|
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
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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
If an error occurs, NULL is returned and errno is set accordingly:
|
|
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:
|
|
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.
|