Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 6d7587e5535e7142017769f96c14d623 > files > 57

libcaca-devel-0.99-0.beta16.5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
    <title>libcaca documentation</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
<!-- $Id$ -->
<!-- Generated by Doxygen 1.5.9 -->
<div class="contents">
<h1><a class="anchor" name="libcaca-canvas">The libcaca canvas format (version 1) </a></h1>All types are big endian.<p>
<div class="fragment"><pre class="fragment"><span class="keyword">struct</span>
{
magic:
   uint8_t caca_header[2];    <span class="comment">// "\xCA\xCA"</span>
   uint8_t caca_file_type[2]; <span class="comment">// "CV"</span>

canvas_header:
   uint32_t control_size;     <span class="comment">// Control size (canvas_data - canvas_header)</span>
   uint32_t data_size;        <span class="comment">// Data size (EOF - canvas_data)</span>

   uint16_t version;          <span class="comment">// Canvas format version</span>
                              <span class="comment">//  bit 0: set to 1 if canvas is compatible</span>
                              <span class="comment">//         with version 1 of the format</span>
                              <span class="comment">//  bits 1-15: unused yet, must be 0</span>

   uint32_t frames;           <span class="comment">// Frame count</span>

   uint16_t flags;            <span class="comment">// Feature flags</span>
                              <span class="comment">//  bits 0-15: unused yet, must be 0</span>

frame_info:
   <span class="keyword">struct</span>
   {
      uint32_t width;         <span class="comment">// Frame width</span>
      uint32_t height;        <span class="comment">// Frame height</span>
      uint32_t duration;      <span class="comment">// Frame duration in milliseconds, 0 to</span>
                              <span class="comment">// not specify a duration</span>
      uint32_t attr;          <span class="comment">// Graphics context attribute</span>
      int32_t cursor_x;       <span class="comment">// Cursor X coordinate</span>
      int32_t cursor_y;       <span class="comment">// Cursor Y coordinate</span>
      int32_t handle_x;       <span class="comment">// Handle X coordinate</span>
      int32_t handle_y;       <span class="comment">// Handle Y coordinate</span>
   }
   frame_list[frames];

control_extension_1:
control_extension_2:
   ...
control_extension_N:
   ...                        <span class="comment">// reserved for future use</span>

canvas_data:
   uint8_t data[data_size];   <span class="comment">// canvas data</span>

data_extension_1:
data_extension_2:
   ...
data_extension_N:
   ...                        <span class="comment">// reserved for future use</span>
};
</pre></div> </div>
<!-- $Id$ -->
  </body>
</html>