Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

59 wiersze
1.6 KiB

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