source: libcaca/trunk/doc/canvas.dox @ 4333

Last change on this file since 4333 was 4333, checked in by Sam Hocevar, 10 years ago

Large source code cleanup, getting rid of spaces, tabs, and svn keywords.

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