Changeset 1357 for libcaca/trunk/cucul/export.c
- Timestamp:
- Nov 12, 2006, 11:42:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/export.c
r1354 r1357 205 205 } 206 206 207 /*208 * The libcaca canvas format, version 1209 * ------------------------------------210 *211 * All types are big endian.212 *213 * struct214 * {215 * magic:216 * uint8_t caca_header[2]; // "\xCA\xCA"217 * uint8_t caca_file_type[2]; // "CV"218 *219 * canvas_header:220 * uint32_t control_size; // Control size (canvas_data - canvas_header)221 * uint32_t data_size; // Data size (EOF - canvas_data)222 *223 * uint16_t version; // Canvas format version224 * // bit 0: set to 1 if canvas is compatible225 * // with version 1 of the format226 * // bits 1-15: unused yet, must be 0227 *228 * uint32_t frames; // Frame count229 *230 * uint16_t flags; // Feature flags231 * // bits 0-15: unused yet, must be 0232 *233 * frame_info:234 * struct235 * {236 * uint32_t width; // Frame width237 * uint32_t height; // Frame height238 * uint32_t duration; // Frame duration in milliseconds, 0 to239 * // not specify a duration240 * uint32_t attr; // Graphics context attribute241 * int32_t cursor_x; // Cursor X coordinate242 * int32_t cursor_y; // Cursor Y coordinate243 * int32_t handle_x; // Handle X coordinate244 * int32_t handle_y; // Handle Y coordinate245 * }246 * frame_list[frames];247 *248 * control_extension_1:249 * control_extension_2:250 * ...251 * control_extension_N:252 * ... // reserved for future use253 *254 * canvas_data:255 * uint8_t data[data_size]; // canvas data256 *257 * data_extension_1:258 * data_extension_2:259 * ...260 * data_extension_N:261 * ... // reserved for future use262 * };263 */264 265 207 /* Generate UTF-8 representation of current canvas. */ 266 208 static void *export_utf8(cucul_canvas_t *cv, unsigned long int *bytes, int cr)
Note: See TracChangeset
for help on using the changeset viewer.