1libcaca-canvas(3caca) libcaca libcaca-canvas(3caca)
2
3
4
6 libcaca-canvas - The libcaca canvas format (version 1)
7
8 All types are big endian.
9
10 struct
11 {
12 magic:
13 uint8_t caca_header[2]; // "\xCA\xCA"
14 uint8_t caca_file_type[2]; // "CV"
15
16 canvas_header:
17 uint32_t control_size; // Control size (canvas_data - canvas_header)
18 uint32_t data_size; // Data size (EOF - canvas_data)
19
20 uint16_t version; // Canvas format version
21 // bit 0: set to 1 if canvas is compatible
22 // with version 1 of the format
23 // bits 1-15: unused yet, must be 0
24
25 uint32_t frames; // Frame count
26
27 uint16_t flags; // Feature flags
28 // bits 0-15: unused yet, must be 0
29
30 frame_info:
31 struct
32 {
33 uint32_t width; // Frame width
34 uint32_t height; // Frame height
35 uint32_t duration; // Frame duration in milliseconds, 0 to
36 // not specify a duration
37 uint32_t attr; // Graphics context attribute
38 int32_t cursor_x; // Cursor X coordinate
39 int32_t cursor_y; // Cursor Y coordinate
40 int32_t handle_x; // Handle X coordinate
41 int32_t handle_y; // Handle Y coordinate
42 }
43 frame_list[frames];
44
45 control_extension_1:
46 control_extension_2:
47 ...
48 control_extension_N:
49 ... // reserved for future use
50
51 canvas_data:
52 uint8_t data[data_size]; // canvas data
53
54 data_extension_1:
55 data_extension_2:
56 ...
57 data_extension_N:
58 ... // reserved for future use
59 };
60
61Version 0.99.beta20 Sun Sep 24 2023 libcaca-canvas(3caca)