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

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