You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

canvas.dox 1.6 KiB

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